Mercurial > hg > aboriginal
view more/migrate-kernel.sh @ 1252:ba951c11fb48
Refactor the gentoo bootstrap build some more. Add "build" and "files" subdirectories, split each package build into a separate file, break out reusable shell functions into functions.sh. Flow control now init chrooting into run-build-stages.sh calling the individual package scripts.
author | Rob Landley <rob@landley.net> |
---|---|
date | Sat, 25 Sep 2010 13:40:04 -0500 |
parents | 300e6d919d86 |
children | a1dc80180a05 |
line wrap: on
line source
#!/bin/bash # Calculate new config for UNSTABLE kernel based on stable kernel config. # I.E. calculate miniconfig-alt-linux based on miniconfig-linux for a target. # Expand miniconfig with the old kernel, copy .config to new kernel, run # make oldconfig, compress to miniconfig, copy to sources/targets/$TARGET . sources/include.sh read_arch_dir "$1" rmdir "$STAGE_DIR" [ -z "$BOOT_KARCH" ] && BOOT_KARCH="$KARCH" # Expand config against current kernel USE_UNSTABLE= setupfor linux 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 && cp .config "$WORK" cleanup USE_UNSTABLE=linux setupfor linux cp "$WORK/.config" . && yes "" | make ARCH="$BOOT_KARCH" oldconfig && mv .config walrus && ARCH="${BOOT_KARCH}" "$SOURCES/toys/miniconfig.sh" walrus || dienow CFG="$CONFIG_DIR/$ARCH_NAME/miniconfig-alt-linux" if [ -e "$CFG" ] && ! cmp mini.config "$CFG" then mv "$CFG" "${CFG}.bak" || dienow fi mv mini.config "$CFG" cleanup