Message ID | 20220202031745.448551-1-joel@jms.id.au |
---|---|
State | Rejected |
Headers | show |
Series | board: x86_64: Enable and mount debugfs | expand |
On 02/02/2022 04:17, Joel Stanley wrote: > Add DEBUG_FS to the kernel options, and modify fstab so it is > automatically mounted at boot. > > This is useful when testing. "This is useful when testing" is not much of an explanation. Why only for this defconfig? Why only debugfs and not strace, dropbear, gdbserver, and tons of other tools useful for testing? For now, I've marked this as Rejected but if there's a good reason we can pick up this patch again. Regards, Arnout > > Signed-off-by: Joel Stanley <joel@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
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
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@jms.id.au> --- board/qemu/x86_64/linux.config | 1 + board/qemu/x86_64/post-build.sh | 3 +++ 2 files changed, 4 insertions(+)