2008-02-05 18:25:19     mac os x elf.h

Document created by Aaronwu Employee on Aug 5, 2013
Version 1Show Document
  • View in full screen mode

2008-02-05 18:25:19     mac os x elf.h

Mark Noonchester (NEW ZEALAND)

Message: 50717   

<a id="elf.h" name="elf.h">elf.h

 

The Linux kernel build system assumes you have an <code>elf.h</code> header provided by the native tools. Since <acronym title="Operating System">OS</acronym> X does not use the ELF format, you will need to provide your own. You should be able to simply copy the <code>elf.h</code> header from the uClibc directory (in the svn toolchain project) to <code>/usr/local/include/</code>.

 

sudo cp /Volumes/Work_d/blackfin-sources/toolchain/uClibc/include/elf.h /usr/local/include/.

 

note this does not work

 

features.h needs to be commented out.  See attached.

 

with features.h commented out I get the following error any ideas?

 

checking how to hardcode library paths into programs... immediate

checking whether stripping libraries is possible... yes

checking if libtool supports shared libraries... no

checking whether to build shared libraries... no

checking whether to build static libraries... yes

configure: creating libtool

appending configuration tag "CXX" to libtool

checking for ld used by bfin-uclinux-g++... bfin-uclinux-ld

checking if the linker (bfin-uclinux-ld) is GNU ld... yes

checking whether the bfin-uclinux-g++ linker (bfin-uclinux-ld) supports shared libraries... no

checking for bfin-uclinux-g++ option to produce PIC... -fPIC

checking if bfin-uclinux-g++ PIC flag -fPIC works... yes

checking if bfin-uclinux-g++ static flag -static works... yes

checking if bfin-uclinux-g++ supports -c -o file.o... yes

checking whether the bfin-uclinux-g++ linker (bfin-uclinux-ld) supports shared libraries... no

checking dynamic linker characteristics... no

checking how to hardcode library paths into programs... immediate

appending configuration tag "F77" to libtool

checking for ANSI C header files... (cached) yes

checking malloc.h usability... yes

checking malloc.h presence... yes

checking for malloc.h... yes

checking for stdlib.h... (cached) yes

checking for string.h... (cached) yes

checking for strings.h... (cached) yes

checking for an ANSI C-conforming const... yes

checking for size_t... yes

checking whether struct tm is in sys/time.h or time.h... time.h

checking for working strtod... no

checking for pow... no

checking for pow in -lm... yes

checking for memset... yes

checking for pow... (cached) no

checking for pow in -lm... (cached) yes

checking for zlibVersion in -lz... no

configure: error: zlib not installed

make[3]: *** [build-libpng-1.2.24/Makefile] Error 1

make[2]: *** [libpng] Error 2

make[1]: *** [all] Error 2

make: *** [subdirs] Error 1

<a id="using_a_serial_port" name="using_a_serial_port">

 

elf.h

QuoteReplyEditDelete

 

 

2008-02-05 18:51:11     Re: mac os x elf.h

Mark Noonchester (NEW ZEALAND)

Message: 50718    using make -k

 

it seems the zlib error is a checking error not a real error.

 

see attached

 

nooney:/Volumes/Work_d/blackfin-sources/uclinux-dist$ make -k

make ARCH=blackfin   CROSS_COMPILE=bfin-uclinux- -j1 -C linux-2.6.x  || exit 1

  CHK     include/linux/version.h

  CHK     include/linux/utsrelease.h

  CALL    scripts/checksyscalls.sh

  CHK     include/linux/compile.h

  KSYM    .tmp_kallsyms1.S

  AS      .tmp_kallsyms1.o

  LD      .tmp_vmlinux2

  KSYM    .tmp_kallsyms2.S

  AS      .tmp_kallsyms2.o

  LD      vmlinux

  SYSMAP  System.map

  SYSMAP  .tmp_System.map

  MODPOST vmlinux

  OBJCOPY arch/blackfin/boot/vmlinux.bin

  GZIP    arch/blackfin/boot/vmlinux.gz

  UIMAGE  arch/blackfin/boot/vmImage

Image Name:   Linux-2.6.22.16-ADI-2008R2-pre-s

Created:      Wed Feb  6 12:38:09 2008

Image Type:   Blackfin Linux Kernel Image (gzip compressed)

Data Size:    1982953 Bytes = 1936.48 kB = 1.89 MB

Load Address: 0x00001000

Entry Point:  0x0015C000

Kernel: arch/blackfin/boot/vmImage is ready

  Building modules, stage 2.

  MODPOST 45 modules

if [ -f linux-2.6.x/vmlinux ]; then \

        ln -f linux-2.6.x/vmlinux linux-2.6.x/linux ; \

fi

. linux-2.6.x/.config; if [ "$CONFIG_MODULES" = "y" ]; then \

        [ -d linux-2.6.x/modules ] || mkdir linux-2.6.x/modules; \

        make ARCH=blackfin   CROSS_COMPILE=bfin-uclinux- -C linux-2.6.x modules; \

fi

  CHK     include/linux/version.h

  CHK     include/linux/utsrelease.h

  CALL    scripts/checksyscalls.sh

  Building modules, stage 2.

  MODPOST 45 modules

for dir in  lib user ; do [ ! -d $dir ] || make ARCH=blackfin   -C $dir || exit 1 ; done

[ -z "" ] || make -j1  || exit $?

