[Buildroot] [PATCH] board: x86_64: Enable and mount debugfs

Joel Stanley joel at jms.id.au
Wed Feb 2 03:17:45 UTC 2022


Add DEBUG_FS to the kernel options, and modify fstab so it is
automatically mounted at boot.

This is useful when testing.

Signed-off-by: Joel Stanley <joel at jms.id.au>
---
 board/qemu/x86_64/linux.config  | 1 +
 board/qemu/x86_64/post-build.sh | 3 +++
 2 files changed, 4 insertions(+)

diff --git a/board/qemu/x86_64/linux.config b/board/qemu/x86_64/linux.config
index e1d2ce01b004..2ed5c4194560 100644
--- a/board/qemu/x86_64/linux.config
+++ b/board/qemu/x86_64/linux.config
@@ -50,4 +50,5 @@ CONFIG_EXT4_FS=y
 CONFIG_AUTOFS4_FS=y
 CONFIG_TMPFS=y
 CONFIG_TMPFS_POSIX_ACL=y
+CONFIG_DEBUG_FS=y
 CONFIG_UNWINDER_FRAME_POINTER=y
diff --git a/board/qemu/x86_64/post-build.sh b/board/qemu/x86_64/post-build.sh
index bf83a002c2fc..0b27ab2c8074 100755
--- a/board/qemu/x86_64/post-build.sh
+++ b/board/qemu/x86_64/post-build.sh
@@ -9,3 +9,6 @@ if [ -e ${TARGET_DIR}/etc/inittab ]; then
 	sed -i '/GENERIC_SERIAL/a\
 tty1::respawn:/sbin/getty -L  tty1 0 vt100 # QEMU graphical window' ${TARGET_DIR}/etc/inittab
 fi
+
+# Mount debugfs on boot
+echo "debugfs     /sys/kernel/debug debugfs defaults 0 0" >> ${TARGET_DIR}/etc/fstab
-- 
2.34.1




More information about the buildroot mailing list