trying to setup my build my own image.
P: Running debootstrap second stage under QEMU
chroot: failed to run command ‘/usr/bin/env’: Exec format error
Pretty much followed the ‘docker based’ instructions from here:
https://github.com/radxa/rockchip-bsp
and replaced ‘rockpi4b’ with ‘rockpis’
(see instruction rockpis here: https://wiki.radxa.com/RockpiS/dev/Debian)
after running the docker, I am able to build successfully u-boot and the kernel for the rk3308.
./build/mk-uboot.sh rockpis
./build/mk-kernel.sh rockpis
Building the image gets me an error:
export ARCH=arm64
cd rootfs
sudo apt-get install binfmt-support qemu-user-static cpio gdisk
sudo dpkg -i ubuntu-build-service/packages/*
sudo apt-get install -f
RELEASE=stretch TARGET=base ARCH=$ARCH ./mk-base-debian.sh
…
I: Extracting libsmartcols1…
I: Extracting libuuid1…
I: Extracting mount…
I: Extracting util-linux…
I: Extracting liblzma5…
I: Extracting zlib1g…
P: Running debootstrap second stage under QEMU
chroot: failed to run command ‘/usr/bin/env’: Exec format error
P: Begin unmounting filesystems…
P: Saving caches…
if [ -f binary-tar.tar.gz ]; then
tar -jcf linaro-stretch-alip-date +%Y%m%d
-1.config.tar.bz2 auto/ config/ configure;
sudo mv binary.contents linaro-stretch-alip-date +%Y%m%d
-1.contents;
sudo mv chroot.packages.live linaro-stretch-alip-date +%Y%m%d
-1.packages;
sudo mv binary-tar.tar.gz linaro-stretch-alip-date +%Y%m%d
-1.tar.gz;
md5sum linaro-stretch-alip-date +%Y%m%d
-1.build-log.txt linaro-stretch-alip-date +%Y%m%d
-1.config.tar.bz2 linaro-stretch-alip-date +%Y%m%d
-1.contents linaro-stretch-alip-date +%Y%m%d
-1.packages linaro-stretch-alip-date +%Y%m%d
-1.tar.gz > linaro-stretch-alip-date +%Y%m%d
-1.md5sums.txt;
sha1sum linaro-stretch-alip-date +%Y%m%d
-1.build-log.txt linaro-stretch-alip-date +%Y%m%d
-1.config.tar.bz2 linaro-stretch-alip-date +%Y%m%d
-1.contents linaro-stretch-alip-date +%Y%m%d
-1.packages linaro-stretch-alip-date +%Y%m%d
-1.tar.gz > linaro-stretch-alip-date +%Y%m%d
-1.sha1sums.txt;
fi
Failed to run livebuild, please check your network connection.
-------eoq----------------------
Does any body know a fix for this?
The error msg is not telling me much?
any package missing that needs to be installed?
PS: I tried building a rockpi4 image and the same error happens. so it does not seem to be rockpis specific.