Issue with OGS Bootloader?

Post Reply
notime2d8
Posts: 292
Joined: Thu Dec 11, 2014 4:40 am
languages_spoken: english
Has thanked: 86 times
Been thanked: 118 times
Contact:

Issue with OGS Bootloader?

Post by notime2d8 »

Hey, I haven't looked at the u-boot changes to see what the fix should be but, u-boot gives an error and does not load the boot.ini from mmc.

I've also built u-boot from source and have the same issue on the OGS and it makes the OGA-BE not load the boot.ini from the mmc as well.

SPI U-boot:

Code: Select all

U-Boot 2017.09-g4102e41302-dirty (Dec 03 2020 - 18:45:15 +0900)

Model: Rockchip RK3326 ODROID-GO Advanced
PreSerial: 2
DRAM:  992 MiB
Sysmem: init
Relocation Offset is: 3dabc000
Using default environment

adc0 (hw rev) 82
dwmmc@ff370000: 1
sfc nor id: b 40 18
GUID Partition Table Header signature is wrong: 0xFFFFFFFFFFFFFFFF != 0x5452415020494645
Repair the backup gpt table OK!
Bootdev(atags): spinor 1
PartType: EFI
init_resource_list: failed to get resource part, ret=-1
RKPARM: Invalid parameter part table
dtb in resource read fail, try dtb in spi flash

Device 1: Vendor: 0x0308 Rev: V1.00 Prod: rkflash-SpiNor
            Type: Hard Disk
            Capacity: 16.0 MB = 0.0 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=0x04)
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
Rockchip UBOOT DRM driver version: v1.0.1
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
** Unable to read file logo.bmp **
logo.bmp 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
Net:   Net Initialization Skipped
No ethernet found.
Hit key to stop autoboot('CTRL+C'):  0 
switch to partitions #0, OK
mmc1 is current device
reading boot.ini
1916 bytes read in 4 ms (467.8 KiB/s)
## Executing script at 00800800
Wrong image format for "source" command
cfgload - read 'boot.ini' from FAT partiton

Usage:
cfgload 
    - read boot.ini from the first partiton treated as FAT partiton
reading Image
20254728 bytes read in 846 ms (22.8 MiB/s)
reading rk3326-odroidgo3-linux.dtb
72329 bytes read in 8 ms (8.6 MiB/s)
## Flattened Device Tree blob at 01f00000
   Booting using the fdt blob at 0x1f00000
   Loading Device Tree to 0000000031c9b000, end 0000000031cafa88 ... OK
reserve drm-loader-logo offset = 58216
reserve drm-logo mem = 000000003de00000, size = 3736832
Adding bank: 0x00200000 - 0x08400000 (size: 0x08200000)
Adding bank: 0x0a200000 - 0x40000000 (size: 0x35e00000)
Total: 3732.79 ms

Starting kernel ...

MMC source built U-boot:

Code: Select all

U-Boot 2017.09 (Dec 28 2020 - 21:50:14 -0600)

Model: Rockchip RK3326 ODROID-GO Advanced
PreSerial: 2
DRAM:  992 MiB
Sysmem: init
Relocation Offset is: 3dabb000
Using default environment

adc0 (hw rev) 83
no mmc device at slot 1
RKPARM: Invalid parameter part table
Found IDB in SDcard
dwmmc@ff370000: 1 (SD)
Bootdev(atags): mmc 1
MMC1: Legacy, 50Mhz
PartType: DOS
rockchip_get_boot_mode: Could not found misc partition
boot mode: loader
init_resource_list: failed to get boot part, ret=-1
init_resource_list: failed to get resource part, ret=-1
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: V1.00 Prod: rkflash-SpiNor
            Type: Hard Disk
            Capacity: 16.0 MB = 0.0 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=0x04)
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
Rockchip UBOOT DRM driver version: v1.0.1
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
** Unable to read file logo.bmp **
logo.bmp 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
Net:   Net Initialization Skipped
No ethernet found.
Hit key to stop autoboot('CTRL+C'):  0 
switch to partitions #0, OK
mmc1 is current device
reading boot.ini
1926 bytes read in 2 ms (940.4 KiB/s)
## Executing script at 00800800
Wrong image format for "source" command
cfgload - read 'boot.ini' from FAT partiton

