diff options
-rw-r--r-- | mk/build.mk | 6 | ||||
-rw-r--r-- | mk/image.mk | 8 | ||||
-rw-r--r-- | package/grub/Makefile | 19 | ||||
-rw-r--r-- | package/grub/files/grub-efi-dual-serial.cfg (renamed from package/grub/files/grub-dual.cfg) | 8 | ||||
-rw-r--r-- | package/grub/files/grub-efi-serial.cfg (renamed from package/grub/files/grub.cfg) | 0 | ||||
-rw-r--r-- | package/grub/files/grub-pc-serial.cfg | 14 | ||||
-rw-r--r-- | package/grub/files/grub-pc-vga.cfg | 2 | ||||
-rw-r--r-- | target/x86_64/qemu-x86_64/genimage-dual.cfg | 1 | ||||
-rw-r--r-- | target/x86_64/qemu-x86_64/genimage-efi-dual.cfg | 8 |
9 files changed, 48 insertions, 18 deletions
diff --git a/mk/build.mk b/mk/build.mk index aae4ffeca..89c7303bf 100644 --- a/mk/build.mk +++ b/mk/build.mk @@ -101,6 +101,12 @@ POSTCONFIG= -@\ rebuild=1;\ fi; \ done; \ + for i in ADK_TARGET_DUAL_BOOT ADK_TARGET_QEMU_WITH_GRAPHIC;do \ + if [ "$$(grep ^$$i .config|md5sum)" != "$$(grep ^$$i .config.old|md5sum)" ];then \ + touch .rebuild.grub;\ + rebuild=1;\ + fi; \ + done; \ for i in ADK_TARGET_GPU_MEM ADK_LINUX_KERNEL_SND_BCM2708;do \ if [ "$$(grep ^$$i .config|md5sum)" != "$$(grep ^$$i .config.old|md5sum)" ];then \ touch .rebuild.bcm28xx-bootloader;\ diff --git a/mk/image.mk b/mk/image.mk index 364b80db3..8459c5f90 100644 --- a/mk/image.mk +++ b/mk/image.mk @@ -347,7 +347,7 @@ ${FW_DIR}/${GENIMAGE}: ${TARGET_DIR} kernel-package mkdir -p $(TARGET_DIR)/boot/extlinux $(CP) $(EXTLINUX) $(TARGET_DIR)/boot/extlinux $(CP) $(FW_DIR)/kernel $(TARGET_DIR)/boot - -$(CP) $(FW_DIR)/*.dtb $(TARGET_DIR)/boot + -$(CP) $(FW_DIR)/*.dtb $(TARGET_DIR)/boot 2>/dev/null ifeq ($(ADK_RUNTIME_FIX_PERMISSION),y) echo '#!/bin/sh' > $(ADK_TOPDIR)/scripts/fakeroot.sh echo "chown -R 0:0 $(TARGET_DIR)" >> $(ADK_TOPDIR)/scripts/fakeroot.sh @@ -359,7 +359,7 @@ ifeq ($(ADK_RUNTIME_FIX_PERMISSION),y) endif ifeq ($(ADK_TARGET_DUAL_BOOT),y) $(CP) $(FW_DIR)/kernel $(TARGET_DIR) - -$(CP) $(FW_DIR)/*.dtb $(TARGET_DIR) + -$(CP) $(FW_DIR)/*.dtb $(TARGET_DIR) 2>/dev/null mkdir $(TARGET_DIR)/extlinux $(CP) $(EXTLINUX) $(TARGET_DIR)/extlinux $(SED) "s#root=.*#root=/dev/$(ADK_TARGET_ROOTDEV)p1#" $(TARGET_DIR)/extlinux/extlinux.conf @@ -393,10 +393,10 @@ endif ifeq ($(ADK_TARGET_DUAL_BOOT),y) (cd ${TARGET_DIR}; find . | sed -n '/^\.\//s///p' | sort | \ PATH='${HOST_PATH}' $(CPIO) -o --quiet -Hustar --owner=0:0 | \ - ${GZIP} -c > ${FW_DIR}/openadk.tar.gz) + gzip -c > ${FW_DIR}/openadk.tar.gz) (cd ${FW_DIR}; PATH='${HOST_PATH}' sha256sum openadk.tar.gz \ | cut -d\ -f1 > sha256.txt) - (cd ${FW_DIR}; PATH='${HOST_PATH}' tar -cf ${ADK_TARGET_SYSTEM}-update.tar openadk.tar.gzip sha256.txt) + (cd ${FW_DIR}; PATH='${HOST_PATH}' tar -cf ${ADK_TARGET_SYSTEM}-update.tar openadk.tar.gz sha256.txt) @rm -rf ${FW_DIR}/temp endif ifeq ($(ADK_PACKAGE_GRUB_EFI_X86)$(ADK_PACKAGE_GRUB_EFI_X86_64),y) diff --git a/package/grub/Makefile b/package/grub/Makefile index d37472b8c..3d7f8d868 100644 --- a/package/grub/Makefile +++ b/package/grub/Makefile @@ -66,6 +66,11 @@ GRUB_PREFIX= (hd0,msdos1)/boot/grub GRUB_TARGET= i386 GRUB_PLATFORM= pc GRUB_MODULES= boot linux ext2 fat part_msdos part_gpt normal biosdisk +ifeq ($(ADK_TARGET_QEMU_WITH_GRAPHIC),y) +GRUB_CFG= grub-pc-vga.cfg +else +GRUB_CFG= grub-pc-serial.cfg +endif endif ifeq ($(ADK_PACKAGE_GRUB_EFI_X86),y) @@ -77,6 +82,11 @@ GRUB_PREFIX= /EFI/BOOT GRUB_TARGET= i386 GRUB_PLATFORM= efi GRUB_MODULES= boot linux ext2 fat part_msdos part_gpt normal efi_gop +ifeq ($(ADK_TARGET_DUAL_BOOT),y) +GRUB_CFG= grub-efi-serial-dual.cfg +else +GRUB_CFG= grub-efi-serial.cfg +endif endif ifeq ($(ADK_PACKAGE_GRUB_EFI_X86_64),y) @@ -88,15 +98,10 @@ GRUB_PREFIX= /EFI/BOOT GRUB_TARGET= x86_64 GRUB_PLATFORM= efi GRUB_MODULES= boot linux ext2 fat part_msdos part_gpt normal efi_gop -endif - ifeq ($(ADK_TARGET_DUAL_BOOT),y) -GRUB_CFG= grub-dual.cfg -else -ifeq ($(ADK_TARGET_QEMU_WITH_GRAPHIC),y) -GRUB_CFG= grub-pc-vga.cfg +GRUB_CFG= grub-efi-dual-serial.cfg else -GRUB_CFG= grub.cfg +GRUB_CFG= grub-efi-serial.cfg endif endif diff --git a/package/grub/files/grub-dual.cfg b/package/grub/files/grub-efi-dual-serial.cfg index 46b5451ad..fde844e09 100644 --- a/package/grub/files/grub-dual.cfg +++ b/package/grub/files/grub-efi-dual-serial.cfg @@ -1,13 +1,17 @@ +serial --speed=115200 --unit=0 --word=8 --parity=no --stop=1 +terminal_input serial +terminal_output serial + if [ "x\${timeout}" != "x-1" ]; then if keystatus; then if keystatus --shift; then set timeout=-1 else - set timeout=0 + set timeout=2 fi else if sleep --interruptible 2; then - set timeout=0 + set timeout=2 fi fi fi diff --git a/package/grub/files/grub.cfg b/package/grub/files/grub-efi-serial.cfg index 3fdc48eda..3fdc48eda 100644 --- a/package/grub/files/grub.cfg +++ b/package/grub/files/grub-efi-serial.cfg diff --git a/package/grub/files/grub-pc-serial.cfg b/package/grub/files/grub-pc-serial.cfg new file mode 100644 index 000000000..4b6a0616c --- /dev/null +++ b/package/grub/files/grub-pc-serial.cfg @@ -0,0 +1,14 @@ +serial --speed=115200 --unit=0 --word=8 --parity=no --stop=1 +terminal_input serial +terminal_output serial + +set default=0 +set timeout=3 + +menuentry "OpenADK" { + insmod msdospart + insmod ext2 + set root='hd0,1' + echo "Loading OpenADK" + linux /boot/kernel root=/dev/sda1 rootfstype=ext4 rootwait panic=10 +} diff --git a/package/grub/files/grub-pc-vga.cfg b/package/grub/files/grub-pc-vga.cfg index b0259ddb3..72af5abce 100644 --- a/package/grub/files/grub-pc-vga.cfg +++ b/package/grub/files/grub-pc-vga.cfg @@ -6,5 +6,5 @@ menuentry "OpenADK" { insmod ext2 set root='hd0,1' echo "Loading OpenADK" - linux /boot/kernel root=/dev/sda1 rootfstype=ext4 rootwait panic=10 + linux /boot/kernel console=tty0 root=/dev/sda1 rootfstype=ext4 rootwait panic=10 } diff --git a/target/x86_64/qemu-x86_64/genimage-dual.cfg b/target/x86_64/qemu-x86_64/genimage-dual.cfg index 647a2bcb5..c9b73170d 100644 --- a/target/x86_64/qemu-x86_64/genimage-dual.cfg +++ b/target/x86_64/qemu-x86_64/genimage-dual.cfg @@ -8,6 +8,7 @@ image disk.img { image = "boot.img" offset = 0 size = 512 + holes = {"(440; 512)"} } partition grub { diff --git a/target/x86_64/qemu-x86_64/genimage-efi-dual.cfg b/target/x86_64/qemu-x86_64/genimage-efi-dual.cfg index ff3cb08d2..247511d57 100644 --- a/target/x86_64/qemu-x86_64/genimage-efi-dual.cfg +++ b/target/x86_64/qemu-x86_64/genimage-efi-dual.cfg @@ -22,14 +22,14 @@ image disk.img { partition root1 { partition-type-uuid = 44479540-f297-41b2-9af7-d131d5f0458a - image = "rootfs.ext" - size = 128M + image = "rootfs1.ext" + size = 64M } partition root2 { partition-type-uuid = 44479540-f297-41b2-9af7-d131d5f0458a - image = "rootfs.ext" - size = 128M + image = "rootfs2.ext" + size = 64M } partition cfgfs { |