Probleme mit root-neutrino-local.sh

Kreuzuebersetzer, Diskussion über Änderungen im Tuxbox-CDK und Tuxbox-CVS
olli96
Interessierter
Interessierter
Beiträge: 24
Registriert: Donnerstag 10. September 2009, 08:17

Probleme mit root-neutrino-local.sh

Beitrag von olli96 »

Ich bin da gerade auf ein Problem gestoßen :gruebel:
Zum Kompilieren von aformat in einem jffs2-Image, habe das Script root-neutrino-local.sh angelegt.

Code: Alles auswählen

#set -x

flashprefix=$1
buildprefix=$2

echo "============================================"
echo "START LOCAL: $0"
echo "flashprefix=$1 and buildprefix=$2"
echo "============================================"

make flash-aformat

echo "============================================"
echo "END LOCAL: $0"
echo "============================================"
Jetzt wird zwar aformat erstellt, nur der ganze Rest (tuxinfo, busybox usw.) nicht mehr

Code: Alles auswählen

[ -x /home/user/my_image/imagefiles/root-neutrino-local.sh ] && KERNEL=2.4 KERNELVERSION=2.4.37.7-dbox2 LIBC=glibc BOXTYPE=dbox2 BOXMODEL= /home/user/my_image/imagefiles/root-neutrino-local.sh /home/user/my_image/image/cdkflash /home/user/my_image/compile/cdk || true
============================================
START LOCAL: /home/user/my_image/imagefiles/root-neutrino-local.sh
flashprefix=/home/user/my_image/image/cdkflash and buildprefix=/home/user/my_image/compile/cdk
============================================
make[1]: Entering directory `/home/user/my_image/compile/cdk'
make -C /home/user/my_image/compile/apps/tuxbox/tools/aformat install prefix=/home/user/my_image/image/cdkflash/root
make[2]: Entering directory `/home/user/my_image/compile/apps/tuxbox/tools/aformat'
powerpc-tuxbox-linux-gnu-g++ -DHAVE_CONFIG_H -I. -I.. -I../include -I/home/user/my_image/image/cdkroot/include/tuxbox -I/home/user/my_image/image/cdkroot/include/tuxbox -I/home/user/my_image/image/cdkroot/include/tuxbox/connection    -I/home/user/my_image/compile/driver/include -I/home/user/my_image/compile/driver/dvb/include  -Wall -pipe -Os -MT aformat.o -MD -MP -MF .deps/aformat.Tpo -c -o aformat.o aformat.cpp
mv -f .deps/aformat.Tpo .deps/aformat.Po
powerpc-tuxbox-linux-gnu-g++  -Wall -pipe -Os  -Wl,-O1 -o aformat aformat.o -L/home/user/my_image/image/cdkroot/lib -lzapitclient -lcontroldclient -L/home/user/my_image/image/cdkroot/lib -ltuxbox-configfile -L/home/user/my_image/image/cdkroot/lib -ltuxbox-connection   
make[3]: Entering directory `/home/user/my_image/compile/apps/tuxbox/tools/aformat'
test -z "/home/user/my_image/image/cdkflash/root/bin" || /bin/mkdir -p "/home/user/my_image/image/cdkflash/root/bin"
  /usr/bin/install -c aformat '/home/user/my_image/image/cdkflash/root/bin'
test -z "/home/user/my_image/image/cdkflash/root/var/tuxbox/config" || /bin/mkdir -p "/home/user/my_image/image/cdkflash/root/var/tuxbox/config"
 /usr/bin/install -c -m 644 aformat.conf '/home/user/my_image/image/cdkflash/root/var/tuxbox/config'
make[3]: Leaving directory `/home/user/my_image/compile/apps/tuxbox/tools/aformat'
make[2]: Leaving directory `/home/user/my_image/compile/apps/tuxbox/tools/aformat'
touch /home/user/my_image/image/cdkflash/root
make[1]: Leaving directory `/home/user/my_image/compile/cdk'
============================================
END LOCAL: /home/user/my_image/imagefiles/root-neutrino-local.sh
============================================
rm -rf /home/user/my_image/image/cdkflash/root-jffs2
m4 --define=rootfs=jffs2 Patches/dbox2-flash.c.m4 > linux/drivers/mtd/maps/dbox2-flash.c
m4 -Dflash -Djffs2 -Ddbox2         -Dcifs -Dnls  -Dautofs   -Dnfs    config/dbox2_kernel-2.4.config.m4 > linux-2.4.37.7/.config
make linux-2.4.37.7/arch/ppc/boot/images/vmlinux.gz targetprefix=/home/user/my_image/image/cdkflash/root-jffs2
make[1]: Entering directory `/home/user/my_image/compile/cdk'
make -C linux-2.4.37.7 oldconfig ARCH=ppc
make[2]: Entering directory `/home/user/my_image/compile/cdk/linux-2.4.37.7'
rm -f include/asm
Deaktiviere ich im Script aformat (#make flash-aformat), wird wieder alles komplett erstellt.

Code: Alles auswählen

[ -x /home/user/my_image/imagefiles/root-neutrino-local.sh ] && KERNEL=2.4 KERNELVERSION=2.4.37.7-dbox2 LIBC=glibc BOXTYPE=dbox2 BOXMODEL= /home/user/my_image/imagefiles/root-neutrino-local.sh /home/user/my_image/image/cdkflash /home/user/my_image/compile/cdk || true
============================================
START LOCAL: /home/user/my_image/imagefiles/root-neutrino-local.sh
flashprefix=/home/user/my_image/image/cdkflash and buildprefix=/home/user/my_image/compile/cdk
============================================
============================================
END LOCAL: /home/user/my_image/imagefiles/root-neutrino-local.sh
============================================
rm -rf /home/user/my_image/image/cdkflash/root
/usr/bin/install -c -d /home/user/my_image/image/cdkflash/root/bin
/usr/bin/install -c -d /home/user/my_image/image/cdkflash/root/dev
/usr/bin/install -c -d /home/user/my_image/image/cdkflash/root/lib/tuxbox
/usr/bin/install -c -d /home/user/my_image/image/cdkflash/root/mnt
/usr/bin/install -c -d /home/user/my_image/image/cdkflash/root/proc
/usr/bin/install -c -d /home/user/my_image/image/cdkflash/root/sbin
/usr/bin/install -c -d /home/user/my_image/image/cdkflash/root/share/tuxbox
/usr/bin/install -c -d /home/user/my_image/image/cdkflash/root/share/fonts
/usr/bin/install -c -d /home/user/my_image/image/cdkflash/root/var/tuxbox/config
/usr/bin/install -c -d /home/user/my_image/image/cdkflash/root/var/etc
/usr/bin/install -c -d /home/user/my_image/image/cdkflash/root/tmp
/usr/bin/install -c -d /home/user/my_image/image/cdkflash/root/etc/init.d
/usr/bin/install -c -d /home/user/my_image/image/cdkflash/root/root
ln -s /tmp /home/user/my_image/image/cdkflash/root/var/run
ln -s /tmp /home/user/my_image/image/cdkflash/root/var/tmp
make /home/user/my_image/image/cdkflash/root/etc/update.urls
make[1]: Entering directory `/home/user/my_image/compile/cdk'
if [ ! -z  ] ; then \
		echo cramfs.list 	>> /home/user/my_image/image/cdkflash/root/etc/update.urls; \
		echo squashfs.list 	>> /home/user/my_image/image/cdkflash/root/etc/update.urls; \
		echo img.list 	>> /home/user/my_image/image/cdkflash/root/etc/update.urls; \
	fi
touch /home/user/my_image/image/cdkflash/root
[ -x /home/user/my_image/imagefiles/update.urls-local.sh ] && KERNEL=2.4 KERNELVERSION=2.4.37.7-dbox2 LIBC=glibc BOXTYPE=dbox2 BOXMODEL= /home/user/my_image/imagefiles/update.urls-local.sh /home/user/my_image/image/cdkflash /home/user/my_image/compile/cdk || true
make[1]: Leaving directory `/home/user/my_image/compile/cdk'
make flash-tuxinfo
Eigentlich sollten die make targets aus den customization scripts doch nur zusätzlich erstellt werden.
Liegt das Problem bei mir?

MfG Olli
seife
Developer
Beiträge: 4189
Registriert: Sonntag 2. November 2003, 12:36

Re: Probleme mit root-neutrino-local.sh

Beitrag von seife »

Ja. Customization-skripte sind für customization, also um zusätzliche Files reinzukopieren oder unerwünschte zu löschen, nicth um make-Targets aufzurufen. Das sollte vorher schon geschehen sein.

Zumindest wenn ich das richtig verstehe.
rhabarber1848
CDK-Experte
Beiträge: 4335
Registriert: Donnerstag 3. April 2008, 14:05

Re: Probleme mit root-neutrino-local.sh

Beitrag von rhabarber1848 »

olli96 hat geschrieben:root-neutrino-local.sh
make flash-* targets nutze ich in root-local.sh.
Barf
Developer
Beiträge: 1475
Registriert: Dienstag 4. Februar 2003, 22:02

Re: Probleme mit root-neutrino-local.sh

Beitrag von Barf »

olli96 hat geschrieben: Eigentlich sollten die make targets aus den customization scripts doch nur zusätzlich erstellt werden.
Liegt das Problem bei mir?
Es scheint so, dass make meint dass das customizingcommando ist "fehlgeschlagen" (exit status != 0) und deswegen (dann korrekt) nicht weitermacht. Probiere mit z.B.

make aflash || true

in dein *-local.sh.
seife hat geschrieben:Ja. Customization-skripte sind für customization, also um zusätzliche Files reinzukopieren oder unerwünschte zu löschen, nicth um make-Targets aufzurufen. Das sollte vorher schon geschehen sein.

Zumindest wenn ich das richtig verstehe.
Das hast du selbst erfunden, seife. Make-aufrufe ist nicht, und war niemals, "bad practice" in customizations. Siehe z.B. hier. Falls du andere Meinung bist (und bessere Alternative hast) höre ich gerne deine Argumente an.
seife
Developer
Beiträge: 4189
Registriert: Sonntag 2. November 2003, 12:36

Re: Probleme mit root-neutrino-local.sh

Beitrag von seife »

Das Problem ist IMHO, dass die (sowieso fragilen) dependencies durch aufrufen von make-Targets im customizing-Skript leicht durcheinanderkommen, was dann zu solchen schwer zu debuggenden Problemen führt.

Deswegen habe ich das immer vermieden und bin gut damit gefahren.