Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong Image Format for bootm command - HI3516EV300 with NAND flash failed to boot #1509

Open
Zhhi opened this issue Aug 1, 2024 · 1 comment

Comments

@Zhhi
Copy link

Zhhi commented Aug 1, 2024

Hi, I had freshly installed the firmware but its not booting.

Boot output:

U-Boot 2016.11-g6d2ed0c-dirty (Mar 20 2023 - 13:54:41 +0300)hi3516ev300

Relocation Offset is: 0774a000
Relocating to 47f4a000, new gd at 47b39ef0, sp at 47b39ed0
SPI Nor:  Boot Media isn't SPI Nor
NAND:  hifmc_ip_ver_check(44): Check Flash Memory Controller v100 ...hifmc_ip_ver_check(50):  Found
SPI Nand ID Table Version 2.7
SPI Nand(cs 0) ID: 0xef 0xaa 0x21 Name:"W25N01GV"
Block:128KB Page:2KB OOB:64B ECC:4bit/512
Chipsize:128 MiB
MMC:   Card did not respond to voltage select!
No SD device found !
hisi-sdhci: 0
In:    serial
Out:   serial
Err:   serial
RAM size: 128MB
Net:   eth0
Warning: eth0 (eth0) using random MAC address - 52:bf:a2:a5:ff:1d

Press Ctrl-c to stop autoboot... 1

NAND read: device 0 offset 0x100000, size 0x300000
 3145728 bytes read: OK
Wrong Image Format for bootm command
ERROR: can't get kernel image!
OpenIPC #

Commands form the generated installation guide:

setenv ipaddr 192.168.1.253; setenv serverip 192.168.1.22
mw.b 0x42000000 0xff 0x800000
tftpboot 0x42000000 openipc-hi3516ev300-ultimate-8mb.bin
nand erase 0x0 0x800000; nand write 0x42000000 0x0 0x800000
reset
run setnand

Logging of input comments (its using OpenIPC U-Boot as i had flashed it once before this)

U-Boot 2016.11-g6d2ed0c-dirty (Mar 20 2023 - 13:54:41 +0300)hi3516ev300

Relocation Offset is: 0774a000
Relocating to 47f4a000, new gd at 47b39ef0, sp at 47b39ed0
SPI Nor:  Boot Media isn't SPI Nor
NAND:  hifmc_ip_ver_check(44): Check Flash Memory Controller v100 ...hifmc_ip_ve                                                                                                                                                             r_check(50):  Found
SPI Nand ID Table Version 2.7
SPI Nand(cs 0) ID: 0xef 0xaa 0x21 Name:"W25N01GV"
Block:128KB Page:2KB OOB:64B ECC:4bit/512
Chipsize:128 MiB
MMC:   Card did not respond to voltage select!
No SD device found !
hisi-sdhci: 0
In:    serial
Out:   serial
Err:   serial
RAM size: 128MB
Net:   eth0
Warning: eth0 (eth0) using random MAC address - 52:bf:a2:a5:ff:1d

Press Ctrl-c to stop autoboot... 1
OpenIPC # setenv ipaddr 192.168.1.253; setenv serverip 192.168.1.22
OpenIPC # mw.b 0x42000000 0xff 0x800000
OpenIPC # tftpboot 0x42000000 openipc-hi3516ev300-ultimate-8mb.bin
Hisilicon ETH net controler
MAC address invalid!
Set Random MAC address: 1e:b1:95:64:67:62
eth0 : phy status change : LINK=UP : DUPLEX=FULL : SPEED=100M
Using eth0 device
TFTP from server 192.168.1.22; our IP address is 192.168.1.253
Filename 'openipc-hi3516ev300-ultimate-8mb.bin'.
Load address: 0x42000000
Loading: #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         ####################################################
         3.8 MiB/s
done
Bytes transferred = 8388608 (800000 hex)
OpenIPC # nand erase 0x0 0x800000; nand write 0x42000000 0x0 0x800000

NAND erase: device 0 offset 0x0, size 0x800000
Erasing at 0x7e0000 -- 100% complete.
OK

NAND write: device 0 offset 0x0, size 0x800000
pure data length is 8388608, len_incl_bad is 8388608
 8388608 bytes written: OK
OpenIPC # reset
resetting ...



System startup

Uncompress Ok!

U-Boot 2016.11-g6d2ed0c-dirty (Mar 20 2023 - 13:54:41 +0300)hi3516ev300

Relocation Offset is: 0774a000
Relocating to 47f4a000, new gd at 47b39ef0, sp at 47b39ed0
SPI Nor:  Boot Media isn't SPI Nor
NAND:  hifmc_ip_ver_check(44): Check Flash Memory Controller v100 ...hifmc_ip_ver_check(50):  Found
SPI Nand ID Table Version 2.7
SPI Nand(cs 0) ID: 0xef 0xaa 0x21 Name:"W25N01GV"
Block:128KB Page:2KB OOB:64B ECC:4bit/512
Chipsize:128 MiB
MMC:   Card did not respond to voltage select!
No SD device found !
hisi-sdhci: 0
*** Warning - bad CRC, using default environment

Erasing NAND...
Erasing at 0x40000 -- 100% complete.
Writing to NAND... OK
Saving default environment...
Erasing NAND...
Erasing at 0x40000 -- 100% complete.
Writing to NAND... OK
In:    serial
Out:   serial
Err:   serial
RAM size: 128MB
Net:   eth0
Warning: eth0 (eth0) using random MAC address - 3e:20:51:72:cc:28

Press Ctrl-c to stop autoboot... 1
OpenIPC # run setnand
Saving Environment to NAND...
Erasing NAND...
Erasing at 0x40000 -- 100% complete.
Writing to NAND... OK
resetting ...

Appreciate if anyone can point me to the right direction.

@Zhhi Zhhi changed the title HiSilicon HI3516EV300 with NAND flash failed to boot Wrong Image Format for bootm command - HI3516EV300 with NAND flash failed to boot Aug 2, 2024
@Rideu
Copy link

Rideu commented Nov 22, 2024

I had luck using run uknand and run urnand commands that will download uImage and rootfs.ubi from your tftp server folder (you can find those in the releases).

Some refs i used:

  1. https://github.com/OpenIPC/wiki/blob/master/en/help-uboot.md
  2. hi3518ev200 bootloop with latest precompiled files #695

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants