Taking the current snapshot from the OpenBIOS web site, I get a few problems trying to build OpenBIOS for sparc32 as per the README file. I am using Solaris 10 on Sparc64 (Enterprise 220R) with GCC 3.4.3
1. Permissions in the config/scripts directory do not have execute "x" bit set. I needed to do a
chmod 755 config/scripts/*
to fix this. Otherwise I can't get past the first step in the README file of running
config/scripts/switch-arch sparc32
2. The Makefile uses $(PWD) which is not available under "sh" shell. To get this to work right you apparently need bash shell. Without it, the line
@ln -s $(PWD)/include/$(ARCH) $(ODIR)/target/include/asm
for the "directories" target actually links to /include/$(ARCH) because $(PWD) is an empty string. This of course causes the make process to fail hopelessly because the links aren't established correctly. So, there should be a note in the README warning about this, or else the Makefile needs to be more tolerant. I've built a lot of open source software lately as I have been configuring my Enterprise 220R box, and OpenBIOS is the only package so far that has failed because the shell for make was sh. Maybe bash has become the de-facto standard shell on Linux, but on Solaris it's sh by default, and on MinGW, it is also sh.
3. Even with all that done, I am still getting problems, this time running make gives
bash-3.00# make Building OpenBIOS on sparc64 for sparc32 Cleaning up... ok Initializing build tree...ok. Creating target Makefile...ok. Creating config files...ok. Building...error: make[1]: Entering directory `/software/source/openbios-devel' gcc -O2 -g -Wall -W -DFCOMPILER -DBOOTSTRAP -DNATIVE_BITWIDTH_SMALLER_THAN_HOST_ BITWIDTH -USWAP_ENDIANNESS -Iinclude -Ikernel/include -Iobj-sparc32/target/include -c -o obj-sparc32/host/kernel/bootstrap.o kernel/bootstrap.c In file included from include/openbios/sysinclude.h:5, from kernel/bootstrap.c:9: obj-sparc32/target/include/asm/types.h:18:20: endian.h: No such file or directory make[1]: *** [obj-sparc32/host/kernel/bootstrap.o] Error 1 make[1]: Leaving directory `/software/source/openbios-devel' bash-3.00#
In other words, now endian.h is missing.
The only place I could find it was
bash-3.00# find ./ -name endian.h ./utils/ofclient/endian.h bash-3.00#
Now, according to mconfig.h, we have
/* Define to 1 if you have the <endian.h> header file. */ #define HAVE_ENDIAN_H 1
so it should be doing a
#include <endian.h>
in types.h
Doing a
cp -p utils/ofclient/endian.h kernel/include
fixes the problem and I get a bit further
4. Now I get
gcc -Wa,-xarch=v8 -Wa,-32 -m32 -mcpu=supersparc $EXTRACFLAGS -Os -Wall -W -DNATI VE_BITWIDTH_EQUALS_HOST_BITWIDTH -USWAP_ENDIANNESS -fno-builtin -g -Wredundant-d ecls -Wshadow -Wpointer-arith -Wstrict-prototypes -Wmissing-declarations -Wundef -Wendif-labels -Wstrict-aliasing -Iinclude -Ikernel/include -Iobj-sparc32/targe t/include -c -o obj-sparc32/target/drivers/iommu.o drivers/iommu.c drivers/iommu.c:15:21: asm/asi.h: No such file or directory
Again, another reference to an include file under obj-sparc32/target/include/asm is missing.
The asi.h file can be found under arch/sparc32 directory. Maybe we need a filesystem link added or else to copy asi.h or change the #include reference in iommu.c
5. Finally, GCC is picking up on lots of unused variables. Do we need to review the build.log files and do a bit of spring cleaning ?
Anyhow, that's a long enough e-mail for now.
Comments please !
Thanks
Jason
Regards, Jason Armistead Senior Systems & Software Engineer Otis Elevator Company Pty Ltd 50 Airds Rd Minto NSW 2566 AUSTRALIA
+61-2-9827-3742 (direct) +61-418-499-568 (mobile) +61-2-9827-3606 (fax) Jason.Armistead@otis.com
at your service
For further information on our products and services please visit us at www.otis.com