How to flash Odroid Go2 u-boot
Roger Pau Monné
royger at freebsd.org
Mon Feb 8 16:58:20 CET 2021
On Mon, Feb 08, 2021 at 01:55:26PM +0000, Peter Robinson wrote:
> On Mon, Feb 8, 2021 at 1:27 PM Roger Pau Monné <royger at freebsd.org> wrote:
> >
> > Hello,
> >
> > I'm trying to build an u-boot image that I can flash into my SD card
> > in order to boot from Odroid Go Super. I'm currently trying to use the
> > odroid-go2_defconfig which should be fairly similar to the hardware
> > present in the Go3.
> >
> > I've managed to build it from 2021.01, but I'm not sure how I should
> > proceed to flash the result into the SD card. The 'fuser' script from
> > the Hardkernel u-boot forked repository has:
> >
> > dd if=idbloader.img of=/dev/foo conv=fsync bs=512 seek=64
> > dd if=uboot.img of=/dev/foo conv=fsync bs=512 seek=16384
> > dd if=trust.img of=/dev/foo conv=fsync bs=512 seek=24576
> >
> > I see idbloader.img and u-boot.img as outputs from the build process,
> > but I have no idea how to get trust.img, as that doesn't seem to be
> > part of the build output AFAICT. Is it something I need to get from
> > another repository?
>
> So U-Boot build, assuming you're putting an ATF bl31.bin in place
Sorry, I'm not familiar with the Arm stuff, so some questions might
seem obvious.
I've picked rk3326_bl31_v1.21.elf from:
https://github.com/rockchip-linux/rkbin/blob/master/bin/rk33/rk3326_bl31_v1.21.elf
I note there's also a rk3326_bl32_v1.15.bin in that folder, some
miniloader .bin files and a ddr .bin, but that's not needed?
I think I must get the bl31 from the above repository, as there's no
support for building it from ARM-software/arm-trusted-firmware
repository:
https://github.com/ARM-software/arm-trusted-firmware/tree/master/plat/rockchip
> bundles 2 and 3 together into an u-boot.itb file which you can replace
> line 2 with so you should be able to do:
> dd if=idbloader.img of=/dev/foo conv=fsync bs=512 seek=64
> dd if=u-boot.itb of=/dev/foo conv=fsync bs=512 seek=16384
Thanks for the snippets. So I wiped the mbr of an SD card and used the
above commands to flash the newly built U-Boot images, and this is the
output I'm getting on the serial port:
U-Boot 201709 (Jan 01 2021 - 01:14:44 +0000)
Model: Rockchip RK3326 ODROID-GO Advanced
PreSerial: 2
DRAM: 992 MiB
Sysmem: init
Relocation Offset is: 3dabd000
Using default environment
adc0 (hw rev) 82
no mmc device at slot 1
RKPARM: Invalid parameter part table
Found IDB in SDcard
dwmmc at ff370000: 1 (SD)
Bootdev(atags): mmc 1
MMC1: Legacy, 50Mhz
RKPARM: Invalid parameter part table
## Unknown partition table type 0
PartType: <NULL>
RKPARM: Invalid parameter part table
init_resource_list: failed to get resource part, ret=-1
** Unrecognized filesystem type **
dtb in resource read fail, try dtb in spi flash
sfc nor id: b 40 18
Device 1: GUID Partition Table Header signature is wrong: 0xFFFFFFFFFFFFFFFF != 0x5452415020494645
Repair the backup gpt table OK!
Vendor: 0x0308 Rev: V100 Prod: rkflash-SpiNor
Type: Hard Disk
Capacity: 160 MB = 00 GB (32768 x 512)
is now current device
spinor read: device 1 block # 12392, count 200 200 blocks read: OK
I2c speed: 400000Hz
PMIC: RK8170 (on=0x80, off=0x08)
vdd_logic 1100000 uV
vdd_arm 1100000 uV
*** Warning - bad CRC, using default environment
In: serial
Out: serial
Err: serial
Model: ODROID-GO3 for linux based on Rockchip rk3326
download key pressed entering recovery mode!
boot mode: recovery (key)
CLK: (sync kernel arm: enter 600000 KHz, init 600000 KHz, kernel 600000 KHz)
apll 600000 KHz
dpll 664000 KHz
cpll 24000 KHz
npll 1188000 KHz
gpll 1200000 KHz
aclk_bus 200000 KHz
hclk_bus 150000 KHz
pclk_bus 100000 KHz
aclk_peri 200000 KHz
hclk_peri 150000 KHz
pclk_pmu 100000 KHz
** Unrecognized filesystem type **
Rockchip UBOOT DRM driver version: v101
Using display timing dts
Detailed mode clock 27500 kHz, flags[a]
H: 0480 0490 0500 0505
V: 0854 0866 0868 0928
bus_format: 100e
final DSI-Link bandwidth: 366 Mbps x 2
** No partition table - mmc 1 **
logobmp file not found! filesize = 0
spinor read: device 1 block # 12592, count 400 400 blocks read: OK
Uncompressed size: 1229814 = 0x12C3F6
switch to partitions #0, OK
mmc1 is current device
** No partition table - mmc 1 **
Net: Net Initialization Skipped
No ethernet found
Hit key to stop autoboot('CTRL+C'): 0
switch to partitions #0, OK
mmc1 is current device
Failed to mount ext2 filesystem
** Unrecognized filesystem type **
Failed to mount ext2 filesystem
** Unrecognized filesystem type **
cfgload - read 'bootini' from FAT partiton
Usage:
cfgload
- read bootini from the first partiton treated as FAT partiton
** No partition table - mmc 1 **
** No partition table - mmc 1 **
Bad Linux ARM64 Image magic!
spinor read: device 1 block # 13792, count 400 400 blocks read: OK
Uncompressed size: 1229814 = 0x12C3F6
Wait power key
Hit ctrl+c key to enter uboot console
power key long pressed
Apart from the fact that the SD has no partition table now I'm not
sure if the hardware is correctly picking up the new u-boot from the
SD, as the only printed version string I see is "U-Boot 201709 (Jan 01
2021 - 01:14:44 +0000)" which the one on the SPI.
Thanks, Roger.
More information about the U-Boot
mailing list