From b1f2caa3651aeb6db3701a207b228e70f44646c9 Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Mon, 6 Feb 2017 01:06:54 +0100 Subject: add different genimage configs for PC Bios and EFI --- target/config/Config.in.rootfs | 5 +++++ target/x86_64/qemu-x86_64/genimage-efi.cfg | 30 ++++++++++++++++++++++++++++++ target/x86_64/qemu-x86_64/genimage.cfg | 21 ++++++++++----------- 3 files changed, 45 insertions(+), 11 deletions(-) create mode 100644 target/x86_64/qemu-x86_64/genimage-efi.cfg (limited to 'target') diff --git a/target/config/Config.in.rootfs b/target/config/Config.in.rootfs index 28d8f2254..96fb5c1a2 100644 --- a/target/config/Config.in.rootfs +++ b/target/config/Config.in.rootfs @@ -164,3 +164,8 @@ config ADK_TARGET_ROOTFS_GENIMAGE Create a complete disk image for the target with genimage. endchoice + +config ADK_TARGET_GENIMAGE_FILENAME + string + default "genimage-efi.cfg" if ADK_PACKAGE_GRUB_EFI_X86_64 || ADK_PACKAGE_GRUB_EFI_X86 + default "genimage.cfg" diff --git a/target/x86_64/qemu-x86_64/genimage-efi.cfg b/target/x86_64/qemu-x86_64/genimage-efi.cfg new file mode 100644 index 000000000..a59d75e47 --- /dev/null +++ b/target/x86_64/qemu-x86_64/genimage-efi.cfg @@ -0,0 +1,30 @@ +image efi-part.vfat { + vfat { + file EFI { + image = "efi-part/EFI" + } + } + size = 32M +} + +image disk.img { + + hdimage { + } + + partition boot { + partition-type = 0xEF + image = "efi-part.vfat" + } + + partition root { + partition-type = 0x83 + image = "rootfs.ext" + } + + partition cfgfs { + partition-type = 0x88 + image = "cfgfs.img" + } + +} diff --git a/target/x86_64/qemu-x86_64/genimage.cfg b/target/x86_64/qemu-x86_64/genimage.cfg index a59d75e47..0b8992731 100644 --- a/target/x86_64/qemu-x86_64/genimage.cfg +++ b/target/x86_64/qemu-x86_64/genimage.cfg @@ -1,20 +1,19 @@ -image efi-part.vfat { - vfat { - file EFI { - image = "efi-part/EFI" - } - } - size = 32M -} - image disk.img { hdimage { } partition boot { - partition-type = 0xEF - image = "efi-part.vfat" + in-partition-table = "no" + image = "boot.img" + offset = 0 + size = 512 + } + + partition grub { + in-partition-table = "no" + image = "grub.img" + offset = 512 } partition root { -- cgit v1.2.3