Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PXE boot with U-boot #1636

Open
peltho opened this issue Feb 6, 2025 · 5 comments
Open

PXE boot with U-boot #1636

peltho opened this issue Feb 6, 2025 · 5 comments
Labels
kind/bug Something isn't working

Comments

@peltho
Copy link

peltho commented Feb 6, 2025

Description

I have a node (Radxa Rock 5C lite sbc) with U-boot as bootloader.
I provide it a pxelinux.cfg following this tutorial:

label flatcar
  menu default
  kernel flatcar_production_pxe.vmlinuz
  initrd flatcar_production_pxe_image.cpio.gz
  append flatcar.first_boot=1 ignition.config.url=tftp://192.168.1.46/srv/tftp/flatcar/ignition.json
  • ignition.json being the Butane example from the guide (converted from .yaml to .json with quay.io/coreos/butane)
  • flatcar_production_pxe.vmlinuz coming from https://stable.release.flatcar-linux.net/arm64-usr/current/flatcar_production_pxe.vmlinuz
  • flatcar_production_pxe_image.cpio.gz coming from https://stable.release.flatcar-linux.net/arm64-usr/current/flatcar_production_pxe_image.cpio.gz

When powering the node, U-boot starts and asks network about PXE.
It fetches the needed files and then it stucks at the step: Starting kernel... as you can see in the Additional information.

Impact

I can't run Flatcar on the device.

Additional information

DDR 9fffbe1e78 cym 24/02/04-10:09:20,fwver: v1.16
LPDDR4X, 2112MHz
channel[0] BW=16 Col=10 Bk=8 CS0 Row=17 CS1 Row=17 CS=2 Die BW=8 Size=4096MB
channel[1] BW=16 Col=10 Bk=8 CS0 Row=17 CS1 Row=17 CS=2 Die BW=8 Size=4096MB
channel[2] BW=16 Col=10 Bk=8 CS0 Row=17 CS1 Row=17 CS=2 Die BW=8 Size=4096MB
channel[3] BW=16 Col=10 Bk=8 CS0 Row=17 CS1 Row=17 CS=2 Die BW=8 Size=4096MB
Manufacturer ID:0x6
CH0 RX Vref:28.5%, TX Vref:21.8%,21.8%
CH1 RX Vref:29.3%, TX Vref:22.8%,22.8%
CH2 RX Vref:29.7%, TX Vref:23.8%,23.8%
CH3 RX Vref:28.9%, TX Vref:21.8%,21.8%
change to F1: 528MHz
change to F2: 1068MHz
change to F3: 1560MHz
change to F0: 2112MHz
out
U-Boot SPL board init
U-Boot SPL rknext-2017.09-1-g1ea6843-dirty # (Jul 02 2024 - 18:16:37)
unknown raw ID 25 38 c2
Trying to boot from MMC2
MMC: no card present
mmc_init: -123, time 0
spl: mmc init failed with error: -123
Trying to boot from MTD2
GUID Partition Table Header signature is wrong: 0xX != 0xX
part_get_info_efi: *** ERROR: Invalid GPT ***
GUID Partition Table Header signature is wrong: 0xX != 0xX
part_get_info_efi: *** ERROR: Invalid Backup GPT ***
GUID Partition Table Header signature is wrong: 0xX != 0xX
part_get_info_efi: *** ERROR: Invalid GPT ***
GUID Partition Table Header signature is wrong: 0xX != 0xX
part_get_info_efi: *** ERROR: Invalid Backup GPT ***
GUID Partition Table Header signature is wrong: 0xX != 0xX
part_get_info_efi: *** ERROR: Invalid GPT ***
GUID Partition Table Header signature is wrong: 0xX != 0xX
part_get_info_efi: *** ERROR: Invalid Backup GPT ***
Trying fit image at 0x4000 sector
## Verified-boot: 0
## Checking atf-1 0x00040000 ... sha256(fb2e6789c5...) + OK
## Checking u-boot 0x00a00000 ... sha256(ed0c6553ea...) + OK
## Checking fdt-1 0x00ad64b0 ... sha256(d13a18ff91...) + OK
## Checking atf-2 0xff100000 ... sha256(1f89737a2c...) + OK
Jumping to U-Boot(0x00a00000) via ARM Trusted Firmware(0x00040000)
Total: 96.967/256.213 ms

NOTICE:  BL31: v2.12.0(release):v2.12
NOTICE:  BL31: Built : 11:32:29, Jan 10 2025


U-Boot 2025.01-rc6-00074-g2f39815bcf9e-dirty (Jan 30 2025 - 08:08:14 +0100)