Usage:
cfgload 
    - read boot.ini from the first partiton treated as FAT partiton
reading Image
20254728 bytes read in 851 ms (22.7 MiB/s)
reading rk3326-odroidgo3-linux.dtb
72093 bytes read in 6 ms (11.5 MiB/s)
## Flattened Device Tree blob at 01f00000
   Booting using the fdt blob at 0x1f00000
   Loading Device Tree to 0000000031c9a000, end 0000000031cae99c ... OK
reserve drm-loader-logo offset = 57992
reserve drm-logo mem = 000000003de00000, size = 3736832
Adding bank: 0x00200000 - 0x08400000 (size: 0x08200000)
Adding bank: 0x0a200000 - 0x40000000 (size: 0x35e00000)
Total: 3763.188 ms

Starting kernel ...
If I say something that sounds smart or like i know what i'm talking about....i'm faking it.

notime2d8
Posts: 292
Joined: Thu Dec 11, 2014 4:40 am
languages_spoken: english
Has thanked: 86 times
Been thanked: 118 times
Contact:

Re: Issue with OGS Bootloader?

Post by notime2d8 »

Below is the error that i got from both SPI and built mmc U-boot.

Code: Select all

reading boot.ini
1916 bytes read in 4 ms (467.8 KiB/s)
## Executing script at 00800800
Wrong image format for "source" command
cfgload - read 'boot.ini' from FAT partiton

Usage:
cfgload 
    - read boot.ini from the first partiton treated as FAT partiton
It's an error coming from source.c here:

Code: Select all

#if defined(CONFIG_PLATFORM_ODROID_GOADV)
		{
			char magic[32];
			int size = snprintf(magic, sizeof(magic),
					"%s-uboot-config", CONFIG_SYS_BOARD);
			if (strncasecmp(buf, magic, strlen(magic))) {
				puts ("Wrong image format for \"source\" command\n");
				return 1;
			}

			data = (u32*)(buf + size);
			len = simple_strtoul(env_get("filesize"), NULL, 16);
		}
#else
		puts ("Wrong image format for \"source\" command\n");
		return 1;
#endif

Which nothing changed here from the older versions of U-boot except the platform name sooo I'm still looking at the changes. And my boot.ini file works on the OGA so I know it's not the issue.
If I say something that sounds smart or like i know what i'm talking about....i'm faking it.

User avatar
odroid
Site Admin
Posts: 37185
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English, Korean
ODROIDs: ODROID
Has thanked: 1703 times
Been thanked: 1116 times
Contact:

Re: Issue with OGS Bootloader?

Post by odroid »

We will try reproducing the issue.
These users thanked the author odroid for the post:
notime2d8 (Thu Dec 31, 2020 1:31 pm)

joy
Posts: 1584
Joined: Fri Oct 02, 2015 1:44 pm
languages_spoken: english
ODROIDs: ODROID-C1+, XU4, X
Has thanked: 179 times
Been thanked: 210 times
Contact:

Re: Issue with OGS Bootloader?

Post by joy »

Hi @notime2d8,
You need to change boot.ini to run new u-boot as following.

The new u-boot with odroidgoa option finds odroidgoa-uboot-config.
If you use a old boo.ini with ODROIDGO2-UBOOT-CONFIG, cfgload of new u-boot doesn't load boot.ini.

Could you try this?
https://wiki.odroid.com/odroid_go_advan ... ni_for_v20

Code: Select all

odroidgoa-uboot-config
 
########################################################################
# Changes made to this are overwritten every time there's a new upgrade
# To make your changes permanent change it on 
# boot.ini.default
# After changing it on boot.ini.default run the bootini command to
# rewrite this file with your personal permanent settings.
########################################################################        
 
# Boot Arguments
setenv bootargs "root=UUID='e139ce78-9841-40fe-8823-96a304a09859' rootwait rw fsck.repair=yes net.ifnames=0 fbcon=rotate:3 console=/dev/ttyFIQ0 quiet splash plymouth.ignore-serial-consoles consoleblank=0"
 
# Booting
setenv loadaddr "0x02000000"
setenv initrd_loadaddr "0x01100000"
setenv dtb_loadaddr "0x01f00000"
 
