comparison more/migrate-kernel.sh @ 1157:300e6d919d86

Move "sources/more/" to just "more/", add a README explaining why those scripts are there, and adjust calls to them.
author Rob Landley <rob@landley.net>
date Mon, 05 Jul 2010 15:37:04 -0500
parents sources/more/migrate-kernel.sh@f44ca6ebdab7
children a1dc80180a05
comparison
equal deleted inserted replaced
1156:8ab750338f73 1157:300e6d919d86
1 #!/bin/bash
2
3 # Calculate new config for UNSTABLE kernel based on stable kernel config.
4 # I.E. calculate miniconfig-alt-linux based on miniconfig-linux for a target.
5
6 # Expand miniconfig with the old kernel, copy .config to new kernel, run
7 # make oldconfig, compress to miniconfig, copy to sources/targets/$TARGET
8
9 . sources/include.sh
10
11 read_arch_dir "$1"
12 rmdir "$STAGE_DIR"
13
14 [ -z "$BOOT_KARCH" ] && BOOT_KARCH="$KARCH"
15
16 # Expand config against current kernel
17
18 USE_UNSTABLE=
19
20 setupfor linux
21
22 cp "$(getconfig linux)" mini.conf || dienow
23 [ "$SYSIMAGE_TYPE" == "initramfs" ] &&
24 (echo "CONFIG_BLK_DEV_INITRD=y" >> mini.conf || dienow)
25 make ARCH="$BOOT_KARCH" KCONFIG_ALLCONFIG=mini.conf $LINUX_FLAGS \
26 allnoconfig > /dev/null &&
27 cp .config "$WORK"
28
29 cleanup
30
31 USE_UNSTABLE=linux
32
33 setupfor linux
34
35 cp "$WORK/.config" . &&
36 yes "" | make ARCH="$BOOT_KARCH" oldconfig &&
37 mv .config walrus &&
38 ARCH="${BOOT_KARCH}" "$SOURCES/toys/miniconfig.sh" walrus || dienow
39
40 CFG="$CONFIG_DIR/$ARCH_NAME/miniconfig-alt-linux"
41 if [ -e "$CFG" ] && ! cmp mini.config "$CFG"
42 then
43 mv "$CFG" "${CFG}.bak" || dienow
44 fi
45 mv mini.config "$CFG"
46
47 cleanup