Model: Radxa ROCK 5C
SoC:   RK3582
DRAM:  16 GiB
PMIC:  RK806 (on=0x40, off=0x00)
Core:  374 devices, 34 uclasses, devicetree: separate
MMC:   mmc@fe2c0000: 1, mmc@fe2e0000: 0
Loading Environment from nowhere... OK
In:    serial@feb50000
Out:   serial@feb50000
Err:   serial@feb50000
Net:   eth0: ethernet@fe1c0000
Hit any key to stop autoboot:  0 
missing environment variable: pxeuuid
Retrieving file: pxelinux.cfg/01-66-2f-42-ae-bf-75
ethernet@fe1c0000 Waiting for PHY auto negotiation to complete....... done
Using ethernet@fe1c0000 device
TFTP from server 192.168.1.46; our IP address is 192.168.1.79
Filename 'pxelinux.cfg/01-66-2f-42-ae-bf-75'.
Load address: 0xe00000
Loading: #
         577.1 KiB/s
done
Bytes transferred = 591 (24f hex)
Config file '<NULL>' found
PXE Boot Menu for Legacy BIOS
1:      Armbian
2:      flatcar
Enter choice: 2:        flatcar
Retrieving file: /srv/tftp/flatcar/flatcar_production_pxe.vmlinuz
Using ethernet@fe1c0000 device
TFTP from server 192.168.1.46; our IP address is 192.168.1.79
Filename '/srv/tftp/flatcar/flatcar_production_pxe.vmlinuz'.
Load address: 0x2000000
Loading: #################################################################
         ...
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         ###################################################
         12 MiB/s
done
Bytes transferred = 61811200 (3af2a00 hex)
Retrieving file: /srv/tftp/flatcar/flatcar_production_pxe_image.cpio.gz
Using ethernet@fe1c0000 device
TFTP from server 192.168.1.46; our IP address is 192.168.1.79
Filename '/srv/tftp/flatcar/flatcar_production_pxe_image.cpio.gz'.
Load address: 0x12180000
Loading: #################################################################
         #################################################################
         #################################################################
         ...
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         ###############################
         12 MiB/s
done
Bytes transferred = 370683004 (16182c7c hex)
append: ignition.config.url=tftp://192.168.1.46/srv/tftp/flatcar/ignition.json
## Flattened Device Tree blob at eded5210
   Booting using the fdt blob at 0xeded5210
Working FDT set to eded5210
   Loading Ramdisk to d6d4b000, end ececdc7c ... OK
   Loading Device Tree to 00000000d6d2d000, end 00000000d6d4ab4f ... OK
Working FDT set to d6d2d000

Starting kernel ...
@t-lo
Copy link
Member

t-lo commented Feb 10, 2025

Thank you for reporting this. If I read the uboot output correctly we're talking about running Flatcar on this SoC: https://radxa.com/products/rock5/5c/#techspec, which is an exciting project! It's quite likely you're the first person to try this, so we might lack drivers and/or firmware required by this particular hardware.

Hence our first step would be to identify the drivers and firmware you need, and check whether we ship these.

The best source for this information is probably RockChip's Armbian support: https://docs.radxa.com/en/rock5/rock5c/other-os/armbian, which points us to https://github.com/radxa-pkg/aic8800. Here, we find a number of kernel patches https://github.com/radxa-pkg/aic8800/tree/main/debian/patches and custom (binary) firmware https://github.com/radxa-pkg/aic8800/tree/main/src - so it's likely the board support has not been upstreamed to the vanilla Linux kernel at all.

It's worth checking if the board is supported by the vanilla kernel (which we ship, for robustness reasons). If it's not you would probably need to build a custom OS image for these boards, with a kernel that includes the board patches and ships the board firmware.

@t-lo
Copy link
Member

t-lo commented Feb 10, 2025

Found something: CONFIG_ARCH_ROCKCHIP is not set in our default kernel configuration: https://github.com/flatcar/scripts/blob/main/sdk_container/src/third_party/coreos-overlay/sys-kernel/coreos-modules/files/arm64_defconfig-6.6 so the board is currently not supported directly.

If you'd like investigating adding support for this board to Flatcar we're here to help! A good first step is to get accustomed to the OS build workflow using the SDK, and to making small modifications: https://www.flatcar.org/docs/latest/reference/developer-guides/sdk-modifying-flatcar/ .

@ader1990
Copy link

See: flatcar/scripts#2556

There should be already a downloadable image that can be tested out.

@ader1990
Copy link

See: flatcar/scripts#2556

There should be already a downloadable image that can be tested out.

Oh, the artifacts have expired, the PR needs to be rebased and CI reruned.

@ader1990
Copy link

Rebased and started a CI build, if all goes well, you should have a Flatcar image artifact downloadable
from the artifacts tab here https://github.com/flatcar/scripts/actions/runs/13243312844.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working
Projects
Status: 📝 Needs Triage
Development

No branches or pull requests

3 participants