diff options
author | Mark Hatle <mark.hatle@xilinx.com> | 2021-12-15 13:52:16 -0800 |
---|---|---|
committer | Mark Hatle <mark.hatle@xilinx.com> | 2022-01-14 15:37:02 -0800 |
commit | f900c6a0c8908e370689235230094308ec419cf9 (patch) | |
tree | bd9ca83e452c263c7a421b826086048cf8130f34 /meta-xilinx-core/recipes-bsp/u-boot/u-boot-zynq-scr | |
parent | aaddcc3f785404da04af9ea3d005f2f520b4ec9e (diff) | |
download | meta-xilinx-f900c6a0c8908e370689235230094308ec419cf9.tar.gz |
Initial restructure/split of meta-xilinx-bsp
Create a new meta-xilinx-core, move core functionality to the core, keeping
board specific files in the bsp layer.
zynqmp-generic changed from require <board> to include, so if meta-xilinx-bsp
is not available it will not fail.
Signed-off-by: Mark Hatle <mark.hatle@xilinx.com>
Diffstat (limited to 'meta-xilinx-core/recipes-bsp/u-boot/u-boot-zynq-scr')
7 files changed, 147 insertions, 0 deletions
diff --git a/meta-xilinx-core/recipes-bsp/u-boot/u-boot-zynq-scr/boot.cmd.generic b/meta-xilinx-core/recipes-bsp/u-boot/u-boot-zynq-scr/boot.cmd.generic new file mode 100644 index 00000000..0249a8a0 --- /dev/null +++ b/meta-xilinx-core/recipes-bsp/u-boot/u-boot-zynq-scr/boot.cmd.generic | |||
@@ -0,0 +1,70 @@ | |||
1 | # This is a boot script for U-Boot | ||
2 | # Generate boot.scr: | ||
3 | # mkimage -c none -A arm -T script -d boot.cmd.default boot.scr | ||
4 | # | ||
5 | ################ | ||
6 | fitimage_name=@@FIT_IMAGE@@ | ||
7 | kernel_name=@@KERNEL_IMAGE@@ | ||
8 | ramdisk_name=@@RAMDISK_IMAGE1@@ | ||
9 | rootfs_name=@@RAMDISK_IMAGE@@ | ||
10 | @@PRE_BOOTENV@@ | ||
11 | |||
12 | for boot_target in ${boot_targets}; | ||
13 | do | ||
14 | echo "Trying to load boot images from ${boot_target}" | ||
15 | if test "${boot_target}" = "jtag" ; then | ||
16 | @@KERNEL_BOOTCMD@@ @@KERNEL_LOAD_ADDRESS@@ @@RAMDISK_IMAGE_ADDRESS@@ @@DEVICETREE_ADDRESS@@ | ||
17 | fi | ||
18 | if test "${boot_target}" = "mmc0" || test "${boot_target}" = "mmc1" ; then | ||
19 | if test -e ${devtype} ${devnum}:${distro_bootpart} /@@UENV_TEXTFILE@@; then | ||
20 | fatload ${devtype} ${devnum}:${distro_bootpart} @@UENV_MMC_LOAD_ADDRESS@@ @@UENV_TEXTFILE@@; | ||
21 | echo "Importing environment(@@UENV_TEXTFILE@@) from ${boot_target}..." | ||
22 | env import -t @@UENV_MMC_LOAD_ADDRESS@@ $filesize | ||
23 | if test -n $uenvcmd; then | ||
24 | echo "Running uenvcmd ..."; | ||
25 | run uenvcmd; | ||
26 | fi | ||
27 | fi | ||
28 | if test -e ${devtype} ${devnum}:${distro_bootpart} /${fitimage_name}; then | ||
29 | fatload ${devtype} ${devnum}:${distro_bootpart} @@FIT_IMAGE_LOAD_ADDRESS@@ ${fitimage_name}; | ||
30 | bootm @@FIT_IMAGE_LOAD_ADDRESS@@; | ||
31 | fi | ||
32 | if test -e ${devtype} ${devnum}:${distro_bootpart} /${kernel_name}; then | ||
33 | fatload ${devtype} ${devnum}:${distro_bootpart} @@KERNEL_LOAD_ADDRESS@@ ${kernel_name}; | ||
34 | fi | ||
35 | if test -e ${devtype} ${devnum}:${distro_bootpart} /system.dtb; then | ||
36 | fatload ${devtype} ${devnum}:${distro_bootpart} @@DEVICETREE_ADDRESS@@ system.dtb; | ||
37 | fi | ||
38 | if test -e ${devtype} ${devnum}:${distro_bootpart} /${ramdisk_name} && test "${skip_tinyramdisk}" != "yes"; then | ||
39 | fatload ${devtype} ${devnum}:${distro_bootpart} @@RAMDISK_IMAGE_ADDRESS@@ ${ramdisk_name}; | ||
40 | @@KERNEL_BOOTCMD@@ @@KERNEL_LOAD_ADDRESS@@ @@RAMDISK_IMAGE_ADDRESS@@ @@DEVICETREE_ADDRESS@@ | ||
41 | fi | ||
42 | if test -e ${devtype} ${devnum}:${distro_bootpart} /${rootfs_name} && test "${skip_ramdisk}" != "yes"; then | ||
43 | fatload ${devtype} ${devnum}:${distro_bootpart} @@RAMDISK_IMAGE_ADDRESS@@ ${rootfs_name}; | ||
44 | @@KERNEL_BOOTCMD@@ @@KERNEL_LOAD_ADDRESS@@ @@RAMDISK_IMAGE_ADDRESS@@ @@DEVICETREE_ADDRESS@@ | ||
45 | fi | ||
46 | @@KERNEL_BOOTCMD@@ @@KERNEL_LOAD_ADDRESS@@ - @@DEVICETREE_ADDRESS@@ | ||
47 | fi | ||
48 | if test "${boot_target}" = "xspi0" || test "${boot_target}" = "qspi" || test "${boot_target}" = "qspi0"; then | ||
49 | sf probe 0 0 0; | ||
50 | sf read @@FIT_IMAGE_LOAD_ADDRESS@@ @@QSPI_FIT_IMAGE_OFFSET@@ @@QSPI_FIT_IMAGE_SIZE@@ | ||
51 | bootm @@FIT_IMAGE_LOAD_ADDRESS@@; | ||
52 | echo "Booting using Fit image failed" | ||
53 | |||
54 | sf read @@KERNEL_LOAD_ADDRESS@@ @@QSPI_KERNEL_OFFSET@@ @@QSPI_KERNEL_SIZE@@ | ||
55 | sf read @@RAMDISK_IMAGE_ADDRESS@@ @@QSPI_RAMDISK_OFFSET@@ @@QSPI_RAMDISK_SIZE@@ | ||
56 | @@KERNEL_BOOTCMD@@ @@KERNEL_LOAD_ADDRESS@@ @@RAMDISK_IMAGE_ADDRESS@@ @@DEVICETREE_ADDRESS@@; | ||
57 | echo "Booting using Separate images failed" | ||
58 | fi | ||
59 | if test "${boot_target}" = "nand" || test "${boot_target}" = "nand0"; then | ||
60 | nand info; | ||
61 | nand read @@FIT_IMAGE_LOAD_ADDRESS@@ @@NAND_FIT_IMAGE_OFFSET@@ @@NAND_FIT_IMAGE_SIZE@@ | ||
62 | bootm @@FIT_IMAGE_LOAD_ADDRESS@@; | ||
63 | echo "Booting using Fit image failed" | ||
64 | |||
65 | nand read @@KERNEL_LOAD_ADDRESS@@ @@NAND_KERNEL_OFFSET@@ @@NAND_KERNEL_SIZE@@ | ||
66 | nand read @@RAMDISK_IMAGE_ADDRESS@@ @@NAND_RAMDISK_OFFSET@@ @@NAND_RAMDISK_SIZE@@ | ||
67 | @@KERNEL_BOOTCMD@@ @@KERNEL_LOAD_ADDRESS@@ @@RAMDISK_IMAGE_ADDRESS@@ @@DEVICETREE_ADDRESS@@; | ||
68 | echo "Booting using Separate images failed" | ||
69 | fi | ||
70 | done | ||
diff --git a/meta-xilinx-core/recipes-bsp/u-boot/u-boot-zynq-scr/boot.cmd.qspi.versal b/meta-xilinx-core/recipes-bsp/u-boot/u-boot-zynq-scr/boot.cmd.qspi.versal new file mode 100644 index 00000000..d56b7c8c --- /dev/null +++ b/meta-xilinx-core/recipes-bsp/u-boot/u-boot-zynq-scr/boot.cmd.qspi.versal | |||
@@ -0,0 +1 @@ | |||
@@KERNEL_BOOTCMD@@ @@KERNEL_LOAD_ADDRESS@@ @@RAMDISK_IMAGE_ADDRESS@@ @@DEVICETREE_ADDRESS@@ | |||
diff --git a/meta-xilinx-core/recipes-bsp/u-boot/u-boot-zynq-scr/boot.cmd.sd.versal b/meta-xilinx-core/recipes-bsp/u-boot/u-boot-zynq-scr/boot.cmd.sd.versal new file mode 100644 index 00000000..10e83cd0 --- /dev/null +++ b/meta-xilinx-core/recipes-bsp/u-boot/u-boot-zynq-scr/boot.cmd.sd.versal | |||
@@ -0,0 +1,3 @@ | |||
1 | setenv bootargs $bootargs root=/dev/mmcblk0p2 rw rootwait clk_ignore_unused | ||
2 | fatload mmc $sdbootdev:$partid @@KERNEL_LOAD_ADDRESS@@ @@KERNEL_IMAGETYPE@@ | ||
3 | @@KERNEL_BOOTCMD@@ @@KERNEL_LOAD_ADDRESS@@ - @@DEVICETREE_ADDRESS@@ | ||
diff --git a/meta-xilinx-core/recipes-bsp/u-boot/u-boot-zynq-scr/boot.cmd.sd.zynq b/meta-xilinx-core/recipes-bsp/u-boot/u-boot-zynq-scr/boot.cmd.sd.zynq new file mode 100644 index 00000000..bbd2e01e --- /dev/null +++ b/meta-xilinx-core/recipes-bsp/u-boot/u-boot-zynq-scr/boot.cmd.sd.zynq | |||
@@ -0,0 +1,7 @@ | |||
1 | if test -n "@@BITSTREAM@@"; then | ||
2 | fatload mmc $sdbootdev @@BITSTREAM_LOAD_ADDRESS@@ @@BITSTREAM_IMAGE@@ && fpga @@BITSTREAM_LOAD_TYPE@@ 0 @@BITSTREAM_LOAD_ADDRESS@@ ${filesize} | ||
3 | fi | ||
4 | fatload mmc 0 @@DEVICETREE_ADDRESS@@ @@DEVICE_TREE_NAME@@ | ||
5 | fatload mmc 0 @@KERNEL_LOAD_ADDRESS@@ @@KERNEL_IMAGETYPE@@ | ||
6 | fatload mmc 0 @@RAMDISK_IMAGE_ADDRESS@@ @@RAMDISK_IMAGE@@ | ||
7 | @@KERNEL_BOOTCMD@@ @@KERNEL_LOAD_ADDRESS@@ @@RAMDISK_IMAGE_ADDRESS@@ @@DEVICETREE_ADDRESS@@ | ||
diff --git a/meta-xilinx-core/recipes-bsp/u-boot/u-boot-zynq-scr/boot.cmd.sd.zynqmp b/meta-xilinx-core/recipes-bsp/u-boot/u-boot-zynq-scr/boot.cmd.sd.zynqmp new file mode 100644 index 00000000..b234a8df --- /dev/null +++ b/meta-xilinx-core/recipes-bsp/u-boot/u-boot-zynq-scr/boot.cmd.sd.zynqmp | |||
@@ -0,0 +1,8 @@ | |||
1 | setenv sdbootdev @@SDBOOTDEV@@ | ||
2 | setenv bootargs $bootargs root=/dev/mmcblk${sdbootdev}p2 rw rootwait earlycon clk_ignore_unused | ||
3 | if test -n "@@BITSTREAM@@"; then | ||
4 | fatload mmc $sdbootdev @@BITSTREAM_LOAD_ADDRESS@@ @@BITSTREAM_IMAGE@@ && fpga @@BITSTREAM_LOAD_TYPE@@ 0 @@BITSTREAM_LOAD_ADDRESS@@ ${filesize} | ||
5 | fi | ||
6 | fatload mmc $sdbootdev @@DEVICETREE_ADDRESS@@ @@DEVICE_TREE_NAME@@ | ||
7 | fatload mmc $sdbootdev:$partid @@KERNEL_LOAD_ADDRESS@@ @@KERNEL_IMAGETYPE@@ | ||
8 | @@KERNEL_BOOTCMD@@ @@KERNEL_LOAD_ADDRESS@@ - @@DEVICETREE_ADDRESS@@ | ||
diff --git a/meta-xilinx-core/recipes-bsp/u-boot/u-boot-zynq-scr/boot.cmd.ubifs b/meta-xilinx-core/recipes-bsp/u-boot/u-boot-zynq-scr/boot.cmd.ubifs new file mode 100644 index 00000000..60c48eda --- /dev/null +++ b/meta-xilinx-core/recipes-bsp/u-boot/u-boot-zynq-scr/boot.cmd.ubifs | |||
@@ -0,0 +1,54 @@ | |||
1 | # This is a boot script for U-Boot | ||
2 | # Generate boot.scr: | ||
3 | # mkimage -c none -A arm -T script -d boot.cmd.default boot.scr | ||
4 | # | ||
5 | ################ | ||
6 | @@PRE_BOOTENV@@ | ||
7 | |||
8 | for boot_target in ${boot_targets}; | ||
9 | do | ||
10 | if test "${boot_target}" = "xspi0" || test "${boot_target}" = "qspi" || test "${boot_target}" = "qspi0"; then | ||
11 | ubifsls @@FIT_IMAGE@@ | ||
12 | if test $? = 0; then | ||
13 | ubifsload @@FIT_IMAGE_LOAD_ADDRESS@@ @@FIT_IMAGE@@; | ||
14 | bootm @@FIT_IMAGE_LOAD_ADDRESS@@; | ||
15 | fi | ||
16 | ubifsls @@KERNEL_IMAGE@@ | ||
17 | if test $? = 0; then | ||
18 | ubifsload @@KERNEL_LOAD_ADDRESS@@ @@KERNEL_IMAGE@@; | ||
19 | fi | ||
20 | ubifsls system.dtb | ||
21 | if test $? = 0; then | ||
22 | ubifsload @@DEVICETREE_ADDRESS@@ system.dtb | ||
23 | fi | ||
24 | ubifsls @@RAMDISK_IMAGE@@ | ||
25 | if test $? = 0; then | ||
26 | ubifsload @@RAMDISK_IMAGE_ADDRESS@@ @@RAMDISK_IMAGE@@ | ||
27 | @@KERNEL_BOOTCMD@@ @@KERNEL_LOAD_ADDRESS@@ @@RAMDISK_IMAGE_ADDRESS@@ @@DEVICETREE_ADDRESS@@ | ||
28 | exit; | ||
29 | fi | ||
30 | @@KERNEL_BOOTCMD@@ @@KERNEL_LOAD_ADDRESS@@ - @@DEVICETREE_ADDRESS@@ | ||
31 | exit; | ||
32 | fi | ||
33 | if test "${boot_target}" = "mmc0" || test "${boot_target}" = "mmc1" ; then | ||
34 | run bootcmd_${boot_target}; | ||
35 | if test -e ${devtype} ${devnum}:${distro_bootpart} /@@FIT_IMAGE@@; then | ||
36 | ext4load ${devtype} ${devnum}:${distro_bootpart} @@FIT_IMAGE_LOAD_ADDRESS@@ @@FIT_IMAGE@@; | ||
37 | bootm @@FIT_IMAGE_LOAD_ADDRESS@@; | ||
38 | exit; | ||
39 | fi | ||
40 | if test -e ${devtype} ${devnum}:${distro_bootpart} /@@KERNEL_IMAGE@@; then | ||
41 | ext4load ${devtype} ${devnum}:${distro_bootpart} @@KERNEL_LOAD_ADDRESS@@ @@KERNEL_IMAGE@@; | ||
42 | fi | ||
43 | if test -e ${devtype} ${devnum}:${distro_bootpart} /system.dtb; then | ||
44 | ext4load ${devtype} ${devnum}:${distro_bootpart} @@DEVICETREE_ADDRESS@@ system.dtb; | ||
45 | fi | ||
46 | if test -e ${devtype} ${devnum}:${distro_bootpart} /@@RAMDISK_IMAGE@@; then | ||
47 | ext4load ${devtype} ${devnum}:${distro_bootpart} @@RAMDISK_IMAGE_ADDRESS@@ @@RAMDISK_IMAGE@@; | ||
48 | @@KERNEL_BOOTCMD@@ @@KERNEL_LOAD_ADDRESS@@ @@RAMDISK_IMAGE_ADDRESS@@ @@DEVICETREE_ADDRESS@@ | ||
49 | exit; | ||
50 | fi | ||
51 | @@KERNEL_BOOTCMD@@ @@KERNEL_LOAD_ADDRESS@@ - @@DEVICETREE_ADDRESS@@ | ||
52 | exit; | ||
53 | fi | ||
54 | done | ||
diff --git a/meta-xilinx-core/recipes-bsp/u-boot/u-boot-zynq-scr/pxeboot.pxe b/meta-xilinx-core/recipes-bsp/u-boot/u-boot-zynq-scr/pxeboot.pxe new file mode 100644 index 00000000..40796545 --- /dev/null +++ b/meta-xilinx-core/recipes-bsp/u-boot/u-boot-zynq-scr/pxeboot.pxe | |||
@@ -0,0 +1,4 @@ | |||
1 | LABEL Linux | ||
2 | KERNEL @@KERNEL_IMAGETYPE@@ | ||
3 | FDT @@DEVICE_TREE_NAME@@ | ||
4 | INITRD @@RAMDISK_IMAGE@@ | ||