Espressobin booting (Was: Re: [PATCH 1/5] arm: mvebu: Espressobin: Move env load addresses)

Pali Rohár pali at kernel.org
Wed Aug 26 13:40:08 CEST 2020


On Wednesday 26 August 2020 12:51:18 Pali Rohár wrote:
> On Wednesday 26 August 2020 11:57:01 Andre Heider wrote:
> > Hi,
> > 
> > On 26/08/2020 10:31, Pali Rohár wrote:
> > > Hello!
> > > 
> > > On Wednesday 26 August 2020 09:30:11 Andre Heider wrote:
> > > > Pali,
> > > > 
> > > > thank you for all these espressobin fixes, much appreciated!
> > > > 
> > > > This isn't directly related to the patch I'm replying to, but since you seem
> > > > to be syncing down- with upstream:
> > > > 
> > > > Upstream u-boot doesn't detect my sata ssd ("SATA link 0 timeout"), nor is
> > > 
> > > Could you try following Marvell SATA/AHCI patch?
> > > https://github.com/MarvellEmbeddedProcessors/u-boot-marvell/commit/2c1571432e4fd298be0236b53511f415bbdd21ac
> > 
> > will do that later and report my findings, thanks!
> > 
> > > > it able to run debian's kernel (hangs after "Starting kernel"). Both work
> > > > with armbian's downstream flash-image.bin.
> > > > 
> > > > I'm using the espressobin v1 with these patches from the list on top of
> > > 
> > > Do you really have espressobin v1? I saw hw schemas and diagrams only
> > > for V3, V4, V5 and V7. And I tested only V5 as I do not have any other
> > > revisions.
> > 
> > Oh sorry, I meant the first public version, the one with ddr3 memory. Which
> > would be the V5 schematics iirc.
> > 
> > > > 2020.07:
> > > > arm64: a37xx: pci: Depends on DM_GPIO
> > > > arm: mvebu: Espressobin: Update README.marvell file
> > > > arm: mvebu: Espressobin: Define console env
> > > > arm: mvebu: Espressobin: Define fdt_addr and kernel_addr env aliases
> > > > arm: mvebu: Espressobin: Change default loadaddr
> > > > arm: mvebu: Espressobin: Move env load addresses
> > > > arm: mvebu: Espressobin: Setup MTD partitions when booting kernel
> > > > arm: mvebu: Espressobin: Make SPI env offset compatible with Marvell's
> > > > U-Boot
> > > > arm: dts: a37x0: enable sd card support on espressobin
> > > > mmc: xenon: set signal voltage and max base clock
> > > > arm64: a37xx: pci: Assert PERST# signal when unloading driver
> > > > arm64: a37xx: pci: Make PCIe Reset GPIO DT compatible with Linux kernel DT
> > > > arm64: dts: armada-3720-espressobin: fix COMPHY nodes
> > > > arm: mvebu: Espressobin: Enable CONFIG_MVNETA
> > > > arm: mvebu: Espressobin: Disallow forwarding packets between wan and lan
> > > > ports
> > > > 
> > > > Bootlog:
> > > > 
> > > > TIM-1.0
> > > > WTMI-devel-18.12.1-
> > > > WTMI: system early-init
> > > > CPU VDD voltage default value: 1.108V
> > > > NOTICE:  Booting Trusted Firmware
> > > > NOTICE:  BL1: v2.3(): (Marvell-devel-18.12.0)
> > > > NOTICE:  BL1: Built : 06:12:46, Aug 26 2020
> > > > NOTICE:  BL1: Booting BL2
> > > > NOTICE:  BL2: v2.3(): (Marvell-devel-18.12.0)
> > > > NOTICE:  BL2: Built : 06:12:46, Aug 26 2020
> > > > NOTICE:  BL1: Booting BL31
> > > > NOTICE:  BL31: v2.3(): (Marvell-devel-18.12.0)
> > > > NOTICE:  BL31: Built : 06:12:46
> > > > 
> > > > U-Boot 2020.07 (Aug 26 2020 - 06:12:46 +0000)
> > > > 
> > > > DRAM:  1 GiB
> > > > Comphy-0: USB3_HOST0    5 Gbps
> > > > Comphy-1: PEX0          2.5 Gbps
> > > > Comphy-2: SATA0         5 Gbps
> > > > SATA link 0 timeout.
> > > > AHCI 0001.0300 32 slots 1 ports 6 Gbps 0x1 impl SATA mode
> > > > flags: ncq led only pmp fbss pio slum part sxs
> > > > PCIE-0: Link up
> > > > MMC:   sdhci at d0000: 0
> > > > Loading Environment from SPI Flash... SF: Detected w25q32dw with page size
> > > > 256 Bytes, erase size 4 KiB, total 4 MiB
> > > > OK
> > > > Model: Marvell Armada 3720 Community Board ESPRESSOBin
> > > > Net:   eth0: neta at 30000
> > > > Hit any key to stop autoboot:  0
> > > > MMC Device 1 not found
> > > > no mmc device at slot 1
> > > > switch to partitions #0, OK
> > > > mmc0 is current device
> > > > Scanning mmc 0:1...
> > > > Found U-Boot script /boot.scr
> > > > 2250 bytes read in 12 ms (182.6 KiB/s)
> > > > ## Executing script at 06d00000
> > > > 22079344 bytes read in 1219 ms (17.3 MiB/s)
> > > > 10671 bytes read in 24 ms (433.6 KiB/s)
> > > > 27689238 bytes read in 1555 ms (17 MiB/s)
> > > > Booting Debian 5.7.0-0.bpo.2-arm64 from mmc 0:1...
> > > > ## Flattened Device Tree blob at 06f00000
> > > >     Booting using the fdt blob at 0x6f00000
> > > >     Loading Ramdisk to 3e0be000, end 3fb26116 ... OK
> > > >     Loading Device Tree to 000000003e0b8000, end 000000003e0bd9ae ... OK
> > > > 
> > > > Starting kernel ...
> > > > <hangs here>
> > > 
> > > Can you write which commands you have run to load & boot kernel?
> > > What are command line arguments for kernel?
> > > 
> > > Also have you reset env variables to default?
> > 
> > Yeah, I do reset the full env when switching between the flash images.
> 
> Now I tried to boot openwrt kernel image and it is working fine on
> tested espressobin v5 unit. I compiled u-boot with all those a37xx
> patches.

