hello

i'm following the notes for booting my Orange PI PC2 from the embedded SPI 
flash! finally..

 https://linux-sunxi.org/Bootable_SPI_flash

i,m using H5 branch of apritzel 
uboot: https://github.com/apritzel/u-boot/tree/h5

after having enabled SPI flash support (and CONFIG_SPL_SPI_SUNXI=y support 
as written in the URL above) in uboot .config,

the compile step returns this error:

"macro SPL_LOAD_IMAGE_METHOD requires 4 arguments, but only 3 given"

the issue is here:

https://github.com/apritzel/u-boot/blob/h5/drivers/mtd/spi/sunxi_spi_spl.c#L287

just need to add a comma in between *"sunxi SPI" 0*. as in:

diff --git a/drivers/mtd/spi/sunxi_spi_spl.c 
b/drivers/mtd/spi/sunxi_spi_spl.c                           
index e70064c..a24c115 100644                                               
                             
--- a/drivers/mtd/spi/sunxi_spi_spl.c
+++ b/drivers/mtd/spi/sunxi_spi_spl.c
@@ -284,4 +284,4 @@ static int spl_spi_load_image(struct spl_image_info 
*spl_image,
        return 0;
 }
 /* Use priorty 0 to override the default if it happens to be linked in */
-SPL_LOAD_IMAGE_METHOD("sunxi SPI" 0, BOOT_DEVICE_SPI, spl_spi_load_image);
+SPL_LOAD_IMAGE_METHOD("sunxi SPI", 0, BOOT_DEVICE_SPI, spl_spi_load_image);

then compile works ok,  flashing to ROM to and boot too! it's great.

U-Boot SPL 2017.01-rc1-g5df570f-dirty (Jan 11 2017 - 00:14:09)
DRAM: 1024 MiB
Trying to boot from sunxi SPI

U-Boot 2017.01-rc1-g5df570f-dirty (Jan 11 2017 - 00:14:09 +0100) Allwinner 
Technology

CPU:   Allwinner H5 (SUN50I)
Model: OrangePi PC 2
DRAM:  1 GiB
MMC:   SUNXI SD/MMC: 0
*** Warning - bad CRC, using default environment

In:    serial@01c28000
Out:   serial@01c28000
Err:   serial@01c28000


U-Boot 2017.01-rc1-g5df570f-dirty (Jan 11 2017 - 00:14:09 +0100) Allwinner 
Technology

CPU:   Allwinner H5 (SUN50I)
Model: OrangePi PC 2
DRAM:  1 GiB
MMC:   SUNXI SD/MMC: 0
*** Warning - bad CRC, using default environment

In:    serial@01c28000
Out:   serial@01c28000
Err:   serial@01c28000
Net:   No ethernet found.
starting USB...
No controllers found
Hit any key to stop autoboot:  2 ^H^H^H 1 ^H^H^H 0
switch to partitions #0, OK
mmc0 is current device
Scanning mmc 0:1...
starting USB...
No controllers found
USB is stopped. Please issue 'usb start' first.
....

i didn't try the kernel/rootfs support on microSD. i suppose it works. but 
i'm fanatic of "network" boot, so i'm wondering what has to be done to make 
the eth available as it looks like it is on this gist: 
https://gist.github.com/apritzel/c128b29c601d180d32d68ee4c9ed8f47

CPU: Allwinner H5 (SUN50I)
Model: OrangePi PC 2
DRAM: 1 GiB
MMC: SUNXI SD/MMC: 0
MMC: no card present
*** Warning - MMC init failed, using default environment
In: serial
Out: serial
Err: serial
Net: phy interface7
eth0: ethernet@1c30000

BTW i'm using uboot cfg  file 'sun50i_h5_spl32_defconfig' avalable in 
pritzel H5 branch with the addition for SUNXI_SPL and SPI flash..

bye andrea


-- 
You received this message because you are subscribed to the Google Groups 
"linux-sunxi" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to