Unable to build U-Boot

Diskussionen um Bootloader, Kernel, Busybox
Antworten
zulok
Neugieriger
Neugieriger
Beiträge: 7
Registriert: Mittwoch 12. Juni 2013, 11:56

Unable to build U-Boot

Beitrag von zulok »

Hello

I am a beginner trying to compile Tuxbox for Dreambox following Bengt Mårtensson's instructions (http://bengt-martensson.de/dbox2/newmak ... cture.html).
I have been able to compile yadd and flash enigma images but I cannot build u-boot (make serversupport) to test YADD build. These are the messages I think could give a hint of the error.
[david@localhost cdk]$ make serversupport
m4 --define=uboottype=flasher \
config/u-boot.dbox2.h.m4 > /home/david/tuxbox-cvs/boot/u-boot-config/u-boot.config
make u-boot-2012.04/u-boot.stripped
make[1]: se ingresa al directorio `/home/david/tuxbox-cvs/cdk'
( rm -rf u-boot-2012.04 || /bin/true ) && bunzip2 -cd /home/david/tuxbox-cvs/cdk/Archive/u-boot-2012.04.tar.bz2 | TAPE=- tar -x && ((for f1 in config.guess config.sub; do (for f2 in `find u-boot-2012.04 -name $f1`; do (test -e $f2 && rm -f $f2 && ln -s /home/david/tuxbox-cvs/cdk/Patches/$f1 $f2 && echo "updated $f2") "done) "done) || /bin/true)
cp -pR /home/david/tuxbox-cvs/boot/u-boot-tuxbox/* u-boot-2012.04

cd u-boot-2012.04 && patch -p1 -E -i ../Patches/u-boot-2011.06.diff

patching file arch/powerpc/cpu/mpc8xx/cpu_init.c
patching file arch/powerpc/cpu/mpc8xx/start.S
Hunk #1 succeeded at 81 (offset -5 lines).
patching file arch/powerpc/lib/board.c
Hunk #1 succeeded at 850 (offset 1 line).
patching file board/dbox2/config.mk
patching file board/dbox2/Makefile

patching file board/dbox2/lcd.c

patching file board/dbox2/u-boot.lds
patching file boards.cfg
Hunk #1 succeeded at 787 (offset 164 lines).
....

....
make[3]: se sale del directorio `/home/david/tuxbox-cvs/cdk/u-boot-2012.04/net'
make -C post/
make[3]: se ingresa al directorio `/home/david/tuxbox-cvs/cdk/u-boot-2012.04/post'
cat /dev/null >.depend
make[3]: se sale del directorio `/home/david/tuxbox-cvs/cdk/u-boot-2012.04/post'
make[3]: se ingresa al directorio `/home/david/tuxbox-cvs/cdk/u-boot-2012.04/post'
rm -f libpost.o; powerpc-tuxbox-linux-gnu-ar rcs libpost.o
make[3]: se sale del directorio `/home/david/tuxbox-cvs/cdk/u-boot-2012.04/post'
make -C board/dbox2/
make[3]: se ingresa al directorio `/home/david/tuxbox-cvs/cdk/u-boot-2012.04/board/dbox2'
make libdbox2.o
make[4]: se ingresa al directorio `/home/david/tuxbox-cvs/cdk/u-boot-2012.04/board/dbox2'
powerpc-tuxbox-linux-gnu-gcc -g -Os -fpic -mrelocatable -ffunction-sections -fdata-sections -meabi -D__KERNEL__ -DCONFIG_SYS_TEXT_BASE=0x40000 -I/home/david/tuxbox-cvs/cdk/u-boot-2012.04/include -fno-builtin -ffreestanding -nostdinc -isystem /home/david/tuxbox-cvs/root/cdk/lib/gcc/powerpc-tuxbox-linux-gnu/3.4.6/include -pipe -DCONFIG_PPC -D__powerpc__ -DCONFIG_8xx -ffixed-r2 -mstring -mcpu=860 -msoft-float -Wall -Wstrict-prototypes -Wno-format-nonliteral -Wno-format-security -o dbox2.o dbox2.c -c
powerpc-tuxbox-linux-gnu-gcc -g -Os -fpic -mrelocatable -ffunction-sections -fdata-sections -meabi -D__KERNEL__ -DCONFIG_SYS_TEXT_BASE=0x40000 -I/home/david/tuxbox-cvs/cdk/u-boot-2012.04/include -fno-builtin -ffreestanding -nostdinc -isystem /home/david/tuxbox-cvs/root/cdk/lib/gcc/powerpc-tuxbox-linux-gnu/3.4.6/include -pipe -DCONFIG_PPC -D__powerpc__ -DCONFIG_8xx -ffixed-r2 -mstring -mcpu=860 -msoft-float -Wall -Wstrict-prototypes -Wno-format-nonliteral -Wno-format-security -o devices.o devices.c -c
powerpc-tuxbox-linux-gnu-gcc -g -Os -fpic -mrelocatable -ffunction-sections -fdata-sections -meabi -D__KERNEL__ -DCONFIG_SYS_TEXT_BASE=0x40000 -I/home/david/tuxbox-cvs/cdk/u-boot-2012.04/include -fno-builtin -ffreestanding -nostdinc -isystem /home/david/tuxbox-cvs/root/cdk/lib/gcc/powerpc-tuxbox-linux-gnu/3.4.6/include -pipe -DCONFIG_PPC -D__powerpc__ -DCONFIG_8xx -ffixed-r2 -mstring -mcpu=860 -msoft-float -Wall -Wstrict-prototypes -Wno-format-nonliteral -Wno-format-security -o flash.o flash.c -c
flash.c: In function `flash_erase':
flash.c:529: warning: long unsigned int format, pointer arg (arg 3)

powerpc-tuxbox-linux-gnu-gcc -g -Os -fpic -mrelocatable -ffunction-sections -fdata-sections -meabi -D__KERNEL__ -DCONFIG_SYS_TEXT_BASE=0x40000 -I/home/david/tuxbox-cvs/cdk/u-boot-2012.04/include -fno-builtin -ffreestanding -nostdinc -isystem /home/david/tuxbox-cvs/root/cdk/lib/gcc/powerpc-tuxbox-linux-gnu/3.4.6/include -pipe -DCONFIG_PPC -D__powerpc__ -DCONFIG_8xx -ffixed-r2 -mstring -mcpu=860 -msoft-float -Wall -Wstrict-prototypes -Wno-format-nonliteral -Wno-format-security -o lcd.o lcd.c -c

lcd.c: In function `lcd_load':
lcd.c:363: warning: implicit declaration of function `netboot_update_env'

lcd.c:366: error: `TFTP' undeclared (first use in this function)

