SoPine SPI booting
#11
(05-04-2018, 09:18 AM)hexalyn Wrote: @aww I see... If I understand correctly, here: https://patchwork.ozlabs.org/patch/873752/ they patch mainline u-boot with the realtek stuff.
As I have seen, every modified file in this patch has the same "pre-patch" state as the files in your modified u-boot version.
Couldn't we juste apply this patch onto your repo if this is the realtek only patch ?

Thanks

Lets try it? 

I was also looking at just building mainline u-boot. It supposedly has support for a64 now.
  Reply
#12
@aww Can you give it a try on your repo in another branch ? Do you want me to build it the way @ayufan does it ?
I also think that what you linked previously in the network issue topic was a much more complete patch : https://github.com/armbian/build/blob/ma...-fix.patch
It seems that this patch has everything that you linked regarding this realtek issue.

I have no idea if it would work on mainline u-boot. It seems there are a lot of fixes in sunxi-u-boot :/
If you think it will work, I can try building from mainline u-boot.
  Reply
#13
So good news, bad news:

Good news: Mainline u-boot just works! It can see networking just fine.

Bad news: It can only see networking on the baseboard, still no luck on clusterboard. However I have only tried with enabling and disabling that realtek config, let me play with rgmii-txid now.

Other Good News: Mainline sees MMC
  Reply
#14
Code:
ethernet@1c30000 Waiting for PHY auto negotiation to complete...... done
BOOTP broadcast 1
BOOTP broadcast 2
DHCP client bound to address 192.168.2.46 (256 ms)
*** Warning: no boot file name; using 'C0A8022E.img'
Using ethernet@1c30000 device
TFTP from server 0.0.0.0; our IP address is 192.168.2.46; sending through gateway 192.168.2.1
Filename 'C0A8022E.img'.
Load address: 0x42000000


In mainline u-boot add the following to: /u-boot/configs/sopine_baseboard_defconfig
Code:
CONFIG_RTL8211E_PINE64_GIGABIT_FIX=y
CONFIG_PHY_REALTEK=y

I'll try and build an image like ayufan did that will flash the SPI.
  Reply
#15
So ayufan's script relies on a command not found in mainline u-boot. I am waiting for a usb-a to usb-a male cable to flash all the sopines.
  Reply
#16
And thanks to latest u-boot, iPXE works, which should enable iSCSI as well.
  Reply
#17
You want me to give a try to modify a bit ayufan's scripts to release a new image to flash mainline u-boot in the SPI ?
@aww : Thanks a lot for your efforts !

@aww : here is a version using Ayufan's scripts with mainline u-boot : https://transfer.sh/4h6rM/u-boot-mainlin...spi.img.xz
Could you try it and tell me if it works as expected ? I had no issues with any command not found. What command was it ?
  Reply
#18
The script looks for the sf command in u-boot to flash the spi, and I wasn't able to get mainline to compile with it.

I'll try it after I get off work. I honestly spent more time focused on the iscsi stuff, which is somewhat of a nightmare because of iPXE and efi.
  Reply
#19
Smile 
(05-07-2018, 02:10 AM)hexalyn Wrote: You want me to give a try to modify a bit ayufan's scripts to release a new image to flash mainline u-boot in the SPI ?
@aww : Thanks a lot for your efforts !

@aww : here is a version using Ayufan's scripts with mainline u-boot : https://transfer.sh/4h6rM/u-boot-mainlin...spi.img.xz
Could you try it and tell me if it works as expected ? I had no issues with any command not found. What command was it ?

