Initial riscv64 Kiwi hacks

Signed-off-by: David Abdurachmanov <davidlt@rivosinc.com>
This commit is contained in:
David Abdurachmanov 2024-05-03 01:17:43 -04:00
parent 00cafda86f
commit 1ba1bf7c41
5 changed files with 58 additions and 16 deletions

View File

@ -202,6 +202,46 @@ if [[ "$kiwi_profiles" == *"Container"* ]]; then
# https://pagure.io/atomic-wg/issue/308
printf "tsflags=nodocs\n" >>/etc/dnf/dnf.conf
# Disable default branched fedora repos
# We only want to have Fedora/RISCV Koji repos
sed -i 's/enabled=1/enabled=0/g' /etc/yum.repos.d/{fedora.repo,fedora-updates.repo,fedora-updates-testing.repo,fedora-cisco-openh264.repo}
# Create Fedora/RISCV repos
cat << EOF > /etc/yum.repos.d/fedora-riscv.repo
[fedora-riscv]
name=Fedora RISC-V
baseurl=http://fedora.riscv.rocks/repos-dist/f40/latest/riscv64/
#baseurl=https://dl.fedoraproject.org/pub/alt/risc-v/repo/fedora/f40/latest/riscv64/
#baseurl=https://mirror.math.princeton.edu/pub/alt/risc-v/repo/fedora/f40/latest/riscv64/
enabled=1
gpgcheck=0
[fedora-riscv-debuginfo]
name=Fedora RISC-V - Debug
baseurl=http://fedora.riscv.rocks/repos-dist/f40/latest/riscv64/debug/
#baseurl=https://dl.fedoraproject.org/pub/alt/risc-v/repo/fedora/f40/latest/riscv64/debug/
#baseurl=https://mirror.math.princeton.edu/pub/alt/risc-v/repo/fedora/f40/latest/riscv64/debug/
enabled=0
gpgcheck=0
[fedora-riscv-source]
name=Fedora RISC-V - Source
baseurl=http://fedora.riscv.rocks/repos-dist/f40/latest/src/
#baseurl=https://dl.fedoraproject.org/pub/alt/risc-v/repo/fedora/f40/latest/src/
#baseurl=https://mirror.math.princeton.edu/pub/alt/risc-v/repo/fedora/f40/latest/src/
enabled=0
gpgcheck=0
EOF
# Create Fedora/RISC-V Koji repo (pulling directly from Koji)
cat << EOF > /etc/yum.repos.d/fedora-riscv-koji.repo
[fedora-riscv-koji]
name=Fedora RISC-V Koji
baseurl=http://fedora.riscv.rocks/repos/f40-build/latest/riscv64/
enabled=0
gpgcheck=0
EOF
if [[ "$kiwi_profiles" == *"Base-Generic-Minimal"* ]]; then
# remove some random help txt files
rm -fv /usr/share/gnupg/help*.txt

View File

@ -1,7 +1,6 @@
<image>
<repository type="rpm-md" alias="rawhide" sourcetype="metalink">
<source path="https://mirrors.fedoraproject.org/metalink?repo=rawhide&amp;arch=$basearch">
<signing key="file:///usr/share/distribution-gpg-keys/fedora/RPM-GPG-KEY-fedora-rawhide-primary"/>
<repository type="rpm-md" alias="rawhide" sourcetype="baseurl">
<source path="http://fedora.riscv.rocks/repos-dist/rawhide/latest/riscv64">
</source>
</repository>
</image>

View File

@ -149,7 +149,7 @@
</oemconfig>
</type>
</preferences>
<preferences profiles="Cloud-Base-UEFI-UKI" arch="x86_64,aarch64">
<preferences profiles="Cloud-Base-UEFI-UKI" arch="x86_64,aarch64,riscv64">
<type image="oem" format="qcow2"
firmware="uefi" efipartsize="1000"
bootpartition="false"

View File

