Open jepio opened 3 years ago
I have this working on my own RaspberryPi and here's a rough description of the steps required and my WIP state. There is an easy way to get it working and a nice way.
You need an SD card and a USB stick (min 8GB).
config.yaml
storage:
filesystems:
- name: "OEM"
mount:
device: "/dev/disk/by-label/OEM"
format: "btrfs"
files:
- filesystem: "OEM"
path: "/grub.cfg"
mode: 0644
append: true
contents:
inline: |
set linux_console="console=ttyAMA0,115200n8 console=tty1"
set linux_append="flatcar.autologin usbcore.autosuspend=-1"
passwd:
users:
- name: core
ssh_authorized_keys:
- <INSERT YOUR SSH PUBKEY HERE>
Fill in your ssh public key, and transpile the config using ct <config.yaml >config.json
. (https://github.com/kinvolk/container-linux-config-transpiler). Here is the json version:
{
"ignition": {
"config": {},
"security": {
"tls": {}
},
"timeouts": {},
"version": "2.3.0"
},
"networkd": {},
"passwd": {
"users": [
{
"name": "core",
"sshAuthorizedKeys": [
"<INSERT YOUR SSH PUBKEY HERE>"
]
}
]
},
"storage": {
"files": [
{
"filesystem": "OEM",
"path": "/grub.cfg",
"append": true,
"contents": {
"source": "data:,set%20linux_console%3D%22console%3DttyAMA0%2C115200n8%20console%3Dtty1%22%0Aset%20linux_append%3D%22flatcar.autologin%20usbcore.autosuspend%3D-1%22%0A",
"verification": {}
},
"mode": 420
}
],
"filesystems": [
{
"mount": {
"device": "/dev/disk/by-label/OEM",
"format": "btrfs"
},
"name": "OEM"
}
]
},
"systemd": {}
}
/dev/sdb
)sudo ./flatcar-install -o "" -i config.json -B arm64-usr -C alpha -d <USB drive>
Insert the USB drive and SD card into the RPI4 and power-it up. Here is where there are a couple of tricky points:
Here's what I consider the nicer way, because you can do without the SD card but requires updating EEPROM and maybe modifying BOOT_ORDER EEPROM variable to boot from USB
Update your EEPROM. I don't exactly know how this is best done, there are some files here: https://github.com/raspberrypi/rpi-eeprom/releases, you can also update with scripts from a running raspberrypi OS. BOOT_ORDER needs to be set to boot from USB.
Prepare the USB stick following instructions from https://github.com/kinvolk/Flatcar/issues/502#issuecomment-916135250, but before booting mount p1
from the USB stick and unpack https://github.com/pftf/RPi4/releases/download/v1.28/RPi4_UEFI_Firmware_v1.28.zip into it. Unmount, insert into RPI4 and boot.
I would like us to provide rpi images on our servers, that have atleast the correct grub.cfg, and RPI4 UEFI firmware on the boot partition. With the right documentation people could then:
Started this work some time back on branches in scripts https://github.com/flatcar-linux/scripts/commits/jepio/rpi4 and coreos-overlay https://github.com/flatcar-linux/coreos-overlay/commits/jepio/rpi4. If someone wants to pick that up that, they are welcome to. Here are the todos that I can still remember:
We can close this is issue now - RPI 4 documentation is available here: https://www.flatcar.org/docs/latest/installing/bare-metal/raspberry-pi/ :rocket:
I think we still wanted to generate the OEM images with the firmware, or?
Current situation
It is possible to boot current arm64 alpha images (2983.0.0) on RaspberryPi 4, but there are several manual steps needed to perform the setup and to gain SSH access to the board.
Impact
It is hard for people to play around with Flatcar on a very popular platform.
Ideal future situation
We provide pre-built images with raspberrypi specific configuration, and some nice beginner friendly documentation (not assuming too much Flatcar knowledge) to perform installation and bring-up.
Implementation options
Some suggestions will follow in the next comments.
Additional information
Flatcar requires on ARM requires UEFI and ACPI support. This is available for RPI4 at https://github.com/pftf/RPi4 but not for other PIs, or many other boards.