Thanks for generating that (and the previous image, although I haven't gotten around to trying it... should do that right now just for giggles...)

The image boots, but it fails to erase or write to the SPI... that sf command must be something to do interacting with the spi flash...

https://pastebin.com/VUJtee2b

I'll boot the image up again with network connected and see if it actually pokes the ethernet... it looks promising as it did indicate phy negotiation was complete. I'll run through that, and add a second boot log or comment shortly...

A little later...

Well, I booted the pine64 master box up, and watching the log from dnsmasq (sudo tailf /var/log/syslog | grep dnsmasq-dhcp), I was starting to get

Code:
May  4 06:39:33 localhost dnsmasq-dhcp[1246]: 154664209 available DHCP subnet: 192.168.0.0/255.255.255.0
May  4 06:39:33 localhost dnsmasq-dhcp[1246]: 154664209 vendor class: U-Boot.armv8


repeated endlessly once the sopine got it's act together and was doing the BOOTP broadcast, so networking is indeed working, and it is trying! Smile

Also, sudo tcpdump -i eth0 port 67 or port 68 -e -n was giving me

Code:
06:45:08.378427 02:ba:09:37:bd:8b > ff:ff:ff:ff:ff:ff, ethertype IPv4 (0x0800), length 342: 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 02:ba:09:37:bd:8b, length 300


And at some point, also got some

Code:
May  4 06:40:19 localhost dnsmasq-dhcp[1246]: 154710342 available DHCP subnet: 192.168.0.0/255.255.255.0
May  4 06:40:19 localhost dnsmasq-dhcp[1246]: 154710342 vendor class: PXEClient:Arch:00011:UNDI:003000
May  4 06:40:19 localhost dnsmasq-dhcp[1246]: 154710342 PXE(eth0) 02:ba:09:37:bd:8b proxy
May  4 06:40:19 localhost dnsmasq-dhcp[1246]: 154710342 tags: eth0
May  4 06:40:19 localhost dnsmasq-dhcp[1246]: 154710342 broadcast response
May  4 06:40:19 localhost dnsmasq-dhcp[1246]: 154710342 sent size:  1 option: 53 message-type  2
May  4 06:40:19 localhost dnsmasq-dhcp[1246]: 154710342 sent size:  4 option: 54 server-identifier  192.168.0.250
May  4 06:40:19 localhost dnsmasq-dhcp[1246]: 154710342 sent size:  9 option: 60 vendor-class  50:58:45:43:6c:69:65:6e:74
May  4 06:40:19 localhost dnsmasq-dhcp[1246]: 154710342 sent size: 29 option: 43 vendor-encap  06:01:08:0a:17:05:42:6f:6f:74:69:6e:67:20...

happening also... did somebody say PXE? :-D

So getting warmer! And btw, the older earlier image writes the SPI flash properly, but the ethernet doesn't work. So it looks like mainline may be the best way for now if we can get uboot on the spi flash...
  Reply
#20
Hello Smile

For the sf command I may have an idea. There is an option not enabled in our /u-boot/configs/sopine_baseboard_defconfig that I found reading ayufan's commits : "CONFIG_CMD_SF=y"
But @ayufan made a lot of other changes to dts and other files : https://github.com/ayufan-pine64/u-boot-...6c850419dd

@aww Do you think that if we replicate those modifications on a fork of the mainline u-boot it would work ? He also made more modifications related to SPI beforehand here : https://github.com/ayufan-pine64/u-boot-...6318658ba2

I will try to create such a fork and replicate the modifications that seem relevant for me and create a new build of the image that makes the flash. Thanks for all your help @pfeerick and @aww.
  Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  slarm64 (unofficial slackware) SOPINE A64 (aarch64) mara 6 3,713 09-24-2023, 11:43 AM
Last Post: mara
  Sopine Fedora 32 on clusterboard w/networking revoman 7 9,283 04-10-2023, 08:49 AM
Last Post: langerma
  Try to boot armbian 22.02 on SoPine baseboard adjivas 1 906 01-11-2023, 03:20 PM
Last Post: MNtinkerer
  sopine-a64 yocto build running on SOPine Baseboard tderensis 1 1,399 07-13-2022, 03:14 PM
Last Post: tderensis
  Volumio (PINE A64-LTS / SOPINE) pineadmin 7 9,271 02-17-2021, 03:47 AM
Last Post: roel
  SOPINE Network boot Ninazu 1 3,778 05-11-2020, 12:40 PM
Last Post: lbruno
  LibreELEC(KODI) for LTS/ SOPine pineadmin 2 5,629 12-27-2019, 11:09 PM
Last Post: tllim
  Armbian - Xenial (SOPINE) pineadmin 6 14,247 08-05-2019, 01:17 AM
Last Post: pineadmin
  Sopine baseboard / A64 base board as OTG mixotricha 0 2,585 07-08-2019, 07:11 PM
Last Post: mixotricha
  NEMS Linux for LTS/ SOPine Luke 1 4,015 05-09-2019, 05:46 PM
Last Post: pineadmin

Forum Jump:


Users browsing this thread: 1 Guest(s)