summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRaju Kumar Pothuraju <rajukumar.pothuraju@amd.com>2023-06-28 15:08:29 +0530
committerMark Hatle <mark.hatle@amd.com>2023-06-29 09:56:52 -0500
commit9b54de80aceb7ad78c3d60fe21ef0584b34c4140 (patch)
treec1e86342deaa018f880dbe09a51bd13fec7e1c6b
parent4c17247f4e5e186776903e5ff3effa523e7e5ee2 (diff)
downloadmeta-xilinx-9b54de80aceb7ad78c3d60fe21ef0584b34c4140.tar.gz
boot.cmd.generic: Update bootargs with launch_ramdisk_init
Map uboot env variable launch_ramdisk_init with bootargs to stop at tiny rootfs. If user specified bootargs at uboot skip appending auto bootargs. Using fdtcontroladdr uboot variable instead of hardcoded value in boot.scr. If DTB loads from FAT to DDR from uboot fdtcontroladdr points to old dtb(loaded from boot.bin or uboot.elf) so updating it with the dtb load address. Signed-off-by: Raju Kumar Pothuraju <rajukumar.pothuraju@amd.com> Signed-off-by: Mark Hatle <mark.hatle@amd.com>
-rw-r--r--meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx-scr/boot.cmd.generic10
1 files changed, 10 insertions, 0 deletions
diff --git a/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx-scr/boot.cmd.generic b/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx-scr/boot.cmd.generic
index 2459d06b..d99932ed 100644
--- a/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx-scr/boot.cmd.generic
+++ b/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx-scr/boot.cmd.generic
@@ -9,10 +9,16 @@ ramdisk_name=@@RAMDISK_IMAGE1@@
9rootfs_name=@@RAMDISK_IMAGE@@ 9rootfs_name=@@RAMDISK_IMAGE@@
10@@PRE_BOOTENV@@ 10@@PRE_BOOTENV@@
11 11
12
13setenv get_bootargs 'fdt addr $fdtcontroladdr;fdt get value bootargs /chosen bootargs;'
14setenv update_bootargs 'if test -n ${launch_ramdisk_init} && test ${bootargs} = "";then if run get_bootargs;then setenv bootargs "\$bootargs launch_ramdisk_init=${launch_ramdisk_init} $extrabootargs";fi;fi'
15
16
12for boot_target in ${boot_targets}; 17for boot_target in ${boot_targets};
13do 18do
14 echo "Trying to load boot images from ${boot_target}" 19 echo "Trying to load boot images from ${boot_target}"
15 if test "${boot_target}" = "jtag" ; then 20 if test "${boot_target}" = "jtag" ; then
21 run update_bootargs
16 @@KERNEL_BOOTCMD@@ @@KERNEL_LOAD_ADDRESS@@ @@RAMDISK_IMAGE_ADDRESS@@ @@DEVICETREE_ADDRESS@@ 22 @@KERNEL_BOOTCMD@@ @@KERNEL_LOAD_ADDRESS@@ @@RAMDISK_IMAGE_ADDRESS@@ @@DEVICETREE_ADDRESS@@
17 fi 23 fi
18 if test "${boot_target}" = "mmc0" || test "${boot_target}" = "mmc1" || test "${boot_target}" = "usb0" || test "${boot_target}" = "usb1"; then 24 if test "${boot_target}" = "mmc0" || test "${boot_target}" = "mmc1" || test "${boot_target}" = "usb0" || test "${boot_target}" = "usb1"; then
@@ -34,6 +40,7 @@ do
34 fi 40 fi
35 if test -e ${devtype} ${devnum}:${distro_bootpart} /system.dtb; then 41 if test -e ${devtype} ${devnum}:${distro_bootpart} /system.dtb; then
36 fatload ${devtype} ${devnum}:${distro_bootpart} @@DEVICETREE_ADDRESS@@ system.dtb; 42 fatload ${devtype} ${devnum}:${distro_bootpart} @@DEVICETREE_ADDRESS@@ system.dtb;
43 setenv fdtcontroladdr @@DEVICETREE_ADDRESS@@
37 fi 44 fi
38 if test -e ${devtype} ${devnum}:${distro_bootpart} /devicetree/openamp.dtbo; then 45 if test -e ${devtype} ${devnum}:${distro_bootpart} /devicetree/openamp.dtbo; then
39 fatload ${devtype} ${devnum}:${distro_bootpart} @@DEVICETREE_OVERLAY_ADDRESS@@ devicetree/openamp.dtbo; 46 fatload ${devtype} ${devnum}:${distro_bootpart} @@DEVICETREE_OVERLAY_ADDRESS@@ devicetree/openamp.dtbo;
@@ -41,6 +48,7 @@ do
41 fdt resize 8192 48 fdt resize 8192
42 fdt apply @@DEVICETREE_OVERLAY_ADDRESS@@ 49 fdt apply @@DEVICETREE_OVERLAY_ADDRESS@@
43 fi 50 fi
51 run update_bootargs
44 if test -e ${devtype} ${devnum}:${distro_bootpart} /${ramdisk_name} && test "${skip_tinyramdisk}" != "yes"; then 52 if test -e ${devtype} ${devnum}:${distro_bootpart} /${ramdisk_name} && test "${skip_tinyramdisk}" != "yes"; then
45 fatload ${devtype} ${devnum}:${distro_bootpart} @@RAMDISK_IMAGE_ADDRESS@@ ${ramdisk_name}; 53 fatload ${devtype} ${devnum}:${distro_bootpart} @@RAMDISK_IMAGE_ADDRESS@@ ${ramdisk_name};
46 @@KERNEL_BOOTCMD@@ @@KERNEL_LOAD_ADDRESS@@ @@RAMDISK_IMAGE_ADDRESS@@ @@DEVICETREE_ADDRESS@@ 54 @@KERNEL_BOOTCMD@@ @@KERNEL_LOAD_ADDRESS@@ @@RAMDISK_IMAGE_ADDRESS@@ @@DEVICETREE_ADDRESS@@
@@ -59,6 +67,7 @@ do
59 67
60 sf read @@KERNEL_LOAD_ADDRESS@@ @@QSPI_KERNEL_OFFSET@@ @@QSPI_KERNEL_SIZE@@ 68 sf read @@KERNEL_LOAD_ADDRESS@@ @@QSPI_KERNEL_OFFSET@@ @@QSPI_KERNEL_SIZE@@
61 sf read @@RAMDISK_IMAGE_ADDRESS@@ @@QSPI_RAMDISK_OFFSET@@ @@QSPI_RAMDISK_SIZE@@ 69 sf read @@RAMDISK_IMAGE_ADDRESS@@ @@QSPI_RAMDISK_OFFSET@@ @@QSPI_RAMDISK_SIZE@@
70 run update_bootargs
62 @@KERNEL_BOOTCMD@@ @@KERNEL_LOAD_ADDRESS@@ @@RAMDISK_IMAGE_ADDRESS@@ @@DEVICETREE_ADDRESS@@; 71 @@KERNEL_BOOTCMD@@ @@KERNEL_LOAD_ADDRESS@@ @@RAMDISK_IMAGE_ADDRESS@@ @@DEVICETREE_ADDRESS@@;
63 echo "Booting using Separate images failed" 72 echo "Booting using Separate images failed"
64 fi 73 fi
@@ -70,6 +79,7 @@ do
70 79
71 nand read @@KERNEL_LOAD_ADDRESS@@ @@NAND_KERNEL_OFFSET@@ @@NAND_KERNEL_SIZE@@ 80 nand read @@KERNEL_LOAD_ADDRESS@@ @@NAND_KERNEL_OFFSET@@ @@NAND_KERNEL_SIZE@@
72 nand read @@RAMDISK_IMAGE_ADDRESS@@ @@NAND_RAMDISK_OFFSET@@ @@NAND_RAMDISK_SIZE@@ 81 nand read @@RAMDISK_IMAGE_ADDRESS@@ @@NAND_RAMDISK_OFFSET@@ @@NAND_RAMDISK_SIZE@@
82 run update_bootargs
73 @@KERNEL_BOOTCMD@@ @@KERNEL_LOAD_ADDRESS@@ @@RAMDISK_IMAGE_ADDRESS@@ @@DEVICETREE_ADDRESS@@; 83 @@KERNEL_BOOTCMD@@ @@KERNEL_LOAD_ADDRESS@@ @@RAMDISK_IMAGE_ADDRESS@@ @@DEVICETREE_ADDRESS@@;
74 echo "Booting using Separate images failed" 84 echo "Booting using Separate images failed"
75 fi 85 fi