latest (1.3.1) doesn't compile: files missing
There are two missing files from the distribution that prevents uboot from compiling.
stddef.h is included by a few different things, but can be a blank file.
stdarg.h is included by a couple of things, and can be a trivial implementation (attached).
These are both host includes, and likely shouldn't be included at all in the boot loader code proper.
This is when building the MPC8548CDS config.
I also get link errors on this out of the box:
cd /pe/imp/u-boot-1.3.1 && powerpc-freebsd-ld -Bstatic -T /pe/imp/u-boot-1.3.1/board/cds/mpc8548cds/u-boot.lds -Ttext 0xfff80000 -n $UNDEF_SYM cpu/mpc85xx/start.o cpu/mpc85xx/resetvec.o \
--start-group lib_generic/libgeneric.a board/cds/mpc8548cds/libmpc8548cds.a cpu/mpc85xx/libmpc85xx.a lib_ppc/libppc.a fs/cramfs/libcramfs.a fs/fat/libfat.a fs/fdos/libfdos.a fs/jffs2/libjffs2.a fs/reiserfs/libreiserfs.a fs/ext2/libext2fs.a net/libnet.a disk/libdisk.a drivers/bios_emulator/libatibiosemu.a drivers/block/libblock.a drivers/hwmon/libhwmon.a drivers/i2c/libi2c.a drivers/input/libinput.a drivers/misc/libmisc.a drivers/mtd/libmtd.a drivers/mtd/nand/libnand.a drivers/mtd/nand_legacy/libnand_legacy.a drivers/mtd/onenand/libonenand.a drivers/net/libnet.a drivers/net/sk98lin/libsk98lin.a drivers/pci/libpci.a drivers/pcmcia/libpcmcia.a drivers/qe/qe.a drivers/rtc/librtc.a drivers/serial/libserial.a drivers/usb/libusb.a drivers/video/libvideo.a post/libpost.a post/drivers/libpostdrivers.a post/lib_ppc/libpostppc.a post/lib_ppc/fpu/libpostppcfpu.a common/libcommon.a libfdt/libfdt.a --end-group -L /usr/powerpc-freebsd/usr/lib -lgcc \
-Map u-boot.map -o u-bootcpu/mpc85xx/resetvec.o(.debug_info+0x14): relocation truncated to fit: R_PPC_ADDR32 .resetvec+4 common/libcommon.a(env_flash.o)(.text+0xc4): In function `saveenv':
/pe/imp/u-boot-1.3.1/common/env_flash.c:312: undefined reference to flash_sect_protect' common/libcommon.a(env_flash.o)(.text+0xe0):/pe/imp/u-boot-1.3.1/common/env_flash.c:316: undefined reference to flash_sect_erase' common/libcommon.a(env_flash.o)(.text+0x130):/pe/imp/u-boot-1.3.1/common/env_flash.c:329: undefined reference to `flash_sect_protect'
Are these to be expected with binutils 2.15 and gcc 4.2.1?
Warner
Quoted 2 lines · In message <[email protected]> you wrote:
There are two missing files from the distribution that prevents uboot from compiling.
What sort of toolchain are you using?
Quoted 6 lines
stddef.his included by a few different things, but can be a blank file.
stdarg.his included by a couple of things, and can be a trivial implementation (attached).
Quoted 6 lines
These are both host includes, and likely shouldn't be included at all in the boot loader code proper.
This is when building the MPC8548CDS config.
I also get link errors on this out of the box:
It seems you have a toolchain issue. This is not a problem with U-Boot code.
Best regards,
Wolfgang Denk
Signature · 5 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de There is an order of things in this universe. -- Apollo, "Who Mourns for Adonais?" stardate 3468.1
In message: <[email protected]>
Wolfgang Denk <[email protected]> writes:
: In message <[email protected]> you wrote:
: > There are two missing files from the distribution that prevents uboot : > from compiling.
:
: What sort of toolchain are you using?
binutils 2.15 and gcc 4.2.1. The problem turned out to be the
combination: gcc 4.2.1 produced code that binutils couldn't assemble properly. That was what was causing the relocation error.
: > stddef.h is included by a few different things, but can be a blank : > file.
: >
: > stdarg.h is included by a couple of things, and can be a trivial : > implementation (attached).
: >
: > These are both host includes, and likely shouldn't be included at all : > in the boot loader code proper.
: >
: > This is when building the MPC8548CDS config.
: >
: > I also get link errors on this out of the box:
:
: It seems you have a toolchain issue. This is not a problem with U-Boot : code.
The two include files aren't a toolchain issue. They can't be because uboot's makefile has said not to include anything from the standard include files. These files aren't included with u-boot.
Warner
Quoted 2 lines · In message <[email protected]> you wrote:
The two include files aren't a toolchain issue. They can't be because
They are - see previous message.
Quoted 2 lines
uboot's makefile has said not to include anything from the standard include files. These files aren't included with u-boot.
stddef.h is included (as include/linux/stddef.h); only host files in tools/ reference host include files.
And stdarg.h has to be provided by your compiler.
Best regards,
Wolfgang Denk
Signature · 6 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de Conceptual integrity in turn dictates that the design must proceed from one mind, or from a very small number of agreeing resonant minds. - Frederick Brooks Jr., "The Mythical Man Month"
I think I should be a bit more explicit:
Quoted 3 lines · In message <[email protected]> I wrote:
Quoted 3 lines
stddef.his included by a few different things, but can be a blank file.
U-Boot already has a stddef.h (include/linux/stddef.h) which gets used for all U-Boot related compiles.
Quoted 2 lines
Quoted 2 lines
stdarg.his included by a couple of things, and can be a trivial implementation (attached).
stdarg.h is a compiler provided file and thus has to be provided by your toolchain.
As mentioned before, I don't think that any changes to U-Boot code are necessary.
Best regards,
Wolfgang Denk
Signature · 5 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de Too much of anything, even love, isn't necessarily a good thing. -- Kirk, "The Trouble with Tribbles", stardate 4525.6