load mmc 1:1 ${loadaddr} Image
load mmc 1:1 ${initrd_loadaddr} uInitrd
 
if test ${hwrev} = 'v11'; then
load mmc 1:1 ${dtb_loadaddr} rk3326-odroidgo2-linux-v11.dtb
elif test ${hwrev} = 'v10-go3'; then
load mmc 1:1 ${dtb_loadaddr} rk3326-odroidgo3-linux.dtb
else
load mmc 1:1 ${dtb_loadaddr} rk3326-odroidgo2-linux.dtb
fi
 
booti ${loadaddr} ${initrd_loadaddr} ${dtb_loadaddr}
Or you can update related packages, u-boot, bootini and kernel package including v2.0 changes
, without the aforementioned way, using apt commands.

Code: Select all

$ sudo apt update -y
$ sudo apt upgrade -y
$ sudo reboot
Then all updates will be installed including boot.ini.
Last edited by joy on Thu Dec 31, 2020 1:31 pm, edited 1 time in total.
These users thanked the author joy for the post (total 2):
notime2d8 (Thu Dec 31, 2020 1:31 pm) • meveric (Fri Jan 01, 2021 12:13 am)

joy
Posts: 1584
Joined: Fri Oct 02, 2015 1:44 pm
languages_spoken: english
ODROIDs: ODROID-C1+, XU4, X
Has thanked: 179 times
Been thanked: 210 times
Contact:

Re: Issue with OGS Bootloader?

Post by joy »

(updated)

@notime2d8,
I've update related wiki page about u-boot and boot.ini.
https://wiki.odroid.com/odroid_go_advance/build_uboot
https://wiki.odroid.com/odroid_go_advan ... ini_sample

Sorry for the missing information.
Last edited by joy on Thu Dec 31, 2020 1:37 pm, edited 1 time in total.

notime2d8
Posts: 292
Joined: Thu Dec 11, 2014 4:40 am
languages_spoken: english
Has thanked: 86 times
Been thanked: 118 times
Contact:

Re: Issue with OGS Bootloader?

Post by notime2d8 »

joy wrote:
Thu Dec 31, 2020 1:30 pm
@notime2d8,
And I will update related wiki page about u-boot and boot.ini soon.
Sorry for the missing information.
Lol, thanks so much. I feel silly now. I missed that "ODROIDGO2-UBOOT-CONFIG" was changed to "odroidgoa-uboot-config" on the very first line of the boot.ini. It's pretty obvious now that you mention it. I called myself double checking it too. :oops:

When i updated the boot.ini that I was using, I only edited this part and thought I was good to go:

Code: Select all

if test ${hwrev} = 'v11'; then
load mmc 1:1 ${dtb_loadaddr} rk3326-odroidgo2-linux-v11.dtb
elif test ${hwrev} = 'v10-go3'; then
load mmc 1:1 ${dtb_loadaddr} rk3326-odroidgo3-linux.dtb
else
load mmc 1:1 ${dtb_loadaddr} rk3326-odroidgo2-linux.dtb
fi
If I say something that sounds smart or like i know what i'm talking about....i'm faking it.

joy
Posts: 1584
Joined: Fri Oct 02, 2015 1:44 pm
languages_spoken: english
ODROIDs: ODROID-C1+, XU4, X
Has thanked: 179 times
Been thanked: 210 times
Contact:

Re: Issue with OGS Bootloader?

Post by joy »

@notime2d8,
Does it works now with odroidgoa-uboot-config? :)

The option change history is hard to find.
So we should have marked it prominently on wiki pages. :oops:
I will check more if there is any missing description in related wiki pages.

notime2d8
Posts: 292
Joined: Thu Dec 11, 2014 4:40 am
languages_spoken: english
Has thanked: 86 times
Been thanked: 118 times
Contact:

Re: Issue with OGS Bootloader?

Post by notime2d8 »

joy wrote:
Thu Dec 31, 2020 1:44 pm
@notime2d8,
Does it works now with odroidgoa-uboot-config? :)

The option change history is hard to find.
So we should have marked it prominently on wiki pages. :oops:
I will check more if there is any missing description in related wiki pages.
Yes, it works perfect. Thanks again.
If I say something that sounds smart or like i know what i'm talking about....i'm faking it.

