Change to use kernel not bzImage everywhere

Previously we hardcoded `bzImage` which is not used for all
use cases or architectures.

fix #1630

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
This commit is contained in:
Justin Cormack
2017-04-27 16:00:28 +01:00
parent 95613b9d93
commit 6155e8c8bc
12 changed files with 36 additions and 36 deletions

View File

@@ -101,7 +101,7 @@ func runHyperKit(args []string) {
log.Fatalln("Error creating hyperkit: ", err)
}
h.Kernel = prefix + "-bzImage"
h.Kernel = prefix + "-kernel"
h.Initrd = prefix + "-initrd.img"
h.VPNKitKey = vpnKitKey
h.UUID = vmUUID

View File

@@ -66,7 +66,7 @@ func runPacket(args []string) {
url := getStringValue(packetBaseURL, *baseURLFlag, "")
if url == "" {
log.Fatal("Need to specify a value for --base-url where the images are hosted. This URL should contain <url>/%s-bzImage and <url>/%s-initrd.img")
log.Fatal("Need to specify a value for --base-url where the images are hosted. This URL should contain <url>/%s-kernel and <url>/%s-initrd.img")
}
facility := getStringValue(packetZoneVar, *zoneFlag, "")
plan := getStringValue(packetMachineVar, *machineFlag, defaultMachine)
@@ -82,10 +82,10 @@ func runPacket(args []string) {
name := getStringValue(packetNameVar, *nameFlag, prefix)
osType := "custom_ipxe"
billing := "hourly"
userData := fmt.Sprintf("#!ipxe\n\ndhcp\nset base-url %s\nset kernel-params ip=dhcp nomodeset ro serial console=ttyS1,115200\nkernel ${base-url}/%s-bzImage ${kernel-params}\ninitrd ${base-url}/%s-initrd.img\nboot", url, name, name)
userData := fmt.Sprintf("#!ipxe\n\ndhcp\nset base-url %s\nset kernel-params ip=dhcp nomodeset ro serial console=ttyS1,115200\nkernel ${base-url}/%s-kernel ${kernel-params}\ninitrd ${base-url}/%s-initrd.img\nboot", url, name, name)
log.Debugf("Using userData of:\n%s\n", userData)
initrdURL := fmt.Sprintf("%s/%s-initrd.img", url, name)
kernelURL := fmt.Sprintf("%s/%s-bzImage", url, name)
kernelURL := fmt.Sprintf("%s/%s-kernel", url, name)
ValidateHTTPURL(kernelURL)
ValidateHTTPURL(initrdURL)
client := packngo.NewClient("", apiKey, nil)

View File

@@ -48,7 +48,7 @@ func runQemu(args []string) {
qemuGUI := qemuFlags.Bool("gui", false, "Set qemu to use video output instead of stdio")
qemuUEFI := qemuFlags.Bool("uefi", false, "Set UEFI boot from 'prefix'-efi.iso")
qemuIso := qemuFlags.Bool("iso", false, "Set Legacy BIOS boot from 'prefix'.iso")
qemuKernel := qemuFlags.Bool("kernel", true, "Set boot using 'prefix'-bzImage/-initrd/-cmdline")
qemuKernel := qemuFlags.Bool("kernel", true, "Set boot using 'prefix'-kernel/-initrd/-cmdline")
// Paths and settings for Disks and UEFI firware
qemuDiskPath := qemuFlags.String("diskpath", "", "Path to disk image to use")
@@ -256,9 +256,9 @@ func buildQemuCmdline(config QemuConfig) (QemuConfig, []string) {
qemuArgs = append(qemuArgs, "-boot", "d")
}
// build kernel boot config from bzImage/initrd/cmdline
// build kernel boot config from kernel/initrd/cmdline
if config.Kernel {
qemuKernelPath := buildPath(config.Prefix, "-bzImage")
qemuKernelPath := buildPath(config.Prefix, "-kernel")
qemuInitrdPath := buildPath(config.Prefix, "-initrd.img")
qemuArgs = append(qemuArgs, "-kernel", qemuKernelPath)
qemuArgs = append(qemuArgs, "-initrd", qemuInitrdPath)