bootdeploy: use original kernel filename when calling boot-deploy (MR 33)

fixes #21
This commit is contained in:
Clayton Craft
2023-03-05 22:58:07 -08:00
parent fa3d3268d7
commit 307fb1889f

View File

@@ -6,6 +6,7 @@ import (
"log" "log"
"os" "os"
"os/exec" "os/exec"
"path"
"path/filepath" "path/filepath"
"strings" "strings"
) )
@@ -68,7 +69,8 @@ func bootDeploy(workDir string, outDir string) error {
} }
defer kernFd.Close() 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 { if err != nil {
return err 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 // boot-deploy -i initramfs -k vmlinuz-postmarketos-rockchip -d /tmp/cpio -o /tmp/foo initramfs-extra
cmd := exec.Command("boot-deploy", cmd := exec.Command("boot-deploy",
"-i", "initramfs", "-i", "initramfs",
"-k", "vmlinuz", "-k", kernFilename,
"-d", workDir, "-d", workDir,
"-o", outDir, "-o", outDir,
"initramfs-extra") "initramfs-extra")