kope Posted September 20, 2017 Posted September 20, 2017 Hi, https://www.armbian.com/orange-pi-pc2/ states: "Following features should work:" ... "SPI+USB boot" . I was trying to load u-boot from the SPI (but without success). I followed the instructions in u-boot/board/sunxi/README.sunxi64 : $ ./sunxi-fel spiflash-write 0 spl/sunxi-spl.bin $ ./sunxi-fel spiflash-write 32768 u-boot.itb Booting from SPI ends with an exception: U-Boot SPL 2017.09-armbian (Sep 13 2017 - 12:23:18) DRAM: 1024 MiB Trying to boot from sunxi SPI "Synchronous Abort" handler, esr 0x02000000 ELR: 4a000000 LR: 125cc x 0: 000000004a000000 x 1: 0000000000000000 x 2: 0000000000007000 x 3: 0000000077777777 As if SPL could find/execute u-boot or SPI at all. Does anybody have any success with booting from SPI on OPI PC2?
martinayotte Posted September 20, 2017 Posted September 20, 2017 It been a while since I've checked/tested SPI-NOR ... Effectively, it seems broken now, probably since several u-boot versions. Fortunately, I still had a old u-boot working build in last March, and I've put back this one into SPI_NOR. EDIT : since I'm keeping a lost of previous images, I found out that another image build back in May was also working, we were still using Apriztel u-boot tree at that time. So the issue come most probably when we switched to Mainline u-boot recently ...
zador.blood.stained Posted September 24, 2017 Posted September 24, 2017 Just found this on the u-boot mailing list: https://lists.denx.de/pipermail/u-boot/2017-September/307246.html
kope Posted September 25, 2017 Author Posted September 25, 2017 yes. I reported it to Apriztel. Patch is included in the link above and is working. It should be included in mainline u-boot starting with v2017.11
zador.blood.stained Posted September 25, 2017 Posted September 25, 2017 2 hours ago, kope said: Patch is included in the link above and is working. It should be included in mainline u-boot starting with v2017.11 Now it's also included in Armbian sources so following builds will have this fix already. 1
zador.blood.stained Posted September 28, 2017 Posted September 28, 2017 @martinayotte Does the u-boot on PC2 or Prime work for you (next branch)? For me OPi PC2 u-boot currently crashes in SPL with a "Synchronous Abort".
martinayotte Posted September 28, 2017 Posted September 28, 2017 If I remember (I'm chasing soo many things in recent days), OPiPC2 works for me, but OPiPrime getting floods of "Synchronous Abort", I had no choice to use older u-boot built somewhen in August.
martinayotte Posted September 30, 2017 Posted September 30, 2017 I've built a fresh OPiPC2 today, and yes I've got one "Synchronous Abort", but it rebooted and boot fine ... Looking back to OPiPrime, it wasn't flood of "Synchronous Abort", but simply kernel oops, but replacing u-boot with older, the same kernel boot fine.
tomter Posted October 28, 2017 Posted October 28, 2017 Hello, I don't understand this new procedure. Previously I have copied with flashcp, how can I made this work? Thanks in advance.
tomter Posted October 28, 2017 Posted October 28, 2017 3 hours ago, martinayotte said: What do you mean by "new procedure" ? Previously this year I asked about boot from USB without SD card. Solution was flashing u boot to spi flash. With this new image doesn't work. So I would like to know how to update u boot on SPI so it will boot from USB without SD card. Thanks
martinayotte Posted October 29, 2017 Posted October 29, 2017 The procedure didn't really change, you need to activate the spi-jedec-nor overlay in /boot/armbianEnv.txt : overlays=spi-jedec-nor param_spinor_spi_bus=0 Then, after reboot, you should get from "cat /proc/mtd", something like that : dev: size erasesize name mtd0: 00200000 00001000 "spi0.0" This mean you can use "flashcp" to place the u-boot image into the flash.
tomter Posted November 1, 2017 Posted November 1, 2017 Hello, I tried your solution, but I am doing something wrong, flashcp doesn't output nothing. Is that right? When I connect HDD and try to boot, I get error Trying to boot from sunxi SPI No matching DT out of these options: Configuration to load ATF before U-Boot No matching DT out of these options: Configuration to load ATF before U-Boot SPL: failed to boot from all boot devices ### ERROR ### Please RESET the board ### What am I doing wrong?
martinayotte Posted November 1, 2017 Posted November 1, 2017 Maybe I don't understand the steps you achieve successfully and the one that maybe failed ... Using the overlay, did you successfully got "cat /proc/mtd ". If Yes, then you did the flashcp and got no errors. Next , you've halted the board, remove the SDCard, and repower the board, and U-Boot from Flash actually executed display the output you've mentioned above. Right ? This means the USB storage you used isn't discovered. I've got such issue with some USB thumb dongles. Did you tried a real USB-HDD drive ? You should see something like "USB 1 Storage detected" or similar message ... If you have placed a copy of /boot into that USB drive, you should see u-boot loading the DT/uInitrd/Image followed by "Starting kernel"
tomter Posted November 2, 2017 Posted November 2, 2017 Finaly I understood why this procedure with flashcp doesn't work as it did with previous images. U-boot is split between spl.bin and u-boot file. Previously it was one file with all-in-one. So I don't know how to flash to SPI-NOR with two files. Anybody with ideas are welcome.
martinayotte Posted November 3, 2017 Posted November 3, 2017 Ah ! Ok ! Now I understand ... Simply concatenate both files into one : cat /usr/lib/linux-u-boot-next-orangepipc2_5.34_arm64/sunxi-spl.bin /usr/lib/linux-u-boot-next-orangepipc2_5.34_arm64/u-boot.itb > /usr/lib/linux-u-boot-next-orangepipc2_5.34_arm64/u-boot-sunxi-with-spl.bin Then, you can use normal "flashcp" cmdline : flashcp /usr/lib/linux-u-boot-next-orangepipc2_5.34_arm64/u-boot-sunxi-with-spl.bin /dev/mtd0
tomter Posted November 3, 2017 Posted November 3, 2017 Now it worked and booted without any issues, many thanks to martinayotte
Recommended Posts