All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH v1 1/4] board/zynqmp/post-build.sh: auto-generate extlinux.conf
@ 2022-05-22 13:15 Neal Frager via buildroot
  2022-05-22 13:15 ` [Buildroot] [PATCH v1 2/4] configs/zynqmp_zcu102_defconfig: add parameters to generate extlinux.conf Neal Frager via buildroot
                   ` (3 more replies)
  0 siblings, 4 replies; 12+ messages in thread
From: Neal Frager via buildroot @ 2022-05-22 13:15 UTC (permalink / raw)
  To: buildroot; +Cc: wesley, Neal Frager, luca, giulio.benetti, michal.simek

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>
---
 board/zynqmp/post-build.sh | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/board/zynqmp/post-build.sh b/board/zynqmp/post-build.sh
index 9fd8bbf2c8..749784c3f3 100755
--- a/board/zynqmp/post-build.sh
+++ b/board/zynqmp/post-build.sh
@@ -4,5 +4,19 @@
 # in the binaries directory
 
 BOARD_DIR="$(dirname $0)"
+CONSOLE=$2
+ROOT=$3
+
+FILE=$BOARD_DIR/extlinux.conf
+if test -f "$FILE"; then
+    echo "$FILE aready exists."
+else
+  cat << __HEADER_EOF >> $BOARD_DIR/extlinux.conf
+label linux
+  kernel /Image
+  devicetree /system.dtb
+  append console=$CONSOLE root=/dev/$ROOT rw rootwait
+__HEADER_EOF
+fi
 
 install -m 0644 -D $BOARD_DIR/extlinux.conf $BINARIES_DIR/extlinux.conf
-- 
2.17.1

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2022-05-25 14:02 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-22 13:15 [Buildroot] [PATCH v1 1/4] board/zynqmp/post-build.sh: auto-generate extlinux.conf Neal Frager via buildroot
2022-05-22 13:15 ` [Buildroot] [PATCH v1 2/4] configs/zynqmp_zcu102_defconfig: add parameters to generate extlinux.conf Neal Frager via buildroot
2022-05-25 12:14   ` Luca Ceresoli
2022-05-25 13:34     ` Neal Frager
2022-05-22 13:15 ` [Buildroot] [PATCH v1 3/4] configs/zynqmp_zcu106_defconfig: " Neal Frager via buildroot
2022-05-22 13:15 ` [Buildroot] [PATCH v1 4/4] configs/zynqmp_kria_kv260_defconfig: " Neal Frager via buildroot
2022-05-25  8:57 ` [Buildroot] [PATCH v1 1/4] board/zynqmp/post-build.sh: auto-generate extlinux.conf Yann E. MORIN
2022-05-25 12:12   ` Luca Ceresoli
2022-05-25 13:33     ` Neal Frager
2022-05-25 13:59       ` Luca Ceresoli
2022-05-25 14:02         ` Neal Frager
2022-05-25 13:31   ` Neal Frager

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.