Mainline U-Boot with SPI, NVMe and SATA boot support
#11
Hi,
I ported simply the latest Ayufan U-Boot Aug 26 2019 version (http://github.com/ayufan-rock64/linux-u-boot) to support of boot only from nvme (I added PCIe support from http://github.com/torvalds/linux/blob/ma...kpro64.dts and I enabled the NVMe and PCIe in defconfig: CONFIG_NVME, CONFIG_PCIE_ROCKCHIP).
Linux boot perfectly only from NVMe, but unfortunately Android not.
I tried already all Android version from http://wiki.pine64.org/index.php/ROCKPro...oid_Images. And I parted the SSD as SD card (same name, type and begin/size sectors of partitions, etc.). But nothing.

Code:
... => boot_android nvme 0:3 ANDROID: reboot reason: "(none)" ANDROID: bootargs: "storagemedia=nvme androidboot.mode=normal androidboot.dtbo_idx=0 console=ttyFIQ0 androidboot.slot_suffix= androidboot.serialno=7b6f8551bce5b3b root=PARTUUID=af01642c-9b84-11e8-9b2a-234eb5e198a0 skip_initramfs" FDT load addr 0x10f00000 size 286 KiB ftd_addr: 22163456 Booting kernel at 0x280000 with fdt at 22163456... ## Booting Android Image at 0x00280000 ... Kernel load addr 0x00280800 size 19081 KiB Kernel command line: console=ttyFIQ0 androidboot.baseband=N/A androidboot.wificountrycode=US androidboot.veritymode=enforcing androidboot.hardware=rk30board androidboot.console=ttyFIQ0 firmware_class.path=/vendor/etc/firmware init=/init rootwait ro init=/init root=PARTUUID=af01642c-9b84-11e8-9b2a-234eb5e198a0 loop.max_part=7 androidboot.selinux=permissive newbootargs: storagemedia=nvme androidboot.mode=normal androidboot.dtbo_idx=0 console=ttyFIQ0 androidboot.slot_suffix= androidboot.serialno=7b6f8551bce5b3b root=PARTUUID=af01642c-9b84-11e8-9b2a-234eb5e198a0 skip_initramfs console=ttyFIQ0 androidboot.baseband=N/A androidboot.wificountrycode=US androidboot.veritymode=enforcing androidboot.hardware=rk30board androidboot.console=ttyFIQ0 firmware_class.path=/vendor/etc/firmware init=/init rootwait ro init=/init root=PARTUUID=af01642c-9b84-11e8-9b2a-234eb5e198a0 loop.max_part=7 androidboot.selinux=permissive "Synchronous Abort" handler, esr 0x96000021 ELR:     f7f59ad0 LR:      f7f59acc x0 : 0000000000000527 x1 : 00000000ff1a0000 x2 : 000000000000000a x3 : 00000000ff1a0000 x4 : 00000000f5f2ae40 x5 : 00000000f7f8eced x6 : 0000000022163456 x7 : 0000000000000008 x8 : 00000000f5f2b240 x9 : 0000000000000008 x10: 00000000f5f2aebe x11: 00000000ffffffff x12: 00000000ffffffff x13: 0000000000000200 x14: 000000000000000e x15: 00000000ffffffff x16: 0000000000001080 x17: 00000000204e0120 x18: 00000000f5f37df8 x19: 0000000022163456 x20: 00000000f7fb2d80 x21: 00000000f5f4b1c0 x22: 00000000f7fb2e80 x23: 00000000f7fb2e88 x24: 0000000022163456 x25: 0000000000000016 x26: 0000000000000000 x27: 00000000f7fb2000 x28: 00000000f5f43370 x29: 0000000000200090 Resetting CPU ...

Moreover, the Android doesn't start from the SD card with the original latest Ayufan U-Boot 2017.09-rockchip-ayufan-1065-g95f6152134 (Aug 26 2019 - 12:41:34 +0000) (http://github.com/ayufan-rock64/linux-u-...95f6152134) either!

Code:
... Hit key to stop autoboot('CTRL+C'):  0 ANDROID: reboot reason: "(none)" SecureBoot enabled, AVB verify => CONFIG_ANDROID_AVB=y? read_is_device_unlocked() ops returned that device is UNLOCKED avb_slot_verify.c:638: ERROR: vbmeta: Error verifying vbmeta image: OK_NOT_SIGNED TTT1 cmdline=root=PARTUUID=$(ANDROID_SYSTEM_PARTUUID) FDT load addr 0x10f00000 size 286 KiB Booting IMAGE kernel at 0x00280000 with fdt at 0x8300000... ## Booting Android Image at 0x0027f800 ... Kernel load addr 0x00280000 size 19081 KiB ## Flattened Device Tree blob at 08300000    Booting using the fdt blob at 0x8300000    XIP Kernel Image ... OK TTT3 commandline=storagemedia=sd androidboot.mode=normal androidboot.dtbo_idx=0 root=PARTUUID=af01642c-9b84-11e8-9b2a-234eb5e198a0 androidboot.verifiedbootstate=orange androidboot.slot_suffix= androidboot.serialno=7b6f8551bce5b3b console=ttyFIQ0 androidboot.baseband=N/A androidboot.wificountrycode=US androidboot.veritymode=enforcing androidboot.hardware=rk30board androidboot.console=ttyFIQ0 firmware_class.path=/vendor/etc/firmware init=/init rootwait ro init=/init root=PARTUUID=af01642c-9b84-11e8-9b2a-234eb5e198a0 loop.max_part=7 androidboot.selinux=permissive    Loading Device Tree to 00000000e9db9000, end 00000000e9dd4727 ... OK Adding bank: 0x00200000 - 0x08400000 (size: 0x08200000) Adding bank: 0x0a200000 - 0xf8000000 (size: 0xede00000) Total: 7012.817 ms Starting kernel ... [    0.000000] Booting Linux on physical CPU 0x0 [    0.000000] Initializing cgroup subsys cpuset [    0.000000] Initializing cgroup subsys cpu [    0.000000] Initializing cgroup subsys cpuacct [    0.000000] Initializing cgroup subsys schedtune [    0.000000] Linux version 4.4.167 (tugy@thzy-server) (gcc version 6.3.1 20170404 (Linaro GCC 6.3-2017.05) ) #22 SMP PREEMPT Mon May 6 09:37:48 CST 2019 [    0.000000] Boot CPU: AArch64 Processor [410fd034] [    0.000000] earlycon: Early serial console at MMIO32 0xff1a0000 (options '') [    0.000000] bootconsole [uart0] enabled [    0.000000] Reserved memory: failed to reserve memory for node 'stb-devinfo@00000000': base 0x0000000000000000, size 0 MiB

Maybe does anyone have an bootable Android version? Or compiled Android with PCIe and NVME support? Thank you for your help!
Or possible boot the Android from extlinux?

My suggestions yet for the NVME port:

1. increase the SPL size (prevent of .sram size error in compile) in include\configs\rk3399_common.h:

Code:
//#define CONFIG_SPL_MAX_SIZE             0x10000 #define CONFIG_SPL_MAX_SIZE             0x20000 //#define CONFIG_SPL_BSS_MAX_SIZE         0x20000 #define CONFIG_SPL_BSS_MAX_SIZE         0x40000

2. I needed to decrease (1 MB => 512 kB) the Maximum Data Transfer Size (MDTS) for my Samsung 970 PRO M.2 512GB NVMe SSD in drivers\nvme\nvme.c:


Code:
static int nvme_get_info_from_identify(struct nvme_dev *dev)     ...         dev->max_transfer_shift = 20;     } //My Hack[20190905]: max 512 kB wihout error...     dev->max_transfer_shift = 19;     printf("nvme_get_info_from_identify()-max_transfer_shift: %u\n", dev->max_transfer_shift)
  Reply


