[07/11] board/bsh/imx8mn-bsh-smm-s2-pro: mount Linux debugfs at bootup

Message ID 20240903152925.917831-7-dario.binacchi@amarulasolutions.com
State New
Headers show
Series
  • [01/11] board: imx8mn-bsh-smm-s2-pro add boot script
Related show

Commit Message

Dario Binacchi Sept. 3, 2024, 3:29 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