From dfcc80ab6308fbdc00cc0200b6234e11e68be907 Mon Sep 17 00:00:00 2001 From: Marc Andre Tanner Date: Fri, 27 Nov 2009 22:43:54 +0100 Subject: [PATCH] kernel: build initramfs Signed-off-by: Marc Andre Tanner --- initramfs.sh | 17 +++-------------- sources/sections/kernel.sh | 10 ++++++++-- 2 files changed, 11 insertions(+), 16 deletions(-) diff --git a/initramfs.sh b/initramfs.sh index 1b91752..c4a20e1 100755 --- a/initramfs.sh +++ b/initramfs.sh @@ -25,17 +25,6 @@ fi $SCRIPTS/gen_initramfs_list.sh -u squash -g squash $ROOT_DIR > \ initramfs-files -# Add some more device nodes - -echo "nod /dev/tty 644 0 0 c 5 0" >> initramfs-files -echo "nod /dev/tty0 644 0 0 c 4 0" >> initramfs-files -echo "nod /dev/tty1 644 0 0 c 4 1" >> initramfs-files -echo "nod /dev/tty2 644 0 0 c 4 2" >> initramfs-files -echo "nod /dev/ttyGS0 644 0 0 c 253 0" >> initramfs-files -echo "nod /dev/ttySAC2 644 0 0 c 204 66" >> initramfs-files -echo "nod /dev/console 622 0 0 c 5 1" >> initramfs-files -echo "nod /dev/null 622 0 0 c 1 3" >> initramfs-files -echo "nod /dev/fb0 644 0 0 c 29 0" >> initramfs-files - -echo "Specify initramfs-files during kernel compilation as CONFIG_INITRAMFS_SOURCE" -echo "or run ./package.sh to create rootfs.tar.gz tarball for a chroot environment." +echo "Now run './build.sh kernel' which will build a kernel with initramfs-files as" +echo "CONFIG_INITRAMFS_SOURCE or run ./package.sh to create a rootfs.tar.gz tarball" +echo "that you can extract on a SD card." diff --git a/sources/sections/kernel.sh b/sources/sections/kernel.sh index dcb041e..625a3bd 100644 --- a/sources/sections/kernel.sh +++ b/sources/sections/kernel.sh @@ -8,9 +8,15 @@ VERSION=$(echo $SRCDIR/kernel-* | sed 's .*/ ' | sed -r 's/kernel-(.*)\.tar.*/\ # kernel load address / entry point START=30008000 -make allnoconfig ARCH="${KARCH}" KCONFIG_ALLCONFIG="$CONFIG_DIR/miniconfig-linux" && +cp "$CONFIG_DIR/miniconfig-linux" config -cp .config "$CONFIG_DIR/config-linux" && +if [ `grep CONFIG_BLK_DEV_INITRD=y config` ]; then + echo CONFIG_INITRAMFS_SOURCE=\"$TOP/initramfs-files\" >> config +fi + +make allnoconfig ARCH="${KARCH}" KCONFIG_ALLCONFIG="config" || dienow + +cp .config "$CONFIG_DIR/config-linux" make -j $CPUS ARCH="$KARCH" CROSS_COMPILE="$CROSS" CONFIG_DEBUG_SECTION_MISMATCH=y $VERBOSITY || dienow -- 2.11.4.GIT