labs.beatcraft.com kernel update †gumstix-oe の kernel は、現在 2.6.21、2.6.22、2.6.24 を選択することができますが、 microSD boot 環境の構築 †kernel を更新するにあたって、新しい kernel を利用する userland を整えます。 gumstix の build 環境の作成 †bc9 (gumstix) の build 環境を作成します。
ただし、今回は内蔵FLASH ROM に書き込むイメージでなくmicroSD BOOT 用イメージをbuildするため、 以下の作業は Ubuntu8.04LTS 上で beat ユーザで行うことを前提に記述しています。 shの調整 †Ubuntu の /bin/sh は bash でなく dash へのリンクになっていますが、bitbake による build 作業時に問題が発生するのを避けるため $ sudo dpkg-reconfigure dash dash を /bin/sh にするか聞かれるので、「いいえ」を選択します。 必須application のインストール †以下のコマンドで bitbake に必要なapplicationをインストールします。 $ sudo apt-get install build-essential help2man diffstat texi2html texinfo libncurses5-dev cvs gawk \ python-dev python-pysqlite2 python-psyco ckermit lrzsz subversion gumstix OE の check out †$ mkdir ~/gumstix $ cd ~/gumstix $ svn co https://gumstix.svn.sourceforge.net/svnroot/gumstix/trunk gumstix-oe 環境変数の設定 †永続的に設定してしまう場合は $ cat gumstix-oe/extras/profile >> ~/.bashrc 一時的に環境変数を設定する場合は、 $ . ~/gumstix/gumstix-oe/extras/profile あるいは $ source ~/gumstix/gumstix-oe/extras/profile を実行します。 source code のキャッシュ保存設定 †gumstix OE は build 作業の途中で source code をダウンロードするようになっています。 $ svn diff build/conf/site.conf Index: build/conf/site.conf =================================================================== --- build/conf/site.conf (リビジョン 318) +++ build/conf/site.conf (作業コピー) @@ -1,5 +1,6 @@ # specifies where BitBake should place the downloaded sources -DL_DIR = "/usr/share/sources" +DL_DIR = "/home/beat/gumstix/sources" # specifies where BitBake should create its temporary files TMPDIR = ${GUMSTIXTOP}/tmp ビルド内容の調整 †PXA270の性能を有効活用するため、以下のように設定を変更して iwmmxt を有効にします。 $ svn diff com.gumstix.collection/conf/machine/include/tune-iwmmxt.inc Index: com.gumstix.collection/conf/machine/include/tune-iwmmxt.inc =================================================================== --- com.gumstix.collection/conf/machine/include/tune-iwmmxt.inc (リビジョン 318) +++ com.gumstix.collection/conf/machine/include/tune-iwmmxt.inc (作業コピー) @@ -1,6 +1,9 @@ # Configurations for the Intel PXA27x Appications Processor Family. # Please use tune-xscale for PXA255/PXA26x based processors. -TARGET_CC_ARCH = "-march=iwmmxt -mcpu=iwmmxt -mtune=iwmmxt" +FEED_ARCH = "iwmmxt" +TARGET_CC_ARCH = "-march=iwmmxt -mtune=iwmmxt" +TARGET_CC_KERNEL_ARCH = "-march=iwmmxt -mtune=iwmmxt" PACKAGE_ARCH = "iwmmxt" PACKAGE_EXTRA_ARCHS += "iwmmxt" microSD から起動できるイメージでは kernel の1Mサイズ制限は不要なのでサイズを倍に増やします。 $ svn diff com.gumstix.collection/conf/machine/include/gumstix.inc Index: com.gumstix.collection/conf/machine/include/gumstix.inc =================================================================== --- com.gumstix.collection/conf/machine/include/gumstix.inc (リビジョン 318) +++ com.gumstix.collection/conf/machine/include/gumstix.inc (作業コピー) @@ -10,6 +10,7 @@ KERNEL_IMAGETYPE = "uImage" RDEPENDS_kernel-base = "" -KERNEL_IMAGE_MAXSIZE = "1048577" +KERNEL_IMAGE_MAXSIZE = "2197154" // incleased for mmcboot UBOOT_ENTRYPOINT = "a0008000" @@ -35,7 +35,7 @@ PREFERRED_PROVIDER_bluez-utils-dbus = "bluez-utils" PREFERRED_PROVIDER_gsmd="libgsmd" -PREFERRED_VERSION_gumstix-kernel = "2.6.21" +PREFERRED_VERSION_gumstix-kernel = "2.6.24" PREFERRED_VERSION_udev = "118" PREFERRED_VERSION_gnuplot = "4.0.0" PREFERRED_VERSION_dropbear = "0.47" microSDから起動できるイメージを作成するため、mmcboot のコメントアウトを外して有効にします。 $ svn diff com.gumstix.collection/conf/machine/gumstix-custom-verdex.conf Index: com.gumstix.collection/conf/machine/gumstix-custom-verdex.conf =================================================================== --- com.gumstix.collection/conf/machine/gumstix-custom-verdex.conf (リビジョン 318) +++ com.gumstix.collection/conf/machine/gumstix-custom-verdex.conf (作業コピー) @@ -5,12 +5,12 @@ MACHINE_FEATURES += "verdex" MACHINE_FEATURES += "iwmmxt" require conf/machine/include/gumstix.inc -require conf/machine/include/tune-xscale.inc +require conf/machine/include/tune-iwmmxt.inc # # Your flash size = Total flash (in MB) - 1 (for linux kernel partition) -ROOT_FLASH_SIZE = "15" -#ROOT_FLASH_SIZE = "31" +#ROOT_FLASH_SIZE = "15" +ROOT_FLASH_SIZE = "31" # # Enable use of virtual terminal for LCD on tty1 if USE_VT = "1" @@ -28,7 +28,7 @@ #MACHINE_FEATURES += "spi" MACHINE_FEATURES += "serial" -MACHINE_FEATURES += "bluetooth" +#MACHINE_FEATURES += "bluetooth" MACHINE_FEATURES += "sound" # if you enable robostix you will need to disable both "lcd" and "touchscreen" features @@ -51,7 +51,7 @@ MACHINE_FEATURES += "fat" # enable one of the following if you want to target build for uimage/rootfs on mmc/microSD or CF -#MACHINE_FEATURES += "mmcroot" +MACHINE_FEATURES += "mmcroot" #MACHINE_FEATURES += "cfroot" # gumstix の expansion board wifistix モジュールは build error になることが分かっているので、 $ svn diff com.gumstix.collection/packages/tasks/task-base-gumstix.bb Index: com.gumstix.collection/packages/tasks/task-base-gumstix.bb =================================================================== --- com.gumstix.collection/packages/tasks/task-base-gumstix.bb (リビジョン 318) +++ com.gumstix.collection/packages/tasks/task-base-gumstix.bb (作業コピー) @@ -201,7 +201,6 @@ RDEPENDS_task-base-gumstix-wifi = "\ task-base-gumstix-pcmcia \ - wifistix-modules \ wireless-tools \ wpa-supplicant \ " 上記の変更で FEED_ARCH を armv5te から iwmmxt にしているので、ipk で application をインストールする場合 build †以下のコマンドで kernel、kernel module、userland を build します。 $ bitbake gumstix-directfb-image build が正常に終了すると以下のようなファイルが生成されています。 $ ls -al tmp/deploy/glibc/images/gumstix-custom-verdex/ 合計 21780 drwxr-xr-x 2 beat beat 4096 2009-06-23 00:01 . drwxr-xr-x 3 beat beat 4096 2009-06-22 22:58 .. -rw-r--r-- 1 beat beat 10402796 2009-06-23 00:01 Angstrom-gumstix-directfb-image-glibc-ipk-2007.9-test-20090622-gumstix-custom-verdex.rootfs.jffs2 -rw-rw-r-- 1 beat beat 8713428 2009-06-23 00:01 Angstrom-gumstix-directfb-image-glibc-ipk-2007.9-test-20090622-gumstix-custom-verdex.rootfs.tar.gz lrwxrwxrwx 1 beat beat 97 2009-06-23 00:01 gumstix-directfb-image-gumstix-custom-verdex.jffs2 -> Angstrom-gumstix-directfb-image-glibc-ipk-2007.9-test-20090622-gumstix-custom-verdex.rootfs.jffs2 lrwxrwxrwx 1 beat beat 98 2009-06-23 00:01 gumstix-directfb-image-gumstix-custom-verdex.tar.gz -> Angstrom-gumstix-directfb-image-glibc-ipk-2007.9-test-20090622-gumstix-custom-verdex.rootfs.tar.gz -rw-rw-r-- 1 beat beat 1929321 2009-06-22 22:58 modules-2.6.24-r1-gumstix-custom-verdex.tgz -rw-r--r-- 1 beat beat 1191276 2009-06-22 22:58 uImage-2.6.24-r1-gumstix-custom-verdex.bin microSDのformat †microSD に上記の kernel と userland を配置して起動可能にするため、microSD を2つの partition に分割して format します。 $ sudo cp ~/gumstix/gumstix-oe/extras/mmc-root/gumstix-factory.script /media/disk/ $ sudo cp ~/gumstix/gumstix-oe/tmp/deploy/glibc/images/gumstix-custom-verdex/uImage-2.6.24-r1-gumstix-custom-verdex.bin /media/disk/uimage $ sudo tar -C /media/disk-1/ -xvfz ~/gumstix/gumstix-oe/tmp/deploy/glibc/images/gumstix-custom-verdex/gumstix-directfb-image-gumstix-custom-verdex.tar.gz $ sudo tar -C /media/disk-1/ -xvfz ~/gumstix/gumstix-oe/tmp/deploy/glibc/images/gumstix-custom-verdex/modules-2.6.24-r1-gumstix-custom-verdex.tgz microSD boot †用意のできた microSD を bc9 の microSDスロットに挿し、シリアルケーブルを PC に接続して電源を入れると、 $ depmod $ vi /etc/modules/pxafb pxafb とだけ記述して保存 $ vi /etc/modules/fbcon fbcon とだけ記述して保存 $ update-modules これで次回起動時から LCD が表示されるようになります。 by 大塚聡史
|