Commit 0734050e authored by Alessandro Rubini's avatar Alessandro Rubini

build and doc: minor cleanups to kernel section

parent 4d0822d0
......@@ -12,6 +12,7 @@ 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"
wrs_download $tarname
mkdir -p $WRS_OUTPUT_DIR/build || wrs_die "mkdir build"
......@@ -25,18 +26,18 @@ tar xjf ${WRS_DOWNLOAD_DIR}/$tarname || wrs_die "untar $tarname"
# apply patches
cd $dirname
for n in ${WRS_BASE_DIR}/../patches/kernel/v2.6.39/00*; do
for n in ${patchdir}/00*; do
patch -p1 < $n || wrs_die "patch kernel"
done
# copy the config and replace "-j" level. First remove it in case it's left in
CFG="$WRS_BASE_DIR/../patches/kernel/v2.6.39/linux-config-wrswitch"
CFG="${patchdir}/linux-config-wrswitch"
if [ "x$WRS_KERNEL_CONFIG" != "x" ]; then
if [ -f $WRS_KERNEL_CONFIG ]; then
CFG=$WRS_KERNEL_CONFIG
else
wrs_warn "WRS_KERNEL_CONFIG is not a regularname: ignoring it"
wrs_warn "WRS_KERNEL_CONFIG does not refer to a regular file: ignoring it"
sleep 3
fi
fi
......@@ -47,9 +48,6 @@ make oldconfig || wrs_die "kernel config"
make $WRS_MAKE_J zImage modules || wrs_die "kernel compilation"
mkdir -p $WRS_OUTPUT_DIR/images/lib
mkdir -p $WRS_OUTPUT_DIR/images/lib/modules
mkdir -p $WRS_OUTPUT_DIR/images/lib/modules/2.6.39
mkdir -p $WRS_OUTPUT_DIR/images/lib/modules/2.6.39/kernel
cp $(find . -name '*.ko') $WRS_OUTPUT_DIR/images/lib/modules/2.6.39/kernel
......
......@@ -986,19 +986,14 @@ and are currently the following ones:
0002-initramfs-stop-after-one-cpio-archive.patch
0003-at91-NR_IRQS-increase-by-64-to-fit-custom-muxes.patch
0004-irq-export-symbols-for-external-irq-controller.patch
0005-fix-nand-parition-layout-and-usb-vbus.patch
0006-fiq-support.patch
@end example
The configuration being used is copied from this package, so it
is easier to change it if needed.
@c again, maybe simplify this to a set of commands?
If you want to change the configuration, you can do so after the first
build iteration: change directory to @code{build/kernel}
and run @code{make menuconfig}. After making your choices, copy back
the file @code{.config} to
@code{patches/kernel/v2.6.39/linux-config-wrswitch} in this package.
You can also set @code{WRS_KERNEL_CONFIG} to the full pathname of
The configuration we use to build the kernel is not a patch but a plan
@code{.config} file, in the same directory as the patches, so you
can change it easily, if needed. As an alternative,
you can also set @code{WRS_KERNEL_CONFIG} to the full pathname of
your configuration file of choice. The file must be a copy of the
@code{.config} found in the main kernel directory,
(for example the one left after the @code{make menuconfig} step).
......
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