What is the highest usable DRAM clock speed for you?
552
29.17%
7
564
0%
0
576
12.50%
3
588
8.33%
2
600
4.17%
1
612
8.33%
2
624
37.50%
9
24 vote(s)
* You voted for this item. [Show Results]

[Volunteer needed]Too high DRAM clock speed MAY be causing you random crashes/freezes
#21
So, maybe I'm dumb and doing this wrong, but can I just replace the u-boot bin file in /usr/share/u-boot on the sd card with the new bin file and it just works when I boot from the sd card?

Cause I have a bad black screen issue and figured I'd try this, but mine happens live and usually after I touch the touchscreen. So, I don't know if it's this issue, but I'm trying to test it and see. So I'm not sure if I need to run the dd script or if the file getting replaced will do the job.

Thanks for the help!
  Reply
#22
(05-19-2020, 01:05 PM)gotomech Wrote: So I'm not sure if I need to run the dd script or if the file getting replaced will do the job.

You need to dd the file - it is being written to an area of disk that is accessed during the boot process.
  • ROCKPro64 v2.1 2GB, 16Gb eMMC for rootfs, SX8200Pro 512GB NVMe for /home, HDMI video & sound, Bluetooth keyboard & mouse. Arch (6.2 kernel, Openbox desktop) for general purpose daily PC.
  • PinePhone Pro Explorer Edition, daily driver, rk2aw & U-boot on SPI, Arch/SXMO & Arch/phosh on eMMC
  • PinePhone BraveHeart now v1.2b 3/32Gb, Tow-boot with Arch/SXMO on eMMC
  Reply
#23
(05-19-2020, 02:08 PM)dukla2000 Wrote:
(05-19-2020, 01:05 PM)gotomech Wrote: So I'm not sure if I need to run the dd script or if the file getting replaced will do the job.

You need to dd the file - it is being written to an area of disk that is accessed during the boot process.

Thank you! I did that and it seems to have worked. Sadly, didn't seem to solve my problem, even on the slowest speed of RAM.
  Reply
#24
Thumbs Up 
Thank you for this thread, devrtz!

I couldn't reliably boot any of the recently released images (pmos, mobian, ubports); it would just crash at random a few moments after UI would show up. Usually somewhere in a kernel lock or when handling memory. A month or two back everything was fine. Actually the older images still work fine today. This explains why! Now I can use the phone again.

588 MHz works fine on my BH. 600 MHz crashed after several minutes, 612 and 624 crashed within seconds after a login prompt shows on the serial term.
  Reply
#25
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.
  Reply
