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.
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
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)
Now comes the magic. Use the command mkimage to turn it into a binary file u-boot can handle.
Reboot and profit.
-Nate Revo
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.
-
sudo dnf install arm-image-installer
- downloaded the raw image file from the Fedora download site and selected Fedora 32: Raw image for aarch64
- 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
- Move card to sopine board
- Insert sopine into clusterboard
- Connect serial console to pins 6,7,8
extracted from https://forum.pine64.org/attachment.php?aid=1111 and somewhere else
- Connect to serial console via
screen /dev/ttyUSB0 115200
- Apply power to clusterboard - and prepare to press a key to "stop autoboot"
- Press the space bar until
Hit any key to stop autoboot: 0
appears and you are presented with a prompt `->` - 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 - Reset the board, either by typing reset or power cycling or the reset button.
This often does not work the first time.
- Wait for the kernel to load and Fedora 32 to finish initializing
- Answer the remaining installation questions
- Finish and log in.
- nmcli` should show an active eth0 device
- ip addr should show an IP address from your DHCP server
- Never remove power or reset the clusterboard.
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: ...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.
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
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