joy
Posts: 1584
Joined: Fri Oct 02, 2015 1:44 pm
languages_spoken: english
ODROIDs: ODROID-C1+, XU4, X
Has thanked: 179 times
Been thanked: 210 times
Contact:

Re: Issue with OGS Bootloader?

Post by joy »

notime2d8 wrote:
Thu Dec 31, 2020 1:36 pm
When i updated the boot.ini that I was using, I only edited this part and thought I was good to go:

Code: Select all

if test ${hwrev} = 'v11'; then
load mmc 1:1 ${dtb_loadaddr} rk3326-odroidgo2-linux-v11.dtb
elif test ${hwrev} = 'v10-go3'; then
load mmc 1:1 ${dtb_loadaddr} rk3326-odroidgo3-linux.dtb
else
load mmc 1:1 ${dtb_loadaddr} rk3326-odroidgo2-linux.dtb
fi
@notime2d8,
If "cfgload" gets errors like wrong config option at first line of boot.ini,
u-boot will run this default bootcmd with default bootargs that is desribed in u-boot config.h
and go to normal booting with those options.
https://github.com/hardkernel/u-boot/bl ... dgoa.h#L85

Code: Select all

	"setbootargs=setenv bootargs earlyprintk swiotlb=1 "		\
		"console=ttyFIQ0,115200n8 "				\
		"rw root=/dev/mmcblk0p2 rootwait rw fsck.repair=yes "	\
		"net.iframes=0 fbcon=rotate:3\0"	\
	"bootcmd=mmc dev 1; cfgload; run setbootargs;"	\
		"load mmc 1:1 0x02000000 Image; "		\
		"load mmc 1:1 0x01f00000 ${dtb_name}; "	\
		"booti 0x02000000 - 0x01f00000\0"
Before bootcmd, ${dtb_name} is automatically parsed here.
https://github.com/hardkernel/u-boot/bl ... wrev.c#L13
https://github.com/hardkernel/u-boot/bl ... ard.c#L306

To use the new u-boot and boot.ini normally, the first line of boot.ini must be modified. (odroidgoa-uboot-config)
If not, cfgload ignores remaining lines and returns fail. ;)
These users thanked the author joy for the post:
odroid (Thu Dec 31, 2020 2:42 pm)

valadaa48
Posts: 288
Joined: Mon Feb 17, 2020 1:35 pm
languages_spoken: english
ODROIDs: odroid go advance
Has thanked: 37 times
Been thanked: 94 times
Contact:

Re: Issue with OGS Bootloader?

Post by valadaa48 »

Funny I found this now. I actually missed the same exact thing until 2 days ago! Was getting complaints that the screen would go black after a period of time but was hard to reproduce. Was checking my custom kernel, Void Linux updates, agetty, etc... Anyway, just thought I'd share!
These users thanked the author valadaa48 for the post:
notime2d8 (Tue Feb 09, 2021 12:43 pm)

notime2d8
Posts: 292
Joined: Thu Dec 11, 2014 4:40 am
languages_spoken: english
Has thanked: 86 times
Been thanked: 118 times
Contact:

Re: Issue with OGS Bootloader?

Post by notime2d8 »

valadaa48 wrote:
Tue Feb 09, 2021 11:58 am
Funny I found this now. I actually missed the same exact thing until 2 days ago! Was getting complaints that the screen would go black after a period of time but was hard to reproduce. Was checking my custom kernel, Void Linux updates, agetty, etc... Anyway, just thought I'd share!
Lol, I'm just glad that it wasn't just me. :D
These users thanked the author notime2d8 for the post:
valadaa48 (Tue Feb 09, 2021 12:51 pm)
If I say something that sounds smart or like i know what i'm talking about....i'm faking it.

mad_ady
Posts: 9348
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, C4, N1, N2, H2, Go, Go Advance
Location: Bucharest, Romania
Has thanked: 599 times
Been thanked: 649 times
Contact:

Re: Issue with OGS Bootloader?

Post by mad_ady »

So the sd cards are not directly swappable between ogs and oga. It needs this small boot.ini tweak. May I aak why there is a different header in boot.ini? Is it because of the different screen?

Post Reply

Return to “Issues”

Who is online

Users browsing this forum: No registered users and 1 guest