PBP won’t boot from eMMC after Debian update / Tow-Boot installer won’t boot from SD
#11
(04-28-2022, 03:01 AM)wdt Wrote: replace /dev/emmc with appropriate /dev/mmcblkX (where X=0,1,2,,, whichever)
lsblk,,, the one with .../boot[0,1]
Do NOT use any partition, just the whole raw device

Oops Blush , sorry for making you go Facepalm.

I think I eventually succeeded to make a copy but when I open the resulting 4.2MB file in GHex I see only 00’s on every line.

Quote:I think that with my limited linux skill set my best bet at the moment is to get Tow-Boot to work from the SPI with that new SD card and then see if I can get Bullseye to boot off the emmc with that.
Unfortunately the Tow-Boot spi installer doesn’t want to boot from the new class 4 SD card either. Maybe I’ll have to go the nandwrite way.. Confused
  Reply
#12
Since in OP you said there was a green led (I assume no SD inserted) there must be something on emmc
When no uboot (really idbloader) can be found, there are no leds, you think it is dead
So, you must have done something wrong
Point ghex at /dev/emmc (mmcblk....) and go sector 64
idbloader ALWAYS (all versions) has file signature 3b 8c dc fc
This is how the boot rom 'knows' that is 'right' code (and to stop looking)
or dd if=/dev/emmc of=idb.test bs=512 skip=64 count=512 (idbloader varies,, 160K-210K)
  Reply
#13
(04-28-2022, 11:04 AM)wdt Wrote: Since in OP you said there was a green led (I assume no SD inserted) there must be something on emmc
When no uboot (really idbloader) can be found, there are no leds, you think it is dead
So, you must have done something wrong
Point ghex at /dev/emmc (mmcblk....) and go sector 64
idbloader ALWAYS (all versions) has file signature 3b 8c dc fc
This is how the boot rom 'knows' that is 'right' code (and to stop looking)
or dd if=/dev/emmc of=idb.test bs=512 skip=64 count=512  (idbloader varies,, 160K-210K)

Yes, there is a green LED when booting without an SD or with the Tow-Boot installer SD. 

Yesterday I dd’d the emmc (mmcblk2) while chrooted into the emmc. I tried again just now while booted into Debian 11 from SD with the emmc mounted. The result was the same: Only 00’s in the display pane and dots in the ASCII column. 

Then I tried your last (imdb.test) suggestion. This produced something more interesting. I’m afraid I have no idea how to point GHex to sector 64 so I tried a search for 3b 8c dc fc but that did not produce anything. There is human readable information in the ASCII column but nothing that means much to me..
  Reply
#14
[quote pid="109500" dateline="1651172012"]

Then I tried your last (imdb.test) suggestion. This produced something more interesting. I’m afraid I have no idea how to point GHex to sector 64 so I tried a search for 3b 8c dc fc but that did not produce anything. There is human readable information in the ASCII column but nothing that means much to me..
[/quote]
chroot will not change device enumeration
attached mrfixit bsp uboot (ver2.0),, if it works,,, if not send me msg with email addy
For output use seek,,, idb seek=64 (default bs=512(B)), uboot seek=8 bs=1M, trust seek=12 bs=1M
(example: dd if=trust.img of=/dev/mmcblk2 seek=12 bs=1M)
(input uses skip)
----
to convert sectors to Bytes, *512,, so 64*512,, but this is decimal, ghex uses hex
so 0x200*0x40 = 0x8000
use kcalc for simplicity
  Reply
#15
Thanks a lot for mailing me mrfixit's uboot package and your instructions dtw!

Writing the img files to eMMC seemed to go well:

Quote:sudo dd if=uboot.img of=/dev/mmcblk2 seek=8 bs=1M
4+0 records in
4+0 records out
4194304 bytes (4.2 MB, 4.0 MiB) copied, 0.021836 s, 192 MB/s

sudo dd if=trust.img of=/dev/mmcblk2 seek=12 bs=1M
4+0 records in
4+0 records out
4194304 bytes (4.2 MB, 4.0 MiB) copied, 0.0206306 s, 203 MB/s