I looked at Debian and booting Debian kernel with Debian initrd failed:

=> booti ${kernel_addr_r} ${ramdisk_addr_r}:{filesize} ${fdt_addr_r}
Moving Image from 0x7000000 to 0x7080000, end=82f2000
ERROR: RD image overlaps OS image (OS=0x7080000..0x82f2000)

Debian's kernel is big, so it is needed to move also ramdisk_addr_r env
variable. Following patch helped:

diff --git a/include/configs/mvebu_armada-37xx.h b/include/configs/mvebu_armada-37xx.h
index 6f72a13301..8929fcf390 100644
--- a/include/configs/mvebu_armada-37xx.h
+++ b/include/configs/mvebu_armada-37xx.h
@@ -99,7 +99,7 @@
 	"fdt_addr_r=0x6f00000\0"	\
 	"kernel_addr=0x7000000\0"	\
 	"kernel_addr_r=0x7000000\0"	\
-	"ramdisk_addr_r=0x8000000\0"	\
+	"ramdisk_addr_r=0xa000000\0"	\
 	"console=" CONFIG_DEFAULT_CONSOLE "\0" \
 	BOOTENV
 

And after that Debian kernel with Debian initrd and FDT was booted:

DRAM:  512 MiB
Comphy-0: USB3_HOST0    5 Gbps    
Comphy-1: PEX0          2.5 Gbps  
Comphy-2: SATA0         5 Gbps    
SATA link 0 timeout.
AHCI 0001.0300 32 slots 1 ports 6 Gbps 0x1 impl SATA mode
flags: ncq led only pmp fbss pio slum part sxs 
PCIE-0: Link up
MMC:   sdhci at d0000: 0
Loading Environment from SPIFlash... SF: Detected w25q32dw with page size 256 Bytes, erase size 4 KiB, total 4 MiB
OK
Model: Marvell Armada 3720 Community Board ESPRESSOBin
Net:   eth0: neta at 30000 [PRIME]
Hit any key to stop autoboot:  0 
=> env default -a
## Resetting to default environment
=> mmc dev 0
switch to partitions #0, OK
mmc0 is current device
=> load mmc 0:2 ${fdt_addr_r} debian/armada-3720-espressobin.dtb
10553 bytes read in 17 ms (605.5 KiB/s)
=> load mmc 0:2 ${kernel_addr_r} debian/vmlinuz-4.19.0-10-arm64
18759536 bytes read in 804 ms (22.3 MiB/s)
=> load mmc 0:2 ${ramdisk_addr_r} debian/initrd.img-4.19.0-10-arm64
23890636 bytes read in 1013 ms (22.5 MiB/s)
=> setenv bootargs "$console root=/dev/mmcblk0p2 ro rootwait net.ifnames=0 biosdevname=0"
=> echo $bootargs
console=ttyMV0,115200 earlycon=ar3700_uart,0xd0012000 root=/dev/mmcblk0p2 ro rootwait net.ifnames=0 biosdevname=0
=> echo ${filesize}
16c8acc
=> booti ${kernel_addr_r} ${ramdisk_addr_r}:{filesize} ${fdt_addr_r}
Moving Image from 0x7000000 to 0x7080000, end=82f2000
## Flattened Device Tree blob at 06f00000
   Booting using the fdt blob at 0x6f00000
   Loading Ramdisk to 20000000, end 20000000 ... OK
   Loading Device Tree to 000000001f620000, end 000000001f625938 ... OK

