Add support for Digilent Zybo (Xilinx Zynq-7000)
A message that is not in the archive (sent off-list or not yet received): [email protected]
PATCH 1/1 Add support for Digilent Zybo (Xilinx Zynq-7000)
Hi Thomas, list,
I have some questions regarding the patch and how to make it more fit, you'll find them below.
Quoted 10 lines · Thomas Petazzoni
Review
Quoted 5 lines
(quoted diff) +5
-0+ +1) make zynq_zybo_defconfig +2) make +3) copy files BOOT.BIN, u-boot-dtb.img, rootfs.cpio.uboot, + uImage, zynq-zybo.dtb into your SD cardPlease use genimage to generate a ready-to-use SD card image. You can check many of the other board configurations in Buildroot that are doing this.
Quoted 4 lines
Also, why do you use an initramfs for the rootfs rather than the more traditional ext4 partition next to the FAT partition? This would be the preferred method for the defconfig in Buildroot.
I will go to ext4 but (as a beginner), I'll first investigate what is wrong with ext4 not booting (maybe mmc/ext4 compiled as a module).
In this case, I guess a board specific defconfig should be used ?
Quoted 10 lines
Quoted 10 lines
(quoted diff) +10
-0+Resulting system +---------------- +A FAT32 partition should be created at the beginning of the SD Card +and the following files should be installed: + /BOOT.BIN + /zynq-zybo.dtb + /uImage + /rootfs-cpio.uboot + /u-boot-dtb.img +
Quoted 9 lines
Review
Quoted 5 lines
(quoted diff) +5
-0+ +All needed files can be taken from output/images/ + +BOOT.BIN, uImage and u-boot-dtb.img are direct copies of the same files +available on output/images/All of this can be simplified once you generate a complete SD card image with genimage.
Done genimage is really easier to prepare sd afterwards :)
Quoted 6 lines
Review
Quoted 2 lines
(quoted diff) +2
-0+There is a patch attached that redefines the U-Boot's environment +to work with Buildroot out-of-the-box.Why do you patch the U-Boot built-in environment instead of providing an uEnv.txt file?
I saw loading uEnv.txt was a board specific stuff and should be subject to patch anyways so I added the environment in there so I can use the board without sd card but with the flash memory.
Quoted 6 lines
Quoted 1 line
+The serial console is accessible on the host on
/dev/ttyUSB1at 115200 bauds.Saying it's on
/dev/ttyUSB1on the host is wrong. It might be on your machine, but it might be on ttyUSB0 on mine, or on ttyUSB2. There is no point in giving this information, since you don't know.
Wrong phrasing, USB connection exposes two USB-to-serial interfaces (one for JTAG and one for UART), to get the console you need to use the second one. I'll correct this explanation.
Quoted 18 lines
configs/zynq_zybo_defconfig line 4
Quoted 10 lines
configs/zynq_zybo_defconfig new file +4
-0@@ -0,0 +1,25 @@ +BR2_arm=y +BR2_cortex_a9=y +BR2_ARM_ENABLE_NEON=y +# BR2_COMPILER_PARANOID_UNSAFE_PATH is not setPlease leave this option to the default.
configs/zynq_zybo_defconfig line 6
Quoted 2 lines
configs/zynq_zybo_defconfig new file +2
-0+BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_6=y +BR2_BINUTILS_VERSION_2_26_X=yPlease leave this to the default.
Quoted 9 lines
configs/zynq_zybo_defconfig line 7
Quoted 1 line
configs/zynq_zybo_defconfig new file +1
-0+BR2_GCC_VERSION_5_X=yDitto.
configs/zynq_zybo_defconfig line 9
Quoted 2 lines
configs/zynq_zybo_defconfig new file +2
-0+BR2_TARGET_GENERIC_GETTY_PORT="ttyPS0" +BR2_LINUX_KERNEL=yPlease use a fixed kernel version.
You mean, not "Use the latest kernel" option but "Specific version" and provide a version number ?
Quoted 7 lines
configs/zynq_zybo_defconfig line 12
Quoted 3 lines
configs/zynq_zybo_defconfig new file +3
-0+BR2_LINUX_KERNEL_DEFCONFIG="multi_v7" +BR2_LINUX_KERNEL_UIMAGE=y +BR2_LINUX_KERNEL_UIMAGE_LOADADDR="0x8000"Can you try to use zImage instead, which is now the standard format on ARM?
Apparently the uImage is all I can use easily with the Zynq, maybe with another defconfig in U-boot for this board, I'll be able to use zImages ?
Quoted 12 lines
configs/zynq_zybo_defconfig line 17
Quoted 5 lines
configs/zynq_zybo_defconfig new file +5
-0+BR2_LINUX_KERNEL_DTS_SUPPORT=y +BR2_LINUX_KERNEL_INTREE_DTS_NAME="zynq-zybo" +BR2_TARGET_ROOTFS_CPIO=y +BR2_TARGET_ROOTFS_CPIO_GZIP=y +BR2_TARGET_ROOTFS_CPIO_UIMAGE=yAs suggested above, what about using an ext4 filesystem instead?
configs/zynq_zybo_defconfig line 18
Quoted 1 line
configs/zynq_zybo_defconfig new file +1
-0+BR2_TARGET_UBOOT=yPlease used a fixed version of U-Boot.
Quoted 11 lines
configs/zynq_zybo_defconfig line 25
Quoted 7 lines
configs/zynq_zybo_defconfig new file +7
-0+BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y +BR2_TARGET_UBOOT_PATCH="$(TOPDIR)/board/digilent/zybo/uboot" +BR2_TARGET_UBOOT_BOARD_DEFCONFIG="zynq_zybo" +BR2_TARGET_UBOOT_NEEDS_DTC=y +BR2_TARGET_UBOOT_FORMAT_DTB_IMG=y +BR2_TARGET_UBOOT_SPL=y +BR2_TARGET_UBOOT_ZYNQ_IMAGE=yCould you rework your patch according to the above suggestions? With those suggestions taken into account, your patch could be merged in Buildroot.
It's ongoing, thanks for your time ;)
S?bastien
PATCH 1/1 Add support for Digilent Zybo (Xilinx Zynq-7000)
Hello Sebastien,
Quoted 8 lines · Sebastien Van Cauwenberghe
Quoted 4 lines
Also, why do you use an initramfs for the rootfs rather than the more traditional ext4 partition next to the FAT partition? This would be the preferred method for the defconfig in Buildroot.
I will go to ext4 but (as a beginner), I'll first investigate what is wrong with ext4 not booting (maybe mmc/ext4 compiled as a module).
In this case, I guess a board specific defconfig should be used ?
You mean the defconfig for your platform does not have ext4 support built-in? That would be weird.
But if that's really the case, don't add a board specific defconfig. Instead, use the existing defconfig, and provide a defconfig fragment (option BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES) to enable ext4/mmc as needed.
Quoted 4 lines
Quoted 3 lines
All of this can be simplified once you generate a complete SD card image with genimage.
Done genimage is really easier to prepare sd afterwards :)
Indeed, that's the whole point of genimage!
Quoted 9 lines
Quoted 6 lines
Review
Quoted 2 lines
(quoted diff) +2
-0+There is a patch attached that redefines the U-Boot's environment +to work with Buildroot out-of-the-box.Why do you patch the U-Boot built-in environment instead of providing an uEnv.txt file?
I saw loading uEnv.txt was a board specific stuff and should be subject to patch anyways so I added the environment in there so I can use the board without sd card but with the flash memory.
So the default environment is not already loading a uEnv.txt file or executing some default script from the MMC ?
If that's the case, then indeed, you need to patch the default environment.
Quoted 8 lines
Quoted 6 lines
Quoted 1 line
+The serial console is accessible on the host on
/dev/ttyUSB1at 115200 bauds.Saying it's on
/dev/ttyUSB1on the host is wrong. It might be on your machine, but it might be on ttyUSB0 on mine, or on ttyUSB2. There is no point in giving this information, since you don't know.Wrong phrasing, USB connection exposes two USB-to-serial interfaces (one for JTAG and one for UART), to get the console you need to use the second one. I'll correct this explanation.
OK.
Quoted 6 lines
Quoted 5 lines
Review
Quoted 2 lines
(quoted diff) +2
-0+BR2_TARGET_GENERIC_GETTY_PORT="ttyPS0" +BR2_LINUX_KERNEL=yPlease use a fixed kernel version.
You mean, not "Use the latest kernel" option but "Specific version" and provide a version number ?
Yes.
Quoted 9 lines
Quoted 7 lines
Review
Quoted 3 lines
(quoted diff) +3
-0+BR2_LINUX_KERNEL_DEFCONFIG="multi_v7" +BR2_LINUX_KERNEL_UIMAGE=y +BR2_LINUX_KERNEL_UIMAGE_LOADADDR="0x8000"Can you try to use zImage instead, which is now the standard format on ARM?
Apparently the uImage is all I can use easily with the Zynq, maybe with another defconfig in U-boot for this board, I'll be able to use zImages ?
Hum, you really don't have the "bootz" command in U-Boot? For a modern U-Boot, this seems weird.
Thanks!
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
PATCH 1/1 Add support for Digilent Zybo (Xilinx Zynq-7000)
Hi Thomas, list,
Quoted 7 lines
Quoted 7 lines
Quoted 4 lines
Also, why do you use an initramfs for the rootfs rather than the more traditional ext4 partition next to the FAT partition? This would be the preferred method for the defconfig in Buildroot.
I will go to ext4 but (as a beginner), I'll first investigate what is wrong with ext4 not booting (maybe mmc/ext4 compiled as a module).
Inadequate bootargs were used, now it works without changing defconfig.
Quoted 10 lines
Quoted 9 lines
Quoted 6 lines
Review
Quoted 2 lines
(quoted diff) +2
-0+There is a patch attached that redefines the U-Boot's environment +to work with Buildroot out-of-the-box.Why do you patch the U-Boot built-in environment instead of providing an uEnv.txt file?
I saw loading uEnv.txt was a board specific stuff and should be subject to patch anyways so I added the environment in there so I can use the board without sd card but with the flash memory.
Quoted 6 lines
So the default environment is not already loading a uEnv.txt file or executing some default script from the MMC ?
If that's the case, then indeed, you need to patch the default environment.
I'll give a try to use uEnv.txt as it's also in the common Zynq configurations. I just hope it's not loaded too late, otherwise, patch it will be :).
Quoted 9 lines
Quoted 6 lines
Quoted 4 lines
Can you try to use zImage instead, which is now the standard format on ARM?
Apparently the uImage is all I can use easily with the Zynq, maybe with another defconfig in U-boot for this board, I'll be able to use zImages ?
Hum, you really don't have the "bootz" command in U-Boot? For a modern U-Boot, this seems weird.
It's in U-boot but not enabled in the defconfig for this board, so I don't know which is better, change the defconfig U-boot or just live with the uImage instead of zImage. Or maybe FIT image ? I just don't know what to use...
Thanks for your time
S?bastien