PDA

View Full Version : Issue build image for Radxa Zero eMMC version



Mad_Donald
2022-02-07, 18:17
I try to build my own Kali image for Radxa Zero eMMC version and i get issue in build process
I?m tryed to following basic steps from this documentation

https://www.kali.org/docs/development/live-build-a-custom-kali-iso/

mainly this section:
Non-Kali Debian-Based Environment

Setting Up The build-script Non-Kali Debian-Based System

of course, i know, that there are steps primarly for live-build ?
but for command:

git clone https://gitlab.com/kalilinux/build-scripts/live-build-config.git
i executed these commands:

git clone https://gitlab.com/kalilinux/build-scripts/kali-arm.git
cd ./kali-arm
git reset --hard ef8ba105ce3a5101374168685578c36fb20db170
./common.d/build_deps.sh
./radxa-zero-emmc.sh

? and the result is
I: Extracting tar...
I: Extracting tzdata...
I: Extracting util-linux...
I: Extracting zlib1g...
✅ Load common file: eatmydata
enabling eatmydata ...
systemd-nspawn dpkg-divert --divert /usr/bin/dpkg-eatmydata --rename --add /usr/bin/dpkg
Adding 'local diversion of /usr/bin/dpkg to /usr/bin/dpkg-eatmydata'
systemd-nspawn eatmydata /debootstrap/debootstrap --second-stage
/debootstrap/debootstrap: 21: .: cannot open /usr/share/debootstrap/functions: No such file
root@debian:/usr/local/kali-arm#
root@debian:/usr/local/kali-arm# ls -la /usr/share/debootstrap/
total 68
drwxr-xr-x 3 root root 4096 Jan 29 09:24 .
drwxr-xr-x 212 root root 12288 Jan 29 10:32 ..
-rwxr-xr-x 1 root root 46898 Jan 9 2019 functions
drwxr-xr-x 2 root root 4096 Jan 29 09:52 scripts
root@debian:/usr/local/kali-arm#

Then i understanded, that in build process was chrooted into /usr/local/kali-arm/base/radxa-zero-emmc-arm64-arm64/working/
and folder debootstrap does not exist in this path


root@debian:/usr/local/kali-arm# ls -la /usr/local/kali-arm/base/radxa-zero-emmc-arm64-arm64/working/usr/share/debootstrap
ls: cannot access '/usr/local/kali-arm/base/radxa-zero-emmc-arm64-arm64/working/usr/share/debootstrap': No such file or directory
root@debian:/usr/local/kali-arm#



and i finded file "functions" only in this path:


root@debian:/usr/local/kali-arm# ls -la /usr/local/kali-arm/base/radxa-zero-emmc-arm64-arm64/working/debootstrap/functions
-rwxr-xr-x 1 root root 46898 Feb 7 08:39 /usr/local/kali-arm/base/radxa-zero-emmc-arm64-arm64/working/debootstrap/functions
root@debian:/usr/local/kali-arm#



when i checked the file

root@debian:/usr/local/kali-arm# less /usr/local/kali-arm/base/radxa-zero-emmc-arm64-arm64/working/debootstrap/debootstrap


i located this section in this file


################################################## #########################


if [ -z "$DEBOOTSTRAP_DIR" ]; then
if [ -x /debootstrap/debootstrap ]; then
DEBOOTSTRAP_DIR=/debootstrap
else
DEBOOTSTRAP_DIR=/usr/share/debootstrap
fi
fi


. "$DEBOOTSTRAP_DIR/functions"
exec 4>&1



Any idea how can i build correctly this image for my radxa zero SoC ?

Ckrt
2022-03-06, 03:23
I tried your method from withing an x86 Debian , and even from an arm64 debian and got the same result.

I also tried from an x86 Kali installation and got a different error (x86 arch is different from arm64).

So I ended up using a raspberry pi 4 with a 64bit Kali image and that worked. Took 5 hours to complete but I wasn't in a hurry.

The problem though is that I got an error at boot time about a missing dtb file once I flashed the image, both in SD card and EMMC versions. I'll open a separate thread for that instead of hijacking yours.

Good luck!