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
  [Manjaro] u-boot won't boot from eMMC with (unbootable) SD card present zackw 1 1,853 08-21-2023, 09:08 PM
Last Post: vanessadonald
  2TB SD Card Write Errors jiacovelli 3 962 06-02-2023, 06:13 PM
Last Post: KC9UDX
  PBP became not-bootable after replace new mainboard. lotsofstars 5 1,642 12-14-2022, 12:16 PM
Last Post: lotsofstars
  Bootloader: SD card boot quirks crazyquark 1 1,000 10-04-2022, 12:27 PM
Last Post: elitegamercody
  Unable to make a bootable microSD card myself600 15 5,155 09-27-2022, 01:45 PM
Last Post: myself600
  100% SD bootable img untitled 9 3,576 08-22-2022, 12:15 PM
Last Post: snorwood
  what is the magic dd incantation to copy the system from the sd card to the emmc? geokon 18 8,780 08-18-2022, 11:26 PM
Last Post: calinb
  Debian/unstable SD card rescue image vajak 4 3,870 10-28-2021, 02:53 PM
Last Post: vajak
  PBP won't boot from eMMC or SD card: a saga archaicmeander 18 14,162 02-06-2021, 07:40 PM
Last Post: wdt
  UBOOT - Mainline not booting from SD card / BSP OK Anarethos 1 2,871 01-10-2021, 12:33 AM
Last Post: Anarethos

Forum Jump:


Users browsing this thread: 1 Guest(s)