U-boot update for AB partitions support
Posted: Fri Mar 08, 2019 2:40 pm
Dear all,
I have been working for some days on an update of the U-boot of Android 8.1. My goal is to compile the actual release of the rockchip u-boot (https://github.com/rockchip-linux/u-boot) by replacing the one in FriendlyElec Android 8.1 source code (2014.10-RK3399-06).
My project is the following one : https://gitlab.peslerbe.com/peslerbe/rk3399-android-8.1
I am now able to successfully launch the new u-boot version but the Android kernel is unfortunately not loading. My goal at this stage is to run the Android version as it is provided in FrendlyElec source code (so without AB partition).
UART Debug console:
As you probably noticed, the eMMC partition table was correctly loaded. But when trying to boot on it, I every time get the same ** Unrecognized filesystem type ** error. I checked many options but I can't figure out where it come from, U-Boot is quite new from me and it seems there some mechanism like mtdparts and nand, I not totally understood.
My config file : https://gitlab.peslerbe.com/peslerbe/rk ... _defconfig
Dts : https://gitlab.peslerbe.com/peslerbe/rk ... -rev00.dts
Dtsi : https://gitlab.peslerbe.com/peslerbe/rk ... ommon.dtsi
If you have an idea of the solutions, you would save me
Thanks
parameter.txt is the following: (Work with unmodified U-Boot)
The upgrade script is the following: (Work with unmodified U-Boot)
I have been working for some days on an update of the U-boot of Android 8.1. My goal is to compile the actual release of the rockchip u-boot (https://github.com/rockchip-linux/u-boot) by replacing the one in FriendlyElec Android 8.1 source code (2014.10-RK3399-06).
My project is the following one : https://gitlab.peslerbe.com/peslerbe/rk3399-android-8.1
I am now able to successfully launch the new u-boot version but the Android kernel is unfortunately not loading. My goal at this stage is to run the Android version as it is provided in FrendlyElec source code (so without AB partition).
UART Debug console:
Code: Select all
...
SdmmcInit=0 1
StorageInit ok = 67451
SecureMode = 0
SecureInit read PBA: 0x4
SecureInit read PBA: 0x404
SecureInit read PBA: 0x804
SecureInit read PBA: 0xc04
SecureInit read PBA: 0x1004
SecureInit read PBA: 0x1404
SecureInit read PBA: 0x1804
SecureInit read PBA: 0x1c04
SecureInit ret = 0, SecureMode = 0
atags_set_bootdev: ret:(0)
GPT part: 0, name: uboot, start:0x2000, size:0x2000
GPT part: 1, name: trust, start:0x4000, size:0x2000
GPT part: 2, name: misc, start:0x6000, size:0x2000
GPT part: 3, name: resource, start:0x8000, size:0x8000
GPT part: 4, name: kernel, start:0x10000, size:0xc000
GPT part: 5, name: boot, start:0x1c000, size:0x10000
GPT part: 6, name: recovery, start:0x2c000, size:0x20000
GPT part: 7, name: backup, start:0x4c000, size:0x38000
GPT part: 8, name: security, start:0x84000, size:0x2000
GPT part: 9, name: cache, start:0x86000, size:0x100000
GPT part: 10, name: system, start:0x186000, size:0x300000
GPT part: 11, name: metadata, start:0x486000, size:0x8000
GPT part: 12, name: vendor, start:0x48e000, size:0x100000
GPT part: 13, name: oem, start:0x58e000, size:0x80000
GPT part: 14, name: frp, start:0x60e000, size:0x400
GPT part: 15, name: userdata, start:0x60e400, size:0x1d1efdf
find part:uboot OK. first_lba:0x2000.
find part:trust OK. first_lba:0x4000.
LoadTrust Addr:0x4000
No find bl30.bin
Load uboot, ReadLba = 2000
Load OK, addr=0x200000, size=0xc0e60
RunBL31 0x10000
NOTICE: BL31: v1.3(debug):370ab80
NOTICE: BL31: Built : 09:23:41, Mar 4 2019
NOTICE: BL31: Rockchip release version: v1.1
INFO: GICv3 with legacy support detected. ARM GICV3 driver initialized in EL3
INFO: Using opteed sec cpu_context!
INFO: boot cpu mask: 0
INFO: plat_rockchip_pmu_init(1181): pd status 3e
INFO: BL31: Initializing runtime services
INFO: BL31: Initializing BL32
INF [0x0] TEE-CORE:init_primary_helper:337: Initializing (1.1.0-195-g8f090d20 #6 Fri Dec 7 06:11:20 UTC 2018 aarch64)
INF [0x0] TEE-CORE:init_primary_helper:338: Release version: 1.2
INF [0x0] TEE-CORE:init_teecore:83: teecore inits done
INFO: BL31: Preparing for EL3 exit to normal world
INFO: Entry point address = 0x200000
INFO: SPSR = 0x3c9
U-Boot 2017.09 (Mar 08 2019 - 14:09:50 +0000)
Model: FriendlyElec NanoPC-T4
PreSerial: 2
DRAM: 3.8 GiB
Relocation Offset is: f7c7c000
Sysmem: init
I2c speed: 400000Hz
PMIC: RK808
vdd_center 900000 uV
vdd_cpu_l 900000 uV
vdd-log init 1000000 uV
MMC: dwmmc@fe310000: 2, dwmmc@fe320000: 1, sdhci@fe330000: 0
*** Warning - bad CRC, using default environment
In: serial@ff1a0000
Out: serial@ff1a0000
Err: serial@ff1a0000
Model: FriendlyElec NanoPC-T4
Bootdev(atags): mmc 0
rockchip_dnl_key_pressed adc_channel_single_shot fail! ret=-19
PartType: EFI
enter Recovery mode!
CLK: (uboot. arml: enter 816000 KHz, init 816000 KHz, kernel 0N/A)
CLK: (uboot. armb: enter 24000 KHz, init 24000 KHz, kernel 0N/A)
aplll 816000 KHz
apllb 24000 KHz
dpll 800000 KHz
cpll 24000 KHz
gpll 800000 KHz
npll 600000 KHz
vpll 24000 KHz
aclk_perihp 133333 KHz
hclk_perihp 66666 KHz
pclk_perihp 33333 KHz
aclk_perilp0 266666 KHz
hclk_perilp0 88888 KHz
pclk_perilp0 44444 KHz
hclk_perilp1 100000 KHz
pclk_perilp1 50000 KHz
Net: eth0: ethernet@fe300000
Hit key to stop autoboot('CTRL+C'): 0
ANDROID: reboot reason: "recovery"
** Invalid Android Image header **
Android boot failed, error -1.
do_boot_rockchip boot from Recovery partition!
=Booting Rockchip format image=
Load FDT from resource part
DTB: rk-kernel.dtb
boot_rockchip_image fdt read error
Card did not respond to voltage select!
mmc_init: -95, time 18
switch to partitions #0, OK
mmc0(part 0) is current device
Failed to mount ext2 filesystem...
** Unrecognized filesystem type **
## Error: "rknand_boot" not defined
starting USB...
USB0: USB EHCI 1.00
USB1: USB EHCI 1.00
scanning bus 0 for devices... 1 USB Device(s) found
scanning bus 1 for devices... 1 USB Device(s) found
scanning usb for storage devices... 0 Storage Device(s) found
Device 0: unknown device
ethernet@fe300000 Waiting for PHY auto negotiation to complete......... TIMEOUT !
Could not initialize PHY ethernet@fe300000
missing environment variable: pxeuuid
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/01-42-bd-e9-ba-c4-33
ethernet@fe300000 Waiting for PHY auto negotiation to complete......... TIMEOUT !
Could not initialize PHY ethernet@fe300000
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/00000000
ethernet@fe300000 Waiting for PHY auto negotiation to complete......... TIMEOUT !
Could not initialize PHY ethernet@fe300000
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/0000000
ethernet@fe300000 Waiting for PHY auto negotiation to complete......... TIMEOUT !
Could not initialize PHY ethernet@fe300000
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/000000
ethernet@fe300000 Waiting for PHY auto negotiation to complete......... TIMEOUT !
Could not initialize PHY ethernet@fe300000
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/00000
ethernet@fe300000 Waiting for PHY auto negotiation to complete......... TIMEOUT !
Could not initialize PHY ethernet@fe300000
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/0000
ethernet@fe300000 Waiting for PHY auto negotiation to complete......... TIMEOUT !
Could not initialize PHY ethernet@fe300000
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/000
ethernet@fe300000 Waiting for PHY auto negotiation to complete......... TIMEOUT !
Could not initialize PHY ethernet@fe300000
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/00
ethernet@fe300000 Waiting for PHY auto negotiation to complete......... TIMEOUT !
Could not initialize PHY ethernet@fe300000
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/0
ethernet@fe300000 Waiting for PHY auto negotiation to complete......... TIMEOUT !
Could not initialize PHY ethernet@fe300000
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/default-arm-rockchip
ethernet@fe300000 Waiting for PHY auto negotiation to complete......... TIMEOUT !
Could not initialize PHY ethernet@fe300000
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/default-arm
ethernet@fe300000 Waiting for PHY auto negotiation to complete......... TIMEOUT !
Could not initialize PHY ethernet@fe300000
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/default
ethernet@fe300000 Waiting for PHY auto negotiation to complete......... TIMEOUT !
Could not initialize PHY ethernet@fe300000
Config file not found
ethernet@fe300000 Waiting for PHY auto negotiation to complete......... TIMEOUT !
Could not initialize PHY ethernet@fe300000
ethernet@fe300000 Waiting for PHY auto negotiation to complete......... TIMEOUT !
Could not initialize PHY ethernet@fe300000
=> mmc list
dwmmc@fe310000: 2
dwmmc@fe320000: 1
sdhci@fe330000: 0 (eMMC)
=> mmc part
Partition Map for MMC device 0 -- Partition Type: EFI
Part Start LBA End LBA Name
Attributes
Type GUID
Partition GUID
1 0x00002000 0x00003fff "uboot"
attrs: 0x0000000000000000
type: 8dcd1602-5214-43f9-ffef-c49a4ee450b7
guid: 5a30833f-8c43-47b1-a41d-84d40883d0c6
2 0x00004000 0x00005fff "trust"
attrs: 0x0000000000000000
type: 1124e418-9008-41f8-9e3d-8d872216c8a1
guid: 67ad7741-4638-47c6-a488-d396583e582a
3 0x00006000 0x00007fff "misc"
attrs: 0x0000000000000000
type: fbd4486a-e42c-448d-d4e9-7f5c324a7843
guid: 3adea03d-c612-46ed-cff9-b79439f11561
4 0x00008000 0x0000ffff "resource"
attrs: 0x0000000000000000
type: bbaf4f47-230d-45b6-feae-e4b35f300b00
guid: e582484a-9010-404a-899d-47bd16ba3fa8
5 0x00010000 0x0001bfff "kernel"
attrs: 0x0000000000000000
type: c5c5d354-440b-453e-8832-d36349b6ee24
guid: dc11277f-eb7f-42d9-8027-a83b14220e50
6 0x0001c000 0x0002bfff "boot"
attrs: 0x0000000000000000
type: 5cc3b72d-c157-4984-a601-30f55f80ac1c
guid: 295a726a-357d-4382-d5a6-e7e871da99e0
7 0x0002c000 0x0004bfff "recovery"
attrs: 0x0000000000000000
type: 34ea5450-9f2a-471b-9c58-280523e6fe2b
guid: a26ad83c-802b-4321-ac9b-b7d356d112af
8 0x0004c000 0x00083fff "backup"
attrs: 0x0000000000000000
type: 9ee35d5b-1534-498d-aca1-2ea95d08afb2
guid: 48c6a675-3744-45f6-d7ff-474449eeb98e
9 0x00084000 0x00085fff "security"
attrs: 0x0000000000000000
type: 9bb6e963-757d-46f3-98df-9dcd617b9e2d
guid: 47e71b31-0d6e-4c8c-a6d4-2ef63fc0366c
10 0x00086000 0x00185fff "cache"
attrs: 0x0000000000000000
type: 0448066e-413f-490b-ddcc-abc36bb480ec
guid: b7cc853f-4829-4339-ebb8-5d343254dff2
11 0x00186000 0x00485fff "system"
attrs: 0x0000000000000000
type: 05f84913-e62e-44d9-b69d-6efa54810023
guid: 69791571-8d47-4e71-9fba-ab487e4b4194
12 0x00486000 0x0048dfff "metadata"
attrs: 0x0000000000000000
type: 9095b134-ad25-4ed8-867c-8de51aa842f5
guid: 532c020c-db67-42d2-baf3-f5540f79b4d4
13 0x0048e000 0x0058dfff "vendor"
attrs: 0x0000000000000000
type: 98d3534c-bc3d-459a-cf50-728a08a6b629
guid: a594dc3d-6b2d-496a-d4a6-bdac5005acec
14 0x0058e000 0x0060dfff "oem"
attrs: 0x0000000000000000
type: f1b86419-1764-4125-a88d-46bb44cd4566
guid: 639cea30-2821-434d-d7a7-173a52c40716
15 0x0060e000 0x0060e3ff "frp"
attrs: 0x0000000000000000
type: 1fb2434f-032e-448d-9335-c04f183a7763
guid: e410bb00-c453-484a-d583-7fec71d723d8
16 0x0060e400 0x0232d3de "userdata"
attrs: 0x0000000000000000
type: 9dd77b6a-6032-45e6-de5b-d61f467ab9ca
guid: 90b25a78-6554-4afd-ef69-7af263bfec99
As you probably noticed, the eMMC partition table was correctly loaded. But when trying to boot on it, I every time get the same ** Unrecognized filesystem type ** error. I checked many options but I can't figure out where it come from, U-Boot is quite new from me and it seems there some mechanism like mtdparts and nand, I not totally understood.
My config file : https://gitlab.peslerbe.com/peslerbe/rk ... _defconfig
Dts : https://gitlab.peslerbe.com/peslerbe/rk ... -rev00.dts
Dtsi : https://gitlab.peslerbe.com/peslerbe/rk ... ommon.dtsi
If you have an idea of the solutions, you would save me

Thanks
parameter.txt is the following: (Work with unmodified U-Boot)
Code: Select all
FIRMWARE_VER:8.1
MACHINE_MODEL:RK3399
MACHINE_ID:007
MANUFACTURER: RK3399
MAGIC: 0x5041524B
ATAG: 0x00200800
MACHINE: 3399
CHECK_MASK: 0x80
PWR_HLD: 0,0,A,0,1
CMDLINE: console=ttyFIQ0 androidboot.baseband=N/A androidboot.selinux=permissive androidboot.veritymode=enforcing androidboot.hardware=rk30board androidboot.console=ttyFIQ0 init=/init initrd=0x62000000,0x00800000 mtdparts=rk29xxnand:0x00002000@0x00002000(uboot),0x00002000@0x00004000(trust),0x00002000@0x00006000(misc),0x00008000@0x00008000(resource),0x0000C000@0x00010000(kernel),0x00010000@0x0001C000(boot),0x00020000@0x0002C000(recovery),0x00038000@0x0004C000(backup),0x00002000@0x00084000(security),0x00100000@0x00086000(cache),0x00300000@0x00186000(system),0x00008000@0x00486000(metadata),0x00100000@0x0048E000(vendor),0x00080000@0x0058E000(oem),0x00000400@0x0060E000(frp),-@0x0060E400(userdata)
The upgrade script is the following: (Work with unmodified U-Boot)
Code: Select all
sudo upgrade_tool ul android8/MiniLoaderAll.bin
sleep 3
sudo upgrade_tool di -p android8/parameter.txt
sleep 3
sudo upgrade_tool di -uboot android8/uboot.img
sleep .5
sudo upgrade_tool di -trust android8/trust.img
sleep .5
sudo upgrade_tool di -misc android8/misc.img
sleep .5
sudo upgrade_tool di -vendor android8/vendor.img
sleep .5
sudo upgrade_tool di -oem android8/oem.img
sleep .5
sudo upgrade_tool di -kernel android8/kernel.img
sleep .5
sudo upgrade_tool di -boot android8/boot.img
sleep .5
sudo upgrade_tool di -recovery android8/recovery.img
sleep .5
sudo upgrade_tool di -system android8/system.img
sleep .5
sudo upgrade_tool di -resource android8/resource.img
sleep .5
sudo upgrade_tool RD