Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion br-ext-chip-goke/board/gk7205v200/gk7205v200.generic.config
Original file line number Diff line number Diff line change
Expand Up @@ -2391,7 +2391,16 @@ CONFIG_SQUASHFS_FRAGMENT_CACHE_SIZE=1
# CONFIG_QNX4FS_FS is not set
# CONFIG_QNX6FS_FS is not set
# CONFIG_ROMFS_FS is not set
# CONFIG_PSTORE is not set
CONFIG_PSTORE=y
# Compression is a mandatory choice on this 4.9 kernel (it has no "none"); ZLIB
# is its default and the only one whose workspace is preallocated at register
# time, so it stays safe to compress from inside a panic. The others stay off.
CONFIG_PSTORE_ZLIB_COMPRESS=y
# CONFIG_PSTORE_LZO_COMPRESS is not set
# CONFIG_PSTORE_LZ4_COMPRESS is not set
CONFIG_PSTORE_CONSOLE=y
CONFIG_PSTORE_PMSG=y
CONFIG_PSTORE_RAM=y
Comment thread
qodo-free-for-open-source-projects[bot] marked this conversation as resolved.
# CONFIG_SYSV_FS is not set
# CONFIG_UFS_FS is not set
CONFIG_NETWORK_FILESYSTEMS=y
Expand Down
21 changes: 21 additions & 0 deletions general/overlay/etc/init.d/S29pstore
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/bin/sh
# Mount the pstore filesystem so a kernel crash log that ramoops captured across
# the reboot (a panic/oops, via kmsg_dump -- independent of the muted console)
# is readable at /sys/fs/pstore. Without this the records are held in the
# reserved RAM region but never exposed. Inert on a kernel built without pstore.
# The backing RAM region is set up in the goke set_allocator (ramoops.* bootargs).
case "$1" in
start)
if grep -q pstore /proc/filesystems; then
mkdir -p /sys/fs/pstore
mountpoint -q /sys/fs/pstore 2>/dev/null ||
mount -t pstore pstore /sys/fs/pstore
fi
;;
stop)
;;
*)
echo "Usage: $0 {start|stop}"
exit 1
;;
esac
8 changes: 6 additions & 2 deletions general/overlay/init
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,12 @@ grep -q overlay /proc/filesystems || exit 1

is_flash_root=true
is_nfs_root=false
grep -q 'root=.*nfs\|mmcblk\|ram' /proc/cmdline && is_flash_root=false
grep -q 'root=.*nfs' /proc/cmdline && is_nfs_root=true
# Anchor these to the root= value. A bare "ram"/"mmcblk"/"nfs" matched the whole
# command line, so any unrelated token carrying those letters -- e.g. the
# "ramoops" crash-log parameters -- was mistaken for a ramdisk/SD/NFS root, the
# flash overlay was never mounted, and the camera booted read-only and unclaimed.
grep -qE 'root=[^ ]*(nfs|mmcblk|ram)' /proc/cmdline && is_flash_root=false
grep -qE 'root=[^ ]*nfs' /proc/cmdline && is_nfs_root=true

if $is_flash_root; then
if grep -q ubifs /proc/cmdline; then
Expand Down
Loading