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

🐛 Fix bootargs matcher for rpi #1810

Merged
merged 2 commits into from
Sep 12, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 16 additions & 14 deletions Earthfile
Original file line number Diff line number Diff line change
Expand Up @@ -273,20 +273,22 @@ framework:
COPY +luet/luet /framework/usr/bin/luet
COPY framework-profile.yaml /framework/etc/luet/luet.yaml

# Copy bootargs.cfg into the final framework as its needed to boot
IF [[ "$FLAVOR" =~ ^alpine* ]]
COPY ./images/alpine/bootargs.cfg /framework/etc/cos/bootargs.cfg
ELSE IF [[ "$FLAVOR" = "ubuntu-20-lts-arm-nvidia-jetson-agx-orin" ]]
COPY ./images/nvidia/bootargs.cfg /framework/etc/cos/bootargs.cfg
ELSE IF [[ "$FLAVOR" =~ "ubuntu" ]]
COPY ./images/debian/bootargs.cfg /framework/etc/cos/bootargs.cfg
ELSE IF [[ "$FLAVOR" =~ ^opensuse-leap$ ]] || [[ "$FLAVOR" =~ ^opensuse-tumbleweed$ ]] # Be specific so it doesnt match the arm-rpi flavors
COPY ./images/opensuse/bootargs.cfg /framework/etc/cos/bootargs.cfg
ELSE IF [[ "$FLAVOR" =~ ^rockylinux* ]] || [[ "$FLAVOR" =~ ^fedora* ]] || [[ "$FLAVOR" =~ ^almalinux* ]]
COPY ./images/redhat/bootargs.cfg /framework/etc/cos/bootargs.cfg
ELSE IF [[ "$FLAVOR" =~ -rpi$ ]]
COPY ./images/rpi/bootargs.cfg /framework/etc/cos/bootargs.cfg
COPY ./images/rpi/config.txt /framework/boot/config.txt
# Copy bootargs.cfg into the final framework as its needed to boot if its not there
IF [ ! -f /framework/etc/cos/bootargs.cfg ]
IF [[ "$FLAVOR" =~ ^alpine* ]]
COPY ./images/alpine/bootargs.cfg /framework/etc/cos/bootargs.cfg
ELSE IF [[ "$FLAVOR" = "ubuntu-20-lts-arm-nvidia-jetson-agx-orin" ]]
COPY ./images/nvidia/bootargs.cfg /framework/etc/cos/bootargs.cfg
ELSE IF [[ "$FLAVOR" =~ "ubuntu" ]] && [[ ! "$FLAVOR" =~ -rpi$ ]]
Copy link
Member Author

Choose a reason for hiding this comment

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

This is the main change, checking negative regex on rpi so we dont enter here if its ubuntu-*-rpi

COPY ./images/debian/bootargs.cfg /framework/etc/cos/bootargs.cfg
ELSE IF [[ "$FLAVOR" =~ ^opensuse-leap$ ]] || [[ "$FLAVOR" =~ ^opensuse-tumbleweed$ ]] # Be specific so it doesnt match the arm-rpi flavors
COPY ./images/opensuse/bootargs.cfg /framework/etc/cos/bootargs.cfg
ELSE IF [[ "$FLAVOR" =~ ^rockylinux* ]] || [[ "$FLAVOR" =~ ^fedora* ]] || [[ "$FLAVOR" =~ ^almalinux* ]]
COPY ./images/redhat/bootargs.cfg /framework/etc/cos/bootargs.cfg
ELSE IF [[ "$FLAVOR" =~ -rpi$ ]]
COPY ./images/rpi/bootargs.cfg /framework/etc/cos/bootargs.cfg
COPY ./images/rpi/config.txt /framework/boot/config.txt
END
END

SAVE ARTIFACT --keep-own /framework/ framework
Expand Down
Loading