From Fedora Project Wiki
No edit summary
Line 46: Line 46:
  cd the_package/master
  cd the_package/master
  fedpkg srpm
  fedpkg srpm
You may need to disable hardened build by adding:
%global _hardened_build 0


Copy the source RPM into the stage3 disk image.  The disk image <b>must not</b> be running when you do this:
Copy the source RPM into the stage3 disk image.  The disk image <b>must not</b> be running when you do this:
Line 59: Line 63:
  cd /var/tmp
  cd /var/tmp
  rpmbuild --rebuild the_package.src.rpm \
  rpmbuild --rebuild the_package.src.rpm \
     --define "debug_package %{nil}" --define "_hardened_build 0"
     --define "debug_package %{nil}"


If it builds successfully, brilliant!  More usually this will require many cycles of debugging and fixing things.  Removing dependencies or parts of the spec file is an option for these stage3 builds.
If it builds successfully, brilliant!  More usually this will require many cycles of debugging and fixing things.  Removing dependencies or parts of the spec file is an option for these stage3 builds.

Revision as of 14:19, 13 August 2016

RISC-V (pronounced "RISC Five") is an open source instruction set architecture (ISA). This project, informally called Fedora/RISC-V, aims to get Fedora bootstrapped on the RISC-V (64 bit) architecture.

Downloads

Status

Last updated: 2016-08-12

Status: The stage3 disk image boots to a shell, with GCC, numerous developer utilities, and rpmbuild.

I have started using the stage3 to build stage4 RPMs.

For the latest information, see: https://github.com/rwmjones/fedora-riscv

Communications

There is no specific mailing list. Use Fedora devel for now.

On FreeNode IRC: #fedora-riscv

People

(add your name here)

Building packages in stage3

The stage3 environment can be built from source or you can download a snapshot binary image. See above for links to git etc.

Pick a package which:

  • has very few dependencies
  • is written in C or C++
  • is part of Fedora @Core

Build a source RPM on the host:

fedpkg clone -B the_package
cd the_package/master
fedpkg srpm

You may need to disable hardened build by adding:

%global _hardened_build 0

Copy the source RPM into the stage3 disk image. The disk image must not be running when you do this:

virt-copy-in -a stage3-disk.img the_package.src.rpm /var/tmp/

Boot the disk image. Spike is currently more stable than qemu, so:

make boot-stage3-in-spike

Inside the VM, you can now try building the package:

cd /var/tmp
rpmbuild --rebuild the_package.src.rpm \
    --define "debug_package %{nil}"

If it builds successfully, brilliant! More usually this will require many cycles of debugging and fixing things. Removing dependencies or parts of the spec file is an option for these stage3 builds.

If you get a build, it will be in /rpmbuild inside the VM. sync and shut down the VM, then do:

virt-copy-out -a stage3-disk.img /rpmbuild/RPMS .

and the files will be downloaded to ./RPMS/ in the current directory.

Add notes to the section below. Also come to #fedora-riscv and discuss where to put your built packages.

Notes on packages built so far

zlib (RWMJ)

Done

filesystem (RWMJ)

Done

glibc (RWMJ)

rpmbuild --with bootstrap ...

The build took over 24 hours, but it got surprisingly far. Unfortunately it failed while creating the locale files. Actually it failed half way through the locales in a very non-specific way. Needs a lot more investigation and time. I might try to find a faster machine first.

gawk (davidlt)

bzip2 (davidlt)