Show pageOld revisionsBacklinksBack to top This page is read only. You can view the source, but not change it. Ask your administrator if you think this is wrong. ===== FreeBSD on Zedboard ===== The Zedboard is an evaluation board for Xilinx Zynq-7000 series System-on-a-Chip. The Zynq-7000 is an FPGA combined with an ARM Cortex-A9 core and a set of standard peripherals. * [[http://www.zedboard.org|Official Zedboard site]]. * [[http://www.xilinx.com/products/silicon-devices/soc/zynq-7000/index.htm|Xilinx Zynq-7000 product page]]. * [[http://www.thomasskibo.com/zedbsd|Thomas Skibo's FreeBSD on Zedboard page]]. ==== SDCARD images ==== SD card images for %%FreeBSD%% 12-RELEASE on the Zedboard can be found on [[http://www.thomasskibo.com/zedbsd|Thomas Skibo's FreeBSD on Zedboard page]]. Also, [[/TimKientzle]]'s system build tool, [[https://github.com/kientzle/Crochet-FreeBSD|Crochet]], can build Zedboard SD card images. The following describes how to manually build an SD image for Zedboard: ==== Building FreeBSD for Zedboard ==== Zynq/Zedboard support is in -CURRENT and 12-STABLE. To build world and kernel for the Zedboard: <code> make TARGET_ARCH=armv7 KERNCONF=ZEDBOARD buildworld buildkernel </code> ==== Building u-boot.img and boot.bin ==== The Zedboard needs several files in a boot partition. The file boot.bin is the first executable the Zynq chip boots. It initializes the Zynq and then hands over execution to u-boot.img. These files can be built by the port sysutils/u-boot-zedboard. Once built, the files will be installed in /usr/local/share/u-boot/u-boot-zedboard. ==== Building an SDCARD image ==== === Create SD card image === <code> dd if=/dev/zero of=SDCARD.img bs=1m count=2000 mdconfig -f SDCARD.img -u 0 gpart create -s MBR md0 gpart add -s64m -t \!14 md0 gpart set -a active -i 1 md0 newfs_msdos -F 16 /dev/md0s1 gpart add -t freebsd md0 gpart create -s BSD md0s2 gpart add -t freebsd-ufs md0s2 newfs /dev/md0s2a tunefs -n enable /dev/md0s2a </code> === Mount filesystems === <code> mkdir /mnt/boot /mnt/armroot mount -t msdosfs /dev/md0s1 /mnt/boot mount /dev/md0s2a /mnt/armroot </code> === Populate root and boot partitions === From within the source directory: <code> make TARGET_ARCH=armv7 KERNCONF=ZEDBOARD DESTDIR=/mnt/armroot installworld distribution installkernel </code> === Copy u-boot files to the boot partition === <code> cp /usr/local/share/u-boot/u-boot-zedboard/{boot.bin,u-boot.img} /mnt/boot </code> === Copy EFI loader to boot partition === <code> mkdir -p /mnt/boot/EFI/BOOT cp /usr/obj/usr/src/arm.armv7/stand/efi/loader_lua/loader_lua.efi /mnt/boot/EFI/BOOT/bootarm.efi </code> === Final tweaks === Copy the DTB file to boot partition: <code> mkdir /mnt/boot/dtb dtc -I dts -O dtb /usr/src/sys/dtb/arm/zedboard.dts > /mnt/boot/dtb/zedboard.dtb echo "fdtfile=zedboard.dtb" > /mnt/boot/uEnv.txt </code> Touch /firstboot: <code> touch /mnt/armroot/firstboot </code> === Unmount file systems === <code> umount /mnt/boot umount /mnt/armroot mdconfig -d -u 0 </code> === Copy to an SD card === <code> dd if=SDCARD.img of=/dev/da0 bs=1M </code> arm/zedboard.txt Last modified: 2019/10/15 17:47by ThomasSkibo