Configure a U-Boot Autoboot Command in PetaLinux

xilinx_logo_1

This post shows where to define CONFIG_BOOTCOMMAND and CONFIG_BOOTDELAY in a PetaLinux Tools 2017.4 build.

Autoboot

At the end of:

project-spec/meta-user/recipes-bsp/u-boot/files/platform-top.h

#define CONFIG_BOOTDELAY 10
#define CONFIG_BOOTCOMMAND "bootm 03000000 01000000 1407f000"

List (for example):This survives petalinux-config, gets picked up by petalinux-build and is included when you package (and un-package) a BSP.

References

U-Boot

U-Boot lists how CONFIG_BOOTDELAY and CONFIG_BOOTCOMMAND work:

- Autoboot Command:
                CONFIG_BOOTCOMMAND
                Only needed when CONFIG_BOOTDELAY is enabled;
                define a command string that is automatically executed
                when no character is read on the console interface
                within "Boot Delay" after reset.

PetaLinux Tools

In the PetaLinux Tools Workflow Manual it lists:

"<plnx-projroot>/project-spec/m
eta-plnx-generated/recipes-bsp/
u-boot/configs"

U-Boot PetaLinux configuration files. The following files
are auto generated by petalinux-config:
• config.mk for MicroBlaze only
• platform-auto.h
• config.cfg
platform-top.h is not modified by any PetaLinux
tools. When U-Boot builds, these files are copied into
U-Boot build directory build/linux as follows:
• config is the U-Boot kconfig file.
• config.mk is copied to
board/xilinx/microblaze-generic/ for MicroBlaze.
<plnx-projroot>/project-spec/me
ta-user/recipes-bsp/u-boot/file
s/platform-top.h

• platform-auto.h and platform-top.h is copied
to include/configs/ directory.
</pre>