|
bc9-oe-sdk setup
Vmware †bc9-oe-sdk での Vmware イメージの設定を記述します。
gumstix-oe †
gumstix-oeの取得 †
環境設定 †
ソースファイル調整 †build 内容の調整をします。
build †2010/06/11 追記 $ vi gumstix/gumstix-oe/org.openembedded.snapshot/packages/zlib/zlib_1.2.3.bb LICENSE = "zlib"
PR="r2"
#SRC_URI = "http://www.zlib.net/zlib-1.2.3.tar.bz2 \
SRC_URI = "http://sourceforge.net/projects/libpng/files/zlib/1.2.3/zlib-1.2.3.tar.bz2
file://visibility.patch;patch=1 \
file://autotools.patch;patch=1 "
S = "${WORKDIR}/zlib-${PV}"
以下のコマンドで microSD 起動用の kernel と userland を build します。 $ bitbake gumstix-basic-image build が終了すると以下のファイルが生成されます。 beat@bc9-oe-sdk:~/gumstix/gumstix-oe/tmp/deploy/glibc/images/gumstix-custom-verdex$ ls -l 合計 18152 -rw-r--r-- 1 beat beat 8576116 2009-07-24 18:57 Angstrom-gumstix-basic-image-glibc-ipk-2007.9-test-20090724-gumstix-custom-verdex.rootfs.jffs2 -rw-rw-r-- 1 beat beat 7081015 2009-07-24 18:57 Angstrom-gumstix-basic-image-glibc-ipk-2007.9-test-20090724-gumstix-custom-verdex.rootfs.tar.gz lrwxrwxrwx 1 beat beat 94 2009-07-24 18:57 gumstix-basic-image-gumstix-custom-verdex.jffs2 -> Angstrom-gumstix-basic-image-glibc-ipk-2007.9-test-20090724-gumstix-custom-verdex.rootfs.jffs2 lrwxrwxrwx 1 beat beat 95 2009-07-24 18:57 gumstix-basic-image-gumstix-custom-verdex.tar.gz -> Angstrom-gumstix-basic-image-glibc-ipk-2007.9-test-20090724-gumstix-custom-verdex.rootfs.tar.gz -rw-rw-r-- 1 beat beat 1881391 2009-07-24 18:24 modules-2.6.21-r1-gumstix-custom-verdex.tgz -rw-r--r-- 1 beat beat 998520 2009-07-24 18:24 uImage-2.6.21-r1-gumstix-custom-verdex.bin ここで生成される kernel は 2.6.21 ですが、起動用 microSD を作成する時点で最初から Angstrom-gumstix-basic-image-glibc-ipk-2007.9-test-20090724-gumstix-custom-verdex.rootfs.tar.gz だけです。 2.6.29 kernel & modules †bc9-android-sdk で取得した linux-android-2.6.29 kernel を /home/beat/kernel_work/ に linux-android-2.6.29 の名でコピーし、 #!/bin/sh export PATH=/home/beat/gumstix/gumstix-oe/tmp/cross/bin:$PATH export ARCH=arm export CROSS_COMPILE=arm-angstrom-linux-gnueabi- このファイルを source し linux-android-2.6.29-bc9-r3 で make を実行すれば kernel が build できますが、 以下の内容で make-bc9-kernel.sh を作成し linux-android-2.6.29-bc9-r3/ で実行します。 #!/bin/sh
export LANG=C
GUMSTIX_HOME="/home/beat/gumstix/gumstix-oe"
SYSMAP="./System.map"
TOOL_PREFIX="${GUMSTIX_HOME}/tmp/cross/bin/arm-angstrom-linux-gnueabi-"
DEPMOD="${TOOL_PREFIX}depmod-2.6"
OBJCOPY=${TOOL_PREFIX}objcopy
MKIMG=${GUMSTIX_HOME}/tmp/staging/i686-linux/bin/uboot-mkimage
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_ENTRYPOINT} \
-e ${UBOOT_ENTRYPOINT} -n "oe/verdex/arm" -d linux.bin ${KERNIMG}
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} modules_install
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}
make が終了すると、vmlinux など標準の make を実行したときに生成されるファイルの他に -rw-rw-r-- 1 beat beat 1.4M 2009-07-28 20:39 modules-2.6.29-bc9-r3.tgz lrwxrwxrwx 1 beat beat 25 2009-07-28 20:39 modules-2.6.29-bc9.tgz -> modules-2.6.29-bc9-r3.tgz -rw-rw-r-- 1 beat beat 1.5M 2009-07-28 20:38 uImage-2.6.29-bc9-r3.bin lrwxrwxrwx 1 beat beat 24 2009-07-28 20:38 uImage-2.6.29-bc9.bin -> uImage-2.6.29-bc9-r3.bin |