10-01-2019 08:47 AM
Hi I'm attempting to create different boot arguments to load different kernel images in a Zynq Ultrscale+ based on a preset value. The 2 kernel/rootfs images are stored in QSPI. The images are generated in buildroot while the u-boot image is created using petalinux 2018.3.
I would like to modify and add envirnment variables, mainly updating kernel size/offsets as well as changing the boot argumemnts. The flow being that our u-boot image would boot up using a the desired kernel. So if I wanted to overwrite the default bootcmd from:
bootcmd=run default_bootcmd
to something like:
bootcmd=if test $bootpart = 1; then run kernelImage1; else run kernelImage2;
where kernelImage1 and kernelImage2 both does an sf probe to to load the bitstream and kernel + rootfs of images stored at different offsets.
Would the ideal place to change these variables be in platform-top.h using the information from platform-auto.h as documented here:
https://www.xilinx.com/support/answers/69780.html
If not, where would one change/add environment variables for custom configurations and designs?
Thanks!
10-02-2019 07:53 AM
To be clear, if I wanted to add extra custom environment variables I would need to add them as a part of CONFIG_EXTRA_ENV_SETTINGS in which I would first have to copy the entire value of CONFIG_EXTRA_ENV_SETTINGS found in platform-auto.h into platform-top.h and add the new variable there, correct? This is the method explained in AR#60780 (for 2016.4-2017.4) still apply to 2018.3?
For reference:
https://www.xilinx.com/support/answers/69780.html
10-02-2019 02:51 AM
Hi
In petalinux, platform-top.h file is the ideal one to make any uboot environment changes. platform-auto.h is autogenerated by tool and is not recommended to edit
Best Regards
Shabbir
10-02-2019 07:53 AM
To be clear, if I wanted to add extra custom environment variables I would need to add them as a part of CONFIG_EXTRA_ENV_SETTINGS in which I would first have to copy the entire value of CONFIG_EXTRA_ENV_SETTINGS found in platform-auto.h into platform-top.h and add the new variable there, correct? This is the method explained in AR#60780 (for 2016.4-2017.4) still apply to 2018.3?
For reference:
https://www.xilinx.com/support/answers/69780.html
10-02-2019 07:03 PM
Hi @badFITimage ,
Yes as I mentioned in AR #60780 you need to copy the CONFIG_EXTRA_ENV_SETTINGS from platform-auto.h to platform-top.h and then append your additional variables. This concept applies to all version of petalinux(2016.4 onwards)
The content of CONFIG_EXTRA_ENV_SETTINGS in platform-auto.h is generated based on your "petalinux-config" settings + default xilinx zynqmp env variables.
Note: If you don't copy CONFIG_EXTRA_ENV_SETTINGS from platform-auto.h to platform-top.h then you lose your "petalinux-config" settings.
10-11-2019 01:21 AM
Hi,
I plan to boot from different paration BOOT.BIN, image.ub, rootfs.jffs2 storeed in QSPI flash the same as you. But i feel confused. I only see bootstart, kernelstart. I don't see rootfsstart in environment variable. How to u-boot know where offset of rootfs.jffs2
Have you try to boot from 2 paration BOOT.BIN, image.ub, rootfs.jffs2 storeed in QSPI flash?
How to impliment it?
Thanks and brgs.