[lowrisc-dev] Re: make cpio error

Dinesh Thirumurthy dinesh.thirumurthy at gmail.com
Fri Dec 28 11:03:50 GMT 2018


Hi,

Thanks Jonathan. I will look at the prebuilt rootfs.

The complete debootstrap log is at:
https://github.com/hakrdinesh/e/blob/master/nexys/debootstrap.log

I believe during make cpio:

work/mybootstrap.sh is trying to get older revisions of 3 libraries.

>From what is currently present at:
http://www.debianmirror.de/debian-ports/pool-riscv64/main/libf/libffi/
http://www.debianmirror.de/debian-ports/pool-riscv64/main/s/systemd/

The following change should hopefully remove the missing files problem.

diff --git a/work/mybootstrap.sh b/work/mybootstrap.sh
index 3e82e4a..6789798 100644
--- a/work/mybootstrap.sh
+++ b/work/mybootstrap.sh
@@ -15,10 +15,10 @@ sudo chroot work/debian-riscv64-chroot
/debootstrap/debootstrap --second-stage
 sudo mkdir -p -m 777 work/debian-riscv64-chroot/tmp
 #Fetch the last few unreleased packages
 cd work/debian-riscv64-chroot/tmp
-wget
http://www.debianmirror.de/debian-ports/pool-riscv64/main/s/systemd/libudev1_238-2_riscv64.deb
-wget
http://www.debianmirror.de/debian-ports/pool-riscv64/main/s/systemd/libsystemd0_238-2_riscv64.deb
+wget
http://www.debianmirror.de/debian-ports/pool-riscv64/main/s/systemd/libudev1_240-2_riscv64.deb
+wget
http://www.debianmirror.de/debian-ports/pool-riscv64/main/s/systemd/libsystemd0_240-2_riscv64.deb
 ##wget
http://www.debianmirror.de/debian-ports/pool-riscv64/main/d/db5.3/libdb5.3_5.3.28-13.1~riscv64_riscv64.deb
-wget
http://www.debianmirror.de/debian-ports/pool-riscv64/main/libf/libffi/libffi7_3.3~rc0-2~riscv64_riscv64.deb
+wget
http://www.debianmirror.de/debian-ports/pool-riscv64/main/libf/libffi/libffi7_3.3~rc0-7_riscv64.deb
 cd ../../..
 #Install the unreleased packages
 sudo chroot work/debian-riscv64-chroot dpkg -i `ls -1
work/debian-riscv64-chroot/tmp | sed 's=^=tmp/='`
dt at marina:~/l/lowrisc-chip/debian-riscv64$

Thanks.

Also, I ran into missing files, which I let make ignore for now.

dt at marina:~/l/lowrisc-chip/debian-riscv64$ git diff
diff --git a/work/makefile.inc b/work/makefile.inc
index 257a02f..dce5675 100644
--- a/work/makefile.inc
+++ b/work/makefile.inc
@@ -17,9 +17,9 @@ init: ../rootfs.tar.xz work/busyboxinit.sh
        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 ${CHROOT_PATH}/sbin/mount.nfs ./sbin
+       -cp -p ${CHROOT_PATH}/sbin/mount.nfs ./sbin
        cp -p ${CHROOT_PATH}/sbin/switch_root ./sbin
-       cp -p ${CHROOT_PATH}/bin/busybox ./bin
+       -cp -p ${CHROOT_PATH}/bin/busybox ./bin
        cp -p ${CHROOT_PATH}/lib/ld-linux-riscv64-lp64d.so.1 ./lib
        cp -p ${CHROOT_PATH}/lib/riscv64-linux-gnu/libblkid.so.1
./lib/riscv64-linux-gnu
        cp -p ${CHROOT_PATH}/lib/riscv64-linux-gnu/libcom_err.so.2
./lib/riscv64-linux-gnu
@@ -37,7 +37,7 @@ init: ../rootfs.tar.xz work/busyboxinit.sh
        cp -p ${CHROOT_PATH}/lib/riscv64-linux-gnu/libresolv.so.2
