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 echo $(TIMEZONE) > "$(CHROOT)"/etc/timezone
ifneq ($(EXTERNAL_KERNEL),YES) ifneq ($(EXTERNAL_KERNEL),YES)
cp $(KERNEL_CONFIG) $(CHROOT)/root/kernel.config cp $(KERNEL_CONFIG) $(CHROOT)/root/kernel.config
cp kernel.sh $(CHROOT)/tmp/kernel.sh
KERNEL=$(KERNEL) EMERGE="$(EMERGE)" USEPKG="$(USEPKG)" MAKEOPTS="$(MAKEOPTS)" \ 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 endif
touch kernel touch kernel
@ -248,6 +250,9 @@ endif
$(change_password) $(change_password)
ifeq ($(PRUNE_CRITICAL),YES) ifeq ($(PRUNE_CRITICAL),YES)
$(inroot) $(EMERGE) -C `cat $(CRITICAL)` $(inroot) $(EMERGE) -C `cat $(CRITICAL)`
ifeq ($(DASH),YES)
$(inroot) $(EMERGE) -C app-shells/bash
endif
endif endif
software: $(software-deps) software: $(software-deps)
@ -263,7 +268,7 @@ endif
device-map: $(RAW_IMAGE) device-map: $(RAW_IMAGE)
echo '(hd0) ' $(RAW_IMAGE) > device-map 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 mkdir -p loop
mount -o noatime $(NBD_DEV)p1 loop mount -o noatime $(NBD_DEV)p1 loop
mkdir -p gentoo mkdir -p gentoo

2
kernel.sh Normal file → Executable file
View File

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