Project Description
Due previous hackweek (https://hackweek.opensuse.org/projects/test-mainline-kernel-on-an-older-qualcomm-soc-msm89xx-explore-mainline-kernel-qualcomm-mainlining) both msm8994 angler and msm8992 bullhead are booting and due other activity (including my work) both have working SD card, but that's just start. Add support for other functionality.
Goal for this Hackweek
- There are still some memory issues for bullhead (SMEM, invalid patch: https://lore.kernel.org/linux-arm-msm/20230128055214.33648-1-jamiemdouglass@gmail.com/), fix them.
- Regulators support for angler (basic for other functionality)
- USB support for both angler and bullhead
- Haptics support (https://wiki.postmarketos.org/wiki/Haptics)
- Document on
Resources
- https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux.git
- https://wiki.postmarketos.org/wiki/Qualcomm_Glossary
- https://wiki.postmarketos.org/wiki/Mainlining
- https://wiki.postmarketos.org/wiki/Mainlining_Guide
Result
- [RFC PATCH 1/1] arm64: dts: qcom: msm8994-huawei-angler: Add regulators (TODO, based on my previous work in my free time)
- [PATCH 1/1] arm64: dts: qcom: msm8992-lg-bullhead: Enable regulators => merged in v6.3-rc1 as 2866527093dd ("arm64: dts: qcom: msm8992-lg-bullhead: Enable regulators")
- [PATCH 1/2] arm64: dts: msm8994-angler: Fix cont_splash_mem mapping => merged into qcom/for-next (will be in v6.4) as fe88480a6be9 ("arm64: dts: qcom: msm8994-angler: Fix cont_splash_mem mapping")
- [PATCH 2/2] arm64: dts: msm8994-angler: removed clash with smem_region => merged into qcom/for-next (will be in v6.4) as c85c8a992794 ("arm64: dts: qcom: msm8994-angler: removed clash with smem_region")
- [PATCH 1/1] arm64: defconfig: Enable qcom msm8994 clk drivers (TODO), => later v2, which was merged as 8f680c287445 ("arm64: defconfig: Switch msm8996 clk drivers to module") and 8f680c287445 ("arm64: defconfig: Switch msm8996 clk drivers to module")
This project is part of:
Hack Week 22 Hack Week 23
Activity
Comments
Be the first to comment!
Similar Projects
early stage kdump support by mbrugger
Project Description
When we experience a early boot crash, we are not able to analyze the kernel dump, as user-space wasn't able to load the crash system. The idea is to make the crash system compiled into the host kernel (think of initramfs) so that we can create a kernel dump really early in the boot process.
Goal for the Hackweeks
- Investigate if this is possible and the implications it would have (done in HW21)
- Hack up a PoC (done in HW22 and HW23)
- Prepare RFC series (giving it's only one week, we are entering wishful thinking territory here).
update HW23
- I was able to include the crash kernel into the kernel Image.
- I'll need to find a way to load that from
init/main.c:start_kernel()
probably afterkcsan_init()
- I workaround for a smoke test was to hack
kexec_file_load()
systemcall which has two problems:- My initramfs in the porduction kernel does not have a new enough kexec version, that's not a blocker but where the week ended
- As the crash kernel is part of init.data it will be already stale once I can call
kexec_file_load()
from user-space.
The solution is probably to rewrite the POC so that the invocation can be done from init.text (that's my theory) but I'm not sure if I can reuse the kexec infrastructure in the kernel from there, which I rely on heavily.
update HW24
- Day1
- rebased on v6.12 with no problems others then me breaking the config
- setting up a new compilation and qemu/virtme env
- getting desperate as nothing works that used to work
- Day 2
- getting to call the invocation of loading the early kernel from
__init
afterkcsan_init()
- getting to call the invocation of loading the early kernel from
Day 3
- fix problem of memdup not being able to alloc so much memory... use 64K page sizes for now
- code refactoring
- I'm now able to load the crash kernel
- When using virtme I can boot into the crash kernel, also it doesn't boot completely (major milestone!), crash in
elfcorehdr_read_notes()
Day 4
- crash systems crashes (no pun intended) in
copy_old_mempage()
link; will need to understand elfcorehdr... - call path
vmcore_init() -> parse_crash_elf_headers() -> elfcorehdr_read() -> read_from_oldmem() -> copy_oldmem_page() -> copy_to_iter()
- crash systems crashes (no pun intended) in
Day 5
- hacking
arch/arm64/kernel/crash_dump.c:copy_old_mempage()
to see if crash system really starts. It does. - fun fact: retested with more reserved memory and with UEFI FW, host kernel crashes in init but directly starts the crash kernel, so it works (somehow) \o/
- hacking
TODOs
- fix elfcorehdr so that we actually can make use of all this...
- test where in the boot
__init()
chain we can/should callkexec_early_dump()