[PATCH] network demo "http" for 4.7.99.2 would not compile

Joel Sherrill joel.sherrill at oarcorp.com
Mon Sep 17 14:44:11 UTC 2007


Torsten Landschoff wrote:
> Hi list,
>
> Compiling the network demos failed here with the following error message:
>
> powerpc-rtems4.8-objcopy -I binary -O `cat obj_format` tarfile
> o-optimize/tarfile.o
> powerpc-rtems4.8-gcc --pipe
> -B/home/torsten/opt/powerpc-rtems4.8/powerpc-rtems4.8/virtex/lib/ -specs
> bsp_specs -qrtems   -g -Wall  -O2 -g -fno-keep-inline-functions -g
> -DUSE_FTPD -isystem
> /home/torsten/tes-board/fpga_rev_05/FPGA_MST/PPC_SYSTEM/ppc405_0/include
> -mcpu=403 -Dppc405 -Dvirtex         -o o-optimize/http.exe
> o-optimize/init.o   o-optimize/tarfile.o  -lftpd
> /home/torsten/opt/powerpc-rtems4.8/lib/gcc/powerpc-rtems4.8/4.2.1/../../../../powerpc-rtems4.8/bin/ld:
> unknown architecture of input file `o-optimize/tarfile.o' is
> incompatible with powerpc:common output
> collect2: ld returned 1 exit status
>
> The following patch fixes this for my configuration (powerpc4.8-rtems
> with virtex BSP). I am not entirely sure if this is the correct way to
> fix this, perhaps somebody has a better proposal.
>   
I couldn't reliably make the objcopy work on all BSPs.  If you
check out the current code in CVS, you will see that it converts
the binary tar file to a .c file containing an array, then compiles it
using the same compiler arguments as the rest of the application.

You need RTEMS from cvs to get bin2c.  And if you get the http
demo from cvs, you will see a few more improvements including
the ability to print a stack usage and cpu usage report from
the web server.

More important.. does the http demo work for you? :)
> diff --git a/http/Makefile b/http/Makefile
> index c211e78..17737ff 100644
> --- a/http/Makefile
> +++ b/http/Makefile
> @@ -88,7 +88,7 @@ ${PGM}: $(OBJS) $(LINK_FILES)
>  $(ARCH)/tarfile.o: $(ARCH) stamp-index-html obj_format
>         cd rootfs ; tar cf ../$(ARCH)/tarfile --exclude CVS .
>         cp $(ARCH)/tarfile .
> -       $(OBJCOPY) -I binary -O `cat obj_format` tarfile $(ARCH)/tarfile.o
> +       $(OBJCOPY) --binary-architecture=$(RTEMS_CPU) -I binary -O `cat
> obj_format` tarfile $(ARCH)/tarfile.o
>
>  stamp-index-html: index.html.in
>  ifneq ($(HTTPD),)
>
>
> Greetings, Torsten
>
> _______________________________________________
> rtems-users mailing list
> rtems-users at rtems.com
> http://rtems.rtems.org/mailman/listinfo/rtems-users
>   




More information about the users mailing list