Messages In This Thread
RE: Mainline U-Boot with SPI and NVMe support (alpha/pre-release version for testing) - by themyshop - 01-07-2020, 04:46 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  (real) Mainline U-boot finally works on SPI, boots SATA, throw away your SD cards NOW aleksei 0 12,985 06-21-2025, 06:21 AM
Last Post: aleksei
  How to use ROCKPro64 PCI-e X4 to M.2/NGFF NVMe SSD Interface Card jykeith123 1 5,535 11-26-2024, 11:08 AM
Last Post: wdt
  enble boot after power loss/restore dkebler 18 30,603 12-04-2023, 12:14 PM
Last Post: ok38
Bug Broken boot: What am I missing? mkosarek 1 4,624 09-08-2023, 08:14 AM
Last Post: wdt
  Unable to boot Armbian on new RockPro64 mooseball 5 13,981 07-14-2023, 08:59 AM
Last Post: rockjonn
  no boot white led flashing moserwi 7 14,274 05-18-2023, 10:46 AM
Last Post: wdt
  u-boot locked on pine64pro ljones 1 4,675 09-06-2022, 10:32 AM
Last Post: ljones
  Cannot get my board to boot deutschlmao 11 20,147 09-05-2022, 04:23 PM
Last Post: ljones
  U-BOOT Tutorial hazz 0 3,617 07-19-2022, 10:48 PM
Last Post: hazz
  Installation Debian on emmc: which U-Boot and where? vongillus 3 8,144 07-02-2022, 09:24 AM
Last Post: dkebler

Forum Jump:


Users browsing this thread: 1 Guest(s)