Thank you very much for the amazing video. It would be great if you can cover the topic of device trees and how you would set up the device tree for such a build in a future video.
*Abstract* This video tutorial demonstrates how to boot an AMD Xilinx Zynq System on Chip (SoC) from an SD card using PetaLinux. The guide covers SD card partitioning and formatting, required image files, boot mode configuration, and a workaround for booting from non-standard SD card pins or eMMC memory. The video utilizes a custom-designed mixed-signal audio analyzer PCB featuring the Zynq 7000 series SoC. *PCB/Hardware Overview* * 0:30: The video uses a custom PCB with a Zynq 7000 series SoC, DDR3 memory, Gigabit Ethernet, and a fully isolated analog audio interface. * 0:46: The PCB includes a micro SD card connector connected to the Zynq SoC via a logic level shifter. * 0:59: A mode switch on the PCB allows toggling between different boot modes by controlling the strapping pins of the Zynq SoC. *Schematic Overview* * 6:58: The Zynq SoC's processing system (PS) has two I/O banks: Bank 0 (3.3V) and Bank 1 (1.8V). * 7:07: Bank 1 operates at 1.8V to support high-speed peripherals like Gigabit Ethernet and USB 2.0. * 7:40: The boot mode is determined by the state of the Mode strapping pins (MIO 0-2) during startup. Different combinations of these pins select JTAG, QSPI, SD card, or other boot modes. * 8:29: The SD card interface (SD0) must be connected to specific MIO pins (40-45) for standard SD card boot mode. * 9:17: Since SD0 is in Bank 1 and the SD card operates at 3.3V, a logic level shifter is needed to interface with the 1.8V bank. *Vivado Block Design & Peripheral Selection* * 9:38: The hardware design is created in Vivado using a block design containing the Zynq processing system and necessary peripherals. * 10:08: The Zynq PS configuration involves setting bank voltages, configuring interfaces like QSPI for flash memory and SD0 for the SD card, and setting up DDR3 memory. * 11:28: After generating the bitstream, the hardware configuration is exported as an XSA file for use in PetaLinux. *Petalinux Config & Build (Video **#100**)* * 12:03: Refer to video #100 on the channel for detailed instructions on building the PetaLinux project, including kernel and U-boot configuration, and flashing the image via JTAG. *SD Card Partition & Format* * 12:55: A blank SD card is partitioned into two sections: * 13:17: Partition 0 (boot): A small FAT32 partition (e.g., 1GB) to store boot images. * 13:31: Partition 1 (rootfs): A larger ext4 partition using the remaining SD card space for the root file system. * 14:11: The video demonstrates using the `fdisk` utility in a Linux environment to create and format the partitions. *Copying Petalinux Files to SD Card* * 16:47: The necessary PetaLinux image files are copied to the SD card partitions: * 17:09: Boot partition: `boot.scr`, `boot.bin`, and the U-boot image. * 17:24: Rootfs partition: Extract `rootfs.tar.gz` or use the `dd` command to copy `rootfs.ext4` image. *SD Card Boot Mode* * 18:20: The SD card with the copied files is inserted into the PCB's SD card holder. * 18:31: The boot mode pins are set to 101 (boot mode 0=1, boot mode 1=0, boot mode 2=1) to select SD card boot mode. *QSPI SD/EMMC Boot Workaround* * 18:47: If the SD card is connected to non-standard pins or eMMC memory is used, a workaround is needed: * 19:07: Generate a first stage bootloader (FSBL) in Vitis IDE using the exported XSA file. * 19:56: Modify the FSBL code to force SD or eMMC boot mode regardless of the boot mode pins. * 21:27: Build the FSBL project and create a `boot.bin` image. * 22:33: Flash the `boot.bin` image to the QSPI flash memory using the Zynq tools in JTAG mode. * 23:37: Set the boot mode pins to 100 (QSPI boot mode) to load the FSBL, which then jumps to the SD card or eMMC for booting PetaLinux. *Petalinux Boot* * 23:52: With the SD card inserted and the correct boot mode selected, power up the board. * 25:23: The PetaLinux kernel boots up, and you should see the login prompt on the serial terminal. i used gemini 1.5 pro Token count 12,764 / 1,048,576
Embedded Linux has come a long long way since I wrote my book 22 years ago. I've got your other petalinux videos queued for this evening, to see how its done now, especially all the pre-init initialization. Your boot time was about 8 secs? Thanks Phil.
I watched #100 and actually have to say, embedded Linux at this level really hasn't changed that much in to past 20 yrs. Run menuconfig, compile, wait, flash, reset (cross fingers) and boot.
Hi Phil, As I'm new to hardware design, I've learned many basics from you about designing custom PCBs. However, I'm still a bit confused about how to start and succeed with the right method. I need to use the STM32H745 microcontroller for my project. Should I follow the schematic of the H745-DISCO board as a reference for the basic workings of the design? Please guide me. Thank you!
So good. i'm working on a project with petalinux, my host OS is windows and virtual OS is Ubuntu 16.04, also I'm using Vivado 2018.3 on windows and my project on there. As far as i see, I don't need another vivado on my virtual Ubuntu but is it enough ? Can only petalinux 2018.3 tools create an SD Card image for my windows based project ?
Hey Phil I hope you can help! When I have an exposed pad in Altium and I put Vias in there I always get Design rule errors. How do I fix those? Vias under SMD didn’t seem to work. Hope you can help!
Really nice. I used to do a bit programming with Basys 2 in VHDL, but never programmed one of them which have ARM core built in. Does your videos 96-100 talk about it how this all works? I have no idea how it works or how to program it, but seems quite interesting. Do you happen to know any beginner tutorial(software)? What cool you can do with it? I see you can program in C. I assume it's the ARM part. How did you get started with it?
Thank you! The previous videos are more about bringing the board up, rather than 'pure programming' tutorials. Although that could be a good starting point (e.g. the example projects). You can program in C/C++, or use the PYNQ environment to go the Python route. There is quite a steep learning curve, but I'd like to make some programming tutorials next. From what I've found actual, practical tutorials are a bit sparse - although there are some online.
Can you please share link for zynq tutorial. I have to matrix multiplication in PS part such that data of matrix is to be fetched from text file. And based on that I have to do some performance in PL part
For PS-PL there are a couple of tutorials using AXI for communication (e.g. medium.com/@prateek22sri/life-with-an-fpga-3-zynq-ps-pl-axi-basedadder-ece25805e5c6).
Can I mention one thing, for whatever reason when you move the camera across the board at 0:24 the PCB is super blurry. I am just a youtube viewer dweeb, but for these types of sweeping shots use a different camera, I thought my eyes were going out and then I realized you just either had the wrong settings on your camera or just using a camera not meant for macro shots.
Thanks - yeah, I need to get a better set-up for that. Also I believe I recorded at a different framerate to that of the screen recording, which may add to the blurriness.
@@PhilsLab still a great video, keep them coming! You are one of the few creators where I drop everything I am doing when I get a notification that you have uploaded.
Hey Phil, Absolutely love this Zynq series. You're inspiring and educating a generation of engineers! Thanks for all that you do!
Thank you very much, Chris!
Thank you very much for the amazing video. It would be great if you can cover the topic of device trees and how you would set up the device tree for such a build in a future video.
Very cool, love that you came back to finish up the Zynq series. The FSBL modification is pretty clever!
*Abstract*
This video tutorial demonstrates how to boot an AMD Xilinx Zynq System on Chip (SoC) from an SD card using PetaLinux. The guide covers SD card partitioning and formatting, required image files, boot mode configuration, and a workaround for booting from non-standard SD card pins or eMMC memory. The video utilizes a custom-designed mixed-signal audio analyzer PCB featuring the Zynq 7000 series SoC.
*PCB/Hardware Overview*
* 0:30: The video uses a custom PCB with a Zynq 7000 series SoC, DDR3 memory, Gigabit Ethernet, and a fully isolated analog audio interface.
* 0:46: The PCB includes a micro SD card connector connected to the Zynq SoC via a logic level shifter.
* 0:59: A mode switch on the PCB allows toggling between different boot modes by controlling the strapping pins of the Zynq SoC.
*Schematic Overview*
* 6:58: The Zynq SoC's processing system (PS) has two I/O banks: Bank 0 (3.3V) and Bank 1 (1.8V).
* 7:07: Bank 1 operates at 1.8V to support high-speed peripherals like Gigabit Ethernet and USB 2.0.
* 7:40: The boot mode is determined by the state of the Mode strapping pins (MIO 0-2) during startup. Different combinations of these pins select JTAG, QSPI, SD card, or other boot modes.
* 8:29: The SD card interface (SD0) must be connected to specific MIO pins (40-45) for standard SD card boot mode.
* 9:17: Since SD0 is in Bank 1 and the SD card operates at 3.3V, a logic level shifter is needed to interface with the 1.8V bank.
*Vivado Block Design & Peripheral Selection*
* 9:38: The hardware design is created in Vivado using a block design containing the Zynq processing system and necessary peripherals.
* 10:08: The Zynq PS configuration involves setting bank voltages, configuring interfaces like QSPI for flash memory and SD0 for the SD card, and setting up DDR3 memory.
* 11:28: After generating the bitstream, the hardware configuration is exported as an XSA file for use in PetaLinux.
*Petalinux Config & Build (Video **#100**)*
* 12:03: Refer to video #100 on the channel for detailed instructions on building the PetaLinux project, including kernel and U-boot configuration, and flashing the image via JTAG.
*SD Card Partition & Format*
* 12:55: A blank SD card is partitioned into two sections:
* 13:17: Partition 0 (boot): A small FAT32 partition (e.g., 1GB) to store boot images.
* 13:31: Partition 1 (rootfs): A larger ext4 partition using the remaining SD card space for the root file system.
* 14:11: The video demonstrates using the `fdisk` utility in a Linux environment to create and format the partitions.
*Copying Petalinux Files to SD Card*
* 16:47: The necessary PetaLinux image files are copied to the SD card partitions:
* 17:09: Boot partition: `boot.scr`, `boot.bin`, and the U-boot image.
* 17:24: Rootfs partition: Extract `rootfs.tar.gz` or use the `dd` command to copy `rootfs.ext4` image.
*SD Card Boot Mode*
* 18:20: The SD card with the copied files is inserted into the PCB's SD card holder.
* 18:31: The boot mode pins are set to 101 (boot mode 0=1, boot mode 1=0, boot mode 2=1) to select SD card boot mode.
*QSPI SD/EMMC Boot Workaround*
* 18:47: If the SD card is connected to non-standard pins or eMMC memory is used, a workaround is needed:
* 19:07: Generate a first stage bootloader (FSBL) in Vitis IDE using the exported XSA file.
* 19:56: Modify the FSBL code to force SD or eMMC boot mode regardless of the boot mode pins.
* 21:27: Build the FSBL project and create a `boot.bin` image.
* 22:33: Flash the `boot.bin` image to the QSPI flash memory using the Zynq tools in JTAG mode.
* 23:37: Set the boot mode pins to 100 (QSPI boot mode) to load the FSBL, which then jumps to the SD card or eMMC for booting PetaLinux.
*Petalinux Boot*
* 23:52: With the SD card inserted and the correct boot mode selected, power up the board.
* 25:23: The PetaLinux kernel boots up, and you should see the login prompt on the serial terminal.
i used gemini 1.5 pro
Token count
12,764 / 1,048,576
Amazing job again from Phill.
I hope i can see these project with open source files😊
Thanks, Patrick! I'll do a hardware walkthrough vid at some point.
@@PhilsLab that would be perfect 🫶
Thanks for another great video, Phil.
Great video, regarding booting from the soldered EMMC, how does the EMMC formatting/partition goes?
Embedded Linux has come a long long way since I wrote my book 22 years ago. I've got your other petalinux videos queued for this evening, to see how its done now, especially all the pre-init initialization. Your boot time was about 8 secs? Thanks Phil.
I'll have to check out your book, Craig! Boot time is under 30sec with the SD card.
I watched #100 and actually have to say, embedded Linux at this level really hasn't changed that much in to past 20 yrs. Run menuconfig, compile, wait, flash, reset (cross fingers) and boot.
@@PhilsLab we should set up a call, I'm sure you'd like to hear stories about embedded Linux before there was embedded Linux. I'll contact you.
Nice video Phil, Thank you very much! Maybe you can make this board as an educational video like your Advanced Hardware Design course! ❤
Thank you! I'll make a few tutorials using this board, as well as a hardware design walkthrough video.
How to know if someone is a gangsta without them saying they're a gangsta , you watch this video and find out
Thanks you for your tutorials, can you do one video for the SYZYGY standard?
Hi Phil,
As I'm new to hardware design, I've learned many basics from you about designing custom PCBs. However, I'm still a bit confused about how to start and succeed with the right method. I need to use the STM32H745 microcontroller for my project. Should I follow the schematic of the H745-DISCO board as a reference for the basic workings of the design? Please guide me.
Thank you!
Can you do near field probe video on this board? that would be intresting. Love your videos btw
That's cool and all but where are the RGB LEDs?
So good. i'm working on a project with petalinux, my host OS is windows and virtual OS is Ubuntu 16.04, also I'm using Vivado 2018.3 on windows and my project on there. As far as i see, I don't need another vivado on my virtual Ubuntu but is it enough ? Can only petalinux 2018.3 tools create an SD Card image for my windows based project ?
what about using Vitis to put an application on a petalinux platform?
Notice that you can go with one partition approach (boot partition) because rootfs is copied to image.ub. There are pros and cons to this approach.
How is your Zynq Ultrascale design doing ?
I'm afraid I've had to put that on hold for some time now, as I've been rather busy with many other projects (work predominantly).
Hey Phil I hope you can help! When I have an exposed pad in Altium and I put Vias in there I always get Design rule errors. How do I fix those? Vias under SMD didn’t seem to work. Hope you can help!
Really nice. I used to do a bit programming with Basys 2 in VHDL, but never programmed one of them which have ARM core built in. Does your videos 96-100 talk about it how this all works? I have no idea how it works or how to program it, but seems quite interesting. Do you happen to know any beginner tutorial(software)? What cool you can do with it? I see you can program in C. I assume it's the ARM part. How did you get started with it?
Thank you! The previous videos are more about bringing the board up, rather than 'pure programming' tutorials. Although that could be a good starting point (e.g. the example projects). You can program in C/C++, or use the PYNQ environment to go the Python route. There is quite a steep learning curve, but I'd like to make some programming tutorials next. From what I've found actual, practical tutorials are a bit sparse - although there are some online.
@@PhilsLab Thanks for the answer.
Where do you purchase the Zync Chips?
They're from LCSC
Thanks a lot! Didn‘t know lcsc stocks Zync’s.
From what I can tell, they're genuine parts but 'grey-market'. Makes them about a 10th of the price compared to those on Mouser.
Can you please share link for zynq tutorial. I have to matrix multiplication in PS part such that data of matrix is to be fetched from text file. And based on that I have to do some performance in PL part
For PS-PL there are a couple of tutorials using AXI for communication (e.g. medium.com/@prateek22sri/life-with-an-fpga-3-zynq-ps-pl-axi-basedadder-ece25805e5c6).
👍🙏❤️
Can I mention one thing, for whatever reason when you move the camera across the board at 0:24 the PCB is super blurry. I am just a youtube viewer dweeb, but for these types of sweeping shots use a different camera, I thought my eyes were going out and then I realized you just either had the wrong settings on your camera or just using a camera not meant for macro shots.
Thanks - yeah, I need to get a better set-up for that. Also I believe I recorded at a different framerate to that of the screen recording, which may add to the blurriness.
@@PhilsLab still a great video, keep them coming! You are one of the few creators where I drop everything I am doing when I get a notification that you have uploaded.
Thanks a lot, I'm very glad to hear that!