./lib/riscv64-linux-gnu
        cp -p ${CHROOT_PATH}/lib/riscv64-linux-gnu/librt.so.1
./lib/riscv64-linux-gnu
        cp -p ${CHROOT_PATH}/lib/riscv64-linux-gnu/libselinux.so.1
./lib/riscv64-linux-gnu
-       cp -p ${CHROOT_PATH}/lib/riscv64-linux-gnu/libtirpc.so.1
./lib/riscv64-linux-gnu
+       -cp -p ${CHROOT_PATH}/lib/riscv64-linux-gnu/libtirpc.so.1
./lib/riscv64-linux-gnu
        cp -p ${CHROOT_PATH}/lib/riscv64-linux-gnu/libuuid.so.1
./lib/riscv64-linux-gnu
        cp work/busyboxinit.sh init
        chmod +x init

The files were mount.nfs, busybox, libtirp.so.1

Apologies for the continuous complaints, just sharing the hiccups as I try
various commands in the documentation.

Regards,
Dinesh


On Fri, Dec 28, 2018 at 2:14 PM Dr Jonathan Kimmitt <jrrk2 at cam.ac.uk> wrote:

> As discussed in the archives of this mailing list and in the lowrisc
> documentation,
>
> The Debian build procedure can occasionally fail because it is based on
> the unstable distribution.
>
> In this case the workaround is to use the pre-build archives from
> github, as discussed in the
>
> quickstart page. Meanwhile I will attempt to reproduce your result and
> see if omitting some optional
>
> package or changing the instructions will solve the problem.
>
> pre-build rootfs is here:
>
> https://github.com/lowRISC/lowrisc-chip/releases/download/v0.6-rc4/rootfs.tar.xz
>
> On 28/12/2018 07:43, Dinesh Thirumurthy wrote:
> > Hi,
> >
> > Complete outpiut of 'make cpio' is at
> > https://github.com/hakrdinesh/e/blob/master/nexys/cpio.out
> >
> > Thank you.
> >
> > Regards,
> > Dinesh
> >
> >
> >
> >
> > On Fri, Dec 28, 2018 at 12:38 PM Dinesh Thirumurthy <
> > dinesh.thirumurthy at gmail.com> wrote:
> >
> >> Hi,
> >>
> >> Following instructions at
> >> https://www.lowrisc.org/docs/download-install-debian/
> >> On running make cpio
> >> I get this error:
> >>
> >> 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
> >> dt at marina:~/l/lowrisc-chip/debian-riscv64$ ls
> >> work/debian-riscv64-chroot/sbin/
> >> agetty      cfdisk      e2image      fsck         fsfreeze       isosize
> >> mkfs         mkfs.minix        raw                start-stop-daemon.REAL
> >> tune2fs
> >> badblocks   chcpu       e2label      fsck.cramfs  fstab-decode
>  killall5
> >> mkfs.bfs     mkhomedir_helper  resize2fs          sulogin
> >> unix_chkpwd
> >> blkdiscard  ctrlaltdel  e2mmpstatus  fsck.ext2    fstrim
>  ldconfig
> >> mkfs.cramfs  mkswap            runuser            swaplabel
> >> unix_update
> >> blkid       debugfs     e2undo       fsck.ext3    getty          logsave
> >> mkfs.ext2    pam_tally         sfdisk             swapoff
> >> wipefs
> >> blkzone     dumpe2fs    fdisk        fsck.ext4    hwclock        losetup
> >> mkfs.ext3    pam_tally2        shadowconfig       swapon
> >> zramctl
> >> blockdev    e2fsck      findfs       fsck.minix   installkernel  mke2fs
> >> mkfs.ext4    pivot_root        start-stop-daemon  switch_root
> >> dt at marina:~/l/lowrisc-chip/debian-riscv64$
> >>
> >> How do I fix/overcome this?
> >>
> >> Thanks.
> >>
> >> Regards,
> >> Dinesh
> >>
> >>
>


More information about the lowrisc-dev mailing list