Fix problem where kernel.sh wasn't actually building a new kernel.

This commit is contained in:
Albert Hopkins 2011-07-17 22:10:57 +00:00
parent 2c54f3239c
commit 682d0e14aa
2 changed files with 9 additions and 2 deletions

View File

@ -154,8 +154,10 @@ kernel: base_system $(KERNEL_CONFIG) kernel.sh
echo $(TIMEZONE) > "$(CHROOT)"/etc/timezone
ifneq ($(EXTERNAL_KERNEL),YES)
cp $(KERNEL_CONFIG) $(CHROOT)/root/kernel.config
cp kernel.sh $(CHROOT)/tmp/kernel.sh
KERNEL=$(KERNEL) EMERGE="$(EMERGE)" USEPKG="$(USEPKG)" MAKEOPTS="$(MAKEOPTS)" \
$(inroot) /bin/sh < kernel.sh
$(inroot) /bin/sh /tmp/kernel.sh
rm -f $(CHROOT)/tmp/kernel.sh
endif
touch kernel
@ -248,6 +250,9 @@ endif
$(change_password)
ifeq ($(PRUNE_CRITICAL),YES)
$(inroot) $(EMERGE) -C `cat $(CRITICAL)`
ifeq ($(DASH),YES)
$(inroot) $(EMERGE) -C app-shells/bash
endif
endif
software: $(software-deps)
@ -263,7 +268,7 @@ endif
device-map: $(RAW_IMAGE)
echo '(hd0) ' $(RAW_IMAGE) > device-map
image: software device-map grub.shell grub dev.tar.bz2 motd.sh
image: kernel software device-map grub.shell grub dev.tar.bz2 motd.sh
mkdir -p loop
mount -o noatime $(NBD_DEV)p1 loop
mkdir -p gentoo

2
kernel.sh Normal file → Executable file
View File

@ -9,6 +9,7 @@ then
exit
fi
${EMERGE} ${USEPKG} --oneshot --noreplace dev-lang/perl
${EMERGE} ${USEPKG} sys-kernel/${KERNEL}
cp /root/kernel.config /usr/src/linux/.config
gcc-config 1
@ -22,3 +23,4 @@ make ${MAKEOPTS} install
cd /boot
k=`/bin/ls -1 vmlinuz-*`
ln -nsf $k vmlinuz
${EMERGE} --depclean dev-lang/perl