Hi Steve,
Steve Witt wrote:
On Fri, 9 Mar 2007, Greg Ungerer wrote:
- The 'uts_name' stuff has changed in 2.6.19, which also
necessitates a minor mod to the Access Library code. The thing I
don't know how to handle correctly is that the new variable
'init_uts_ns' (in linux-2.6.x/init/version.c) is exported as
EXPORT_SYMBOL_GPL, which as I've learned, means that a non-GPL module
can't link to the symbol. So the ixp400.ko module has an 'unknown
symbol' error when it is loaded. This could be easily fixed, but not
correctly or (dare I say) legally. So what's the best way to solve
this problem?
I don't recall hitting this. What did you have to change in the
AccessLibrary code for this?
I've attached a diff of what I did for this. It still has the original
code, I just conditionally compiled in my slight change to get to it build.
Oh, Ok, I see. We changed ours to so that 2.6.19 and above it uses:
utsname()->sysname
utsname()->release
(Which are defined in linux-2.6.19/include/linux/utsname.h)
Regards
Greg
------------------------------------------------------------------------
diff -upr
uClinux-dist-orig/modules/ixp425/ixp400-2.1/ixp_osal/os/linux/src/platforms/ixp400/IxOsalOsIxp400.c
uClinux-dist/modules/ixp425/ixp400-2.1/ixp_osal/os/linux/src/platforms/ixp400/IxOsalOsIxp400.c
---
uClinux-dist-orig/modules/ixp425/ixp400-2.1/ixp_osal/os/linux/src/platforms/ixp400/IxOsalOsIxp400.c
2005-09-24 20:59:09.000000000 -0700
+++
uClinux-dist/modules/ixp425/ixp400-2.1/ixp_osal/os/linux/src/platforms/ixp400/IxOsalOsIxp400.c
2007-02-28 13:08:41.000000000 -0800
@@ -53,7 +53,11 @@ static volatile UINT32 *ixOsalOstsRegAdd
PRIVATE BOOL IxOsalOemInitialized = FALSE;
+#ifdef NO_COMPILE_SAW
extern struct new_utsname system_utsname;
+#else
+extern struct uts_namespace init_uts_ns;
+#endif
PUBLIC UINT32
ixOsalOsIxp400TimestampGet (void)
@@ -119,15 +123,24 @@ ixOsalOemInit (void)
PUBLIC IX_STATUS
ixOsalOsIxp400NameGet(INT8* osName, INT32 maxSize)
{
+#ifdef NO_COMPILE_SAW
strncpy(osName, system_utsname.sysname, maxSize);
+#else
+ strncpy(osName, init_uts_ns.name.sysname, maxSize);
+#endif
return IX_SUCCESS;
+
}
PUBLIC IX_STATUS
ixOsalOsIxp400VersionGet(INT8* osVersion, INT32 maxSize)
{
+#ifdef NO_COMPILE_SAW
strncpy(osVersion, system_utsname.release, maxSize);
+#else
+ strncpy(osVersion, init_uts_ns.name.release, maxSize);
+#endif
return IX_SUCCESS;
}
------------------------------------------------------------------------
_______________________________________________
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
--
------------------------------------------------------------------------
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