ZYBOの情報はまだ少なげなので、まずはZedBoardでの例をトレースして勉強して見ます(ZedBoardもって無いけど)。
多くの先人がトライされているようだ。
http://mfn.blog.so-net.ne.jp/2013-09-18
http://marsee101.blog19.fc2.com/blog-entry-2402.html
感謝しつつ情報収集して進めてみる。
VirtualBox + Ubuntu13.10 64bit で開始。
git clone https://github.com/Digilent/linux-digilent.git
早速時間がかかる….
sudo apt-get install ncurses-dev
export CCOMPILER=arm-xilinx-linux-gnueabi-gcc export ARCH=arm export CROSS_COMPILE=arm-xilinx-linux-gnueabi-
cd linux-digilent
cp ./arch/arm/configs/digilent_zed_defconfig .config make menuconfig make
ちなみに menuconfig では何もせずに Exit しました。 いいのかな?
拍子抜けするほどあっさりと arch/arm/boot/zImage が完成
git の clone が一番時間がかかりました。build は事の他高速に終わりました。
さて、ZedBoard と ZYBO の相違点も把握していないのだがこれからどうしたものか。
とりあえず、ZedBoard用を一通り勉強して見る
git clone https://github.com/Digilent/u-boot-digilent
make zynq_zed_config make
とりあえずここで Windows にファイルを持っていって、BOOT.BIN だけ作って、残りはすべて
ZedBoardのファイルで起動して見た。
U-Boot 2012.04.01 (Feb 28 2014 – 17:25:42)
DRAM: 512 MiB
WARNING: Caches not enabled
MMC: SDHCI: 0
Using default environmentIn: serial
Out: serial
Err: serial
Net: zynq_gem
Hit any key to stop autoboot: 0
Copying Linux from SD to RAM…
Device: SDHCI
Manufacturer ID: 3
OEM: 5344
Name: SU16G
Tran Speed: 25000000
Rd Block Len: 512
SD version 2.0
High Capacity: Yes
Capacity: 14.8 GiB
Bus Width: 4-bit
reading zImage2479640 bytes read
reading devicetree.dtb** Unable to read "devicetree.dtb" from mmc 0:1 **
reading ramdisk8M.image.gz3694108 bytes read
## Starting application at 0x00008000 …
Uncompressing Linux… done, booting the kernel.Error: unrecognized/unsupported machine ID (r1 = 0x1fb69578).
Available machine support:
ID (hex) NAME
00000d32 Xilinx Zynq Platform
00000d0f Xilinx Zynq Platform
00000d32 Xilinx Zynq Platform
00000d0f Xilinx Zynq Platform
00000d0f Xilinx Zynq Platform
00000d0f Xilinx Zynq PlatformPlease check your kernel config and/or bootloader.
というイマイチの結果だったが、u-bootのビルド日は今日になっており、bitファイルは自作のLEDチカチカが動いているようだ。
Linuxとか動かさない分には BOOT.BIN でバイナリ置けばARM上で走るはずなので、ITRONとか動かすのは楽かも。
その後
git clone git://git.xilinx.com/device-tree.git bsp/device-tree_v0_00_x
sudo cp -r bsp/device-tree_v0_00_x/ /opt/Xilinx/SDK/2013.4/sw/lib/bsp/
とか、いろいろ説明があるのだがついていけていない...
追記
https://github.com/Digilent/u-boot-Digilent-Dev/commit/e7773ea2067c224f178a40a97d003ff418f47e12
に "Xilinx: Arm: Add Config Support for ZYBO" の記述が!
git clone https://github.com/Digilent/u-boot-Digilent-Dev.git
make zynq_zybo_config
make
普通に通りますね。
コメント