Starting kernel ...

[    0.000000] Booting Linux on physical CPU 0x0000000000 [0x410fd034]
[    0.000000] Linux version 4.19.0-10-arm64 (debian-kernel at lists.debian.org) (gcc version 8.3.0 (Debian 8.3.0-6)) #1 SMP Debian 4.19.132-1 (2020-07-24)
[    0.000000] Machine model: Globalscale Marvell ESPRESSOBin Board
[    0.000000] earlycon: ar3700_uart0 at MMIO 0x00000000d0012000 (options '')
[    0.000000] bootconsole [ar3700_uart0] enabled
[    0.000000] efi: Getting EFI parameters from FDT:
[    0.000000] efi: UEFI not found.
[    0.000000] cma: Reserved 64 MiB at 0x000000001b400000
[    0.000000] NUMA: No NUMA configuration found
[    0.000000] NUMA: Faking a node at [mem 0x0000000000000000-0x000000001fffffff]
[    0.000000] NUMA: NODE_DATA [mem 0x1ffe6600-0x1ffe7dbf]
[    0.000000] Zone ranges:
[    0.000000]   DMA32    [mem 0x0000000000000000-0x000000001fffffff]
[    0.000000]   Normal   empty
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000000000000-0x0000000003ffffff]
[    0.000000]   node   0: [mem 0x0000000004200000-0x000000001fffffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x000000001fffffff]
[    0.000000] psci: probing for conduit method from DT.
[    0.000000] psci: PSCIv1.1 detected in firmware.
[    0.000000] psci: Using standard PSCI v0.2 function IDs
[    0.000000] psci: MIGRATE_INFO_TYPE not supported.
[    0.000000] psci: SMC Calling Convention v1.1
[    0.000000] random: get_random_bytes called from start_kernel+0x9c/0x4c0 with crng_init=0
[    0.000000] percpu: Embedded 25 pages/cpu s61976 r8192 d32232 u102400
[    0.000000] Detected VIPT I-cache on CPU0
[    0.000000] CPU features: enabling workaround for ARM erratum 845719
[    0.000000] Speculative Store Bypass Disable mitigation not required
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 128512
[    0.000000] Policy zone: DMA32
[    0.000000] Kernel command line: console=ttyMV0,115200 earlycon=ar3700_uart,0xd0012000 root=/dev/mmcblk0p2 ro rootwait net.ifnames=0 biosdevname=0
...


More information about the U-Boot mailing list