Sopine Fedora 32 on clusterboard w/networking
#1
Just jotting down some notes, and a question after going through a painful process of trying to get a non-debian derivative Linux OS on my cluster.   

After some twists and turns I finally came back around to a post I saw regarding the arm-image-installer and a F30 image.  

I run Fedora on my workstation, so  all of the instructions assume a fedora build box.

  1. sudo dnf install arm-image-installer
  2. downloaded the raw image file from the Fedora download site and selected Fedora 32: Raw image for aarch64
  3. Write the F32 aarch64 image to an SD card using the following command
    sudo arm-image-installer --addconsole --addkey ~/.ssh/id_rsa.pub --relabel --resizefs --image=Fedora-Minimal-32-1.6.aarch64.raw.xz --media=/dev/sdc --target=sopine_baseboard
  4. Move card to sopine board
  5. Insert sopine into clusterboard
  6. Connect serial console to pins 6,7,8
    extracted from https://forum.pine64.org/attachment.php?aid=1111 and somewhere else
  7. Connect to serial console via
    screen /dev/ttyUSB0 115200
  8. Apply power to clusterboard - and prepare to press a key to "stop autoboot"
  9. Press the space bar until
    Hit any key to stop autoboot:  0
    appears and you are presented with a prompt `->`
  10. At this prompt execute this command and hit enter 
    mi w 1c30000 1f 7; mi w 1c30000 1e a4 ; mi w 1c30000 1c b573 ; mi w 1c30000 1f 0
    found at https://forum.pine64.org/showthread.php?tid=6036
  11. Reset the board, either by typing reset or power cycling or the reset button.
    This often does not work the first time.
  12. Wait for the kernel to load and Fedora 32 to finish initializing
  13. Answer the remaining installation questions
  14. Finish and log in.  
  15. nmcli` should show an active eth0 device
  16. ip addr should show an IP address from your DHCP server
  17. Never remove power or reset the clusterboard.  Wink
So.  After all that, I still get boot errors where the boards try to boot from the mmc before it has finished initializing causing the kernel or vmlinuz images to be unavailable.
Also, if I power cycle the board, the setting from #10 gets erased.

Question to the community.  How do I make `mi w 1c30000 1f 7; mi w 1c30000 1e a4 ; mi w 1c30000 1c b573 ; mi w 1c30000 1f 0` persistent?  Is this u-boot?  is this EFI?  I am a bit out of my league here.

Thanks in advance,
-Nate R

(06-10-2020, 12:09 PM)revoman Wrote: ...
Question to the community.  How do I make `mi w 1c30000 1f 7; mi w 1c30000 1e a4 ; mi w 1c30000 1c b573 ; mi w 1c30000 1f 0` persistent?  Is this u-boot?  is this EFI?  I am a bit out of my league here.

Thanks in advance,
-Nate R
Found the answer to my own question.  Quite a crazy journey, but now I have fully working Fedora 32 sopine compute modules!  Now to k8s it.

The key came in this link: https://github.com/linux-sunxi/u-boot-sunxi/wiki
Turns out the u-boot process looks for a `boot.scr` file on the first fat partition for running scripts.  There was some pretty crazy dynamic variables going on, so it took a minute to get right.   Here's what I ended up with.

First fat boot device is mounted under /boot/efi
cd /boot/efi
Create the text file /boot/efi/boot.txt
Fill it with the u-boot commands you wish to execute. (note, current scripting continues the boot after these, so no need to re-run bootcmd)

Code:
echo starting eth0 fix
mi w 1c30000 1f 7
mi w 1c30000 1e a4
mi w 1c30000 1c b573
mi w 1c30000 1f 0
echo fixed eth0

Now comes the magic.  Use the command mkimage to turn it into a binary file u-boot can handle.
Code:
mkimage -A arm -T script -O linux -d boot.txt boot.scr

Reboot and profit.

-Nate Revo
  Reply


Messages In This Thread
Sopine Fedora 32 on clusterboard w/networking - by revoman - 06-10-2020, 12:09 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  slarm64 (unofficial slackware) SOPINE A64 (aarch64) mara 6 3,823 09-24-2023, 11:43 AM
Last Post: mara
  SoPine SPI booting ayufan 31 39,913 02-13-2023, 08:56 PM
Last Post: mundey
  Try to boot armbian 22.02 on SoPine baseboard adjivas 1 960 01-11-2023, 03:20 PM
Last Post: MNtinkerer
  sopine-a64 yocto build running on SOPine Baseboard tderensis 1 1,448 07-13-2022, 03:14 PM
Last Post: tderensis
  Volumio (PINE A64-LTS / SOPINE) pineadmin 7 9,411 02-17-2021, 03:47 AM
Last Post: roel
  Networking on A64 LTS broken on Debian with Kernel 5.9 kuleszdl 0 2,080 01-02-2021, 06:26 PM
Last Post: kuleszdl
  SOPINE Network boot Ninazu 1 3,825 05-11-2020, 12:40 PM
Last Post: lbruno
  LibreELEC(KODI) for LTS/ SOPine pineadmin 2 5,685 12-27-2019, 11:09 PM
Last Post: tllim
  Armbian - Xenial (SOPINE) pineadmin 6 14,353 08-05-2019, 01:17 AM
Last Post: pineadmin
  Sopine baseboard / A64 base board as OTG mixotricha 0 2,619 07-08-2019, 07:11 PM
Last Post: mixotricha

Forum Jump:


Users browsing this thread: 1 Guest(s)