Hi Daniel,
Daniel Alomar wrote:
I am adding usb support to our 5282 based board (the sl811 from
cypress). And when I am compiling the hcd.c file, the compiler complains
about the UTS_SYSNAME definition.
Some time ago it was discussed on the list the problem lies on the lack
of the backslash on the compiler:
http://mailman.uclinux.org/pipermail/uclinux-dev/2005-May/032711.html
and
http://mailman.uclinux.org/pipermail/uclinux-dev/2005-April/032221.html
UTS_SYSNAME is defined inside the linux/uts.h
#ifndef UTS_SYSNAME
#ifdef CONFIG_UCLINUX
#define UTS_SYSNAME "uClinux"
#else
#define UTS_SYSNAME "Linux"
#endif
#endif
but at compilation time appears:
m68k-elf-gcc -fno-builtin -nostdinc -D__KERNEL__
-I/home2/darryl/MCF5282/uClinux-dist/linux-2.4.x/include -Wall
-Wstrict-prototypes -Wno-trigraphs -O1 -g -fno-strict-aliasing
-fno-common -I/usr/local/lib/gcc-lib/m68k-elf/2.95.3/./include -pipe
-DNO_MM -DNO_FPU -m5307 -Wa,-S -Wa,-m5307 -D__ELF__ -DMAGIC_ROM_PTR
-DUTS_SYSNAME="uClinux" -D__linux__ -O1 -nostdinc -iwithprefix include
-DKBUILD_BASENAME=hcd -c -o hcd.o hcd.c
and the error looks like this:
hcd.c: In function `rh_string':
hcd.c:312: `uClinux' undeclared (first use in this function)
hcd.c:312: (Each undeclared identifier is reported only once
hcd.c:312: for each function it appears in.)
The only way to get a successful compilation is add the following line
inside the hcd.c
#define UTS_SYSNAME "uClinux"
The following files seems ok:
linux-2.4.x/arch/m68knommu/ (UTS_SYSNAME = -DUTS_SYSNAME=\"uClinux\")
linux-2.4.x/arch/m68knommu/platform/5282/Rules.make
-DUTS_SYSNAME=\"uClinux\"
linux-2.4.x/arch/m68knommu/platform/5307/Rules.make
-DUTS_SYSNAME=\"uClinux\"
Maybe we should just drop the changing of UTS_NAME for uClinux
altogether. It is just linux, I don't see any reason not to
report as such with utsname.
Regards
Greg
------------------------------------------------------------------------
Greg Ungerer -- Chief Software Dude EMAIL: [EMAIL PROTECTED]
Secure Computing Corporation PHONE: +61 7 3435 2888
825 Stanley St, FAX: +61 7 3891 3630
Woolloongabba, QLD, 4102, Australia WEB: http://www.SnapGear.com
_______________________________________________
uClinux-dev mailing list
[email protected]
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by [email protected]
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev