Tool/software:
Hello,
there has been found an issue in the build process of the SDK, which could be traced back to
an error in bin/setup-targetfs-nfs.sh. I just wanna share that here, as others might be affected as well.
Thanks for Viktor Gotwig for locating the problem in the end!
When executing make linux_install normally, it is failing with the following error messages:
=======================================
Installing the Linux Kernel DTBs
=======================================
The extracted target filesystem directory doesn't exist.
Please run setup.sh in the SDK's root directory and then try again.
make: *** [makerules/Makefile_linux-dtbs:24: linux-dtbs_install] Error 1
Re-running setup.sh does not solve that problem, of course.
Apparently, the variable DESTDIR is not set up properly.
One work-around is to explicitely specify DESTDIR while calling make. I.e. by executing
DESTDIR=<Path to the SDK>/targetNFS make linux_install
The actual issue is in one of the setup scripts where some makefiles are being
created/edited - in particular bin/setup-targetfs-nfs.sh
There, in lines 153 and 156 are two calls of sed dealing with EXEC_DIR and DESTDIR.
In both cases these variables are trailed with a space (totally four times - at each occurence of
EXEC_DIR and DESTDIR), which is causing the troubles. Here is also a patch that is fixing the issue:
--- bin/setup-targetfs-nfs.sh 2024-06-20 16:14:54.505952679 +0000
+++ bin/setup-targetfs-nfs.new.sh 2024-06-20 16:16:27.710321122 +0000
@@ -150,10 +150,10 @@
echo
read -p "Press return to continue" REPLY
-sed -i "s=EXEC_DIR ?\=.*$=EXEC_DIR ?\=$dst/home/root/$platform=g" $cwd/../Rules.make
+sed -i "s=EXEC_DIR?\=.*$=EXEC_DIR?\=$dst/home/root/$platform=g" $cwd/../Rules.make
check_status
-sed -i "s=DESTDIR ?\=.*$=DESTDIR ?\=$dst=g" $cwd/../Rules.make
+sed -i "s=DESTDIR?\=.*$=DESTDIR?\=$dst=g" $cwd/../Rules.make
check_status
echo "Rules.make edited successfully..
Mario