annotate more/migrate-kernel.sh @ 1265:918501f802d1

Update squashfs and kernel to current versions.
author Rob Landley <rob@landley.net>
date Thu, 21 Oct 2010 19:09:51 -0500
parents 300e6d919d86
children a1dc80180a05
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
930
61aa2ac67660 Script to caclulate unstable linux miniconfig from stable linux miniconfig, using make oldconfig.
Rob Landley <rob@landley.net>
parents:
diff changeset
1 #!/bin/bash
61aa2ac67660 Script to caclulate unstable linux miniconfig from stable linux miniconfig, using make oldconfig.
Rob Landley <rob@landley.net>
parents:
diff changeset
2
61aa2ac67660 Script to caclulate unstable linux miniconfig from stable linux miniconfig, using make oldconfig.
Rob Landley <rob@landley.net>
parents:
diff changeset
3 # Calculate new config for UNSTABLE kernel based on stable kernel config.
61aa2ac67660 Script to caclulate unstable linux miniconfig from stable linux miniconfig, using make oldconfig.
Rob Landley <rob@landley.net>
parents:
diff changeset
4 # I.E. calculate miniconfig-alt-linux based on miniconfig-linux for a target.
61aa2ac67660 Script to caclulate unstable linux miniconfig from stable linux miniconfig, using make oldconfig.
Rob Landley <rob@landley.net>
parents:
diff changeset
5
61aa2ac67660 Script to caclulate unstable linux miniconfig from stable linux miniconfig, using make oldconfig.
Rob Landley <rob@landley.net>
parents:
diff changeset
6 # Expand miniconfig with the old kernel, copy .config to new kernel, run
61aa2ac67660 Script to caclulate unstable linux miniconfig from stable linux miniconfig, using make oldconfig.
Rob Landley <rob@landley.net>
parents:
diff changeset
7 # make oldconfig, compress to miniconfig, copy to sources/targets/$TARGET
61aa2ac67660 Script to caclulate unstable linux miniconfig from stable linux miniconfig, using make oldconfig.
Rob Landley <rob@landley.net>
parents:
diff changeset
8
61aa2ac67660 Script to caclulate unstable linux miniconfig from stable linux miniconfig, using make oldconfig.
Rob Landley <rob@landley.net>
parents:
diff changeset
9 . sources/include.sh
61aa2ac67660 Script to caclulate unstable linux miniconfig from stable linux miniconfig, using make oldconfig.
Rob Landley <rob@landley.net>
parents:
diff changeset
10
61aa2ac67660 Script to caclulate unstable linux miniconfig from stable linux miniconfig, using make oldconfig.
Rob Landley <rob@landley.net>
parents:
diff changeset
11 read_arch_dir "$1"
1125
f44ca6ebdab7 Cosmetic cleanup, don't leave unused empty output directories lying around.
Rob Landley <rob@landley.net>
parents: 1123
diff changeset
12 rmdir "$STAGE_DIR"
930
61aa2ac67660 Script to caclulate unstable linux miniconfig from stable linux miniconfig, using make oldconfig.
Rob Landley <rob@landley.net>
parents:
diff changeset
13
61aa2ac67660 Script to caclulate unstable linux miniconfig from stable linux miniconfig, using make oldconfig.
Rob Landley <rob@landley.net>
parents:
diff changeset
14 [ -z "$BOOT_KARCH" ] && BOOT_KARCH="$KARCH"
61aa2ac67660 Script to caclulate unstable linux miniconfig from stable linux miniconfig, using make oldconfig.
Rob Landley <rob@landley.net>
parents:
diff changeset
15
61aa2ac67660 Script to caclulate unstable linux miniconfig from stable linux miniconfig, using make oldconfig.
Rob Landley <rob@landley.net>
parents:
diff changeset
16 # Expand config against current kernel
61aa2ac67660 Script to caclulate unstable linux miniconfig from stable linux miniconfig, using make oldconfig.
Rob Landley <rob@landley.net>
parents:
diff changeset
17
61aa2ac67660 Script to caclulate unstable linux miniconfig from stable linux miniconfig, using make oldconfig.
Rob Landley <rob@landley.net>
parents:
diff changeset
18 USE_UNSTABLE=
61aa2ac67660 Script to caclulate unstable linux miniconfig from stable linux miniconfig, using make oldconfig.
Rob Landley <rob@landley.net>
parents:
diff changeset
19
61aa2ac67660 Script to caclulate unstable linux miniconfig from stable linux miniconfig, using make oldconfig.
Rob Landley <rob@landley.net>
parents:
diff changeset
20 setupfor linux
61aa2ac67660 Script to caclulate unstable linux miniconfig from stable linux miniconfig, using make oldconfig.
Rob Landley <rob@landley.net>
parents:
diff changeset
21
61aa2ac67660 Script to caclulate unstable linux miniconfig from stable linux miniconfig, using make oldconfig.
Rob Landley <rob@landley.net>
parents:
diff changeset
22 cp "$(getconfig linux)" mini.conf || dienow
61aa2ac67660 Script to caclulate unstable linux miniconfig from stable linux miniconfig, using make oldconfig.
Rob Landley <rob@landley.net>
parents:
diff changeset
23 [ "$SYSIMAGE_TYPE" == "initramfs" ] &&
61aa2ac67660 Script to caclulate unstable linux miniconfig from stable linux miniconfig, using make oldconfig.
Rob Landley <rob@landley.net>
parents:
diff changeset
24 (echo "CONFIG_BLK_DEV_INITRD=y" >> mini.conf || dienow)
61aa2ac67660 Script to caclulate unstable linux miniconfig from stable linux miniconfig, using make oldconfig.
Rob Landley <rob@landley.net>
parents:
diff changeset
25 make ARCH="$BOOT_KARCH" KCONFIG_ALLCONFIG=mini.conf $LINUX_FLAGS \
61aa2ac67660 Script to caclulate unstable linux miniconfig from stable linux miniconfig, using make oldconfig.
Rob Landley <rob@landley.net>
parents:
diff changeset
26 allnoconfig > /dev/null &&
61aa2ac67660 Script to caclulate unstable linux miniconfig from stable linux miniconfig, using make oldconfig.
Rob Landley <rob@landley.net>
parents:
diff changeset
27 cp .config "$WORK"
61aa2ac67660 Script to caclulate unstable linux miniconfig from stable linux miniconfig, using make oldconfig.
Rob Landley <rob@landley.net>
parents:
diff changeset
28
61aa2ac67660 Script to caclulate unstable linux miniconfig from stable linux miniconfig, using make oldconfig.
Rob Landley <rob@landley.net>
parents:
diff changeset
29 cleanup
61aa2ac67660 Script to caclulate unstable linux miniconfig from stable linux miniconfig, using make oldconfig.
Rob Landley <rob@landley.net>
parents:
diff changeset
30
61aa2ac67660 Script to caclulate unstable linux miniconfig from stable linux miniconfig, using make oldconfig.
Rob Landley <rob@landley.net>
parents:
diff changeset
31 USE_UNSTABLE=linux
61aa2ac67660 Script to caclulate unstable linux miniconfig from stable linux miniconfig, using make oldconfig.
Rob Landley <rob@landley.net>
parents:
diff changeset
32
61aa2ac67660 Script to caclulate unstable linux miniconfig from stable linux miniconfig, using make oldconfig.
Rob Landley <rob@landley.net>
parents:
diff changeset
33 setupfor linux
61aa2ac67660 Script to caclulate unstable linux miniconfig from stable linux miniconfig, using make oldconfig.
Rob Landley <rob@landley.net>
parents:
diff changeset
34
61aa2ac67660 Script to caclulate unstable linux miniconfig from stable linux miniconfig, using make oldconfig.
Rob Landley <rob@landley.net>
parents:
diff changeset
35 cp "$WORK/.config" . &&
61aa2ac67660 Script to caclulate unstable linux miniconfig from stable linux miniconfig, using make oldconfig.
Rob Landley <rob@landley.net>
parents:
diff changeset
36 yes "" | make ARCH="$BOOT_KARCH" oldconfig &&
61aa2ac67660 Script to caclulate unstable linux miniconfig from stable linux miniconfig, using make oldconfig.
Rob Landley <rob@landley.net>
parents:
diff changeset
37 mv .config walrus &&
61aa2ac67660 Script to caclulate unstable linux miniconfig from stable linux miniconfig, using make oldconfig.
Rob Landley <rob@landley.net>
parents:
diff changeset
38 ARCH="${BOOT_KARCH}" "$SOURCES/toys/miniconfig.sh" walrus || dienow
61aa2ac67660 Script to caclulate unstable linux miniconfig from stable linux miniconfig, using make oldconfig.
Rob Landley <rob@landley.net>
parents:
diff changeset
39
61aa2ac67660 Script to caclulate unstable linux miniconfig from stable linux miniconfig, using make oldconfig.
Rob Landley <rob@landley.net>
parents:
diff changeset
40 CFG="$CONFIG_DIR/$ARCH_NAME/miniconfig-alt-linux"
61aa2ac67660 Script to caclulate unstable linux miniconfig from stable linux miniconfig, using make oldconfig.
Rob Landley <rob@landley.net>
parents:
diff changeset
41 if [ -e "$CFG" ] && ! cmp mini.config "$CFG"
61aa2ac67660 Script to caclulate unstable linux miniconfig from stable linux miniconfig, using make oldconfig.
Rob Landley <rob@landley.net>
parents:
diff changeset
42 then
61aa2ac67660 Script to caclulate unstable linux miniconfig from stable linux miniconfig, using make oldconfig.
Rob Landley <rob@landley.net>
parents:
diff changeset
43 mv "$CFG" "${CFG}.bak" || dienow
61aa2ac67660 Script to caclulate unstable linux miniconfig from stable linux miniconfig, using make oldconfig.
Rob Landley <rob@landley.net>
parents:
diff changeset
44 fi
61aa2ac67660 Script to caclulate unstable linux miniconfig from stable linux miniconfig, using make oldconfig.
Rob Landley <rob@landley.net>
parents:
diff changeset
45 mv mini.config "$CFG"
61aa2ac67660 Script to caclulate unstable linux miniconfig from stable linux miniconfig, using make oldconfig.
Rob Landley <rob@landley.net>
parents:
diff changeset
46
61aa2ac67660 Script to caclulate unstable linux miniconfig from stable linux miniconfig, using make oldconfig.
Rob Landley <rob@landley.net>
parents:
diff changeset
47 cleanup