Mercurial > hg > aboriginal
changeset 1065:1d776e44b908
Save the uClibc and linux .config files in the native toolchain, and install them with the rest of the native toolchain. Don't bother extracting and configuring the kernel if we don't need to.
author | Rob Landley <rob@landley.net> |
---|---|
date | Wed, 05 May 2010 22:27:14 -0500 |
parents | ff8818e846b4 |
children | 21ec839a416f |
files | sources/sections/linux-headers.sh sources/sections/uClibc.build system-image.sh |
diffstat | 3 files changed, 14 insertions(+), 18 deletions(-) [+] |
line wrap: on
line diff
--- a/sources/sections/linux-headers.sh Wed May 05 22:15:58 2010 -0500 +++ b/sources/sections/linux-headers.sh Wed May 05 22:27:14 2010 -0500 @@ -13,7 +13,8 @@ [ -e mini.conf ] && make ARCH=${BOOT_KARCH:-$KARCH} KCONFIG_ALLCONFIG=mini.conf $LINUX_FLAGS \ allnoconfig >/dev/null && -cp .config "$STAGE_DIR/config-linux" +mkdir -p "$STAGE_DIR/src" && +cp .config "$STAGE_DIR/src/config-linux" # Install Linux kernel headers (for use by uClibc).
--- a/sources/sections/uClibc.build Wed May 05 22:15:58 2010 -0500 +++ b/sources/sections/uClibc.build Wed May 05 22:27:14 2010 -0500 @@ -22,7 +22,8 @@ # Build and install make KCONFIG_ALLCONFIG="$WORK/mini.conf" allnoconfig && -cp .config "$STAGE_DIR/config-uClibc" && +mkdir -p "$STAGE_DIR/src" && +cp .config "$STAGE_DIR/src/config-uClibc" && make_uClibc install || dienow # Do we need host or target versions of ldd and such?
--- a/system-image.sh Wed May 05 22:15:58 2010 -0500 +++ b/system-image.sh Wed May 05 22:27:14 2010 -0500 @@ -44,24 +44,18 @@ # Build a linux kernel for the target -setupfor linux -[ -z "$BOOT_KARCH" ] && BOOT_KARCH=$KARCH -cp "$(getconfig linux)" mini.conf || dienow -[ "$SYSIMAGE_TYPE" == "initramfs" ] && - (echo "CONFIG_BLK_DEV_INITRD=y" >> mini.conf || dienow) -make ARCH=$BOOT_KARCH KCONFIG_ALLCONFIG=mini.conf $LINUX_FLAGS \ - allnoconfig >/dev/null || dienow - -# This is a layering violation: we're adding stuff to the native root -# filesystem. But we want the kernel .config to be saved in the system -# image's filesystem. (TODO: Find a better way to do this.) - -[ -d "$STAGE_DIR/usr/src" ] && cp .config "$NATIVE_ROOT/usr/src/config-linux" - -# Build kernel in parallel with initramfs - if [ "$SYSIMAGE_TYPE" == initramfs ] || [ ! -e "$STAGE_DIR/zImage-$ARCH" ] then + setupfor linux + [ -z "$BOOT_KARCH" ] && BOOT_KARCH=$KARCH + cp "$(getconfig linux)" mini.conf || dienow + [ "$SYSIMAGE_TYPE" == "initramfs" ] && + (echo "CONFIG_BLK_DEV_INITRD=y" >> mini.conf || dienow) + make ARCH=$BOOT_KARCH KCONFIG_ALLCONFIG=mini.conf $LINUX_FLAGS \ + allnoconfig >/dev/null || dienow + + # Build kernel in parallel with initramfs + echo "make -j $CPUS ARCH=$BOOT_KARCH $DO_CROSS $LINUX_FLAGS $VERBOSITY" && maybe_fork "make -j $CPUS ARCH=$BOOT_KARCH $DO_CROSS $LINUX_FLAGS $VERBOSITY || dienow" fi