Part Number: AM5728
Hi, we have custom version number of bootloader (MLO), we need to pass it to the application (A15_0) firmware. Is there a good/easy way of doing it? Thanks.
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Part Number: AM5728
Hi, we have custom version number of bootloader (MLO), we need to pass it to the application (A15_0) firmware. Is there a good/easy way of doing it? Thanks.
Hi Vadim,
Do you want to pass the version number from MLO to u-boot or to Linux?
- Keerthy
To TI-RTOS. I consider 2 options right now:
1. Writing file that contains version string to eMMC and then reading it from ti-rtos.
2. Modifying Linker.cmd file of MLO and modifying the RTSC Platform file, making section in OCMC_RAM1 that will contain the version number.
I have difficulties with the second way, i need to play with memory sections and adresses, maybe there is "step-by-step" guide for this thing. thanks.
Hi Vadim,
I want to understand the boot flow a bit more detailed. Do you boot to Linux
or directly jump from MLO to RTOS firmware?
- Keerthy
Hi Vadim,
I tried the below diff at the very end of SPL. I could easily pass the value
using the unused 0x80080000 address from SPL to u-boot. I believe
in a simple way the SPL version information can be passed on from MLO to RTOS
application instead of MLO to u-boot.
diff --git a/common/spl/spl.c b/common/spl/spl.c
index 18ca9baf76..24e630341b 100644
--- a/common/spl/spl.c
+++ b/common/spl/spl.c
@@ -574,6 +574,7 @@ void board_init_r(gd_t *dummy1, ulong dummy2)
};
struct spl_image_info spl_image;
int ret;
+ int *data_ptr = (int *)0x80080000;
debug(">>" SPL_TPL_PROMPT "board_init_r()\n");
@@ -687,7 +688,11 @@ void board_init_r(gd_t *dummy1, ulong dummy2)
debug("Failed to stash bootstage: err=%d\n", ret);
#endif
- debug("loaded - jumping to U-Boot...\n");
+ printf("loaded - jumping to U-Boot...\n");
+
+ *data_ptr = 0xDEADBEEF;
+
+ printf("The address is 0x%x and val is 0x%x\n", data_ptr, *data_ptr);
spl_board_prepare_for_boot();
jump_to_image_no_args(&spl_image);
}
SPL Log:
U-Boot SPL 2019.01-g323d51410c-dirty (Aug 17 2020 - 23:22:310530)
DRA762-GP ES1.0 ABZ package
no pinctrl state for default me
Trying to boot from MMC1
no pinctrl state for default mode
Loading Environment from FAT... *** Warning - bad CRC, usingefault environment
Loading Environment from MMC... *** Warning - bad CRC, using default environment
loaded - jumping to U-Boot...
The address is 0x80080000 and v is 0xdeadbeef
u-boot dump:
md 0x80080000
80080000: deadbeef 00000000 00000000 00000000 ..............
80080010: 00000000 00000000 00000000 00000000 ..............
- Keerthy