#26
(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.

On my RockPro64, in the days when I compiled kernels for it you would get an additional option in extlinux.conf - if selected then it boots directly into memtest. It is probably the purest test but I think the "problem" is not so subtle and I can now easily reproduce by installing memtester which will run as an application.

If I boot my BraveHeart with stock Mobian, or patched with your 600 or even 588 u-boots then the following in a King's Cross terminal session will quickly fail

Code:
echo performance |sudo tee /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
sudo memtester 1G 1

memtester will try use 1Gb of memory and run for 1 pass, which takes about 30 minutes to successful completion (it says OK or done or  similar). If your system is unstable typically phosh crashes and after entering your PIN your terminal session has vanished.

I passed this sequence (indeed even memtester 1G 4 which ran for about 2 hours) at 576 but still feel my phone is not 100% stable.
  • ROCKPro64 v2.1 2GB, 16Gb eMMC for rootfs, SX8200Pro 512GB NVMe for /home, HDMI video & sound, Bluetooth keyboard & mouse. Arch (6.2 kernel, Openbox desktop) for general purpose daily PC.
  • PinePhone Pro Explorer Edition, daily driver, rk2aw & U-boot on SPI, Arch/SXMO & Arch/phosh on eMMC
  • PinePhone BraveHeart now v1.2b 3/32Gb, Tow-boot with Arch/SXMO on eMMC
  Reply
#27
(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.  Sad


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. Angel



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.
  Reply
#28
I take it the uboot doesn't yet have a screen driver or button mappings, so we can't use it for the boot menu as the openmoko used to. I'll have to see if I can find enough bits to make the serial cable.
http://wiki.openmoko.org/wiki/U-Boot_commands
http://wiki.openmoko.org/wiki/U-Boot_environment
  Reply
#29
Alright, an early test version is now available at https://pastebin.com/LRukGNup . I'll probably put this up on Github when it's been through sufficient testing and memtest support is ironed out in the bootloader/kernel. Dependencies are bash, sed and, unless you provide the logfile location, dmesg.

Note that this is just parsing the output from the Linux memtest, without memtest activated in the kernel (both compiled in and specified on the cmdline) this won't do anything. I'd recommend "memtest=17" on the cmdline but the script makes no assumptions on how many patterns you use. Further instructions in the script header.

I couldn't get a log sample from a system with bad memory so the entire error handling section is made from reverse engineering of the Linux source code. If you have a kernel log from a system with bad memory I'd greatly appreciate if you could provide real error messages.
  Reply
#30
(05-23-2020, 01:16 PM)Djhg2000 Wrote: ...
I couldn't get a log sample from a system with bad memory so the entire error handling section is made from reverse engineering of the Linux source code. If you have a kernel log from a system with bad memory I'd greatly appreciate if you could provide real error messages.

But how do I get memtest to execute on boot?

I added memtest=17 in /boot/boot.cmd


Code:
$ cat /boot/boot.cmd
if test ${mmc_bootdev} -eq 0 ; then
echo "Booting from SD";
setenv linux_mmcdev 0;
else
echo "Booting from eMMC";
setenv linux_mmcdev 2;
fi;

setenv bootargs console=ttyS0,115200 no_console_suspend panic=10 consoleblank=0 loglevel=7 root=/dev/mmcblk${linux_mmcdev}p1 ro splash memtest=17 plymouth.ignore-serial-consoles vt.global_cursor_default=0

...

but clearly that isn't what is being used at boot


Code:
$ uname -a
Linux DuklaPP 5.6-pinephone #5.6.0+pinephone6 SMP PREEMPT Fri May 15 23:20:03 CEST 2020 aarch64 GNU/Linux
chris@DuklaPP:~$ grep -i memtest /boot/config-$(uname -r)
CONFIG_MEMTEST=y
chris@DuklaPP:~$ ./mem.sh
No memtest output found in kernel log, wrong boot option?
$ dmesg | grep Kernel
[    0.000000] Kernel command line: console=ttyS0,115200 no_console_suspend panic=10 consoleblank=0 loglevel=7 root=/dev/mmcblk2p1 ro splash plymouth.ignore-serial-consoles vt.global_cursor_default=0
...
  • ROCKPro64 v2.1 2GB, 16Gb eMMC for rootfs, SX8200Pro 512GB NVMe for /home, HDMI video & sound, Bluetooth keyboard & mouse. Arch (6.2 kernel, Openbox desktop) for general purpose daily PC.
  • PinePhone Pro Explorer Edition, daily driver, rk2aw & U-boot on SPI, Arch/SXMO & Arch/phosh on eMMC
  • PinePhone BraveHeart now v1.2b 3/32Gb, Tow-boot with Arch/SXMO on eMMC
  Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  emmc speed via usb? joe1 0 364 04-27-2024, 08:07 PM
Last Post: joe1
  Phone powers off with high user demands car46999 7 2,054 04-11-2024, 09:17 AM
Last Post: zetabeta
  Help needed: Jump drive not working UsnR2 5 5,870 07-09-2021, 03:22 PM
Last Post: UsnR2
  Endless crashes on Pine64 received today luciphercolors 4 6,380 11-24-2020, 06:09 PM
Last Post: rocket2nfinity
  Does the PinePhone have a hardware random number generator? LibrePhoneUser 4 7,217 11-12-2020, 07:47 PM
Last Post: megous
  Only enable modem when needed with kill switches sokolgeo 2 4,627 09-20-2020, 04:40 AM
Last Post: sokolgeo
Sad Crashes in every OS - Hardware-issue? rakor 4 6,965 06-22-2020, 09:20 AM
Last Post: Nooblife

Forum Jump:


Users browsing this thread: 2 Guest(s)