@ -14,7 +14,7 @@
<type image="oci">
<containerconfig
name="fedora"
tag="rawhide"
tag="40"
maintainer="Fedora Project Contributors &lt;devel@lists.fedoraproject.org&gt;"
>
<subcommand execute="/bin/bash"/>
@ -23,12 +23,12 @@
<label name="org.opencontainers.image.url" value="https://fedoraproject.org/"/>
<label name="org.opencontainers.image.license" value="MIT"/>
<label name="org.opencontainers.image.name" value="fedora"/>
<label name="org.opencontainers.image.version" value="rawhide"/>
<label name="org.opencontainers.image.version" value="40"/>
<!-- Legacy attributes for backward compatibility -->
<label name="vendor" value="Fedora Project"/>
<label name="license" value="MIT"/>
<label name="name" value="fedora"/>
<label name="version" value="rawhide"/>
<label name="version" value="40"/>
</labels>
</containerconfig>
</type>
@ -41,7 +41,7 @@
<type image="oci">
<containerconfig
name="fedora-minimal"
tag="rawhide"
tag="40"
maintainer="Fedora Project Contributors &lt;devel@lists.fedoraproject.org&gt;"
>
<subcommand execute="/bin/bash"/>
@ -50,12 +50,12 @@
<label name="org.opencontainers.image.url" value="https://fedoraproject.org/"/>
<label name="org.opencontainers.image.license" value="MIT"/>
<label name="org.opencontainers.image.name" value="fedora-minimal"/>
<label name="org.opencontainers.image.version" value="rawhide"/>
<label name="org.opencontainers.image.version" value="40"/>
<!-- Legacy attributes for backward compatibility -->
<label name="vendor" value="Fedora Project"/>
<label name="license" value="MIT"/>
<label name="name" value="fedora-minimal"/>
<label name="version" value="rawhide"/>
<label name="version" value="40"/>
</labels>
</containerconfig>
</type>
@ -68,7 +68,7 @@
<type image="oci">
<containerconfig
name="fedora-toolbox"
tag="rawhide"
tag="40"
maintainer="Fedora Project Contributors &lt;devel@lists.fedoraproject.org&gt;"
>
<subcommand execute="/bin/bash"/>
@ -77,13 +77,13 @@
<label name="org.opencontainers.image.url" value="https://fedoraproject.org/"/>
<label name="org.opencontainers.image.license" value="MIT"/>
<label name="org.opencontainers.image.name" value="fedora-toolbox"/>
<label name="org.opencontainers.image.version" value="rawhide"/>
<label name="org.opencontainers.image.version" value="40"/>
<label name="com.github.containers.toolbox" value="true"/>
<!-- Legacy attributes for backward compatibility -->
<label name="vendor" value="Fedora Project"/>
<label name="license" value="MIT"/>
<label name="name" value="fedora-toolbox"/>
<label name="version" value="rawhide"/>
<label name="version" value="40"/>
</labels>
</containerconfig>
</type>
@ -198,7 +198,7 @@
<package name="man-db"/>
<package name="man-pages"/>
<package name="mesa-dri-drivers"/>
<package name="mesa-va-drivers" arch="aarch64,ppc64le,x86_64"/> <!-- doesn't exist in s390x -->
<package name="mesa-va-drivers" arch="aarch64,ppc64le,x86_64,riscv64"/> <!-- doesn't exist in s390x -->
<package name="mesa-vulkan-drivers"/>
<package name="mtr"/>
<package name="nss-mdns"/>

View File

@ -5,11 +5,14 @@ echo "###" "$0" "$@"
case "$(uname -m)" in
aarch64) arch="aa64"; ARCH="AA64";;
x86_64) arch="x64"; ARCH="X64";;
riscv64) arch="riscv64"; ARCH="RISCV64";;
esac
# figure where shim.efi and BOOT.CSV are located
shim="$(ls boot/efi/EFI/*/shim${arch}.efi)"
csv="${shim%/*}/BOOT${ARCH}.CSV"
# We don't have shim on riscv64
#shim="$(ls boot/efi/EFI/*/shim${arch}.efi)"
#csv="${shim%/*}/BOOT${ARCH}.CSV"
csv="boot/efi/EFI/fedora/BOOT.CSV"
# copy UKI images (typically one) to ${ESP}/EFI/Linux and
# generate BOOT.CSV with one entry per UKI.