mirror of
https://gitlab.com/buildroot.org/buildroot.git
synced 2026-08-01 21:23:51 -09:00
The board/versal/post-image.sh script has an unnecessary mkdir command:
mkdir -p "${BINARIES_DIR}"
This directory is created before calling the post image scripts,
in [1].
Just above the command, the script is making a symlink for the Linux DTB in
the ${BINARIES_DIR}, so if the ${BINARIES_DIR} did not already exist with
images inside, the script would fail regardless of whether this mkdir is
executed or not.
For this reason, remove the mkdir call from the script because it is not
necessary.
[1] https://gitlab.com/buildroot.org/buildroot/-/blob/2025.08/Makefile#L829
Signed-off-by: Neal Frager <neal.frager@amd.com>
[Julien: add a link showing where the directory is created]
Signed-off-by: Julien Olivain <ju.o@free.fr>
34 lines
1.1 KiB
Bash
Executable File
34 lines
1.1 KiB
Bash
Executable File
#!/bin/sh
|
|
|
|
# By default U-Boot loads DTB from a file named "system.dtb", so
|
|
# let's use a symlink with that name that points to the *first*
|
|
# devicetree listed in the config.
|
|
|
|
FIRST_DT=$(sed -nr \
|
|
-e 's|^BR2_LINUX_KERNEL_INTREE_DTS_NAME="(xilinx/)?([-_/[:alnum:]\\.]*).*"$|\2|p' \
|
|
"${BR2_CONFIG}")
|
|
|
|
[ -z "${FIRST_DT}" ] || ln -fs "${FIRST_DT}.dtb" "${BINARIES_DIR}/system.dtb"
|
|
|
|
BOARD_DIR="$(dirname "$0")"
|
|
|
|
cat <<-__HEADER_EOF > "${BINARIES_DIR}/bootgen.bif"
|
|
the_ROM_image:
|
|
{
|
|
image {
|
|
{ type=bootimage, file=${BINARIES_DIR}/boot.pdi }
|
|
{ type=bootloader, file=${BINARIES_DIR}/plm.elf }
|
|
{ core=psm, file=${BINARIES_DIR}/psmfw.elf }
|
|
}
|
|
image {
|
|
id = 0x1c000000, name=apu_subsystem
|
|
{ type=raw, load=0x00001000, file=${BINARIES_DIR}/u-boot.dtb }
|
|
{ core=a72-0, exception_level=el-3, trustzone, file=${BINARIES_DIR}/bl31.elf }
|
|
{ core=a72-0, exception_level=el-2, file=${BINARIES_DIR}/u-boot.elf }
|
|
}
|
|
}
|
|
__HEADER_EOF
|
|
|
|
"${HOST_DIR}/bin/bootgen" -arch versal -image "${BINARIES_DIR}/bootgen.bif" -o "${BINARIES_DIR}/boot.bin" -w on
|
|
support/scripts/genimage.sh -c "${BOARD_DIR}/genimage.cfg"
|