sudo dd if=idbloader.img of=/dev/mmcblk2 seek=64 bs=512
319+1 records in
319+1 records out
163836 bytes (164 kB, 160 KiB) copied, 0.00230385 s, 71.1 MB/s


I may have gotten something wrong though as the PBP still doesn't boot from the eMMC. The green power LED is the only sign of life..
  Reply
#16
That is the right set of commands, it still boots from SD?
Maybe look at extlinux.conf (on emmc) to see if it is right?
  Reply
#17
Yes, it still boots from SD.

extlinux.conf:

Quote:## /boot/extlinux/extlinux.conf
##
## IMPORTANT WARNING
##
## The configuration of this file is generated automatically.
## Do not edit this file manually, use: u-boot-update

default l0
menu title U-Boot menu
prompt 0
timeout 10


label l0
menu label Debian GNU/Linux 11 (bullseye) 5.10.0-13-arm64
linux /vmlinuz-5.10.0-13-arm64
initrd /initrd.img-5.10.0-13-arm64
fdt /rk3399-pinebook-pro.dtb
append root=LABEL=mmcblk2-RootFS console=ttyS2,1500000n8 console=tty0 ro quiet splash plymouth.ignore-serial-consoles maxcpus=4 coherent_pool=1M

label l0r
menu label Debian GNU/Linux 11 (bullseye) 5.10.0-13-arm64 (rescue target)
linux /vmlinuz-5.10.0-13-arm64
initrd /initrd.img-5.10.0-13-arm64
fdt /rk3399-pinebook-pro.dtb
append root=LABEL=mmcblk2-RootFS console=ttyS2,1500000n8 console=tty0 ro splash plymouth.ignore-serial-consoles maxcpus=4 coherent_pool=1M single
  Reply
