Created: 2019-05-14 Tue 19:09
You may be thinking:
That's awesome! Why are you telling us this ?
Because we need to rebuild u-boot with Verified Boot and FIT images support.
It's more problems really…
We reset the board and…it fails silently..
## Booting image at 80500000 ... Image Name: Linux-3.4.34-01535-g499e8d5-dirt Image Type: ARM Linux Kernel Image (uncompressed) Data Size: 3519528 Bytes = 3.4 MB Load Address: 80008000 Entry Point: 80008000 Verifying Checksum ... OK Starting kernel ...
48 │ WRITE: 0xC0001010 0x00100100 49 │ WRITE: 0xC0001014 0x00080200 50 │ WRITE: 0xC000101C 0x90118011 51 │ WRITE: 0xC0001028 0x00000011 52 │ WRITE: 0xC0001040 0x00000607 53 │ WRITE: 0xC00010C0 0x51000000 54 │ WRITE: 0xC0001050 0x15150000 55 │ WRITE: 0xC0001054 0x20100000 56 │ WRITE: 0xC0001074 0x15150000 57 │ 58 │ ;Setp7: init read fifo pointer and OFF spec parameter 59 │ WRITE: 0xC0001000 0x00004032 60 │ WRITE: 0xC00003bc 0x02020404 61 │ 62 │ ;Step8: phyinit_sequence_sync2(1, 3, 2, 0) 63 │ WRITE: 0xC0001014 0x00080200
I'll spare you the Perl code that comes along with this..
So I basically spent three months in that situation:
What is the thing loaded after the kernel?
What can we observe about the device tree ?
(Disclaimer: from this point, this is really how I think it works based on my observations)
If the kernel can't load the device tree:
early printk
can't help me.U-boot does load the FDT!
256M
U-boot has a notion of environment:
bootdelay=1 baudrate=115200 ipaddr=192.168.0.2 serverip=192.168.0.1 netmask=255.255.255.0 bootfile="fitImage" bootcmd=mmc read 80200000 280000 400000;bootm 80200000 bootargs=console=ttyS2,115200n8 console=tty0 root=/dev/mtdblock4 rw rootfstyp=jffs2 nohz=off stdin=serial stdout=serial stderr=serial kernel_addr=0x5....... /* Something we don't care */ fdt_addr=0x5....... /* Something whatever */ fdt_high=0xffffffff
See that fdt_high
variable?
0xffffffff
disables the relocation feature of u-boot!... [ 0.636324] usbcore: registered new interface driver usbfs [ 0.636328] usbcore: registered new interface driver hub [ 0.636345] usbcore: registered new device driver usb [ 0.636359] pps_core: LinuxPPS API ver. 1 registered [ 0.636360] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it> [ 0.636361] PTP clock support registered [ 0.636366] EDAC MC: Ver: 3.0.0 [ 0.636412] Registered efivars operations [ 0.646290] PCI: Using ACPI for IRQ routing [ 0.647520] PCI: pci_cache_line_size set to 64 bytes [ 0.647520] e820: reserve RAM buffer [mem 0x0009f000-0x0009ffff] [ 0.647520] e820: reserve RAM buffer [mem 0x40004000-0x43ffffff] [ 0.647520] e820: reserve RAM buffer [mem 0xd3cff018-0xd3ffffff] [ 0.647520] e820: reserve RAM buffer [mem 0xd3d08018-0xd3ffffff] ...
Three months…for an environment variable…