Initial draft for riscv64 (F41)
Signed-off-by: David Abdurachmanov <davidlt@rivosinc.com>
This commit is contained in:
parent
c7024688bf
commit
67597e25bb
@ -7,7 +7,7 @@
|
||||
<requires profile="BootCore"/>
|
||||
</profile>
|
||||
</profiles>
|
||||
<preferences profiles="BootDiskCore" arch="x86_64">
|
||||
<preferences profiles="BootDiskCore" arch="x86_64,riscv64">
|
||||
<type image="oem"
|
||||
filesystem="btrfs" btrfs_root_is_subvolume="true" btrfs_set_default_volume="false" fsmountoptions="x-systemd.growfs,compress=zstd:1"
|
||||
kernelcmdline="rhgb quiet" devicepersistency="by-uuid"
|
||||
@ -86,6 +86,8 @@
|
||||
<packages type="image" patternType="plusRecommended" profiles="BootCore">
|
||||
<package name="grub2-efi-aa64" arch="aarch64"/>
|
||||
<package name="grub2-efi-aa64-modules" arch="aarch64"/>
|
||||
<package name="grub2-efi-riscv64" arch="riscv64"/>
|
||||
<package name="grub2-efi-riscv64-modules" arch="riscv64"/>
|
||||
<package name="grub2-efi-x64" arch="x86_64"/>
|
||||
<package name="grub2-efi-x64-modules" arch="x86_64"/>
|
||||
<package name="grub2-pc" arch="x86_64"/>
|
||||
@ -94,6 +96,7 @@
|
||||
<package name="s390utils-base" arch="s390x"/>
|
||||
<package name="shim-signed-aa64" arch="aarch64"/>
|
||||
<package name="shim-signed-x64" arch="x86_64"/>
|
||||
<package name="shim-unsigned-riscv64" arch="riscv64"/>
|
||||
<package name="kernel-core"/>
|
||||
<package name="systemd-oomd-defaults"/>
|
||||
<package name="systemd-resolved"/>
|
||||
@ -101,6 +104,7 @@
|
||||
<packages type="image" patternType="plusRecommended" profiles="BootCoreUKI">
|
||||
<package name="shim-signed-aa64" arch="aarch64"/>
|
||||
<package name="shim-signed-x64" arch="x86_64"/>
|
||||
<package name="shim-unsigned-riscv64" arch="riscv64"/>
|
||||
<package name="systemd-oomd-defaults"/>
|
||||
<package name="systemd-resolved"/>
|
||||
<package name="kernel-uki-virt"/>
|
||||
@ -109,6 +113,7 @@
|
||||
</packages>
|
||||
<packages type="iso" patternType="plusRecommended" profiles="BootCore">
|
||||
<package name="grub2-efi-aa64-cdboot" arch="aarch64"/>
|
||||
<package name="grub2-efi-riscv64-cdboot" arch="riscv64"/>
|
||||
<package name="grub2-efi-x64-cdboot" arch="x86_64"/>
|
||||
</packages>
|
||||
<packages type="image" patternType="plusRecommended" profiles="BootDiskCore">
|
||||
@ -121,5 +126,6 @@
|
||||
<package name="btrfs-progs"/>
|
||||
<package name="udisks2-btrfs"/>
|
||||
<package name="uboot-images-armv8" arch="aarch64"/>
|
||||
<package name="uboot-images-riscv64" arch="riscv64"/>
|
||||
</packages>
|
||||
</image>
|
||||
|
@ -23,6 +23,15 @@
|
||||
<bootloader name="grub2" grub_template="grub-arm.cfg.iso-template" console="console" timeout="10"/>
|
||||
</type>
|
||||
</preferences>
|
||||
<preferences profiles="LiveInstall" arch="riscv64">
|
||||
<type image="iso"
|
||||
publisher="Fedora Project" volid="Fedora_Linux" application_id="Fedora_Linux"
|
||||
primary="true" flags="dmsquash" filesystem="squashfs" squashfscompression="xz" mediacheck="true"
|
||||
firmware="uefi" efiparttable="gpt" efifatimagesize="30" kernelcmdline="quiet rhgb"
|
||||
>
|
||||
<bootloader name="grub2" grub_template="grub-riscv64.cfg.iso-template" console="console" timeout="10"/>
|
||||
</type>
|
||||
</preferences>
|
||||
<preferences profiles="LiveInstall" arch="ppc64le">
|
||||
<type image="iso"
|
||||
publisher="Fedora Project" volid="Fedora_Linux" application_id="Fedora_Linux"
|
||||
|
15
config.sh
15
config.sh
@ -402,4 +402,19 @@ if [[ "$kiwi_profiles" == *"FEX"* ]]; then
|
||||
rm /usr/bin/rm
|
||||
fi
|
||||
|
||||
# Find the architecture we are on
|
||||
installarch=$(uname -m)
|
||||
|
||||
# Do custom Fedora/RISCV changes
|
||||
if [[ $installarch == "riscv64" ]]; then
|
||||
if [[ "$kiwi_profiles" == *"Disk"* ]]; then
|
||||
# Disable tmpfs for /tmp
|
||||
# Most boards don't have a lot of RAM.
|
||||
systemctl mask tmp.mount
|
||||
|
||||
# We most likely don't have HW random number generator
|
||||
systemctl enable haveged.service
|
||||
fi
|
||||
fi
|
||||
|
||||
exit 0
|
||||
|
41
grub-riscv64.cfg.iso-template
Normal file
41
grub-riscv64.cfg.iso-template
Normal file
@ -0,0 +1,41 @@
|
||||
# Inspired by the config used for lorax-built live media
|
||||
|
||||
set default="1"
|
||||
|
||||
function load_video {
|
||||
insmod efi_gop
|
||||
insmod efi_uga
|
||||
insmod video_bochs
|
||||
insmod video_cirrus
|
||||
insmod all_video
|
||||
}
|
||||
set basicgfx="nomodeset"
|
||||
|
||||
load_video
|
||||
set gfxpayload=keep
|
||||
insmod gzio
|
||||
insmod part_gpt
|
||||
insmod ext2
|
||||
|
||||
terminal_input console
|
||||
terminal_output ${terminal_output}
|
||||
|
||||
set timeout=${boot_timeout}
|
||||
set timeout_style=${boot_timeout_style}
|
||||
|
||||
search ${search_params}
|
||||
|
||||
menuentry "Start ${title}" --class fedora --class gnu-linux --class gnu --class os {
|
||||
linux ($$root)${bootpath}/${kernel_file} ${boot_options}
|
||||
initrd ($$root)${bootpath}/${initrd_file}
|
||||
}
|
||||
menuentry "Test this media & start ${title}" --class fedora --class gnu-linux --class gnu --class os {
|
||||
linux ($$root)${bootpath}/${kernel_file} ${boot_options} rd.live.check
|
||||
initrd ($$root)${bootpath}/${initrd_file}
|
||||
}
|
||||
submenu "Troubleshooting -->" {
|
||||
menuentry "Start ${title} in basic graphics mode" --class fedora --class gnu-linux --class gnu --class os {
|
||||
linux ($$root)${bootpath}/${kernel_file} ${boot_options} $${basicgfx}
|
||||
initrd ($$root)${bootpath}/${initrd_file}
|
||||
}
|
||||
}
|
@ -1,20 +1,29 @@
|
||||
<image>
|
||||
<repository type="rpm-md" alias="fedora" sourcetype="metalink">
|
||||
<repository type="rpm-md" alias="fedora" sourcetype="metalink" arch="x86_64,aarch64,ppc64le,s390x">
|
||||
<source path="https://mirrors.fedoraproject.org/metalink?repo=fedora-$releasever&arch=$basearch">
|
||||
<signing key="file:///usr/share/distribution-gpg-keys/fedora/RPM-GPG-KEY-fedora-$releasever-primary"/>
|
||||
</source>
|
||||
</repository>
|
||||
<repository type="rpm-md" alias="updates" sourcetype="metalink">
|
||||
<repository type="rpm-md" alias="updates" sourcetype="metalink" arch="x86_64,aarch64,ppc64le,s390x">
|
||||
<source path="https://mirrors.fedoraproject.org/metalink?repo=updates-released-f$releasever&arch=$basearch">
|
||||
<signing key="file:///usr/share/distribution-gpg-keys/fedora/RPM-GPG-KEY-fedora-$releasever-primary"/>
|
||||
</source>
|
||||
</repository>
|
||||
<!-- For folks to enable for building images with content in test update repositories -->
|
||||
<!--
|
||||
<repository type="rpm-md" alias="updates-testing" sourcetype="metalink">
|
||||
<repository type="rpm-md" alias="updates-testing" sourcetype="metalink" arch="x86_64,aarch64,ppc64le,s390x">
|
||||
<source path="https://mirrors.fedoraproject.org/metalink?repo=updates-testing-f$releasever&arch=$basearch">
|
||||
<signing key="file:///usr/share/distribution-gpg-keys/fedora/RPM-GPG-KEY-fedora-$releasever-primary"/>
|
||||
</source>
|
||||
</repository>
|
||||
-->
|
||||
<repository type="rpm-md" alias="fedora" sourcetype="baseurl" arch="riscv64">
|
||||
<source path="http://fedora.riscv.rocks/repos-dist/f$releasever-staging/latest/$basearch"/>
|
||||
</repository>
|
||||
<!-- For folks to enable for building images with content in Koji working repos -->
|
||||
<!--
|
||||
<repository type="rpm-md" alias="fedora-koji" sourcetype="baseurl" arch="riscv64">
|
||||
<source path="http://fedora.riscv.rocks/repos/f$releasever-staging/latest/$basearch"/>
|
||||
</repository>
|
||||
-->
|
||||
</image>
|
||||
|
@ -89,7 +89,7 @@
|
||||
</oemconfig>
|
||||
</type>
|
||||
</preferences>
|
||||
<preferences profiles="Cloud-Base-Generic" arch="x86_64,aarch64">
|
||||
<preferences profiles="Cloud-Base-Generic" arch="x86_64,aarch64,riscv64">
|
||||
<type image="oem" format="qcow2"
|
||||
filesystem="btrfs" btrfs_root_is_subvolume="true" btrfs_set_default_volume="false" fsmountoptions="compress=zstd:1"
|
||||
kernelcmdline="no_timer_check console=tty1 console=ttyS0,115200n8 systemd.firstboot=off"
|
||||
@ -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"
|
||||
|
@ -246,7 +246,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"/>
|
||||
|
@ -71,6 +71,24 @@
|
||||
</oemconfig>
|
||||
</type>
|
||||
</preferences>
|
||||
<preferences profiles="ServerVMDisk" arch="riscv64">
|
||||
<type image="oem" format="qcow2"
|
||||
filesystem="xfs"
|
||||
kernelcmdline="earlycon console=ttyS0,115200n8"
|
||||
devicepersistency="by-uuid"
|
||||
bootpartition="true" bootpartsize="1000" bootfilesystem="xfs" efipartsize="100" firmware="uefi"
|
||||
rootfs_label="fedora"
|
||||
>
|
||||
<bootloader name="grub2" console="serial" timeout="0"/>
|
||||
<size unit="G">10</size>
|
||||
<systemdisk>
|
||||
<volume name="@root"/>
|
||||
</systemdisk>
|
||||
<oemconfig>
|
||||
<oem-resize>false</oem-resize>
|
||||
</oemconfig>
|
||||
</type>
|
||||
</preferences>
|
||||
<preferences profiles="ServerDisk" arch="x86_64">
|
||||
<type image="oem"
|
||||
filesystem="xfs"
|
||||
@ -139,6 +157,24 @@
|
||||
</oemconfig>
|
||||
</type>
|
||||
</preferences>
|
||||
<preferences profiles="ServerDisk" arch="riscv64">
|
||||
<type image="oem"
|
||||
filesystem="xfs"
|
||||
kernelcmdline="earlycon console=ttyS0,115200n8"
|
||||
devicepersistency="by-uuid"
|
||||
bootpartition="true" bootpartsize="1000" bootfilesystem="xfs" efipartsize="100" firmware="uefi"
|
||||
rootfs_label="fedora"
|
||||
>
|
||||
<bootloader name="grub2" console="serial" timeout="3" timeout_style="menu"/>
|
||||
<size unit="G">10</size>
|
||||
<systemdisk>
|
||||
<volume name="@root"/>
|
||||
</systemdisk>
|
||||
<oemconfig>
|
||||
<oem-resize>false</oem-resize>
|
||||
</oemconfig>
|
||||
</type>
|
||||
</preferences>
|
||||
<packages type="bootstrap" patternType="plusRecommended" profiles="ServerCore">
|
||||
<package name="fedora-release-server"/>
|
||||
</packages>
|
||||
@ -149,6 +185,7 @@
|
||||
<ignore name="initial-setup-gui"/>
|
||||
<ignore name="plymouth"/>
|
||||
<package name="glibc-all-langpacks"/>
|
||||
<package name="haveged" arch="riscv64"/>
|
||||
<package name="initial-setup"/>
|
||||
<package name="lvm2"/>
|
||||
<package name="xfsprogs"/>
|
||||
|
@ -3,8 +3,9 @@ echo "###" "$0" "$@"
|
||||
|
||||
# set arch-specific variables
|
||||
case "$(uname -m)" in
|
||||
aarch64) arch="aa64"; ARCH="AA64";;
|
||||
x86_64) arch="x64"; ARCH="X64";;
|
||||
aarch64) arch="aa64"; ARCH="AA64";;
|
||||
riscv64) arch="riscv64"; ARCH="RISCV64";;
|
||||
x86_64) arch="x64"; ARCH="X64";;
|
||||
esac
|
||||
|
||||
# figure where shim.efi and BOOT.CSV are located
|
||||
|
Loading…
x
Reference in New Issue
Block a user