diff --git a/README.md b/README.md index a09024c880a0875818d097298cc8415f0ad9bece..404d780c4b86e33b52eff49444ed4d5af6109765 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # PetaLinux for Scalp board -## Documentation to create a custom BSP for PetaLinux +## Documentation to create a PetaLinux distribution for Scalp board PetaLinux is an extension of the Yocto project that provides official support (Xilinx layers) for Xilinx SoCs Arm (Zynq and ZynqMP) and Xilinx Microblaze. @@ -182,8 +182,31 @@ The produced binary file can be found in the **./images/linux** folder. This is ### Flash firmware on QSPI memory +If you are using a single JTAG probe. + +``` +$ program_flash -f images/linux/BOOT.BIN -offset 0 -flash_type qspi-x4-single -fsbl images/linux/zynq_fsbl.elf -cable type xilinx_tcf url TCP:127.0.0.1:3121 +``` + +The **program_flash** command is located in the Vivado installation folder. + +If you use several JTAG probes. + ``` -petalinux-package --boot --fsbl images/linux/zynq_fsbl.elf --fpga images/linux/system.bit --u-boot --kernel --offset 0x520000 +$ program_flash -jtagtarget + +JTAG chain configuration +-------------------------------------------------- +1 Digilent 210299AFC175 + 2 jsn-JTAG-HS3-210299AFC175-4ba00477-0 (name arm_dap idcode 4ba00477) + 3 jsn-JTAG-HS3-210299AFC175-0373b093-0 (name xc7z015 idcode 0373b093) +4 Xilinx 00001a3719fe01 + 5 jsn-DLC10-00001a3719fe01-4ba00477-0 (name arm_dap idcode 4ba00477) + 6 jsn-DLC10-00001a3719fe01-0373b093-0 (name xc7z015 idcode 0373b093) + +$ program_flash -f images/linux/BOOT.BIN -offset 0 -flash_type qspi-x4-single -fsbl images/linux/zynq_fsbl.elf -target_id 2 -url TCP:127.0.0.1:3121 + +$ program_flash -f images/linux/BOOT.BIN -offset 0 -flash_type qspi-x4-single -fsbl images/linux/zynq_fsbl.elf -target_id 5 -url TCP:127.0.0.1:3121 ``` The **image.ub** file corresponds to the image of the Linux kernel, the device tree and the RamFS file system in FIT format. @@ -195,3 +218,45 @@ The image content can be viewed using the **dumpimage** command. ``` In my case, I copied the tools produced by U-Boot into the **/tools/u-boot-tools/** folder. + +## HOWTO + +### Howto create a patch for U-Boot ? + +Retrieve the desired version of the U-Boot GIT deposit. + +``` +$ git clone https://github.com/Xilinx/u-boot-xlnx.git +$ cd u-boot-xlnx +$ git checkout xilinx-v2020.2 +``` + +Make the necessary modifications and commit the changes. + +``` +$ git add * +$ git commit -m "Doing something." +``` + +Produce the new patch. + +``` +$ git diff -p xilinx-v2020.2 HEAD > my-u-boot.patch +``` + +Solution in case of problems with whitespaces. + +``` +$ emacs u-boot-scalp-sja1105.patch -f delete-trailing-whitespace -f save-buffer -f kill-emacs +``` + +Apply the new patch to a clean version of the U-Boot GIT deposit. + +``` +$ git clone https://github.com/Xilinx/u-boot-xlnx.git +$ cd u-boot-xlnx +$ git checkout xilinx-v2020.2 +$ git apply u-boot-scalp-sja1105.patch +``` + +And that's it.