annotate sources/sections/linux-headers.sh @ 1663:8c8256e18ad2

Clean up some minor kernel version bit-rot.
author Rob Landley <rob@landley.net>
date Wed, 02 Jul 2014 20:04:18 -0500
parents ffa79617fb3f
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
906
5e0cbc73da55 Split out linux-headers, uClibc, and uClibc++ as their own sections.
Rob Landley <rob@landley.net>
parents:
diff changeset
1 # Install Linux kernel headers.
5e0cbc73da55 Split out linux-headers, uClibc, and uClibc++ as their own sections.
Rob Landley <rob@landley.net>
parents:
diff changeset
2
5e0cbc73da55 Split out linux-headers, uClibc, and uClibc++ as their own sections.
Rob Landley <rob@landley.net>
parents:
diff changeset
3 setupfor linux
5e0cbc73da55 Split out linux-headers, uClibc, and uClibc++ as their own sections.
Rob Landley <rob@landley.net>
parents:
diff changeset
4
1152
2f39d1bfb2fd Add baseconfig-linux, the infrastructure to use it, and move over the arm targets. (You can override with a miniconfig-linux or miniconfig-uClibc in the appropriate target directory.)
Rob Landley <rob@landley.net>
parents: 1065
diff changeset
5 # Expand and copy kernel .config.
964
edf9264f2d26 Make root filesystem's usr/src has config-linux and config-uClibc as well as config-busybox.
Rob Landley <rob@landley.net>
parents: 906
diff changeset
6
1152
2f39d1bfb2fd Add baseconfig-linux, the infrastructure to use it, and move over the arm targets. (You can override with a miniconfig-linux or miniconfig-uClibc in the appropriate target directory.)
Rob Landley <rob@landley.net>
parents: 1065
diff changeset
7 getconfig linux > mini.conf &&
2f39d1bfb2fd Add baseconfig-linux, the infrastructure to use it, and move over the arm targets. (You can override with a miniconfig-linux or miniconfig-uClibc in the appropriate target directory.)
Rob Landley <rob@landley.net>
parents: 1065
diff changeset
8 [ "$SYSIMAGE_TYPE" == "initramfs" ] &&
2f39d1bfb2fd Add baseconfig-linux, the infrastructure to use it, and move over the arm targets. (You can override with a miniconfig-linux or miniconfig-uClibc in the appropriate target directory.)
Rob Landley <rob@landley.net>
parents: 1065
diff changeset
9 echo "CONFIG_BLK_DEV_INITRD=y" >> mini.conf
2f39d1bfb2fd Add baseconfig-linux, the infrastructure to use it, and move over the arm targets. (You can override with a miniconfig-linux or miniconfig-uClibc in the appropriate target directory.)
Rob Landley <rob@landley.net>
parents: 1065
diff changeset
10
964
edf9264f2d26 Make root filesystem's usr/src has config-linux and config-uClibc as well as config-busybox.
Rob Landley <rob@landley.net>
parents: 906
diff changeset
11 make ARCH=${BOOT_KARCH:-$KARCH} KCONFIG_ALLCONFIG=mini.conf $LINUX_FLAGS \
1571
ffa79617fb3f Apply BUILD_VERBOSE setting to header install.
Rob Landley <rob@landley.net>
parents: 1152
diff changeset
12 $VERBOSITY allnoconfig >/dev/null &&
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.
Rob Landley <rob@landley.net>
parents: 1039
diff changeset
13 mkdir -p "$STAGE_DIR/src" &&
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.
Rob Landley <rob@landley.net>
parents: 1039
diff changeset
14 cp .config "$STAGE_DIR/src/config-linux"
964
edf9264f2d26 Make root filesystem's usr/src has config-linux and config-uClibc as well as config-busybox.
Rob Landley <rob@landley.net>
parents: 906
diff changeset
15
edf9264f2d26 Make root filesystem's usr/src has config-linux and config-uClibc as well as config-busybox.
Rob Landley <rob@landley.net>
parents: 906
diff changeset
16
906
5e0cbc73da55 Split out linux-headers, uClibc, and uClibc++ as their own sections.
Rob Landley <rob@landley.net>
parents:
diff changeset
17 # Install Linux kernel headers (for use by uClibc).
1571
ffa79617fb3f Apply BUILD_VERBOSE setting to header install.
Rob Landley <rob@landley.net>
parents: 1152
diff changeset
18 make -j $CPUS headers_install ARCH="${KARCH}" INSTALL_HDR_PATH="$STAGE_DIR" \
ffa79617fb3f Apply BUILD_VERBOSE setting to header install.
Rob Landley <rob@landley.net>
parents: 1152
diff changeset
19 $VERBOSITY &&
906
5e0cbc73da55 Split out linux-headers, uClibc, and uClibc++ as their own sections.
Rob Landley <rob@landley.net>
parents:
diff changeset
20 # This makes some very old package builds happy.
1663
8c8256e18ad2 Clean up some minor kernel version bit-rot.
Rob Landley <rob@landley.net>
parents: 1571
diff changeset
21 [ ! -e "$STAGE_DIR/include/asm/page.h" ] &&
8c8256e18ad2 Clean up some minor kernel version bit-rot.
Rob Landley <rob@landley.net>
parents: 1571
diff changeset
22 ln -sf ../sys/user.h "$STAGE_DIR/include/asm/page.h"
906
5e0cbc73da55 Split out linux-headers, uClibc, and uClibc++ as their own sections.
Rob Landley <rob@landley.net>
parents:
diff changeset
23
5e0cbc73da55 Split out linux-headers, uClibc, and uClibc++ as their own sections.
Rob Landley <rob@landley.net>
parents:
diff changeset
24 cleanup
1039
a34a4954c640 Cleanup debris files installed by the kernel's headers install, spotted by Denys Vlasenko.
Rob Landley <rob@landley.net>
parents: 964
diff changeset
25
a34a4954c640 Cleanup debris files installed by the kernel's headers install, spotted by Denys Vlasenko.
Rob Landley <rob@landley.net>
parents: 964
diff changeset
26 # Remove debris the kernel puts in there for no apparent reason.
a34a4954c640 Cleanup debris files installed by the kernel's headers install, spotted by Denys Vlasenko.
Rob Landley <rob@landley.net>
parents: 964
diff changeset
27
a34a4954c640 Cleanup debris files installed by the kernel's headers install, spotted by Denys Vlasenko.
Rob Landley <rob@landley.net>
parents: 964
diff changeset
28 find "$STAGE_DIR/include" -name ".install" -print0 -or -name "..install.cmd" -print0 | xargs -0 rm