We will not be using pre-configured settings. (This would be possible by using a bsp file).
(Thus, we will rely on templates).
$ petalinux-create --type project --template zynq --name my_project
$ cd my_project
$ petalinux-config --get-hw-description path/to/exported/design_1_wrapper.xsa --silentconfig
$ petalinux-config
(w/o params).To save download time, we can download various caches. There are two of them, the “download” and the “sstate” one. Namely, under the PetaLinux Tools sstate-cache Artifacts, the following can be downloaded:
Extract both of them and note the destination paths like so:
file:///path/to/downloads/inner/downloads/folder
/path/to/sstate/top/arm/folder
To set them:
menuconfig
: $ petalinux-config
Yocto-settings ⟶ Add pre-mirror URL
, andYocto Settings ⟶ Local sstate feeds settings
:(Instead of loading Linux onto [board’s] RAM (default/image.ub)),
We will install, Linux, directly onto the SD(ext4) card.
menuconfig
: $ petalinux-config
Image Packaging Configuration ⟶ Root filesystem type ⟶ EXT4
Yocto Settings ⟶ Parallel thread execution
(As per reference), Open the rootfs
configuration:
$ petalinux-config -c rootfs
Image Features ⟶ serial-autologin-root
In order to not boot read-only, we’ll need a device tree
specification.
Taken from the original source code, we’ll adapt the device tree specifications (files system-user.dtsi
and zturn-pl-hdmi.dtsi
(the .dtsi
stands for Device Tree Source Include
)), too isolate the SD part: (and adapt the system-user.dtsi
file):
my_project/project-spec/meta-user/recipes-bsp/device-tree/files/system-user.dtsi
:
/include/ "system-conf.dtsi"
/ {
aliases {
mmc0 = &sdhci0;
};
};
&sdhci0 {
status = "okay";
disable-wp;
// wp-inverted;
};
$ petalinux-build
build/downloads
folder to reduce download times).FIXME: Why?
$ petalinux-package --boot --u-boot --fpga project-spec/hw-description/design_1_wrapper.bit
--fpga path/bit
) to include the bitstream.project-spec/hw-description/design_1_wrapper.bit
is updated after $ petalinux-config
, whereasimages/linux/system.bit
may not be updatedBOOT.BIN
, boot.scr
, image.ub
files which contain the bootloader (?), the (?) [reference] and the kernel, along with:rootfs.tar.gz
, which will be extracted onto the SD.As per the tutorial:
boot.scr
is the script that U-Boot reads during boot time to load the kernel and rootfsimage.ub
contains kernel image, device tree and rootfsThus, up to the previous chapter, the ext4
(where the rootfs.tar.gz
was extracted) was not being used 🙊!
As per reference:
BOOT.bin
, boot.scr
and image.ub
files into a FAT32
partition of the SD cardrootfs.tar.gz
into an ext4
partition(You can monitor the boot process with picocom or CuteCom).