diff options
author | Waldemar Brodkorb <wbx@uclibc-ng.org> | 2016-09-12 23:22:14 +0200 |
---|---|---|
committer | Waldemar Brodkorb <wbx@uclibc-ng.org> | 2016-09-12 23:22:29 +0200 |
commit | d284ab4d037ed69c0368ab45f79917465187dfc8 (patch) | |
tree | 4ad8608b4af65507a4f252b282334d98387bb637 | |
parent | 284b7b24de6d8f957c6aba9d2010bed9eda98efe (diff) |
qemu: efi boot works, need to add a package for EFI bios file
-rw-r--r-- | mk/vars.mk | 2 | ||||
-rw-r--r-- | package/grub/files/grub.cfg | 12 | ||||
-rw-r--r-- | target/x86_64/Makefile | 11 | ||||
-rw-r--r-- | target/x86_64/qemu-x86_64/genimage.cfg | 15 |
4 files changed, 28 insertions, 12 deletions
diff --git a/mk/vars.mk b/mk/vars.mk index 3f09ad7a3..b0b34a469 100644 --- a/mk/vars.mk +++ b/mk/vars.mk @@ -62,7 +62,7 @@ SCRIPT_TARGET_DIR:= ${STAGING_TARGET_DIR}/scripts # PATH variables TARGET_PATH= ${SCRIPT_DIR}:${STAGING_TARGET_DIR}/scripts:${TOOLCHAIN_DIR}/usr/bin:${STAGING_HOST_DIR}/usr/bin:${_PATH} -HOST_PATH= ${SCRIPT_DIR}:${TOOLCHAIN_DIR}/usr/bin:${STAGING_HOST_DIR}/usr/bin:${_PATH} +HOST_PATH= ${SCRIPT_DIR}:${TOOLCHAIN_DIR}/usr/bin:${STAGING_HOST_DIR}/usr/bin:${STAGING_HOST_DIR}/usr/sbin:${_PATH} AUTOTOOL_PATH= ${TOOLCHAIN_DIR}/usr/bin:${STAGING_HOST_DIR}/usr/bin:${STAGING_TARGET_DIR}/scripts:${_PATH} ifeq ($(ADK_DISABLE_HONOUR_CFLAGS),) diff --git a/package/grub/files/grub.cfg b/package/grub/files/grub.cfg index 2e415af5f..66ce6e0a0 100644 --- a/package/grub/files/grub.cfg +++ b/package/grub/files/grub.cfg @@ -1,15 +1,7 @@ set default=0 set timeout=3 -insmod efi_gop -insmod efi_uga -menuentry "ODOS 1" { - echo "Loading ODOS from first partition" +menuentry "OpenADK" { set root=(hd0,2) - linux (hd0,2)/boot/kernel root=/dev/mmcblk1p2 rootfstype=ext4 rootwait panic=10 -} -menuentry "ODOS 2" { - echo "Loading ODOS from second partition" - set root=(hd0,3) - linux (hd0,3)/boot/kernel root=/dev/mmcblk1p3 rootfstype=ext4 rootwait panic=10 + linux (hd0,2)/boot/kernel root=/dev/sda2 rootfstype=ext4 rootwait panic=10 } diff --git a/target/x86_64/Makefile b/target/x86_64/Makefile index cd6530c91..dfaaa1e43 100644 --- a/target/x86_64/Makefile +++ b/target/x86_64/Makefile @@ -9,6 +9,7 @@ KERNEL:=$(LINUX_DIR)/arch/x86/boot/bzImage QEMU_ARCH:=x86_64 QEMU_ARGS:=-M pc +QEMU_ARGS+=-L . -bios bios.bin QEMU_ARGS+=${ADK_QEMU_ARGS} QEMU_ARGS+=-net user -net nic,model=e1000 @@ -84,6 +85,16 @@ ifeq ($(ADK_TARGET_FS),iso) targethelp: @echo 'ISO image is at $<' endif +ifeq ($(ADK_TARGET_FS),genimage) +targethelp: + @echo "The disk image is: $(FW_DIR)/disk.img" + @echo "Use following command to install it on SD card:" +ifeq ($(ADK_TARGET_QEMU),y) + @echo 'qemu-system-${QEMU_ARCH} ${QEMU_ARGS} $(FW_DIR)/disk.img' +else + @echo 'sudo dd if=$(FW_DIR)/disk.img of=/dev/sdX bs=2048k' +endif +endif # image creation and kernel install kernel-strip: diff --git a/target/x86_64/qemu-x86_64/genimage.cfg b/target/x86_64/qemu-x86_64/genimage.cfg index 9f2d3ec72..5a5479fbd 100644 --- a/target/x86_64/qemu-x86_64/genimage.cfg +++ b/target/x86_64/qemu-x86_64/genimage.cfg @@ -1,12 +1,25 @@ +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" } } - |