From Fedora Project Wiki
No edit summary
No edit summary
Line 47: Line 47:
baseurl=https://people.redhat.com/jmontleo/fedora/linux/releases/41/spacemit/source/tree
baseurl=https://people.redhat.com/jmontleo/fedora/linux/releases/41/spacemit/source/tree
</pre>
</pre>
* `dnf -y downgrade kernel*`
* `dnf -y update`
* `dnf -y remove kernel-6.1[01]* kernel-core-6.1[01]* kernel-modules-6.1[01]* kernel-modules-core-6.1[01]*`
* This script is not required, but will automatically update `/boot/extlinux/extlinux.conf` when a new kernel is installed. To use it save it as `/etc/kernel/install.d/99-update-extlinux.install`, ensuring the cmdline `root=` settings matches your root device.
* This script is not required, but will automatically update `/boot/extlinux/extlinux.conf` when a new kernel is installed. To use it save it as `/etc/kernel/install.d/99-update-extlinux.install`, ensuring the cmdline `root=` settings matches your root device.
<pre>
<pre>
Line 81: Line 84:
</pre>
</pre>
* `chmod +x /etc/kernel/install.d/99-update-extlinux.install`
* `chmod +x /etc/kernel/install.d/99-update-extlinux.install`
* Run it now manually; `/etc/kernel/install.d/99-update-extlinux.install`
* Change `SELINUX=enforcing` to `SELINUX=permissive` in `/etc/selinux/config`
* Change `SELINUX=enforcing` to `SELINUX=permissive` in `/etc/selinux/config`
* `touch /.autorelabel`
* `touch /.autorelabel`
* `dnf -y install ... ... ... ...`
* `dnf -y remove kernel-6.10.0-0.rc3.20240612git2ef5971ff345.33.0.riscv64.fc41.riscv64 kernel-core-6.10.0-0.rc3.20240612git2ef5971ff345.33.0.riscv64.fc41.riscv64 kernel-modules-6.10.0-0.rc3.20240612git2ef5971ff345.33.0.riscv64.fc41.riscv64 kernel-modules-core-6.10.0-0.rc3.20240612git2ef5971ff345.33.0.riscv64.fc41.riscv64`
* Run `/etc/kernel/install.d/99-update-extlinux.install` one manually now.
* `reboot`, let relabel complete
* `reboot`, let relabel complete
* Change `SELINUX=permissive` back to `SELINUX=enforcing` in `/etc/selinux/config`
* Change `SELINUX=permissive` back to `SELINUX=enforcing` in `/etc/selinux/config`
Line 126: Line 127:




* TODO: Run thu this and check for accuracy.
* TODO: Run thru this and check for accuracy.

Revision as of 10:58, 26 September 2024

Configuring Banani Pi / Jupiter as a Koji Builder

Prepare Fedora

Recommended Steps

  • Resize /boot. (partition 5) The image only has a 256MB /boot partition, which is too small for installing multiple kernels.
  • Move / (partition 6) to an NVME disk and resize it. If you do this mount /boot and update root=/dev/mmcblk0p6 to root=/dev/nvme0n1p1 in extlinux/extlinux.conf

Boot and Complete

  • Install your storage device(s) and boot
  • Replace /etc/yum.repos.d/fedora-riscv-koji.repo with
[fedora-riscv-koji]
name=Fedora RISC-V Koji
baseurl=http://fedora.riscv.rocks/repos/f41-build/latest/riscv64/
enabled=1
gpgcheck=0

[fedora-riscv-openkoji]
name=Fedora RISC-V Koji
baseurl=http://openkoji.iscas.ac.cn/kojifiles/repos/f41-build/latest/riscv64/
enabled=0
gpgcheck=0
  • dnf remove python3-unbound-1.20.0-2.fc41.riscv64 && dnf -y update

Optional: Install updated SpacemiT kernel repo

Rust projects have been observed failing to build with 6.1.15 kernel that comes on the image. It also does not have selinux enabled, modules necessary for firewalld to run, etc.

