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

[WIP] Enable Rockchip arch in kernel #2556

Open
wants to merge 27 commits into
base: main
Choose a base branch
from

Conversation

sambonbonne
Copy link

Set CONFIG_ARCH_ROCKCHIP

After some discussion on Matrix about Odroid M1S (based on RK3566), I made this PR to enable Rockchip arch in the kernel.

The goal is to test the generated aarch64 image on my hardware and to see if the initrd size is not increased to much before discussing about the possible inclusion of this configuration in Flatcar.

⚠️ This PR is based on #2300 to use 6.12 kernel, because Odroid M1S support has been added on 6.12, so it can't be merged prior to #2300.

How to use

Installing the image in Odroid M1S requires U-Boot binaries and multiple steps. I will add testing commands if it works on my hardware and someone want to try it on real hardware.

Testing done

No testing for now. I plan to download the generated image (when it's generated) and install it on my hardware to test if it boots.

  • Changelog entries added in the respective changelog/ directory (user-facing change, bug fix, security fix, update)
  • Inspected CI output for image differences: /boot and /usr size, packages, list files for any missing binaries, kernel modules, config files, kernel modules, etc.

ader1990 and others added 26 commits December 19, 2024 09:23
@@ -5,6 +5,7 @@ CONFIG_ARCH_BCM2835=y
CONFIG_ARCH_BCM_IPROC=y
# CONFIG_ARCH_MEDIATEK is not set
# CONFIG_ARCH_QCOM is not set
CONFIG_ARCH_ROCKCHIP=y
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CONFIG_ARCH_MULTI_V7 might be required too

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

RK3566 is ARMv8-A (it has only 4 Cortex A-55, which are ARMv8.2-A) and CONFIG_ARCH_MULTI_V7 is for ARMv7 (if I understand correctly). So at first sight, it should not be required but if my real test fails, I'll try to add it.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, this is weird because it says it's for Rockchip Cortex-A9 so I'll try without it and if it doesn't work, I'll try to add it.

If I add it, I'll try to use the SDK container to build locally and make the change if it helps.

@ader1990
Copy link
Contributor

ader1990 commented Jan 3, 2025

@sambonbonne the image was built, you can download it and try it from the github actions artifacts page. https://github.com/flatcar/scripts/actions/runs/12575139169?pr=2556

Copy link

github-actions bot commented Jan 3, 2025

Build action triggered: https://github.com/flatcar/scripts/actions/runs/12596150074

@ader1990
Copy link
Contributor

ader1990 commented Jan 3, 2025

The vmlinuz image increase is pretty big, by 3MB, which is more than the space allowed for the updates to work, that s why some of the tests failed. But as a PoC, you can try first the resulting image and see if it works.

@sambonbonne
Copy link
Author

@ader1990 thank you! I had some problems when trying to edit the partition layout of my SD card with fdisk on thursday (for U-Boot) and I couldn't try to fix it this week-end but I may have time to work on it on Monday or Tuesday. I already know what I can try to fix my partitioning problem so it should not take too long for me to try.

I understand 3MB is too big, unfortunately I don't know enough about "kernel things" to help on this so if I manage to have a working image, I hope we will be able to reduce the added size or find an alternative.

@sambonbonne
Copy link
Author

@ader1990 I'm trying to use flatcar-install /path/to/flatcar_production_image.bin but I have some errors, IDK if I did something wrong. Here are the logs:

$ flatcar-install -d /dev/sdb -B arm64-usr -i /path/to/ignition.json -f /path/to/flatcar_production_image.bin -u
Using existing image: /path/to/flatcar_production_image.bin
Writing /path/to/flatcar_production_image.bin...
Running in chroot, ignoring request.
Running in chroot, ignoring request.
mount: /tmp/flatcar-install.77HskzhsAm/oemfs: WARNING: source write-protected, mounted read-only.
Installing Ignition config /path/to/ignition.json...
cp: cannot create regular file '/tmp/flatcar-install.77HskzhsAm/oemfs/config.ign': Read-only file system
Error: return code 1 from [[ -n "${IGNITION}" ]]
/dev/sdb: 8 bytes were erased at offset 0x00000200 (gpt): 45 46 49 20 50 41 52 54
/dev/sdb: 2 bytes were erased at offset 0x000001fe (PMBR): 55 aa
/dev/sdb: calling ioctl to re-read partition table: Success

If you have any idea to help me, I will be very happy!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: ⚒️ In Progress
Development

Successfully merging this pull request may close these issues.

3 participants