#18
so.... check LABEL= is right,,,, sudo blkid ,,,, and that the dtb is where stated, not in a dtb directory
the line(s) linux /vmlinuz-5.10.0-13-arm64
Strongly suggest that /boot is a separate partition, should show that in blkid above
If there is only 1 partition, that is wrong
explanation: uboot looks for (and I'm not sure what order) boot.scr, extlinux/extlinux.conf, efi/aarch64.efi
(or boot/boot.scr,, boot/extlinux/extlinux.conf ,,, etc)
If there is only 1 partition, those are preceded by /boot/
If there are 2, well, fstab and mounting has not happened yet, so as far as uboot
knows, these are in the root of what uboot recognizes as the file system
If you have a 3.3V serial cable and flip the headphone/serial switch then you will know more
Even then, some dtb's do not set up video correctly
My extlinux.conf for buster also has (in the append line) modprobe.blacklist=panfrost
and maxcpus=6 (This will just make it a LOT slower,using the 4 m55 cores)
  Reply
#19
Quote:sudo blkid
/dev/mmcblk2p1: PARTLABEL="mmcblk2-IDBLoader" PARTUUID="77523881-31d7-dd4d-94ff-010b5620ce16"
/dev/mmcblk2p2: PARTLABEL="mmcblk2-U-Boot" PARTUUID="fc6b06bb-5996-fa4b-9981-06102f199d0a"
/dev/mmcblk2p3: PARTLABEL="mmcblk2-TrustedFirmware-A" PARTUUID="4b35c3b6-01d1-d84d-95ad-461ce9bc3f25"
/dev/mmcblk2p4: LABEL_FATBOOT="EFI" LABEL="EFI" UUID="C119-72D7" BLOCK_SIZE="512" TYPE="vfat" PARTLABEL="mmcblk2-EFI" PARTUUID="e29fa735-14a6-3241-b4f6-05ef2ec82599"
/dev/mmcblk2p5: LABEL="mmcblk2-Boot" UUID="234e8e57-10fd-49d3-a103-9fc17ae835da" BLOCK_SIZE="1024" TYPE="ext4" PARTLABEL="mmcblk2-Boot" PARTUUID="2825f52c-7d7a-4b4f-a7c8-968bef8e3211"
/dev/mmcblk2p6: UUID="d6714f15-c3b4-46a2-8c68-ddc1de61881e" TYPE="crypto_LUKS" PARTLABEL="mmcblk2-RootFS" PARTUUID="1ffd33d7-f7de-7b40-9323-507e17ce8baf"


I won't have much time to do anything until at least the end of the week. I have a UART that I bought together with my PBP. I will not be around my main computer for potentially months though so I'll bring my keyboard equipped PP and see if I can have that hooked up with my PBP at some point.
  Reply
#20
Some busy time has passed since my last post but I am quarantining on the other side of the planet now and have some time on my hands again.

I brought the UART but decided it is probably wise not to use it as it likely uses the wrong voltage: I got it from the Pine store together with my PBP al the way back in 2019. 

Starting with the good news though: I finally managed to install Tow-Boot to SPI! Disabling the eMMC with the switch on the mainboard did the trick.

The not so good news is that booting Debian from the eMMC is still not working. The process stops when starting the kernel, with a black screen and a red power LED.

To make matters worse, I no longer can boot Debian from the SD card I have been using lately either. The boot process seems to get a little further than from the eMMC: Past a red to a green LED, but the screen remains black.

I’ll try to attach some PDFs with the screen output during the boot process in the hope someone smarter than me sees something in there that might help make my PBP useable again.

My digital life has been unraveling a bit lately. I lost my iPad last week on the first day of several months away from home. My phone is a dumb one so I’m now using a borrowed iPhone with a broken mic as a mini-iPad until my new iPad arrives in 2-3 weeks time. They seem to be in short supply.

Luckily I was able to get Tow-Boot installed and Mobian reinstalled on my PP yesterday as it hadn’t been booting since a failed upgrade to bookworm a while ago.

On a side-note, as my PP will be my main computer for the time being:
Is it safe to connect unpowered devices like USB thumb drives or (SD) card readers to the phone? The Wiki only mentions power sources, megi seems to be much more restrictive. 
https://wiki.pine64.org/wiki/PinePhone_(...ard#Safety
https://xnux.eu/pinephone-keyboard/faq.html#charging

Any help will be greatly appreciated!


Attached Files
.pdf   SD.pdf (Size: 375.15 KB / Downloads: 118)
.pdf   eMMC.pdf (Size: 628.78 KB / Downloads: 119)
.pdf   Tow-Boot.pdf (Size: 598.67 KB / Downloads: 114)
  Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Debian on Pinebook Pro u974615 8 436 03-22-2024, 03:57 PM
Last Post: u974615
Exclamation 'failed to open panfrost' after system update using archarm Puckla 1 210 03-01-2024, 06:46 PM
Last Post: Puckla
  Help installing Manjaro on eMMC of Pinebook Pro pine4546464 4 1,910 12-13-2023, 07:22 PM
Last Post: trillobite
  Need Help Recovering Manjaro /boot Contents on Pinebook Pro calinb 6 1,978 12-11-2023, 03:47 AM
Last Post: calinb
  Manjaro 20.04 not loading from SD (with Manjaro on eMMC) zaius 1 290 12-07-2023, 03:11 PM
Last Post: wdt
  Boot Order in Pinebook Pro food 8 989 11-23-2023, 07:37 AM
Last Post: KC9UDX
  install debian on pbp jsch 7 3,826 11-22-2023, 04:22 PM
Last Post: TRS-80
  How to mainline kernel on daniel thompson's debian installer? hellojack 14 7,013 09-07-2023, 09:38 PM
Last Post: Der Geist der Maschine
  Manjaro [ARM Stable Update] 2021-07-23 issues Bocanila 1 1,912 08-21-2023, 09:10 PM
Last Post: vanessadonald
  [Manjaro] u-boot won't boot from eMMC with (unbootable) SD card present zackw 1 1,850 08-21-2023, 09:08 PM
Last Post: vanessadonald

Forum Jump:


Users browsing this thread: 2 Guest(s)