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
  Reply
#2
(05-20-2020, 01:23 AM)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


Possibly Related Threads...
Thread Author Replies Views Last Post
  SOPINE LTS Availability and Plan aldrich@tulip.co 0 61 05-14-2020, 10:00 AM
Last Post: aldrich@tulip.co
  SoPine eMMC compatibility Terra854 4 1,935 02-20-2020, 07:52 PM
Last Post: mcrognale
  Sopine baseboard CSI port camera not work olivaw 2 335 02-20-2019, 09:50 AM
Last Post: maya.b
  Is it Sopine, SOPINE, SOPine or SoPine? Pine 2 524 01-07-2019, 08:37 AM
Last Post: Pine
  +SOPINE baseboard datasheet is different gamelaster 3 755 09-09-2018, 05:08 PM
Last Post: tllim
  How to control the SOPINE UART and SPI pins as GPIO? Pine 1 441 08-22-2018, 10:15 AM
Last Post: martinayotte
  Two of our sopine's only register 1GB RAM paradise 3 458 08-09-2018, 08:35 AM
Last Post: paradise
  Heatsink for SOPINE htg20@yahoo.com 1 596 08-04-2018, 10:41 AM
Last Post: paradise
  SOPINE MAC Address htg20@yahoo.com 2 398 07-24-2018, 02:35 AM
Last Post: htg20@yahoo.com
  custom sopine baseboard - some (all) assembly still required maya.b 6 1,618 12-26-2017, 12:37 PM
Last Post: dkryder

Forum Jump:


Users browsing this thread: 1 Guest(s)