I am attempting to maintain and keep up to date an LTS 6.6 kernel that more closely resembles a Fedora config with patches from https://gitee.com/bianbu-linux/linux-6.6/ until we have a proper mainline kernel. The Bianbu repo is based off 6.6.36. At the time of writing I have been able to keep it up to the current LTS release, 6.6.52.

  • Add /etc/yum.repos.d/spacemit.repo
[spacemit]
name=spacemit
enabled=1
gpgcheck=0
baseurl=https://people.redhat.com/jmontleo/fedora/linux/releases/41/spacemit/riscv64/
priority=98

[spacemit-source]
name=spacemit-source
enabled=0
gpgcheck=0
baseurl=https://people.redhat.com/jmontleo/fedora/linux/releases/41/spacemit/source/tree
  • dnf -y downgrade kernel*
  • dnf -y update
  • dnf -y remove kernel-6.1[01]* kernel-core-6.1[01]* kernel-modules-6.1[01]* kernel-modules-core-6.1[01]*
  • This script is not required, but will automatically update /boot/extlinux/extlinux.conf when a new kernel is installed. To use it save it as /etc/kernel/install.d/99-update-extlinux.install, ensuring the cmdline root= settings matches your root device.
cat << EOF > /boot/extlinux/extlinux.conf
menu title Fedora boot menu
prompt 0
timeout 50
default F41S1
EOF

index=0
for i in $(ls -1vr /boot/vmlinuz*); do
  index=$((index+1))
  version=$(echo $i | sed 's,/boot/vmlinuz-,,g' | sed 's,\.unzboot,,g')
  if [ ${index} == 1 ]; then
    unlink /boot/dtb
    ln -sf dtb-${version} /boot/dtb
  fi
  if [ "${version}" == "6.1.15+" ]; then
    export spacemit=spacemit
  else
    export spacemit=dtb/spacemit
  fi
  cat << EOF >> /boot/extlinux/extlinux.conf

label F41S${index}
        menu label Fedora 41 ${version}
        linux /vmlinuz-${version}
        initrd /initramfs-${version}.img
        fdtdir /${spacemit}
        append console=ttyS0,115200 root=/dev/nvme0n1p1 rootfstype=ext4 rootwait rw earlycon clk_ignore_unused quiet
EOF
done
  • chmod +x /etc/kernel/install.d/99-update-extlinux.install
  • Run it now manually; /etc/kernel/install.d/99-update-extlinux.install
  • Change SELINUX=enforcing to SELINUX=permissive in /etc/selinux/config
  • touch /.autorelabel
  • reboot, let relabel complete
  • Change SELINUX=permissive back to SELINUX=enforcing in /etc/selinux/config
  • reboot (or just setenforce 1)

Install and Configure Koji

  • systemctl mask tmp.mount
  • Create /etc/systemd/system/kojid.service.d/override.conf
[Service]
Restart=always
RestartSec=10min
  • reboot
  • Add /etc/yum.repos.d/koji.repo (Nothing past 1.33 works right or me with the current server)
[koji]
name=koji
enabled=1
gpgcheck=0
baseurl=https://people.redhat.com/jmontleo/fedora/linux/releases/41/koji/riscv64/
priority=98

[koji-source]
name=koji-source
enabled=0
gpgcheck=0
baseurl=https://people.redhat.com/jmontleo/fedora/linux/releases/41/koji/source/tree
  • dnf -y install koji-builder koji-builder-plugin-rpmautospec python3-rpmautospec rpmautospec koji-builder-plugins python3-legacy-cgi
  • TODO: kojid.conf
  • TODO: site-defaults.cfg
  • TODO: ca cert
  • TODO: builder cert

Proxy Configuration

Builders can use a lot of bandwidth. A squid proxy can cut this down substantially

  • TODO: Add example proxy configuration
  • TODO: docker/podman run example


  • TODO: Run thru this and check for accuracy.