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:
[email protected] 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 [email protected] 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
  Armbian - Xenial (SOPINE) pineadmin 6 4,742 08-05-2019, 01:17 AM
Last Post: pineadmin
  Sopine baseboard / A64 base board as OTG mixotricha 0 71 07-08-2019, 07:11 PM
Last Post: mixotricha
  LibreELEC(KODI) for LTS/ SOPine pineadmin 0 400 05-10-2019, 03:19 AM
Last Post: pineadmin
  NEMS Linux for LTS/ SOPine Luke 1 277 05-09-2019, 05:46 PM
Last Post: pineadmin
  Volumio (PINE A64-LTS / SOPINE) pineadmin 1 1,281 01-18-2019, 04:42 PM
Last Post: Luke
  SoPine/Pine64 LTS: Ubuntu Mate is not booting jaganteki 0 267 11-20-2018, 10:49 PM
Last Post: jaganteki
  Arch Linux mainline XFCE (PINE A64-LTS / SOPINE) pineadmin 1 2,111 11-09-2018, 03:07 AM
Last Post: pineadmin
  Xenial Mate @ Sopine: no graphic acceleration & high CPU load AI_newsettler 0 234 08-11-2018, 10:26 AM
Last Post: AI_newsettler
  Trying to boot archlinux-minimal-sopine-20170708-1.img kris240376 0 367 05-25-2018, 10:30 AM
Last Post: kris240376
  Sopine Complete Guide parmleyhunt 4 1,284 02-01-2018, 11:54 AM
Last Post: parmleyhunt

Forum Jump:


Users browsing this thread: 1 Guest(s)