Browse Source

try to use new grub2

Waldemar Brodkorb 10 years ago
parent
commit
cbce24b803
4 changed files with 9 additions and 3 deletions
  1. 3 1
      package/grub/Makefile
  2. BIN
      package/grub/files/core.img.i386-pc
  3. 2 2
      scripts/create.sh
  4. 4 0
      target/x86/Makefile

+ 3 - 1
package/grub/Makefile

@@ -5,7 +5,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=		grub
 PKG_VERSION:=		2.00
-PKG_RELEASE:=		1
+PKG_RELEASE:=		2
 PKG_MD5SUM:=		e927540b6eda8b024fb0391eeaa4091c
 PKG_DESCR:=		GRUB2 bootloader (source package)
 PKG_SECTION:=		boot
@@ -50,5 +50,7 @@ grub-install:
 		$(IDIR_GRUB)/usr/lib/grub/${GRUB_ARCH}/
 	${INSTALL_BIN} ${WRKINST}/usr/bin/* $(IDIR_GRUB)/usr/bin
 	${INSTALL_BIN} ${WRKINST}/usr/sbin/* $(IDIR_GRUB)/usr/sbin
+	${CP} ./files/core.img.${GRUB_ARCH} \
+		$(IDIR_GRUB)/usr/lib/grub/core.img
 
 include ${TOPDIR}/mk/pkg-bottom.mk

BIN
package/grub/files/core.img.i386-pc


+ 2 - 2
scripts/create.sh

@@ -152,7 +152,7 @@ else
 fi
 
 if (( usegrub )); then
-	tar -xOzf "$src" usr/share/grub-bin/core.img >"$T/core.img"
+	tar -xOzf "$src" usr/lib/grub/core.img >"$T/core.img"
 	integer coreimgsz=$($statcmd "$T/core.img")
 	if (( coreimgsz < 1024 )); then
 		print -u2 core.img is probably too small: $coreimgsz
@@ -275,7 +275,7 @@ if (( usegrub )); then
 	) >boot/grub/grub.cfg
 	set -A grubfiles
 	ngrubfiles=0
-	for a in usr/lib/grub/*-pc/{*.mod,efiemu??.o,command.lst,moddep.lst,fs.lst,handler.lst,parttool.lst}; do
+	for a in usr/lib/grub/*-pc/{*.mod,*.lst}; do
 		[[ -e $a ]] && grubfiles[ngrubfiles++]=$a
 	done
 	cp "${grubfiles[@]}" boot/grub/

+ 4 - 0
target/x86/Makefile

@@ -38,8 +38,12 @@ ifeq ($(ADK_HARDWARE_QEMU),y)
 	@echo "Use following command to create a QEMU Image:"
 	@echo "$(CREATE) qemu-${CPU_ARCH}.img $(FW_DIR)/$(ROOTFSTARBALL)"
 	@echo "Start qemu with following command line:"
+ifeq ($(ADK_TARGET_QEMU_WITH_BOOTLOADER),y)
+	@echo 'qemu-system-i386 ${ADK_QEMU_ARGS} -net user -net nic,model=e1000 qemu-${CPU_ARCH}.img'
+else
 	@echo 'qemu-system-i386 ${ADK_QEMU_ARGS} -net user -net nic,model=e1000 -kernel $(FW_DIR)/$(TARGET_KERNEL) qemu-${CPU_ARCH}.img'
 endif
+endif
 ifeq ($(ADK_HARDWARE_VBOX),y)
 	@cp $(KERNEL) $(FW_DIR)/$(TARGET_KERNEL)
 	@echo "Use following command to create a VirtualBox Image:"