lowRISC / lowRISC/lowrisc-chip
Issue building Debian for riscv-64.
Nobody has claimed this yet.
- Dominant language
- SystemVerilog
- Stars
- 601
- Forks
- 147
- PR merge metrics
- No merged PRs in 30d
Description
I'm trying to build everything in the baremetal toolchain for v0.6, and I'm having some problems with the Debian step.
I follow all the commands here: https://www.lowrisc.org/docs/overview/
The commands that I ran are as follows (I checked out a new repo and everything):
sudo apt update
sudo apt upgrade
sudo apt-get install autoconf automake autotools-dev curl \
libmpc-dev libmpfr-dev libgmp-dev gawk build-essential bison \
flex texinfo gperf libncurses5-dev libusb-1.0-0-dev libboost-dev \
swig git libtool libreadline-dev libelf-dev python-dev \
microcom chrpath gawk texinfo nfs-kernel-server xinetd pseudo \
libusb-1.0-0-dev hugo device-tree-compiler zlib1g-dev libssl-dev \
debootstrap debian-ports-archive-keyring qemu-user-static iverilog \
openjdk-8-jdk-headless iperf3 libglib2.0-dev libpixman-1-dev
git clone -b refresh-v0.6 --recursive https://github.com/lowrisc/lowrisc-chip.git
sudo ln -s /mnt/c/nobackup/Xilinx/ /opt/Xilinx
cd /mnt/c/nobackup/lowrisc-chip
source /opt/Xilinx/Vivado/2018.2/settings64.sh
unset LD_LIBRARY_PATH
source set_env.sh
# https://www.lowrisc.org/docs/generate-the-bitstream/
cd $TOP/fpga/board/nexys4_ddr
make cleanall
make bitstream
make cfgmem
make program-cfgmem
# https://www.lowrisc.org/docs/build-bare-metal-toolchain/
cd $TOP/rocket-chip/riscv-tools/
bash ./build.sh
cd $TOP/rocket-chip/riscv-tools/riscv-gnu-toolchain/build
../configure --prefix=$RISCV
make -j$(nproc) linux
cd $TOP/qemu
./configure --static --disable-system --target-list=riscv64-linux-user
make
cd $TOP/debian-riscv64
sudo update-binfmts --import work/qemu-riscv64
make cpio
When I run the final make cpio I get an error with the script as follows:
Time zone: 105
Current default time zone: 'America/New_York'
Local time is now: Sat Nov 3 09:27:19 EDT 2018.
Universal Time is now: Sat Nov 3 13:27:19 UTC 2018.
sudo tar cJf - -C work/debian-riscv64-chroot . > ../rootfs.tar.xz
rm -rf bin etc dev home lib proc sbin sys tmp usr mnt nfs root run init
mkdir -p bin etc dev home lib proc sbin sys tmp usr mnt nfs root run usr/bin usr/lib usr/sbin usr/share/perl5 usr/share/udhcpc lib/riscv64-linux-gnu usr/lib/riscv64-linux-gnu # usr/share/sysvinit
cp -p work/usr-share-udhcpc-default.script usr/share/udhcpc/default.script
cp -p work/debian-riscv64-chroot/sbin/mount.nfs ./sbin
cp: cannot stat 'work/debian-riscv64-chroot/sbin/mount.nfs': No such file or directory
work/makefile.inc:17: recipe for target 'init' failed
make: *** [init] Error 1
Am I doing something wrong, or are you missing a step in your documentation about the mount.nfs file?
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading work/makefile.inc around the init target and rerun make cpio from debian-riscv64 to confirm the missing work/debian-riscv64-chroot/sbin/mount.nfs path. Trace how the Debian chroot is created and compare it with the documented setup commands; done means make cpio completes and produces the root filesystem archive.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- debian, linux, shell
- Domain
- build-system, operating-systems
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100