lcd.c:366: error: (Each undeclared identifier is reported only once
lcd.c:366: error: for each function it appears in.)
make[4]: *** [lcd.o] Error 1
make[4]: se sale del directorio `/home/david/tuxbox-cvs/cdk/u-boot-2012.04/board/dbox2/lcd.c'
make[3]: *** [all] Error 2
make[3]: se sale del directorio `/home/david/tuxbox-cvs/cdk/u-boot-2012.04/board/dbox2'
make[2]: *** [board/dbox2/libdbox2.o] Error 2
make[2]: se sale del directorio `/home/david/tuxbox-cvs/cdk/u-boot-2012.04'
make[1]: *** [u-boot-2012.04/u-boot.stripped] Error 2
make[1]: se sale del directorio `/home/david/tuxbox-cvs/cdk'
make: *** [/home/david/tuxbox-cvs/root/tftpboot/dboxflasher] Error 2

[david@localhost cdk]$
I have tried to figure out wether it is a problem with the patching of lcd.c but I guess it is not. I am using u-boot-2012.04.tar.bz2 with u-boot-2011.06.diff

thanks for any help

David
zulok
Neugieriger
Neugieriger
Beiträge: 7
Registriert: Mittwoch 12. Juni 2013, 11:56

Re: Unable to build U-Boot

Beitrag von zulok »

Hello

I have found that line 366 of lcd.c should be replaced as:
- size = NetLoop (TFTP);
+ size = NetLoop (TFTPGET);

and line 86 of fb.c as well.

I have modified u-boot-2011.06.diff so that it becomes automatic.

....


--- u-boot-2011.12.org.patched/board/dbox2/lcd.c 2011-05-19 21:54:36.000000000 +0200
+++ u-boot-2011.12/board/dbox2/lcd.c 2012-01-22 12:02:38.000000000 +0100
@@ -245,7 +245,7 @@
iop->iop_pddat = LCD_WRITE_DATA | (data & 0xFF) | LCD_CLK_LO;
}

-static void lcd_clear (void)
+static void dbox_lcd_clear (void)
{
int i, j;

@@ -329,7 +329,7 @@
iop = &immr->im_ioport;

lcd_reset_init ();
- lcd_clear ();
+ dbox_lcd_clear ();

printf ("LCD: ready\n");

@@ -366,1 +366,1 @@
- size = NetLoop (TFTP);
+ size = NetLoop (TFTPGET);
--- u-boot-2011.12.org.patched/board/dbox2/fb.c 2011-05-19 21:54:36.000000000 +0200
+++ u-boot-2011.12/board/dbox2/fb.c 2012-01-22 12:02:38.000000000 +0100
@@ -86,1 +86,1 @@
- size = NetLoop (TFTP);
+ size = NetLoop (TFTPGET);


diff -uNr u-boot-2011.06.org//board/dbox2/u-boot.lds u-boot-2011.06/board/dbox2/u-boot.lds
--- u-boot-2011.06.org//board/dbox2/u-boot.lds 2010-08-11 22:33:36.000000000 +0200
+++ u-boot-2011.06/board/dbox2/u-boot.lds 2011-06-30 18:39:45.000000000 +0200

....
And it works

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

Re: Unable to build U-Boot

Beitrag von seife »

Yadd on dreambox works differently than yadd on dbox.

You'll probably need to set something on the bootloader to be able to boot the kernel via tftp and pass the options to the kernel to use nfs root.

I have done this on dm500 but it was a real PITA due to its crappy bootloader, so I only used it to recover the box after flashing a bad imaga :-)

I don't know about other dreamboxes, so you'll probably need to do other things.

Trying to boot a U-Boot build for d-box2 on any dreambox will not get you very far.
zulok
Neugieriger
Neugieriger
Beiträge: 7
Registriert: Mittwoch 12. Juni 2013, 11:56

Re: Unable to build U-Boot

Beitrag von zulok »

Thank you very much Seife. Actually i can build images but I wanted to test with a YADD before flashing so not to damange anything. Have you testes YADD with Dreamboxes?
seife
Developer
Beiträge: 4189
Registriert: Sonntag 2. November 2003, 12:36

Re: Unable to build U-Boot

Beitrag von seife »

Yes, but it has been years ago.

Basically, you export the rootfs via NFS, then tftpboot the kernel with apropriate parameters to boot from the NFS root.

If you don't know what to do from my description above, you'd better not try it :-)
zulok
Neugieriger
Neugieriger
Beiträge: 7
Registriert: Mittwoch 12. Juni 2013, 11:56

Re: Unable to build U-Boot

Beitrag von zulok »

Thanks Seife

Well, I do not know exactly how to do (parameters, end so on) it but I understand what you are telling me. Anyway, there is only ona way to learn...

David
Antworten