[ -z "" ] || (cd /Volumes/Work_d/blackfin-sources/uclinux-dist/staging; chmod 755 ./usr/lib/lib*.so*; chmod 644 ./usr/lib/lib*.la ./usr/lib/lib*.a; sed -i "/^libdir=/s:=.*:='/Volumes/Work_d/blackfin-sources/uclinux-dist/staging/usr/lib':" ./usr/lib/*.la; sed -i "/^prefix=/s:=.*:='/Volumes/Work_d/blackfin-sources/uclinux-dist/staging/usr':" ./usr/lib/pkgconfig/*.pc ./usr/bin/*-config; true)

[ -z "" ] || make -j1  || exit $?

[ -z "" ] || (cd /Volumes/Work_d/blackfin-sources/uclinux-dist/staging; chmod 755 ./usr/lib/lib*.so*; chmod 644 ./usr/lib/lib*.la ./usr/lib/lib*.a; sed -i "/^libdir=/s:=.*:='/Volumes/Work_d/blackfin-sources/uclinux-dist/staging/usr/lib':" ./usr/lib/*.la; sed -i "/^prefix=/s:=.*:='/Volumes/Work_d/blackfin-sources/uclinux-dist/staging/usr':" ./usr/lib/pkgconfig/*.pc ./usr/bin/*-config; true)

[ -z "libg zlib libjpeg" ] || make -j1 libg libjpeg zlib || exit $?

[ ! -d "libg" ] || ( touch libg/.sgbuilt_lib && make -C libg ) || exit $?

for i in gtermcap ; do make -C $i || exit gtermcap ; done

#@rm -f termcap.o tparam.o

[ ! -d "libjpeg" ] || ( touch libjpeg/.sgbuilt_lib && make -C libjpeg ) || exit $?

install -d /Volumes/Work_d/blackfin-sources/uclinux-dist/staging/usr/lib

install -d /Volumes/Work_d/blackfin-sources/uclinux-dist/staging/usr/include

install -m0644 libjpeg.a /Volumes/Work_d/blackfin-sources/uclinux-dist/staging/usr/lib

install -m0644 jpeglib.h /Volumes/Work_d/blackfin-sources/uclinux-dist/staging/usr/include

install -m0644 jconfig.h /Volumes/Work_d/blackfin-sources/uclinux-dist/staging/usr/include

install -m0644 jmorecfg.h /Volumes/Work_d/blackfin-sources/uclinux-dist/staging/usr/include

install -m0644 jerror.h /Volumes/Work_d/blackfin-sources/uclinux-dist/staging/usr/include

[ ! -d "zlib" ] || ( touch zlib/.sgbuilt_lib && make -C zlib ) || exit $?

install -d -m0755 /Volumes/Work_d/blackfin-sources/uclinux-dist/staging/usr/lib

install -m0644 libz.a /Volumes/Work_d/blackfin-sources/uclinux-dist/staging/usr/lib

install -d -m0755 /Volumes/Work_d/blackfin-sources/uclinux-dist/staging/usr/include

install -m0644 zconf.h zlib.h /Volumes/Work_d/blackfin-sources/uclinux-dist/staging/usr/include

[ -z "libg zlib libjpeg" ] || (cd /Volumes/Work_d/blackfin-sources/uclinux-dist/staging; chmod 755 ./usr/lib/lib*.so*; chmod 644 ./usr/lib/lib*.la ./usr/lib/lib*.a; sed -i "/^libdir=/s:=.*:='/Volumes/Work_d/blackfin-sources/uclinux-dist/staging/usr/lib':" ./usr/lib/*.la; sed -i "/^prefix=/s:=.*:='/Volumes/Work_d/blackfin-sources/uclinux-dist/staging/usr':" ./usr/lib/pkgconfig/*.pc ./usr/bin/*-config; true)

chmod: ./usr/lib/lib*.so*: No such file or directory

chmod: ./usr/lib/lib*.la: No such file or directory

sed: can't read ./usr/lib/*.la: No such file or directory

sed: can't read ./usr/lib/pkgconfig/*.pc: No such file or directory

sed: can't read ./usr/bin/*-config: No such file or directory

[ -z "libpng" ] || make -j1 libpng || exit $?

[ ! -d "libpng" ] || ( touch libpng/.sgbuilt_lib && make -C libpng ) || exit $?

find libpng-1.2.24 -type f -print0 | xargs -0 touch -r libpng-1.2.24/configure

set -e ; \

rm -rf build-libpng-1.2.24 ; \

mkdir build-libpng-1.2.24 ; \

cd build-libpng-1.2.24 ; \

../libpng-1.2.24/configure --host=bfin-uclinux --build=i386-apple-darwin8.11.1 --prefix=/usr --sysconfdir=/etc --datadir=/usr/share --mandir=/usr/share/man --infodir=/usr/share/info --localstatedir=/var/lib --disable-dependency-tracking --enable-fast-install

checking for a BSD-compatible install... /usr/bin/install -c

checking whether build environment is sane... yes

checking for gawk... gawk

checking whether make sets $(MAKE)... yes

checking for bfin-uclinux-strip... bfin-uclinux-strip

checking whether to enable maintainer-specific portions of Makefiles... no

checking for bfin-uclinux-gcc... bfin-uclinux-gcc

checking for C compiler default output file name... a.out

checking whether the C compiler works... yes

checking whether we are cross compiling... yes

checking for suffix of executables...

checking for suffix of object files... o

checking whether we are using the GNU C compiler... yes

checking whether bfin-uclinux-gcc accepts -g... yes

checking for bfin-uclinux-gcc option to accept ISO C89... none needed

checking for style of include used by make... GNU

checking dependency style of bfin-uclinux-gcc... none

checking for a sed that does not truncate output... /sw/bin/sed

checking build system type... i386-apple-darwin8.11.1

checking host system type... bfin-unknown-uclinux

checking for grep that handles long lines and -e... /usr/bin/grep

checking for egrep... /usr/bin/grep -E

checking for ld used by bfin-uclinux-gcc... bfin-uclinux-ld

checking if the linker (bfin-uclinux-ld) is GNU ld... yes

checking how to run the C preprocessor... bfin-uclinux-gcc -E

checking for bfin-uclinux-sed... /sw/bin/sed

checking for a BSD-compatible install... /usr/bin/install -c

checking whether ln -s works... yes

checking whether make sets $(MAKE)... (cached) yes

checking for bfin-uclinux-ld option to reload object files... -r

checking for BSD-compatible nm... bfin-uclinux-nm

checking how to recognize dependent libraries... unknown

checking for ANSI C header files... yes

checking for sys/types.h... yes

checking for sys/stat.h... yes

checking for stdlib.h... yes

checking for string.h... yes

checking for memory.h... yes

checking for strings.h... yes

checking for inttypes.h... yes

checking for stdint.h... yes

checking for unistd.h... yes

checking dlfcn.h usability... no

checking dlfcn.h presence... no

checking for dlfcn.h... no

checking whether we are using the GNU C++ compiler... yes

checking whether bfin-uclinux-g++ accepts -g... yes

checking dependency style of bfin-uclinux-g++... none

checking how to run the C++ preprocessor... bfin-uclinux-g++ -E

checking for bfin-uclinux-g77... no

checking for bfin-uclinux-xlf... no

checking for bfin-uclinux-f77... no

checking for bfin-uclinux-frt... no

checking for bfin-uclinux-pgf77... no

checking for bfin-uclinux-cf77... no

checking for bfin-uclinux-fort77... no

checking for bfin-uclinux-fl32... no

checking for bfin-uclinux-af77... no

checking for bfin-uclinux-xlf90... no

checking for bfin-uclinux-f90... no

checking for bfin-uclinux-pgf90... no

checking for bfin-uclinux-pghpf... no

checking for bfin-uclinux-epcf90... no

checking for bfin-uclinux-gfortran... no

checking for bfin-uclinux-g95... no

checking for bfin-uclinux-xlf95... no

checking for bfin-uclinux-f95... no

checking for bfin-uclinux-fort... no

checking for bfin-uclinux-ifort... no

checking for bfin-uclinux-ifc... no

checking for bfin-uclinux-efc... no

checking for bfin-uclinux-pgf95... no

checking for bfin-uclinux-lf95... no

checking for bfin-uclinux-ftn... no

checking for g77... no

checking for xlf... no

checking for f77... no

checking for frt... no

checking for pgf77... no

checking for cf77... no

checking for fort77... no

checking for fl32... no

checking for af77... no

checking for xlf90... no

checking for f90... no

checking for pgf90... no

checking for pghpf... no

checking for epcf90... no

checking for gfortran... no

checking for g95... no

checking for xlf95... no

checking for f95... no

checking for fort... no

checking for ifort... no

checking for ifc... no

checking for efc... no

checking for pgf95... no

checking for lf95... no

checking for ftn... no

checking whether we are using the GNU Fortran 77 compiler... no

checking whether  accepts -g... no

checking the maximum length of command line arguments... 196608

checking command to parse bfin-uclinux-nm output from bfin-uclinux-gcc object... ok

checking for objdir... .libs

checking for bfin-uclinux-ar... bfin-uclinux-ar

checking for bfin-uclinux-ranlib... bfin-uclinux-ranlib

checking for bfin-uclinux-strip... (cached) bfin-uclinux-strip

checking if bfin-uclinux-gcc supports -fno-rtti -fno-exceptions... no

checking for bfin-uclinux-gcc option to produce PIC... -fPIC

checking if bfin-uclinux-gcc PIC flag -fPIC works... yes

checking if bfin-uclinux-gcc static flag -static works... yes

checking if bfin-uclinux-gcc supports -c -o file.o... yes

checking whether the bfin-uclinux-gcc linker (bfin-uclinux-ld) supports shared libraries... yes

checking whether -lc should be explicitly linked in... no

checking dynamic linker characteristics... no

checking how to hardcode library paths into programs... immediate

checking whether stripping libraries is possible... yes

checking if libtool supports shared libraries... no

checking whether to build shared libraries... no

checking whether to build static libraries... yes

configure: creating libtool

appending configuration tag "CXX" to libtool

checking for ld used by bfin-uclinux-g++... bfin-uclinux-ld

checking if the linker (bfin-uclinux-ld) is GNU ld... yes

checking whether the bfin-uclinux-g++ linker (bfin-uclinux-ld) supports shared libraries... no

checking for bfin-uclinux-g++ option to produce PIC... -fPIC

checking if bfin-uclinux-g++ PIC flag -fPIC works... yes

checking if bfin-uclinux-g++ static flag -static works... yes

checking if bfin-uclinux-g++ supports -c -o file.o... yes

checking whether the bfin-uclinux-g++ linker (bfin-uclinux-ld) supports shared libraries... no

checking dynamic linker characteristics... no

checking how to hardcode library paths into programs... immediate

appending configuration tag "F77" to libtool

checking for ANSI C header files... (cached) yes

checking malloc.h usability... yes

checking malloc.h presence... yes

checking for malloc.h... yes

checking for stdlib.h... (cached) yes

checking for string.h... (cached) yes

checking for strings.h... (cached) yes

checking for an ANSI C-conforming const... yes

checking for size_t... yes

checking whether struct tm is in sys/time.h or time.h... time.h

checking for working strtod... no

checking for pow... no

checking for pow in -lm... yes

checking for memset... yes

checking for pow... (cached) no

checking for pow in -lm... (cached) yes

checking for zlibVersion in -lz... no

configure: error: zlib not installed

make[3]: *** [build-libpng-1.2.24/Makefile] Error 1

make[3]: Target `all' not remade because of errors.

make[2]: *** [libpng] Error 2

make[1]: *** [all] Error 2

make: *** [subdirs] Error 1

rm -f /Volumes/Work_d/blackfin-sources/uclinux-dist/images/romfs-inst.log

for dir in vendors  lib user ; do [ ! -d $dir ] || make ARCH=blackfin   -C $dir romfs || exit 1 ; done

make -C /Volumes/Work_d/blackfin-sources/uclinux-dist/vendors/AnalogDevices/BF533-STAMP/. dir_v=/Volumes/Work_d/blackfin-sources/uclinux-dist/vendors/AnalogDevices/BF533-STAMP/. -f /Volumes/Work_d/blackfin-sources/uclinux-dist/vendors/vendors-common.mak romfs

mkdir -p /Volumes/Work_d/blackfin-sources/uclinux-dist/romfs

cd /Volumes/Work_d/blackfin-sources/uclinux-dist/romfs && mkdir -p bin etc etc/dhcpc home lib mnt proc sys usr var root home tmp etc/config var/run var/lib/misc home/httpd home/httpd/cgi-bin etc/boa var/log/boa

chmod 1777 /Volumes/Work_d/blackfin-sources/uclinux-dist/romfs/tmp

romfs-inst.sh -s bin /sbin

romfs-inst.sh /etc/rc

romfs-inst.sh /etc/mdev.conf

romfs-inst.sh /etc/inittab

set -e ; \

for f in filesystems group hosts host.conf inetd.conf issue mime.types modprobe.conf motd passwd protocols services TZ tux-bf.gif boa.conf index.html tux-wink.gif tuxsit_small.gif ; do \

        romfs-inst.sh ../common/$f /etc/$f ; \

done

echo "AnalogDevices/BF533-STAMP Version 3.2.0 -- `date`" > /Volumes/Work_d/blackfin-sources/uclinux-dist/romfs/etc/version

gzip -9c /Volumes/Work_d/blackfin-sources/uclinux-dist/config/.config > /Volumes/Work_d/blackfin-sources/uclinux-dist/romfs/root/uclinux-config.gz

for i in   libg libjpeg zlib libpng      ; do \

        [ ! -d $i ] || make -C $i romfs || exit $? ; \

done

make[2]: Nothing to be done for `romfs'.

if [ "" = "y" ]; then \

        romfs-inst.sh libjpeg.so /lib/libjpeg.so.62 ; \

fi

make[2]: Nothing to be done for `romfs'.

for l in libpng12.so.0 libpng.so.3 ; do \

        romfs-inst.sh -d -e CONFIG_FMT_USE_FDPIC_ELF /Volumes/Work_d/blackfin-sources/uclinux-dist/staging/usr/lib/$l /usr/lib/$l || exit $? ; \

done

for i in blkfin-apps blkfin-drvs blkfin-test boa busybox dhcpcd-new dhrystone ftp ftpd games gdbserver inetd init jpegview lrzsz mtd-utils net-tools play portmap ramimage strace sysutils telnet telnetd threaddemos version vplay whetstone /Volumes/Work_d/blackfin-sources/uclinux-dist/prop ; do \

        [ ! -d $i ] || make -C $i romfs || exit $? ; \

done

for i in  inetutils inetutils inetutils yaffs-utils irattach watchdogd ; do make -C $i romfs || exit $? ; done

for i in libinetutils rcp rsh rshd ; do make -C $i romfs || exit $? ; done

make[4]: `romfs' is up to date.

romfs-inst.sh /bin/rcp

cp: rcp: No such file or directory

make[4]: *** [romfs] Error 1

make[3]: *** [romfs] Error 2

make[2]: *** [romfs] Error 2

make[1]: *** [romfs] Error 2

make: *** [romfs.subdirs] Error 1

. /Volumes/Work_d/blackfin-sources/uclinux-dist/linux-2.6.x/.config; \

. /Volumes/Work_d/blackfin-sources/uclinux-dist/config/.config; \

if [ "$CONFIG_MODULES" = "y" ]; then \

        [ -d /Volumes/Work_d/blackfin-sources/uclinux-dist/romfs/lib/modules ] || mkdir -p /Volumes/Work_d/blackfin-sources/uclinux-dist/romfs/lib/modules; \

        rm -f /Volumes/Work_d/blackfin-sources/uclinux-dist/romfs/lib/modules/modules.dep; \

        make ARCH=blackfin   CROSS_COMPILE=bfin-uclinux- -C linux-2.6.x INSTALL_MOD_PATH=/Volumes/Work_d/blackfin-sources/uclinux-dist/romfs DEPMOD=true modules_install; \

        rm -f /Volumes/Work_d/blackfin-sources/uclinux-dist/romfs/lib/modules/*/build; \

        rm -f /Volumes/Work_d/blackfin-sources/uclinux-dist/romfs/lib/modules/*/source; \

        find /Volumes/Work_d/blackfin-sources/uclinux-dist/romfs/lib/modules -type f -name "*o" | xargs bfin-uclinux-strip -R .comment -R .note -g --strip-unneeded; \

        env NM=bfin-uclinux-nm /Volumes/Work_d/blackfin-sources/uclinux-dist/user/busybox/depmod.pl -P _ -b /Volumes/Work_d/blackfin-sources/uclinux-dist/romfs/lib/modules/ -k /Volumes/Work_d/blackfin-sources/uclinux-dist/linux-2.6.x/vmlinux; \

fi

Warning: you may need to install module-init-tools

See http://www.codemonkey.org.uk/docs/post-halloween-2.6.txt

  INSTALL drivers/char/bfin_twi_lcd.ko

  INSTALL drivers/i2c/algos/i2c-algo-bit.ko

  INSTALL drivers/i2c/i2c-core.ko

  INSTALL drivers/i2c/i2c-dev.ko

  INSTALL drivers/input/evdev.ko

  INSTALL drivers/input/misc/twi_keypad.ko

  INSTALL drivers/mtd/chips/cfi_cmdset_0002.ko

  INSTALL drivers/mtd/chips/cfi_probe.ko

  INSTALL drivers/mtd/chips/cfi_util.ko

  INSTALL drivers/mtd/chips/gen_probe.ko

  INSTALL drivers/mtd/chips/map_rom.ko

  INSTALL drivers/mtd/maps/bf5xx-flash.ko

  INSTALL drivers/mtd/mtdchar.ko

  INSTALL drivers/net/irda/irtty-sir.ko

  INSTALL drivers/net/irda/sir-dev.ko

  INSTALL drivers/video/bfin_ad7171fb.ko

  INSTALL drivers/video/bfin_adv7393fb.ko

  INSTALL drivers/video/cfbcopyarea.ko

  INSTALL drivers/video/cfbfillrect.ko

  INSTALL drivers/video/cfbimgblt.ko

  INSTALL drivers/video/fb.ko

  INSTALL fs/jffs2/jffs2.ko

  INSTALL fs/lockd/lockd.ko

  INSTALL fs/nfs/nfs.ko

  INSTALL fs/nls/nls_base.ko

  INSTALL fs/smbfs/smbfs.ko

  INSTALL fs/yaffs2/yaffs.ko

  INSTALL lib/crc-ccitt.ko

  INSTALL lib/zlib_deflate/zlib_deflate.ko

  INSTALL net/irda/ircomm/ircomm-tty.ko

  INSTALL net/irda/ircomm/ircomm.ko

  INSTALL net/irda/irda.ko

  INSTALL net/irda/irlan/irlan.ko

  INSTALL net/sunrpc/sunrpc.ko

  INSTALL security/capability.ko

  INSTALL security/commoncap.ko

  INSTALL sound/blackfin/snd-ad1836.ko

  INSTALL sound/blackfin/snd-ad73311.ko

  INSTALL sound/core/oss/snd-mixer-oss.ko

  INSTALL sound/core/oss/snd-pcm-oss.ko

  INSTALL sound/core/snd-page-alloc.ko

  INSTALL sound/core/snd-pcm.ko

  INSTALL sound/core/snd-timer.ko

  INSTALL sound/core/snd.ko

  INSTALL sound/soundcore.ko

if [ -r System.map -a -x true ]; then true -ae -F System.map -b /Volumes/Work_d/blackfin-sources/uclinux-dist/romfs -r 2.6.22.16-ADI-2008R2-pre-svn4225; fi

env: /Volumes/Work_d/blackfin-sources/uclinux-dist/user/busybox/depmod.pl: No such file or directory

make: *** [modules_install] Error 127

make ARCH=blackfin   -C vendors romfs.post

make -C /Volumes/Work_d/blackfin-sources/uclinux-dist/vendors/AnalogDevices/BF533-STAMP/. dir_v=/Volumes/Work_d/blackfin-sources/uclinux-dist/vendors/AnalogDevices/BF533-STAMP/. -f /Volumes/Work_d/blackfin-sources/uclinux-dist/vendors/vendors-common.mak romfs.post

set -e; \

t=`bfin-linux-uclibc-gcc -mcpu=bf533-0.3 -print-file-name=libc.a`; \

t=`dirname $t`/../..; \

for i in $t/lib/*so*; do \

        bn=`basename $i`; \

        if [ -f $i ] ; then \

                romfs-inst.sh -p 755 $i /lib/$bn; \

        fi; \

done; \

for i in $t/lib/*so*; do \

        if [ -h $i -a -e $i ] ; then \

                j=`readlink $i`; \

                romfs-inst.sh -s \

                        `basename $j` \

                        /lib/`basename $i`; \

        fi; \

done; \

if type bfin-linux-uclibc-ldconfig >/dev/null 2>&1; then \

        bfin-linux-uclibc-ldconfig -r /Volumes/Work_d/blackfin-sources/uclinux-dist/romfs; \

fi

find /Volumes/Work_d/blackfin-sources/uclinux-dist/romfs/. -name CVS | xargs -r rm -rf

[ -d /Volumes/Work_d/blackfin-sources/uclinux-dist/images ] || mkdir /Volumes/Work_d/blackfin-sources/uclinux-dist/images

make ARCH=blackfin   -C vendors image

make -C /Volumes/Work_d/blackfin-sources/uclinux-dist/vendors/AnalogDevices/BF533-STAMP/. dir_v=/Volumes/Work_d/blackfin-sources/uclinux-dist/vendors/AnalogDevices/BF533-STAMP/. -f /Volumes/Work_d/blackfin-sources/uclinux-dist/vendors/vendors-common.mak image

mkdir -p /Volumes/Work_d/blackfin-sources/uclinux-dist/images

rm -rf /Volumes/Work_d/blackfin-sources/uclinux-dist/images/*

rm -rf /Volumes/Work_d/blackfin-sources/uclinux-dist/romfs/dev

cp /Volumes/Work_d/blackfin-sources/uclinux-dist/linux-2.6.x/linux /Volumes/Work_d/blackfin-sources/uclinux-dist/images/vmlinux

bfin-uclinux-strip -g /Volumes/Work_d/blackfin-sources/uclinux-dist/images/vmlinux

set -e ; \

if [ -x /Volumes/Work_d/blackfin-sources/uclinux-dist/user/mtd-utils/build/mkfs.jffs2 ] && [ -n "" -o -n "m" ]; then \

        /Volumes/Work_d/blackfin-sources/uclinux-dist/user/mtd-utils/build/mkfs.jffs2 -l -d /Volumes/Work_d/blackfin-sources/uclinux-dist/romfs -D device_table-min.txt -o /Volumes/Work_d/blackfin-sources/uclinux-dist/images/rootfs.jffs2; \

fi

cp /Volumes/Work_d/blackfin-sources/uclinux-dist/linux-2.6.x/arch/blackfin/boot/vmImage /Volumes/Work_d/blackfin-sources/uclinux-dist/images/vmImage

/bin/bash /Volumes/Work_d/blackfin-sources/uclinux-dist/linux-2.6.x/scripts/gen_initramfs_list.sh -u squash -g squash /Volumes/Work_d/blackfin-sources/uclinux-dist/romfs > /Volumes/Work_d/blackfin-sources/uclinux-dist/images/rootfs.initramfs.contents

awk -f dev-table-to-cpio.awk device_table-min.txt >> /Volumes/Work_d/blackfin-sources/uclinux-dist/images/rootfs.initramfs.contents

echo "slink /init /sbin/init 0755 0 0" >> /Volumes/Work_d/blackfin-sources/uclinux-dist/images/rootfs.initramfs.contents

/Volumes/Work_d/blackfin-sources/uclinux-dist/linux-2.6.x/usr/gen_init_cpio /Volumes/Work_d/blackfin-sources/uclinux-dist/images/rootfs.initramfs.contents > /Volumes/Work_d/blackfin-sources/uclinux-dist/images/rootfs.initramfs

gzip -c -9 /Volumes/Work_d/blackfin-sources/uclinux-dist/images/rootfs.initramfs > /Volumes/Work_d/blackfin-sources/uclinux-dist/images/rootfs.initramfs.gz

cp /Volumes/Work_d/blackfin-sources/uclinux-dist/images/rootfs.initramfs.gz /Volumes/Work_d/blackfin-sources/uclinux-dist/linux-2.6.x/usr/initramfs_data.cpio.gz

CPPFLAGS="" CFLAGS="" LDFLAGS="" \

make ARCH=blackfin   CROSS_COMPILE=bfin-uclinux- -j1 -C /Volumes/Work_d/blackfin-sources/uclinux-dist/linux-2.6.x

  CHK     include/linux/version.h

  CHK     include/linux/utsrelease.h

  CALL    scripts/checksyscalls.sh

  CHK     include/linux/compile.h

  AS      usr/initramfs_data.o

  LD      usr/built-in.o

  GEN     .version

  CHK     include/linux/compile.h

  UPD     include/linux/compile.h

  CC      init/version.o

  LD      init/built-in.o

  LD      .tmp_vmlinux1

  KSYM    .tmp_kallsyms1.S

  AS      .tmp_kallsyms1.o

  LD      .tmp_vmlinux2

  KSYM    .tmp_kallsyms2.S

  AS      .tmp_kallsyms2.o

  LD      vmlinux

  SYSMAP  System.map

  SYSMAP  .tmp_System.map

  MODPOST vmlinux

  OBJCOPY arch/blackfin/boot/vmlinux.bin

  GZIP    arch/blackfin/boot/vmlinux.gz

  UIMAGE  arch/blackfin/boot/vmImage

Image Name:   Linux-2.6.22.16-ADI-2008R2-pre-s

Created:      Wed Feb  6 12:39:54 2008

Image Type:   Blackfin Linux Kernel Image (gzip compressed)

Data Size:    1980198 Bytes = 1933.79 kB = 1.89 MB

Load Address: 0x00001000

Entry Point:  0x0015C000

Kernel: arch/blackfin/boot/vmImage is ready

  Building modules, stage 2.

  MODPOST 45 modules

cp /Volumes/Work_d/blackfin-sources/uclinux-dist/linux-2.6.x/arch/blackfin/boot/vmImage /Volumes/Work_d/blackfin-sources/uclinux-dist/images/uImage.initramfs.gz

cp /Volumes/Work_d/blackfin-sources/uclinux-dist/linux-2.6.x/System.map /Volumes/Work_d/blackfin-sources/uclinux-dist/images/System.map.initramfs.gz

cp /Volumes/Work_d/blackfin-sources/uclinux-dist/linux-2.6.x/vmlinux /Volumes/Work_d/blackfin-sources/uclinux-dist/images/linux.initramfs.gz

ln -sf linux.initramfs.gz /Volumes/Work_d/blackfin-sources/uclinux-dist/images/linux

cp /Volumes/Work_d/blackfin-sources/uclinux-dist/images/rootfs.initramfs /Volumes/Work_d/blackfin-sources/uclinux-dist/linux-2.6.x/usr/initramfs_data.cpio.gz

CPPFLAGS="" CFLAGS="" LDFLAGS="" \

make ARCH=blackfin   CROSS_COMPILE=bfin-uclinux- -j1 -C /Volumes/Work_d/blackfin-sources/uclinux-dist/linux-2.6.x

  CHK     include/linux/version.h

  CHK     include/linux/utsrelease.h

  CALL    scripts/checksyscalls.sh

  CHK     include/linux/compile.h

  AS      usr/initramfs_data.o

  LD      usr/built-in.o

  GEN     .version

  CHK     include/linux/compile.h

  UPD     include/linux/compile.h

  CC      init/version.o

  LD      init/built-in.o

  LD      .tmp_vmlinux1

  KSYM    .tmp_kallsyms1.S

  AS      .tmp_kallsyms1.o

  LD      .tmp_vmlinux2

  KSYM    .tmp_kallsyms2.S

  AS      .tmp_kallsyms2.o

  LD      vmlinux

  SYSMAP  System.map

  SYSMAP  .tmp_System.map

  MODPOST vmlinux

  OBJCOPY arch/blackfin/boot/vmlinux.bin

  GZIP    arch/blackfin/boot/vmlinux.gz

  UIMAGE  arch/blackfin/boot/vmImage

Image Name:   Linux-2.6.22.16-ADI-2008R2-pre-s

Created:      Wed Feb  6 12:40:12 2008

Image Type:   Blackfin Linux Kernel Image (gzip compressed)

Data Size:    1983524 Bytes = 1937.04 kB = 1.89 MB

Load Address: 0x00001000

Entry Point:  0x0015C000

Kernel: arch/blackfin/boot/vmImage is ready

  Building modules, stage 2.

  MODPOST 45 modules

cp /Volumes/Work_d/blackfin-sources/uclinux-dist/linux-2.6.x/arch/blackfin/boot/vmImage /Volumes/Work_d/blackfin-sources/uclinux-dist/images/uImage.initramfs

cp /Volumes/Work_d/blackfin-sources/uclinux-dist/linux-2.6.x/System.map /Volumes/Work_d/blackfin-sources/uclinux-dist/images/System.map.initramfs

cp /Volumes/Work_d/blackfin-sources/uclinux-dist/linux-2.6.x/vmlinux /Volumes/Work_d/blackfin-sources/uclinux-dist/images/linux.initramfs

ln -sf uImage.initramfs /Volumes/Work_d/blackfin-sources/uclinux-dist/images/uImage

make: Target `all' not remade because of errors.

QuoteReplyEditDelete

 

 

2008-02-05 22:52:33     Re: mac os x elf.h

Mike Frysinger (UNITED STATES)

Message: 50721    that depends on your definition of "real" ... none of the applications that rely on libpng arent going to be built/installed

 

sure the kernel and the other userspace applications will work fine

QuoteReplyEditDelete

 

 

2008-02-05 22:54:40     Re: mac os x elf.h

Mike Frysinger (UNITED STATES)

Message: 50722    the elf.h would only affect host utils, not target building

 

you will need to review the config.log from the libpng build dir to find out why zlib isnt being detected

QuoteReplyEditDelete

 

 

2008-02-06 18:23:02     Re: mac os x elf.h

Mark Noonchester (NEW ZEALAND)

Message: 50780    configure:20290: result: no

configure:20294: checking for pow in -lm

configure:20329: bfin-uclinux-gcc -o conftest -pipe -Wall -g -O2      -mcpu=bf533-0.3 -DEMBED -D__uClinux__ -I/Volumes/Work_d/blackfin-sources/uclinux-dist  -mcpu=bf533-0.3  -Wl,-elf2flt    -mcpu=bf533-0.3 conftest.c -lm   >&5

conftest.c:32: warning: conflicting types for built-in function 'pow'

configure:20335: $? = 0

configure:20353: result: yes

configure:20370: checking for memset

configure:20426: bfin-uclinux-gcc -o conftest -pipe -Wall -g -O2      -mcpu=bf533-0.3 -DEMBED -D__uClinux__ -I/Volumes/Work_d/blackfin-sources/uclinux-dist  -mcpu=bf533-0.3  -Wl,-elf2flt    -mcpu=bf533-0.3 conftest.c  >&5

conftest.c:48: warning: conflicting types for built-in function 'memset'

configure:20432: $? = 0

configure:20450: result: yes

configure:20468: checking for pow

configure:20548: result: no

configure:20557: checking for pow in -lm

configure:20616: result: yes

configure:20635: checking for zlibVersion in -lz

configure:20670: bfin-uclinux-gcc -o conftest -pipe -Wall -g -O2      -mcpu=bf533-0.3 -DEMBED -D__uClinux__ -I/Volumes/Work_d/blackfin-sources/uclinux-dist  -mcpu=bf533-0.3  -Wl,-elf2flt    -mcpu=bf533-0.3 conftest.c -lz  -lm  >&5

/Volumes/Work_d/blackfin-sources/uclinux-dist/staging/usr/lib/libz.a: could not read symbols: Archive has no index; run ranlib to add one

collect2: ld returned 1 exit status

configure:20676: $? = 1

configure: failed program was:

| /* confdefs.h.  */

| #define PACKAGE_NAME "libpng"

| #define PACKAGE_TARNAME "libpng"

| #define PACKAGE_VERSION "1.2.24"

| #define PACKAGE_STRING "libpng 1.2.24"

| #define PACKAGE_BUGREPORT "png-mng-implement@lists.sourceforge.net"

| #define PACKAGE "libpng"

| #define VERSION "1.2.24"

| #define STDC_HEADERS 1

| #define HAVE_SYS_TYPES_H 1

| #define HAVE_SYS_STAT_H 1

| #define HAVE_STDLIB_H 1

| #define HAVE_STRING_H 1

| #define HAVE_MEMORY_H 1

| #define HAVE_STRINGS_H 1

| #define HAVE_INTTYPES_H 1

| #define HAVE_STDINT_H 1

| #define HAVE_UNISTD_H 1

| #define STDC_HEADERS 1

| #define HAVE_MALLOC_H 1

| #define HAVE_STDLIB_H 1

| #define HAVE_STRING_H 1

| #define HAVE_STRINGS_H 1

| #define HAVE_MEMSET 1

| #define HAVE_LIBM 1

config.log

libz.a

QuoteReplyEditDelete

 

 

2008-02-06 19:02:14     Re: mac os x elf.h

Mike Frysinger (UNITED STATES)

Message: 50784    the fun output is probably from zlib, not png

 

simply do:

make lib/zlib_clean

make lib/zlib_only

 

make sure that when compiling zlib that bfin-uclinux-ar is used and not `ar`

QuoteReplyEditDelete

 

 

2008-02-06 19:21:03     Re: mac os x elf.h

Mark Noonchester (NEW ZEALAND)

Message: 50786    looks like ar is being used.

 

nooney:/Volumes/Work_d/blackfin-sources/uclinux-dist$ make lib/zlib_clean

make -C zlib clean; rm -f zlib/.sgbuilt_lib; true

rm -f *.o *~ example minigzip \

   libz.* foo.gz so_locations \

   _match.s maketree contrib/infback9/*.o

nooney:/Volumes/Work_d/blackfin-sources/uclinux-dist$ make lib/zlib_only

touch zlib/.sgbuilt_lib && make -C zlib -j1

bfin-uclinux-gcc -pipe -Wall -g -O2      -mcpu=bf533-0.3 -DEMBED -D__uClinux__ -I/Volumes/Work_d/blackfin-sources/uclinux-dist  -mcpu=bf533-0.3  -c -o adler32.o adler32.c

bfin-uclinux-gcc -pipe -Wall -g -O2      -mcpu=bf533-0.3 -DEMBED -D__uClinux__ -I/Volumes/Work_d/blackfin-sources/uclinux-dist  -mcpu=bf533-0.3  -c -o compress.o compress.c

bfin-uclinux-gcc -pipe -Wall -g -O2      -mcpu=bf533-0.3 -DEMBED -D__uClinux__ -I/Volumes/Work_d/blackfin-sources/uclinux-dist  -mcpu=bf533-0.3  -c -o crc32.o crc32.c

bfin-uclinux-gcc -pipe -Wall -g -O2      -mcpu=bf533-0.3 -DEMBED -D__uClinux__ -I/Volumes/Work_d/blackfin-sources/uclinux-dist  -mcpu=bf533-0.3  -c -o gzio.o gzio.c

bfin-uclinux-gcc -pipe -Wall -g -O2      -mcpu=bf533-0.3 -DEMBED -D__uClinux__ -I/Volumes/Work_d/blackfin-sources/uclinux-dist  -mcpu=bf533-0.3  -c -o uncompr.o uncompr.c

bfin-uclinux-gcc -pipe -Wall -g -O2      -mcpu=bf533-0.3 -DEMBED -D__uClinux__ -I/Volumes/Work_d/blackfin-sources/uclinux-dist  -mcpu=bf533-0.3  -c -o deflate.o deflate.c

bfin-uclinux-gcc -pipe -Wall -g -O2      -mcpu=bf533-0.3 -DEMBED -D__uClinux__ -I/Volumes/Work_d/blackfin-sources/uclinux-dist  -mcpu=bf533-0.3  -c -o trees.o trees.c

bfin-uclinux-gcc -pipe -Wall -g -O2      -mcpu=bf533-0.3 -DEMBED -D__uClinux__ -I/Volumes/Work_d/blackfin-sources/uclinux-dist  -mcpu=bf533-0.3  -c -o zutil.o zutil.c

bfin-uclinux-gcc -pipe -Wall -g -O2      -mcpu=bf533-0.3 -DEMBED -D__uClinux__ -I/Volumes/Work_d/blackfin-sources/uclinux-dist  -mcpu=bf533-0.3  -c -o inflate.o inflate.c

bfin-uclinux-gcc -pipe -Wall -g -O2      -mcpu=bf533-0.3 -DEMBED -D__uClinux__ -I/Volumes/Work_d/blackfin-sources/uclinux-dist  -mcpu=bf533-0.3  -c -o infback.o infback.c

bfin-uclinux-gcc -pipe -Wall -g -O2      -mcpu=bf533-0.3 -DEMBED -D__uClinux__ -I/Volumes/Work_d/blackfin-sources/uclinux-dist  -mcpu=bf533-0.3  -c -o inftrees.o inftrees.c

bfin-uclinux-gcc -pipe -Wall -g -O2      -mcpu=bf533-0.3 -DEMBED -D__uClinux__ -I/Volumes/Work_d/blackfin-sources/uclinux-dist  -mcpu=bf533-0.3  -c -o inffast.o inffast.c

ar rc libz.a adler32.o compress.o crc32.o gzio.o uncompr.o deflate.o trees.o zutil.o inflate.o infback.o inftrees.o inffast.o

install -d -m0755 /Volumes/Work_d/blackfin-sources/uclinux-dist/staging/usr/lib

install -m0644 libz.a /Volumes/Work_d/blackfin-sources/uclinux-dist/staging/usr/lib

install -d -m0755 /Volumes/Work_d/blackfin-sources/uclinux-dist/staging/usr/include

install -m0644 zconf.h zlib.h /Volumes/Work_d/blackfin-sources/uclinux-dist/staging/usr/include

nooney:/Volumes/Work_d/blackfin-sources/uclinux-dist$

 

how do I fix this?

QuoteReplyEditDelete

 

 

2008-02-07 00:19:47     Re: mac os x elf.h

Mike Frysinger (UNITED STATES)

Message: 50791    it's been fixed in svn now

QuoteReplyEditDelete

 

 

2008-02-07 01:09:11     Re: mac os x elf.h

Mark Noonchester (NEW ZEALAND)

Message: 50796    It seems that the zlib make file over writes AR

 

Here is a better make file.

 

nooney:/Volumes/Work_d/blackfin-sources/uclinux-dist$ svn diff

Index: lib/zlib/Makefile

===================================================================

--- lib/zlib/Makefile   (revision 6181)

+++ lib/zlib/Makefile   (working copy)

@@ -33,8 +33,9 @@

SHAREDLIBV=libz.so.1.2.3

SHAREDLIBM=libz.so.1

 

-AR=ar rc

-RANLIB=ranlib

+ARFLAGS = rc

+#AR=ar rc

+#RANLIB=ranlib

TAR=tar

SHELL=/bin/sh

EXE=

@@ -85,7 +86,7 @@

        fi

 

libz.a: $(OBJS) $(OBJA)

-       $(AR) $@ $(OBJS) $(OBJA)

+       $(AR) $(ARFLAGS) $@ $(OBJS) $(OBJA)

        -@ ($(RANLIB) $@ || true) >/dev/null 2>&1

 

match.o: match.S

Index: lib/Makefile

===================================================================

--- lib/Makefile        (revision 6181)

+++ lib/Makefile        (working copy)

@@ -20,6 +20,7 @@

-include $(ARCH_CONFIG)

-include $(MODULES_CONFIG)

 

+

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

#

# always build these dir_

nooney:/Volumes/Work_d/blackfin-sources/uclinux-dist$

 

 

 

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

 

Does this thing build for anyone?

 

And here is the next problem:

 

*

* System Logging Utilities

*

syslogd (SYSLOGD) [Y/n/?] y

  Rotate message files (FEATURE_ROTATE_LOGFILE) [N/y/?] n

  Remote Log support (FEATURE_REMOTE_LOG) [N/y/?] n

  Circular Buffer support (FEATURE_IPC_SYSLOG) [N/y/?] n

klogd (KLOGD) [Y/n/?] y

logger (LOGGER) [Y/n/?] y

*

* Runit Utilities

*

runsv (RUNSV) [N/y/?] n

runsvdir (RUNSVDIR) [N/y/?] n

sv (SV) [N/y/?] n

svlogd (SVLOGD) [N/y/?] n

chpst (CHPST) [N/y/?] n

setuidgid (SETUIDGID) [N/y/?] n

envuidgid (ENVUIDGID) [N/y/?] n

envdir (ENVDIR) [N/y/?] n

softlimit (SOFTLIMIT) [N/y/?] n

*

* ipsvd utilities

*

tcpsvd (TCPSVD) [N/y/?] n

udpsvd (UDPSVD) [N/y/?] n

/Volumes/Work_d/blackfin-sources/uclinux-dist/user/busybox/busybox-1.9.0/Makefile.local:8: warning: overriding commands for target `.config'

Makefile:470: warning: ignoring old commands for target `.config'

/Volumes/Work_d/blackfin-sources/uclinux-dist/user/busybox/busybox-1.9.0/scripts/setlocalversion: /Volumes/Work_d/blackfin-sources/uclinux-dist/user/busybox/busybox-1.9.0/scripts/setlocalversion: No such file or directory

/Volumes/Work_d/blackfin-sources/uclinux-dist/user/busybox/busybox-1.9.0/Makefile.local:8: warning: overriding commands for target `.config'

Makefile:470: warning: ignoring old commands for target `.config'

/Volumes/Work_d/blackfin-sources/uclinux-dist/user/busybox/busybox-1.9.0/scripts/setlocalversion: /Volumes/Work_d/blackfin-sources/uclinux-dist/user/busybox/busybox-1.9.0/scripts/setlocalversion: No such file or directory

  SPLIT   include/autoconf.h -> include/config/*

  GEN     include/bbconfigopts.h

/Volumes/Work_d/blackfin-sources/uclinux-dist/user/busybox/busybox-1.9.0/Makefile.local:8: warning: overriding commands for target `.config'

/Volumes/Work_d/blackfin-sources/uclinux-dist/user/busybox/busybox-1.9.0/./Makefile:470: warning: ignoring old commands for target `.config'

  HOSTCC  applets/usage

  GEN     include/usage_compressed.h

  HOSTCC  applets/applet_tables

In file included from applets/../include/libbb.h:13,

                 from applets/../include/busybox.h:10,

                 from applets/applet_tables.c:16:

applets/../include/platform.h:145: error: conflicting types for 'socklen_t'

/usr/include/sys/socket.h:99: error: previous declaration of 'socklen_t' was here

In file included from applets/../include/busybox.h:10,

                 from applets/applet_tables.c:16:

applets/../include/libbb.h:20:20: error: mntent.h: No such file or directory

applets/../include/libbb.h:34:24: error: sys/statfs.h: No such file or directory

In file included from applets/../include/busybox.h:10,

                 from applets/applet_tables.c:16:

applets/../include/libbb.h:309: error: 'AF_PACKET' undeclared here (not in a function)

applets/../include/libbb.h:312: error: 'AF_NETLINK' undeclared here (not in a function)

In file included from applets/../include/busybox.h:10,

                 from applets/applet_tables.c:16:

applets/../include/libbb.h:794: warning: 'struct mntent' declared inside parameter list

applets/../include/libbb.h:794: warning: its scope is only this definition or declaration, which is probably not what you want

make[5]: *** [applets/applet_tables] Error 1

make[4]: *** [applets] Error 2

make[3]: *** [all] Error 2

make[2]: *** [busybox] Error 2

make[1]: *** [all] Error 2

make: *** [subdirs] Error 1

 

Makefile

QuoteReplyEditDelete

 

 

2008-02-07 10:55:16     Re: mac os x elf.h

Mike Frysinger (UNITED STATES)

Message: 50824    i fixed zlib in svn already

 

i'll handle your busybox problem in the other thread ... please dont double post your issues in the future

Attachments

Outcomes