Making an SD card bootable
#1
Hi,
I've almost finished a port of OpenMandriva to the Pinebook Pro -- the last remaining big issue: I can't get the SD card to boot by itself. It works fine if I use the UART cable to stop autoboot and run uboot commands to boot it manually.

I built u-boot from the megous repository, using the pinebook-pro-rk3399_defconfig configuration. Then I do
dd if=u-boot/idbloader.img of=/dev/sdb seek=64 conv=notrunc
dd if=u-boot/u-boot.itb of=/dev/sdb seek=16384 conv=notrunc

I have an ext4 partition starting at sector 32768 containing the files documented at http://opensource.rock-chips.com/wiki_Boot_option

But the bootloader simply doesn't seem to see the SD card as a bootable device, it boots Manjaro as usual when the SD card is inserted (unless I intervene manually over the UART).

What am I doing wrong?

U-Boot TPL 2020.01-7-g365495a329 (Mar 30 2020 - 15:28:38)
Channel 0: LPDDR4, 50MHz
BW=32 Col=10 Bk=8 CS0 Row=15 CS1 Row=15 CS=2 Die BW=16 Size=2048MB
Channel 1: LPDDR4, 50MHz
BW=32 Col=10 Bk=8 CS0 Row=15 CS1 Row=15 CS=2 Die BW=16 Size=2048MB
256B stride
256B stride
lpddr4_set_rate: change freq to 400000000 mhz 0, 1
lpddr4_set_rate: change freq to 800000000 mhz 1, 0
Trying to boot from BOOTROM
Returning to boot ROM...

U-Boot SPL 2020.01-7-g365495a329 (Mar 30 2020 - 15:28:38 +0000)
Trying to boot from MMC2


U-Boot 2020.01-7-g365495a329 (Mar 30 2020 - 15:28:38 +0000) Manjaro ARM

Model: Pine64 Pinebook Pro
DRAM:  3.9 GiB
PMIC:  RK808  
MMC:   dwmmc@fe320000: 1, sdhci@fe330000: 0
In:    serial@ff1a0000
Out:   serial@ff1a0000
Err:   serial@ff1a0000
Model: Pine64 Pinebook Pro
## Error: Can't overwrite "serial#"
## Error inserting "serial#" variable, errno=1
rockchip_dnl_key_pressed: adc_channel_single_shot fail!
Net:   No ethernet found.
Hit any key to stop autoboot:  0  

[ ---> I can manually intervene here and load my stuff from the SD card just <--- ]

starting USB...
Bus usb@fe380000: USB EHCI 1.00
Bus usb@fe3c0000: USB EHCI 1.00
Bus dwc3: Register 2000140 NbrPorts 2
Starting the controller
USB XHCI 1.10
Bus dwc3: Register 2000140 NbrPorts 2
Starting the controller
USB XHCI 1.10
scanning bus usb@fe380000 for devices... 1 USB Device(s) found
scanning bus usb@fe3c0000 for devices... 2 USB Device(s) found
scanning bus dwc3 for devices... 1 USB Device(s) found
scanning bus dwc3 for devices... 1 USB Device(s) found
      scanning usb for storage devices... 0 Storage Device(s) found

Device 0: unknown device
switch to partitions #0, OK
mmc0(part 0) is current device
Scanning mmc 0:1...
Found /extlinux/extlinux.conf
Retrieving file: /extlinux/extlinux.conf
#2
In your extlinux.conf is the root= part set right? It probably wants to be something like /dev/sda2, not /dev/mmcblk1p2. That's also true of your /etc/fstab. And these are the ones on the sd card, not the ones on your eMMC. So like /sd/etc/fstab.

I copied (on a Rasberry Pi) an sd to a USB hard drive once and those were the only 2 things I had to change.


Possibly Related Threads…
Thread Author Replies Views Last Post
  PBP won't boot from eMMC or SD card: a saga archaicmeander 18 3,657 02-06-2021, 07:40 PM
Last Post: wdt
  UBOOT - Mainline not booting from SD card / BSP OK Anarethos 1 1,084 01-10-2021, 12:33 AM
Last Post: Anarethos
  Debian (or ubuntu) on a micro sd card (pinebook pro) pine76 28 14,941 09-06-2020, 08:20 AM
Last Post: pine76
  PBP SD Card not booting images/IO-Errors(?!) Mikatale 4 2,475 07-03-2020, 11:08 PM
Last Post: wdt
  Can't boot up Manjaro 20.04 eMMc image from SD card... rick1959 25 14,212 06-23-2020, 07:27 PM
Last Post: nathanielwheeler
  Manjaro KDE 20.04 - cant even mount SD card after dd Manjaro from SD to emmc rolf 0 1,103 06-20-2020, 10:01 AM
Last Post: rolf
  After messing with eMMC partitions, PBP won't boot, even from SD card imij 15 6,896 06-09-2020, 09:52 AM
Last Post: wdt
  Manjaro SD card boot issue aeastw 8 3,759 06-06-2020, 02:46 AM
Last Post: cefre00
Question Mount eMMC after booting from SD card Feakster 3 2,403 03-16-2020, 02:36 PM
Last Post: lxn
  Not booting from SD card made from Pinebook chihiro 2 1,143 01-07-2020, 11:38 AM
Last Post: chihiro

Forum Jump:


Users browsing this thread: 1 Guest(s)