You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to use OBFLR with U-Boot from Boufafalo Buildroot with Sipeed M1S Dock (BL808).
I am not an expert in low-level software development, so I might be very wrong in what I am writing below.
My understanding is that the header should be at the 0x588000000 address in the flash but if I set #define BOOT_HDR_SRC_ADDR 0x58800000 in d0_lowload/src/main.c build and flash the lowload and the u-boot image, I get error
The same error I get when I use the 0x5d5ff000 BOOT_HDR_SRC_ADDR which is committed in this repo:
[I][LowLoad] low_load start...
[I][LowLoad] Header at 0x5d5ff000
[E][LowLoad] invalid boot header magic: 0xffffffff
[I][LowLoad] load time: 654 us
U-Boot + OpenSBI Image
Here is how I flashed the U-boot, OpenSBI and DTB "bin" firmware:
# cat flash_prog_u_boot_cfg.ini
[cfg]
# 0: no erase, 1:programmed section erase, 2: chip erase
erase = 1
# skip mode set first para is skip addr, second para is skip len, multi-segment region with ; separated
skip_mode = 0x0, 0x0
# 0: not use isp mode, #1: isp mode
boot2_isp_mode = 0
[FW]
filedir = /home/dev/project/poky/build/tmp/deploy/images/bl808/bl808-firmware.bin
address = 0x800000
seems to contain the boot header magic value 0x4c4d5642.
BOOT_HDR_SRC_ADDR which works
I used https://github.com/openbouffalo/OBLFR/blob/master/apps/d0_lowload/src/main.c#L141 loop to find an address which contains the magic value of the boot header and found it to be 0x5f800000. I have looked through the BL808 reference manual v1.3, section 1.4 - Address Mapping and I could not understand to which range the 0x5f800000 belongs, looks like not FlashA to my mind.
Issue description
Hi,
I am trying to use OBFLR with U-Boot from Boufafalo Buildroot with Sipeed M1S Dock (BL808).
I am not an expert in low-level software development, so I might be very wrong in what I am writing below.
Buildroot Bouffalo's Readme recommends flashing the U-boot + OpenSBI + DTB image (merged by mergebin.py - https://github.com/openbouffalo/buildroot_bouffalo/blob/main/board/pine64/ox64/mergebin.py#L103) at flash address 0x800000 which is at 0x58800000.
My understanding is that the
header
should be at the 0x588000000 address in the flash but if I set#define BOOT_HDR_SRC_ADDR 0x58800000
in d0_lowload/src/main.c build and flash the lowload and the u-boot image, I get errorThe same error I get when I use the
0x5d5ff000
BOOT_HDR_SRC_ADDR which is committed in this repo:U-Boot + OpenSBI Image
Here is how I flashed the U-boot, OpenSBI and DTB "bin" firmware:
Flash command:
bl_mcu_sdk/tools/bflb_tools/bouffalo_flash_cube/BLFlashCommand --baudrate=2000000 --chipname=bl808 --port=/dev/ttyACM1 --config=/home/dev/project/bl808/lowload/OBLFR/apps/d0_lowload/flash_prog_u_boot_cfg.ini
and the "start" of the
bl808-firmware.bin
is (hexedit):seems to contain the boot header magic value
0x4c4d5642
.BOOT_HDR_SRC_ADDR which works
I used https://github.com/openbouffalo/OBLFR/blob/master/apps/d0_lowload/src/main.c#L141 loop to find an address which contains the
magic
value of the boot header and found it to be0x5f800000
. I have looked through the BL808 reference manual v1.3, section 1.4 - Address Mapping and I could not understand to which range the0x5f800000
belongs, looks like not FlashA to my mind.When I changed
d0_lowload/src/main.c
:built and flashed, the lowload started loading OpenSBI, U-boot and then Linux (built by Yocto).
Here is the successful boot:
May I ask you, if you have time, to analyze the issue I have (highly likely there is no issue but my misunderstanding)?
Thank you in advance,
// Dmitrii.
The text was updated successfully, but these errors were encountered: