Commit 5a446e69 authored by Alessandro Rubini's avatar Alessandro Rubini

build: offer linux-3.14 as an option

Signed-off-by: Alessandro Rubini's avatarAlessandro Rubini <rubini@gnudd.com>
parent f249a835
......@@ -19,6 +19,13 @@ config PPSI
bool "Use PPSi daemon"
default y
config USE_KERNEL_3_14
bool "Build Linux-3.14 for the switch, instead of 2.6.39"
help
This selects and experimental build with a newer kernel
version. The port is not complete, and a number of details
are still to be fixed. You'd better say N.
menu "Local configuration"
config NTP_SERVER
......
......@@ -14,9 +14,13 @@ http://repository.timesys.com/buildsources/a/at91bootstrap-3/at91bootstrap-3-3.0
barebox-2014.04.0.tar.bz2 e1f089fc24cc7f24478e663c0e3b91d9 \
http://www.barebox.org/download/barebox-2014.04.0.tar.bz2
# kernel
linux-2.6.39.tar.bz2 1aab7a741abe08d42e8eccf20de61e05 \
http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.39.tar.bz2
# kernel: download both, we don't know what is being built
linux-2.6.39.tar.xz 25cd73d797a49ad5b4119b67f1caf2cc \
http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.39.tar.xz
linux-3.14.tar.xz b621207b3f6ecbb67db18b13258f8ea8 \
http://www.kernel.org/pub/linux/kernel/v3.x/linux-3.14.tar.xz
# our gateware binaries
wrs-gw-v4.0-20140807.tar.gz 60030b4f8d6e3ab7d2bbf231031fa026 \
......
......@@ -10,9 +10,16 @@ fi
wrs_check_vars WRS_OUTPUT_DIR WRS_DOWNLOAD_DIR CROSS_COMPILE
wrs_echo "--- Linux kernel for switch"
tarname="linux-2.6.39.tar.bz2"
patchdir="${WRS_BASE_DIR}/../patches/kernel/v2.6.39"
# Warning: same stanza appears in wrs_build_modules
if [ -n "$CONFIG_USE_KERNEL_3_14" ]; then
kver="3.14"
else
kver="2.6.39"
fi
wrs_echo "--- Linux kernel for switch (version $kver)"
tarname="linux-${kver}.tar.xz"
patchdir="${WRS_BASE_DIR}/../patches/kernel/v${kver}"
wrs_download $tarname
mkdir -p $WRS_OUTPUT_DIR/build || wrs_die "mkdir build"
......@@ -20,9 +27,9 @@ mkdir -p $WRS_OUTPUT_DIR/images || wrs_die "mkdir images"
# go to the build dir and compile it, using our configuration
cd $WRS_OUTPUT_DIR/build
dirname="linux-2.6.39"
dirname="linux-${kver}"
rm -rf $dirname
tar xjf ${WRS_DOWNLOAD_DIR}/$tarname || wrs_die "untar $tarname"
tar xf ${WRS_DOWNLOAD_DIR}/$tarname || wrs_die "untar $tarname"
# apply patches
cd $dirname
......@@ -48,7 +55,7 @@ make oldconfig || wrs_die "kernel config"
make $WRS_MAKE_J zImage modules || wrs_die "kernel compilation"
mkdir -p $WRS_OUTPUT_DIR/images/lib/modules/2.6.39/kernel
mkdir -p $WRS_OUTPUT_DIR/images/lib/modules/${kver}/kernel
cp $(find . -name '*.ko') $WRS_OUTPUT_DIR/images/lib/modules/2.6.39/kernel
cp $(find . -name '*.ko') $WRS_OUTPUT_DIR/images/lib/modules/${kver}/kernel
cp arch/$ARCH/boot/zImage $WRS_OUTPUT_DIR/images
......@@ -8,6 +8,13 @@ if [ -z "$WRS_BASE_DIR" ]; then
fi
. ${WRS_BASE_DIR}/scripts/wrs_functions
# Warning: same stanza appears in wrs_build_kernel
if [ -n "$CONFIG_USE_KERNEL_3_14" ]; then
kver="3.14"
else
kver="2.6.39"
fi
wrs_check_vars WRS_OUTPUT_DIR WRS_DOWNLOAD_DIR CROSS_COMPILE
wrs_echo "--- Kernel modules from this package"
......@@ -16,7 +23,7 @@ mkdir -p $WRS_OUTPUT_DIR/build || wrs_die "mkdir build"
mkdir -p $WRS_OUTPUT_DIR/images || wrs_die "mkdir images"
# check that the kernel has been compiled (or at least configured)
export LINUX="$WRS_OUTPUT_DIR/build/linux-2.6.39"
export LINUX="$WRS_OUTPUT_DIR/build/linux-${kver}"
test -f $LINUX/.config || wrs_die "no kernel in $LINUX"
cd $WRS_BASE_DIR/../kernel
make $WRS_MAKE_J || wrs_die "white rabbit kernel modules"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment