From 307fb1889f10d299850137f44ccad09df840fe1e Mon Sep 17 00:00:00 2001 From: Clayton Craft Date: Sun, 5 Mar 2023 22:58:07 -0800 Subject: [PATCH] bootdeploy: use original kernel filename when calling boot-deploy (MR 33) fixes #21 --- internal/bootdeploy/bootdeploy.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/internal/bootdeploy/bootdeploy.go b/internal/bootdeploy/bootdeploy.go index b7d0e4d..a60ec8d 100644 --- a/internal/bootdeploy/bootdeploy.go +++ b/internal/bootdeploy/bootdeploy.go @@ -6,6 +6,7 @@ import ( "log" "os" "os/exec" + "path" "path/filepath" "strings" ) @@ -68,7 +69,8 @@ func bootDeploy(workDir string, outDir string) error { } defer kernFd.Close() - kernFileCopy, err := os.Create(filepath.Join(workDir, "vmlinuz")) + kernFilename := path.Base(kernFile) + kernFileCopy, err := os.Create(filepath.Join(workDir, kernFilename)) if err != nil { return err } @@ -83,7 +85,7 @@ func bootDeploy(workDir string, outDir string) error { // boot-deploy -i initramfs -k vmlinuz-postmarketos-rockchip -d /tmp/cpio -o /tmp/foo initramfs-extra cmd := exec.Command("boot-deploy", "-i", "initramfs", - "-k", "vmlinuz", + "-k", kernFilename, "-d", workDir, "-o", outDir, "initramfs-extra")