Le 19/10/2021 à 15:44, Christophe Leroy a écrit :
There is something:
=> bootm 0
Wrong Image Format for bootm command
ERROR: can't get kernel image!
=> md 0
00000000: 00000000 b497aae1 616e9207 003227a4 '..V....an...2'.
00000010: 00000000 00000000 ee36255f 05070201 .........6%_....
00000020: 4c696e75 782d352e 31352e30 2d726335 Linux-5.15.0-rc5
00000030: 2d303232 32342d67 61336330 30376164 -02224-ga3c007ad
00000040: 1f8b0800 00000000 0203ec5c 0f7013e7 ...........\.p..
=> mw.l 0 0x27051956
=> bootm 0
## Booting kernel from Legacy Image at 00000000 ...
Image Name: Linux-5.15.0-rc5-02224-ga3c007ad
Image Type: PowerPC Linux Kernel Image (gzip compressed)
Data Size: 3286948 Bytes = 3.1 MiB
Load Address: 00000000
Entry Point: 00000000
Verifying Checksum ... Bad Data CRC
ERROR: can't get kernel image!
So we have something but it seems it gets overwritten by stuff.
Anyway loading a uImage at 0 is just bad because it is a gzipped
image that should get gunzipped at address 0.
Or should we just copy the raw kernel at 0 and jump to the entry
point ? But then we also need a device tree somewhere.
If I change KERNEL_LOAD_ADDR to 0x1000000, I can bootm at that
address, and it seems it properly decompress the kernel:
=> bootm 0x1000000
## Booting kernel from Legacy Image at 01000000 ...
Image Name: Linux-5.15.0-rc5-02224-ga3c007ad
Image Type: PowerPC Linux Kernel Image (gzip compressed)
Data Size: 3296789 Bytes = 3.1 MiB
Load Address: 00000000
Entry Point: 00000000
Verifying Checksum ... OK
Uncompressing Kernel Image ... OK
And it initialises the MMU properly.
Then it gets stuck because there is no devicetree.
(gdb) bt
#0 0xc00094cc in udelay ()
#1 0xc0025d34 in panic ()
#2 0xc06415a0 in early_init_devtree ()
#3 0xc0641da8 in machine_init ()
#4 0xc0002200 in start_here ()