(05-20-2020, 03:05 PM)devrtz Wrote: You are very welcome (:
@Djhg2000
I'm still trying to figure out how to u-boot can be used to set command line arguments for the kernel (for memset).
Haven't found the location yet where this could be done.
After giving this some thought, maybe it is a better idea to leave u-boot as it is, and instead build the kernel with
the necessary command line baked into it.
Sorry for the delay, I've been having a rough few weeks (unfortunately ending with a funeral yesterday) so I've had other things to attend to and I've been feeling awful in general. None of this is directly related to the coronavirus, but I've been unable to get much of anything done.
This seems to be a cheat-sheet on how to configure the cmdline which U-boot passes on to the kernel: https://docs.embeddedarm.com/U-boot_cmdline
From what I gather I think we can set this from the serial port on boot, so I think the proof of concept would be to enter the interactive U-boot console with the headphone jack serial port and changing the "cmdline_append" environment variable. Just remember to read it out first so that you don't lose whatever the proper cmdline is. Then it should be one of the boot commands ("booti"?) to boot the predefined kernel image. I'm not too familiar with U-boot though so this might all be completely wrong because I've misread the documentation.
I haven't gotten to work on the script yet, but I've decided to release the script version first and figure out how to make an app out of it later. One obvious problem is that I don't actually have a broken stick of RAM with me (self isolating away from home) to be 100% sure the script works. I can't overclock the RAM on my workstation until I get small errors so I'll need someone else to test it, preferably on a real phone.
The interim solution might be to instead run "memtester" (probably available in the repo), but keep in mind it works by reserving a chunk of memory at an arbitrary offset (where the Linux kernel decides it fits). It won't test the whole memory and it won't return reliable offsets but it might be able to separate out the worst cases which barely boot.
Edit: Clarify first paragraph.
Edit 2: I forgot we're working with a Debian-like system. The "grep -i memtest /boot/config-$(uname -r)" command should return "CONFIG_MEMTEST=y" if memtest is enabled in the currently running kernel.