Hochmüller Stephan 2017
- Linaro toolchain 64bit installed
- ultraZed with Linux running
- arm 64bit compiler:
- If using Debian or Ubuntu setup the tool chain as next [ Setup Toolchain in debian] (02-toolchain.md) or
- Directly Linaro toolchain 64bit
Note: with Debian Jessie the Kernel doesn't compile, test with Debian Stretch
~$ LINUX_TAG=xilinx-v2017.1
~$ 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_ultraZed.sh
To check the that the compiler was setup correctly:
~$ ${CC}gcc --version
This file contains the linux configuration. Get the default
~$ make xilinx_zynqmp_defconfig
~$ make menuconfig
to configure OpenAMP ensure that the following module is enabled:
Device Driver
|
---> Remoteproc drivers
|
--->ZynqMP_r5 remoteproc support
Note: The Rpmsg driver is also needed. If the drivers are enabled in kernel configuration an error gets obtained at branch 2017.1. To still get the module compiled the rpmsg_user_dev_driver from https://github.com/Xilinx/meta-openamp/blob/rel-v2017.1/recipes-kernel/rpmsg-user-module/files/rpmsg_user_dev_driver.c can be used. The module and a makefile is given in /ultrazed/rpmsg_user_dev_driver.
use the device tree source file provided in /ultrZed/device_tree and build it with the build_dts.sh script
~$ make Image -j4
~$ make modules -j4
~$ make modules_install INSTALL_MOD_PATH=./modules
~$ scp <repo path>/ultrazed/system.dtb root@${ip}:${boot}/devicetree.dtb
~$ scp arch/arm64/boot/Image root@$ip:${boot}
~$ ssh root@$ip 'unlock'
~$ rsync -avc modules/lib/. root@$ip:/lib/. && ssh root@$ip 'sync'
~$ cp -v scp <repo path>/ultrazed/system.dtb /media/$USER/BOOT/devicetree.dtb
~$ cp -v arch/arm64/boot/Image /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