sunxi: defconfig: Add pstore support for pinephone
PATCH v2 1/1 sunxi: defconfig: Add pstore support for pinephone
pstore will allow users to catch kernel crashes and report them to developers. Modern (Android) phones have pstore usually enabled to get information about kernel crash, since it's the simplest way to get kernel backtrace on mobile device without serial console. Usually it's enabled by default in distribution kernels like Debian.
CONFIG_PSTORE=yCONFIG_PSTORE_RAM=m
systemd has service that automatically handles pstore and saves them in /var/lib/pstore for later usage.
In general any DRAM address, that isn't overwritten during a boot is suitable for pstore.
Range from 0x40000000 - 0x50000000 is heavily used by u-boot for internal use and to load kernel, fdt, fdto, scripts, pxefile and ramdisk later in the boot process. Ramdisk start address is 0x4FF00000, initramfs for kernel with some hacking features and debug info enabled can take more than 100Mb and final address will be around 0x58000000. Address 0x61000000 will most likely not overlap with that.
---
Changes since v1:
- updated description with pstore usage details
configs/pinephone_defconfig | 2 ++ 1 file changed, 2 insertions(+)
configs/pinephone_defconfig +2 -0
@@ -10,6 +10,8 @@ CONFIG_DRAM_ZQ=3881949 CONFIG_MMC_SUNXI_SLOT_EXTRA=2 CONFIG_PINEPHONE_DT_SELECTION=y # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set +CONFIG_CMD_PSTORE=y +CONFIG_CMD_PSTORE_MEM_ADDR=0x61000000 CONFIG_OF_LIST="sun50i-a64-pinephone-1.1 sun50i-a64-pinephone-1.2" CONFIG_LED_STATUS=y CONFIG_LED_STATUS_GPIO=y
Signature · 1 line
2.45.2
On Wed, 6 Nov 2024 10:49:47 +0300
Andrey Skvortsov <[email protected]> wrote:
Hi Andrey,
Quoted 15 lines
pstore will allow users to catch kernel crashes and report them to developers. Modern (Android) phones have pstore usually enabled to get information about kernel crash, since it's the simplest way to get kernel backtrace on mobile device without serial console. Usually it's enabled by default in distribution kernels like Debian.
CONFIG_PSTORE=yCONFIG_PSTORE_RAM=msystemd has service that automatically handles pstore and saves them in
/var/lib/pstorefor later usage.In general any DRAM address, that isn't overwritten during a boot is suitable for pstore.
Quoted 6 lines
Range from
0x40000000-0x50000000is heavily used by u-boot for internal use and to load kernel, fdt, fdto, scripts, pxefile and ramdisk later in the boot process. Ramdisk start address is0x4FF00000, initramfs for kernel with some hacking features and debug info enabled can take more than 100Mb and final address will be around0x58000000. Address0x61000000will most likely not overlap with that.
Nice commit message, good rationale.
I briefly tested the part where U-Boot injects the DT, and that works. I wonder if this could be rolled out to a wider audience, at least we could move the address into the generic Kconfig file, for all ARMv8 sunxi SoCs. I will let it sit for a while, and let people test it, then we can come back to this.
Quoted 2 lines
Signed-off-by Andrey Skvortsov <[email protected]>
Queued for the next PR.
Cheers,
Andre
Quoted 21 lines
---
Changes since v1:
- updated description with pstore usage detailsconfigs/pinephone_defconfig | 2 ++ 1 file changed, 2 insertions(+)configs/pinephone_defconfig +2
-0@@ -10,6 +10,8 @@ CONFIG_DRAM_ZQ=3881949 CONFIG_MMC_SUNXI_SLOT_EXTRA=2 CONFIG_PINEPHONE_DT_SELECTION=y # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set +CONFIG_CMD_PSTORE=y +CONFIG_CMD_PSTORE_MEM_ADDR=0x61000000 CONFIG_OF_LIST="sun50i-a64-pinephone-1.1 sun50i-a64-pinephone-1.2" CONFIG_LED_STATUS=y CONFIG_LED_STATUS_GPIO=y