[Buildroot] [PATCH v2 1/4] board/zynqmp/post-build.sh: auto-generate extlinux.conf
Frager, Neal
neal.frager at amd.com
Wed Jun 15 05:20:07 UTC 2022
Hi,
> This patch uses the BR2_ROOTFS_POST_SCRIPT_ARGS to auto-generate the extlinux.conf file, so developers will only need to modify the board_defconfig file to change the console and boot file system locations.
> Signed-off-by: Neal Frager <neal.frager at amd.com>
> ---
> V1->V2:
> - generates extlinux.conf directly in output/images directory
> - uses "cat <<-" option to remove leading tabs
> ---
> board/zynqmp/post-build.sh | 15 ++++++++++++++-
> 1 file changed, 14 insertions(+), 1 deletion(-)
> diff --git a/board/zynqmp/post-build.sh b/board/zynqmp/post-build.sh index 9fd8bbf2c8..7387576414 100755
> --- a/board/zynqmp/post-build.sh
> +++ b/board/zynqmp/post-build.sh
> @@ -4,5 +4,18 @@
> # in the binaries directory
> BOARD_DIR="$(dirname $0)"
> +CONSOLE=$2
> +ROOT=$3
> -install -m 0644 -D $BOARD_DIR/extlinux.conf $BINARIES_DIR/extlinux.conf
> +FILE=${BOARD_DIR}/extlinux.conf
> +if test -f "${FILE}"; then
> + install -m 0644 -D "${FILE}" "${BINARIES_DIR}/extlinux.conf"
> +else
> + mkdir -p "${BINARIES_DIR}"
> + cat <<-__HEADER_EOF > "${BINARIES_DIR}/extlinux.conf"
> + label linux
> + kernel /Image
> + devicetree /system.dtb
> + append console=${CONSOLE} root=/dev/${ROOT} rw rootwait
> + __HEADER_EOF
> +fi
> --
> 2.17.1
Any feedback on v2 of this patch set? Thank you!
Best regards,
Neal Frager
AMD
More information about the buildroot
mailing list