[v2,06/10] board/bsh/imx8mn-bsh-smm-s2-pro: mount Linux debugfs at bootup

Message ID 20240911150733.2914626-6-dario.binacchi@amarulasolutions.com
State New
Headers show
Series
  • [v2,01/10] board: imx8mn-bsh-smm-s2-pro add boot script
Related show

Commit Message

Dario Binacchi Sept. 11, 2024, 3:07 p.m. UTC
Really useful during development.

Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
---
 board/bsh/imx8mn-bsh-smm-s2-pro/post-build.sh | 5 +++++
 1 file changed, 5 insertions(+)

Patch

diff --git a/board/bsh/imx8mn-bsh-smm-s2-pro/post-build.sh b/board/bsh/imx8mn-bsh-smm-s2-pro/post-build.sh
index 08eb3abc5b8f..47f6d9ae8a10 100755
--- a/board/bsh/imx8mn-bsh-smm-s2-pro/post-build.sh
+++ b/board/bsh/imx8mn-bsh-smm-s2-pro/post-build.sh
@@ -6,3 +6,8 @@  install -d "$TARGET_DIR/boot/extlinux/"
 sed "s/%PARTUUID%/$PARTUUID/g" "$BOARD_DIR/extlinux.conf" > "$TARGET_DIR/boot/extlinux/extlinux.conf"
 sed "s/%PARTUUID%/$PARTUUID/g" "$BOARD_DIR/genimage.cfg" > "$BINARIES_DIR/genimage.cfg"
 install ${BOARD_DIR}/emmc_boot.lst ${BINARIES_DIR}
+
+# mount debugfs
+grep -q "/sys/kernel/debug" ${TARGET_DIR}/etc/fstab || \
+echo "nodev\t\t/sys/kernel/debug\tdebugfs\tdefaults\t\t0\t0" \
+     >> ${TARGET_DIR}/etc/fstab