Message ID | 20220609140449.210030-1-neal.frager@xilinx.com |
---|---|
State | Accepted |
Headers | show |
Series | [v2,1/4] board/zynqmp/post-build.sh: auto-generate extlinux.conf | expand |
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@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
Hi Neal, apologies for the late review... On 09/06/22 16:04, Neal Frager wrote: > From: Neal Frager <neal.frager@amd.com> > > 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@amd.com> Reviewed-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Note that the above is the new e-mail address I'm using for Buildroot, recently changed in DEVELOPERS.
On 09/06/2022 16:04, Neal Frager wrote: > From: Neal Frager <neal.frager@amd.com> > > 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@amd.com> Series applied to master, thanks. Very nicely structured series! Regards, Arnout > --- > 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
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