Adrian Remonda 2016
- Linaro toolchain installed
- Zybo with Linux running
- If using Debian setup the tool chain as next [ Setup Toolchain in debian] (02-toolchain.md)
- If using Ubuntu install the next packages:
~$ sudo apt-get install -y device-tree-compiler lzma lzop u-boot-tools
~$ sudo apt-get install -y gcc-arm-linux-gnueabihf
~$ LINUX_TAG=xilinx-v2016.4
~$ wget https://github.com/Xilinx/linux-xlnx/archive/${LINUX_TAG}.zip && unzip ${LINUX_TAG}.zip && cd linux-xlnx-${LINUX_TAG}
~$ git init
~$ git add .
~$ git commit -m "Linux vanilla"
~$ . ./export_me_xilinx_kernel.sh
To check the that the compiler was setup correctly:
~$ ${CC}gcc --version
This file contains the linux configuration. Get the default
~$ make xilinx_zynq_defconfig
Configure the kernel (works with the default configuration)
~$ make menuconfig
Copy the device tree from /zybo/zynq-zybo.dts to /arch/arm/boot/dts/zynq-zed.dts
~$ gedit arch/arm/boot/dts/zynq-zybo.dts
Change the line "chosen" parameters as next:
chosen {
bootargs = "console=ttyPS0,115200 root=/dev/mmcblk0p2 rw rootfstype=ext4 rootwait earlyprintk";
linux,stdout-path = "/amba/serial@e0001000";
};
To add new perhiperals edit the next file:
arch/arm/boot/dts/zynq-7000.dtsi
~$ make zynq-zybo.dtb
~$ make uImage -j4
~$ make modules -j4
~$ make modules_install INSTALL_MOD_PATH=./modules
~$ scp arch/arm/boot/dts/zynq-zybo.dtb root@${ip}:${boot}/devicetree.dtb
~$ scp arch/arm/boot/uImage root@$ip:${boot}
~$ ssh root@$ip 'unlock'
~$ rsync -avc modules/lib/. root@$ip:/lib/. && ssh root@$ip 'sync'
~$ cp -v arch/arm/boot/dts/zynb-zybo.dtb /media/$USER/BOOT/devicetree.dtb
~$ cp -v arch/arm/boot/uImage /media/$USER/BOOT
~$ sudo rsync -avc modules/lib/. /media/$USER/rootfs/lib/.
~$ sync
At the first access to the board command line update the module dependencies by typing this command:
~# depmod -a
~$ git commit
~$ git format-patch -1 -o ../patches/
~$ patch -p1 < ../patches/ check patches
- Increase ram to 1G (0x40000000) arch/arm/boot/dts/zynq-zed.dts