bc9/Software/OpenEmbedded/kernel2.6.29(2/2)
[
Front page
] [
New
|
List of pages
|
Search
|
Recent changes
]
Start:
[[labs.beatcraft.com]]~
[[bc9/Software/OpenEmbedded/kernel2.6.29(1/2)]]~
*Updating kernel to 2.6.29 [#s51bc679]
Once you have prepared bootable microSD with kernel 2.6.2...
Following is procedure.
**Obtaining kernel source [#bb1b002a]
This time, we modify 2.6.29.4 kernel, so get it as follows:
$ wget http://www.jp.kernel.org/pub/linux/kernel/v2.6/li...
$ tar xvfj linux-2.6.29.4.tar.bz2
**Applying patch for bc9 [#sa8f8446]
The kernel obtained from kernel.org (so called vanilla ke...
even if it is built for ARM processor.~
We must patch kernel for booting up bc9.~
This tgz archive &ref(patch-kernel-2.6.29.4-bc9-r2.tgz);...
Do patch in serial order as follows: (Bigger number patch...
$ tar xvfz patch-kernel-2.6.29.4-bc9-r2.tgz
$ ls
linux-2.6.29.4 patch-kernel-2.6.29.4-bc9
$ cd linux-2.6.29.4
$ patch -p1 < ../patch-kernel-2.6.29.4-bc9/01-minimum.pa...
$ patch -p1 < ../patch-kernel-2.6.29.4-bc9/02-lcd.patch
$ patch -p1 < ../patch-kernel-2.6.29.4-bc9/03-tsc.patch
$ patch -p1 < ../patch-kernel-2.6.29.4-bc9/04-usb.patch
$ patch -p1 < ../patch-kernel-2.6.29.4-bc9/05-proc-gpio....
*snip*
Rename patch applied linux-2.6.29.4 source directory.
$ cd ..
$ mv linux-2.6.29.4 linux-2.6.29.4-bc9
**Preparing kernel build [#v841f766]
In order to cross build patced kernel for bc9, prepare sc...
Source this script and set path to cross toolchain genera...
$ vim setup_kernel_build.sh
#!/bin/sh
export PATH=/home/beat/gumstix/gumstix-oe/tmp/cross/bin:...
export ARCH=arm
export CROSS_COMPILE=arm-angstrom-linux-gnueabi-
$ source setup_kernel_build.sh
After patch applied, there is linux-2.6.29.4-bc9/arch/arm...
$ cd linux-2.6.29.4-bc9
$ cp arch/arm/configs/bc9_defconfig .config
This defconfig is already configured with make menuconfig...
Copy defconfig and you can build kernel just executing ma...
If you have something to configure, do make oldconfig jus...
After this, kernel build will successfully finish when yo...
But it's not enough for bc9. bc9 requires uImage* + modul...
So prepare script as follows:
$ vim make-bc9-kernel.sh
#!/bin/sh
export LANG=C
GUMSTIX_HOME="/home/beat/gumstix/gumstix-oe"
SYSMAP="./System.map"
TOOL_PREFIX="${GUMSTIX_HOME}/tmp/cross/bin/arm-angstrom-...
DEPMOD="${TOOL_PREFIX}depmod-2.6"
OBJCOPY=${TOOL_PREFIX}objcopy
MKIMG=${GUMSTIX_HOME}/tmp/staging/i686-linux/bin/uboot-m...
UBOOT_ENTRYPOINT="a0008000"
MOD_WORKDIR="./mod_work"
make ARCH=arm CROSS_COMPILE=${TOOL_PREFIX} prepare
KERNREL=`make kernelrelease`
KERNVER=`make kernelversion`
KERNIMG="uImage-${KERNREL}.bin"
MODTGZ="modules-${KERNREL}.tgz"
KERNIMGLN="uImage-${KERNVER}-bc9.bin"
MODTGZLN="modules-${KERNVER}-bc9.tgz"
echo "### Cleanup"
rm -rf ${MOD_WORKDIR}
rm -f ${KERNIMG} ${MODTGZ} ${KERNIMGLN} ${MODTGZLN}
echo "### Build kernel"
make ARCH=arm CROSS_COMPILE=${TOOL_PREFIX}
if [ $? != 0 ]; then
echo "*** Failed to build kernel"
exit 1
fi
echo "### Make kernel image"
${OBJCOPY} -O binary -R .note -R .comment ?
-S ./arch/arm/boot/compressed/vmlinux linux.bin
if [ $? != 0 ]; then
echo "*** Failed to make kernel image"
exit 1
fi
${MKIMG} -A arm -O linux -T kernel -C none -a ${UBOOT_EN...
-e ${UBOOT_ENTRYPOINT} -n "oe/verdex/arm" -d linux.bin $...
if [ $? != 0 ]; then
echo "*** Failed to make kernel image"
exit 1
fi
ln -s ${KERNIMG} ${KERNIMGLN}
echo "### Install modules"
make ARCH=arm DEPMOD=echo INSTALL_MOD_PATH=${MOD_WORKDIR...
if [ $? != 0 ]; then
echo "*** Failed to modules_install"
exit 1
fi
${DEPMOD} -A -b ${MOD_WORKDIR} -F ${SYSMAP} ${KERNREL}
if [ $? != 0 ]; then
echo "*** Failed to depmod modules"
exit 1
fi
echo "### Make modules tar ball"
tar czvf ${MODTGZ} -C ${MOD_WORKDIR} lib
if [ $? != 0 ]; then
echo "*** Failed to make modules tarball"
exit 1
fi
ln -s ${MODTGZ} ${MODTGZLN}
echo "### Finished"
ls -l ${KERNIMG} ${MODTGZ}
**kernel build [#kd978ec6]
Execute this script in kernel source directory.
$ mv make-bc9-kernel.sh linux-2.6.29.4-bc9
$ cd linux-2.6.29.4-bc9
$ ./make-bc9-kernel.sh
When build successfully finished, you will obtain two ano...
modules-2.6.29.4-bc9-r2.tgz
uImage-bc9-2.6.29.4-bc9-r2.bin
**Copying to microSD [#yc21d043]
Copy those two files to kernel 2.6.24 bootable microSD as...
(We assume that vfat partition mount on /media/disk and e...
$ sudo cp linux-2.6.29.4-bc9/uImage-bc9-2.6.29.4-bc9-r2....
$ sudo tar -C /media/disk-1/ -xvfz linux-2.6.29.4-bc9/mo...
**Booting 2.6.29.4-bc9 from microSD [#v6e13a91]
Insert prepared microSD into bc9's card slot and power on...
Linux 2.6.29 boot logo(tuz) appear on LCD and bc9 boot wi...
$ uname -a
Linux gumstix-custom-verdex 2.6.29.4-bc9-r2 #1 Tue Jun 2...
-----------------
RIGHT:by Satoshi OTSUKA
End:
[[labs.beatcraft.com]]~
[[bc9/Software/OpenEmbedded/kernel2.6.29(1/2)]]~
*Updating kernel to 2.6.29 [#s51bc679]
Once you have prepared bootable microSD with kernel 2.6.2...
Following is procedure.
**Obtaining kernel source [#bb1b002a]
This time, we modify 2.6.29.4 kernel, so get it as follows:
$ wget http://www.jp.kernel.org/pub/linux/kernel/v2.6/li...
$ tar xvfj linux-2.6.29.4.tar.bz2
**Applying patch for bc9 [#sa8f8446]
The kernel obtained from kernel.org (so called vanilla ke...
even if it is built for ARM processor.~
We must patch kernel for booting up bc9.~
This tgz archive &ref(patch-kernel-2.6.29.4-bc9-r2.tgz);...
Do patch in serial order as follows: (Bigger number patch...
$ tar xvfz patch-kernel-2.6.29.4-bc9-r2.tgz
$ ls
linux-2.6.29.4 patch-kernel-2.6.29.4-bc9
$ cd linux-2.6.29.4
$ patch -p1 < ../patch-kernel-2.6.29.4-bc9/01-minimum.pa...
$ patch -p1 < ../patch-kernel-2.6.29.4-bc9/02-lcd.patch
$ patch -p1 < ../patch-kernel-2.6.29.4-bc9/03-tsc.patch
$ patch -p1 < ../patch-kernel-2.6.29.4-bc9/04-usb.patch
$ patch -p1 < ../patch-kernel-2.6.29.4-bc9/05-proc-gpio....
*snip*
Rename patch applied linux-2.6.29.4 source directory.
$ cd ..
$ mv linux-2.6.29.4 linux-2.6.29.4-bc9
**Preparing kernel build [#v841f766]
In order to cross build patced kernel for bc9, prepare sc...
Source this script and set path to cross toolchain genera...
$ vim setup_kernel_build.sh
#!/bin/sh
export PATH=/home/beat/gumstix/gumstix-oe/tmp/cross/bin:...
export ARCH=arm
export CROSS_COMPILE=arm-angstrom-linux-gnueabi-
$ source setup_kernel_build.sh
After patch applied, there is linux-2.6.29.4-bc9/arch/arm...
$ cd linux-2.6.29.4-bc9
$ cp arch/arm/configs/bc9_defconfig .config
This defconfig is already configured with make menuconfig...
Copy defconfig and you can build kernel just executing ma...
If you have something to configure, do make oldconfig jus...
After this, kernel build will successfully finish when yo...
But it's not enough for bc9. bc9 requires uImage* + modul...
So prepare script as follows:
$ vim make-bc9-kernel.sh
#!/bin/sh
export LANG=C
GUMSTIX_HOME="/home/beat/gumstix/gumstix-oe"
SYSMAP="./System.map"
TOOL_PREFIX="${GUMSTIX_HOME}/tmp/cross/bin/arm-angstrom-...
DEPMOD="${TOOL_PREFIX}depmod-2.6"
OBJCOPY=${TOOL_PREFIX}objcopy
MKIMG=${GUMSTIX_HOME}/tmp/staging/i686-linux/bin/uboot-m...
UBOOT_ENTRYPOINT="a0008000"
MOD_WORKDIR="./mod_work"
make ARCH=arm CROSS_COMPILE=${TOOL_PREFIX} prepare
KERNREL=`make kernelrelease`
KERNVER=`make kernelversion`
KERNIMG="uImage-${KERNREL}.bin"
MODTGZ="modules-${KERNREL}.tgz"
KERNIMGLN="uImage-${KERNVER}-bc9.bin"
MODTGZLN="modules-${KERNVER}-bc9.tgz"
echo "### Cleanup"
rm -rf ${MOD_WORKDIR}
rm -f ${KERNIMG} ${MODTGZ} ${KERNIMGLN} ${MODTGZLN}
echo "### Build kernel"
make ARCH=arm CROSS_COMPILE=${TOOL_PREFIX}
if [ $? != 0 ]; then
echo "*** Failed to build kernel"
exit 1
fi
echo "### Make kernel image"
${OBJCOPY} -O binary -R .note -R .comment ?
-S ./arch/arm/boot/compressed/vmlinux linux.bin
if [ $? != 0 ]; then
echo "*** Failed to make kernel image"
exit 1
fi
${MKIMG} -A arm -O linux -T kernel -C none -a ${UBOOT_EN...
-e ${UBOOT_ENTRYPOINT} -n "oe/verdex/arm" -d linux.bin $...
if [ $? != 0 ]; then
echo "*** Failed to make kernel image"
exit 1
fi
ln -s ${KERNIMG} ${KERNIMGLN}
echo "### Install modules"
make ARCH=arm DEPMOD=echo INSTALL_MOD_PATH=${MOD_WORKDIR...
if [ $? != 0 ]; then
echo "*** Failed to modules_install"
exit 1
fi
${DEPMOD} -A -b ${MOD_WORKDIR} -F ${SYSMAP} ${KERNREL}
if [ $? != 0 ]; then
echo "*** Failed to depmod modules"
exit 1
fi
echo "### Make modules tar ball"
tar czvf ${MODTGZ} -C ${MOD_WORKDIR} lib
if [ $? != 0 ]; then
echo "*** Failed to make modules tarball"
exit 1
fi
ln -s ${MODTGZ} ${MODTGZLN}
echo "### Finished"
ls -l ${KERNIMG} ${MODTGZ}
**kernel build [#kd978ec6]
Execute this script in kernel source directory.
$ mv make-bc9-kernel.sh linux-2.6.29.4-bc9
$ cd linux-2.6.29.4-bc9
$ ./make-bc9-kernel.sh
When build successfully finished, you will obtain two ano...
modules-2.6.29.4-bc9-r2.tgz
uImage-bc9-2.6.29.4-bc9-r2.bin
**Copying to microSD [#yc21d043]
Copy those two files to kernel 2.6.24 bootable microSD as...
(We assume that vfat partition mount on /media/disk and e...
$ sudo cp linux-2.6.29.4-bc9/uImage-bc9-2.6.29.4-bc9-r2....
$ sudo tar -C /media/disk-1/ -xvfz linux-2.6.29.4-bc9/mo...
**Booting 2.6.29.4-bc9 from microSD [#v6e13a91]
Insert prepared microSD into bc9's card slot and power on...
Linux 2.6.29 boot logo(tuz) appear on LCD and bc9 boot wi...
$ uname -a
Linux gumstix-custom-verdex 2.6.29.4-bc9-r2 #1 Tue Jun 2...
-----------------
RIGHT:by Satoshi OTSUKA
Page: