Closed podhrmic closed 4 years ago
@podhrmic can you please point me ( url ) for the project and I will give try.
@podhrmic there is a bug in description setup-os-debian-buster. Instead of
sudo tar -C /opt -xf install/riscv-gnu-toolchains.tar.gz
should be
sudo tar -C / -xf install/riscv-gnu-toolchains.tar.gz
reason : the destination folder is not /opt/riscv
. Actually is /opt/opt/riscv
.
So we have already discussed about that. Should I open a ticket ?
@dragansts this should be a ticket in gfe
repo. The error in the path of the script has nothing to do with docker image not working, but it should be fixed nonetheless. Thanks for finding it out!
@podhrmic Perhaps this one is docker related .
the debotstrap
does not work from command line but it works with manually added symbolic link:
sudo ln -s /usr/sbin/debotstrap /usr/bin/debootstrap
I will add in the 231
issue this comment .
Don't mess with /usr/bin
in Debian, it's under the control of the package manager. debootstrap
generally needs to be run as root and is thus in /usr/sbin
, which will be in your PATH if you use sudo
or su -
; if you really intend to run it as non-root, mess with your own PATH.
@podhrmic @jrtc27 yes , in order to speed-up I have added my user to the root group and in sudoers I granted privileges to ALL. Yes u are right. Please then ignore my comment above. I fixed it now. Thanks .
missing in docker file :
RUN apt-get install dialog apt-utils git -y
building image is in progress
status:
riscv64-unknown-elf-objcopy -S -O binary --change-addresses -0x80000000 bbl bbl.bin
make[1]: Leaving directory '/gfe/bootmem/build-qemu-bbl'
build-qemu-bbl/bbl done
debian.cpio
qemu-system-riscv64 \
-nographic -machine virt -m 2G -smp 1 \
-kernel build-qemu-bbl/bbl \
-append "console=ttyS0 besspin.set_clock=$(date --iso-8601=sec) besspin.debian_repo=http://deb.debian.org/debian-ports/ besspin.dhcp_addr=1" \
-fsdev local,id=virtfs,path=/gfe/bootmem/virtfs,security_model=mapped-file \
-device virtio-9p-device,fsdev=virtfs,mount_tag=virtfs \
-device virtio-net-device,netdev=usernet \
-netdev user,id=usernet,hostfwd=tcp::10001-:22
qemu-system-riscv64: Could not set up host forwarding rule 'tcp::10001-:22'
make: *** [Makefile:221: debian.cpio] Error 1
Looks like running qemu inside docker is rather complicated. I suggest closing this as "known limitations" and moving on to other issues. Debian can be build directly on a host machine, given the dependencies are installed, or an image is provided from the nix binary cache.
I agree with @podhrmic. Let's park this as a "Won't Fix" as we can always build on a Debian self-host.
How to reproduce?
From
gfe
root directory:This will produce a working Debian binary on host,but fails to build so in docker (even with priviledged mode).
Tested with:
This is the error message:
And this is the corresponding line in the Debian Makefile where the error occurs