arm darwin update

some stuff that got lost from the last batch

Change-Id: Id892a8fce7c90a07c359d77282c557a0a9b41cd2
Reviewed-on: http://gerrit.openafs.org/4064
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
This commit is contained in:
Derrick Brashear 2011-02-26 21:55:19 -05:00
parent fbac809a46
commit 4397159a1c
15 changed files with 115 additions and 41 deletions

View File

@ -424,11 +424,9 @@ afsd_event_cleanup(int signo) {
CFRunLoopRemoveSource(CFRunLoopGetCurrent(), source, kCFRunLoopDefaultMode);
CFRelease (source);
#ifndef AFS_ARM_DARWIN_ENV
IODeregisterForSystemPower(&iterator);
IOServiceClose(root_port);
IONotificationPortDestroy(notify);
#endif
exit(0);
}
@ -439,7 +437,6 @@ afsd_install_events(void)
SCDynamicStoreContext ctx = {0};
SCDynamicStoreRef store;
#ifndef AFS_ARM_DARWIN_ENV
root_port = IORegisterForSystemPower(0,&notify,afsd_sleep_callback,&iterator);
if (root_port) {
@ -486,7 +483,6 @@ afsd_install_events(void)
CFRelease (store);
}
#endif
if (source != NULL) {
CFRunLoopAddSource (CFRunLoopGetCurrent(),
@ -1457,7 +1453,7 @@ AfsdbLookupHandler(void)
kernelMsg[1] = 0;
acellName[0] = '\0';
#ifdef AFS_DARWIN_ENV
#if defined(AFS_DARWIN_ENV) && !defined(AFS_ARM_DARWIN_ENV)
/* Fork the event handler also. */
code = fork();
if (code == 0) {

View File

@ -446,6 +446,26 @@ case $AFS_SYSNAME in
XLIBS="${LIB_AFSDB} ${XBSA_XLIBS} -framework CoreFoundation"
;;
arm_darwin_100)
AFSD_LDFLAGS="-F/System/Library/PrivateFrameworks -framework SystemConfiguration -framework IOKit -framework CoreFoundation"
MT_CFLAGS='-DAFS_PTHREAD_ENV -D_REENTRANT ${XCFLAGS} ${ARCHFLAGS}'
MT_LIBS="${LIB_AFSDB} -framework CoreFoundation"
KROOT=
KINCLUDES='-I$(KROOT)/System/Library/Frameworks/Kernel.framework/Headers'
LD="cc"
KERN_OPTMZ="-Os"
LWP_OPTMZ="-Os"
OPTMZ="-Os"
PAM_LIBS="-lpam"
REGEX_OBJ="regex.o"
TXLIBS="-lncurses"
EXTRA_VLIBOBJS="fstab.o"
SHLIB_LINKER="${MT_CC} -dynamiclib"
SHLIB_SUFFIX="dylib"
RANLIB="ranlib"
XLIBS="${LIB_AFSDB} ${XBSA_XLIBS} -framework CoreFoundation"
;;
*_darwin_100)
AFSD_LDFLAGS="-F/System/Library/PrivateFrameworks -framework DiskArbitration -framework SystemConfiguration -framework IOKit -framework CoreFoundation"
MT_CFLAGS="-DAFS_PTHREAD_ENV -D_REENTRANT ${XCFLAGS} \${ARCHFLAGS}"

View File

@ -104,6 +104,9 @@
#define AFS_GCPAGS 0
#define RXK_LISTENER_ENV 1
#ifndef IGNORE_STDS_H
/* a dodge to avoid including this in lwp process.s */
#define RTM_NEWADDR 0xc /* address being added to iface */
#define RTM_IFINFO 0xe /* iface going up/down etc. */
#define RTAX_NETMASK 2 /* netmask sockaddr present */
@ -114,6 +117,8 @@ struct rt_addrinfo {
int rti_addrs;
struct sockaddr *rti_info[RTAX_MAX];
};
#endif
#ifdef KERNEL
#undef MACRO_BEGIN
#undef MACRO_END

View File

@ -0,0 +1,33 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist SYSTEM "file://localhost/System/Library/DTDs/PropertyList.dtd">
<plist version="0.9">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleExecutable</key>
<string>afs</string>
<key>CFBundleIdentifier</key>
<string>org.openafs.filesystems.afs</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>8.0</string>
<key>CFBundleName</key>
<string>afs</string>
<key>CFBundlePackageType</key>
<string>KEXT</string>
<key>CFBundleShortVersionString</key>
<string>@MACOS_VERSION@</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>@MACOS_VERSION@</string>
<key>OSBundleLibraries</key>
<dict>
<key>com.apple.kpi.bsd</key>
<string>8.0.0</string>
<key>com.apple.kpi.mach</key>
<string>8.0.0</string>
<key>com.apple.kpi.libkern</key>
<string>8.0</string>
</dict>
</dict>
</plist>

View File

@ -284,6 +284,9 @@ syscall.o: ${SYS}/syscall.s
$(PATH_CPP) ${SFLAGS} ${SYS}/syscall.s > syscall.ss; \
as -o syscall.o syscall.ss; \
$(RM) syscall.ss;; \
arm_darwin_* ) \
touch syscall.c ; \
${CC} ${AFS_CFLAGS} -c syscall.c;; \
sgi_* | *_darwin_* ) \
${CC} ${AFS_CFLAGS} -c ${SYS}/syscall.s;; \
alpha_dux?? ) \
@ -291,7 +294,8 @@ syscall.o: ${SYS}/syscall.s
${AS} -o syscall.o syscall.i; \
$(RM) -f syscall.ss syscall.i;; \
*bsd* ) \
touch syscall.o ;; \
touch syscall.c ; \
${CC} ${AFS_CFLAGS} -c syscall.c;; \
*) \
$(PATH_CPP) ${SFLAGS} ${SYS}/syscall.s > syscall.ss; \
as -o syscall.o syscall.ss; \

View File

@ -9,7 +9,7 @@
#
SHELL=/bin/sh
INCLUDE= -I. -I/usr/include -I${TOP_OBJDIR}/src/config
INCLUDE= -I. -I${ISYSROOT}/usr/include -I${TOP_OBJDIR}/src/config
UOBJ =../UAFS
PICOBJ =../UAFS.pic
JUAFS =../JUAFS
@ -2022,14 +2022,14 @@ AFSWEB:
setup_common:
-$(RM) -f h net netinet rpc ufs nfs machine sys inet nsapi afsd
-ln -s /usr/include/sys h
-ln -s /usr/include/net net
-ln -s /usr/include/netinet netinet
-ln -s /usr/include/rpc rpc
-ln -s /usr/include/sys sys
-ln -s /usr/include/nfs nfs
-ln -s /usr/include/inet inet
-ln -s /usr/include/ufs ufs
-ln -s ${ISYSROOT}/usr/include/sys h
-ln -s ${ISYSROOT}/usr/include/net net
-ln -s ${ISYSROOT}/usr/include/netinet netinet
-ln -s ${ISYSROOT}/usr/include/rpc rpc
-ln -s ${ISYSROOT}/usr/include/sys sys
-ln -s ${ISYSROOT}/usr/include/nfs nfs
-ln -s ${ISYSROOT}/usr/include/inet inet
-ln -s ${ISYSROOT}/usr/include/ufs ufs
-ln -s $(TOP_SRCDIR)/afsd afsd
-ln -s $(NS_INCL) nsapi

View File

@ -92,7 +92,7 @@ process.o : process.s process.i386.s process.c lwp.o
fi ; \
fi ; \
if [ -n "$${arm}" ] ; then \
$(CC) ${LWP_DBG} ${LWP_OPTMZ} -c -arch armv6 -I${TOP_INCDIR} ${srcdir}/process.c -o "$${arm}" ; \
$(CC) -x assembler-with-cpp -c -arch armv6 -I${TOP_INCDIR} -I${srcdir} ${srcdir}/process.s -o "$${arm}" ; \
if [ -z "$${i386}" -a -z "$${amd64}" -a -z "$${ppc}" ] ; then \
${MV} "$${arm}" process.o ; \
fi ; \

View File

@ -370,7 +370,7 @@ LWP_CreateProcess(void *(*ep) (void *), int stacksize, int priority, void *parm,
Initialize_PCB(temp, priority, stackmemory, stacksize, ep, parm, name);
insert(temp, &runnable[priority]);
temp2 = lwp_cpptr;
#ifndef AFS_ARM_LINUX20_ENV
#if !defined(AFS_ARM_LINUX20_ENV) && !defined(AFS_ARM_DARWIN_ENV)
if (PRE_Block != 0)
Abort_LWP("PRE_Block not 0");
@ -466,7 +466,7 @@ LWP_CreateProcess2(void *(*ep) (void *), int stacksize, int priority, void *parm
Initialize_PCB(temp, priority, stackptr, stacksize, ep, parm, name);
insert(temp, &runnable[priority]);
temp2 = lwp_cpptr;
#ifndef AFS_ARM_LINUX20_ENV
#if !defined(AFS_ARM_LINUX20_ENV) && !defined(AFS_ARM_DARWIN_ENV)
if (PRE_Block != 0)
Abort_LWP("PRE_Block not 0");
@ -967,7 +967,7 @@ Dispatcher(void)
printf("Dispatch %d [PCB at 0x%x] \"%s\"\n", ++dispatch_count,
runnable[i].head, runnable[i].head->name);
#endif
#ifndef AFS_ARM_LINUX20_ENV
#if !defined(AFS_ARM_LINUX20_ENV) && !defined(AFS_ARM_DARWIN_ENV)
if (PRE_Block != 1)
Abort_LWP("PRE_Block not 1");
#endif

View File

@ -11,13 +11,15 @@
#include <afs/param.h>
#if defined(__arm32__) || defined(__arm__)
/* register definitions */
#ifndef AFS_ARM_DARWIN_ENV
/* register definitions */
fp .req r11
ip .req r12
sp .req r13
lp .req r14
pc .req r15
#endif
/*
savecontext(f, area1, newsp)
int (*f)()#if defined(RIOS);
@ -29,24 +31,30 @@
.text
.align 0
#ifndef AFS_ARM_DARWIN_ENV
.globl savecontext
.type savecontext, #function
savecontext:
@ build the frame
mov ip, sp
stmfd sp!, {fp, ip, lr, pc}
sub fp, ip, #4
@ stack r0 - r10, current fp
stmfd sp!, {r0, r1, r2, r3, r4, r5, r6, r7, r8, r9, r10, fp}
str sp, [r1, #0]
@ check if newsp is zero
movs r2, r2
movne sp, r2
@ call function ...
mov pc, r0
/* should never get here ... */
/* bl EXT(abort) */
#else
.globl _savecontext
_savecontext:
#endif
@ build the frame
mov ip, sp
stmfd sp!, {fp, ip, lr, pc}
sub fp, ip, #4
@ stack r0 - r10, current fp
stmfd sp!, {r0, r1, r2, r3, r4, r5, r6, r7, r8, r9, r10, fp}
str sp, [r1, #0]
@ check if newsp is zero
movs r2, r2
movne sp, r2
@ call function ...
#ifdef AFS_ARM_DARWIN_ENV
bx r0
#else
mov pc, r0
#endif
/*
returnto(area2)
@ -55,9 +63,14 @@ savecontext:
/* area2 is in r0. */
#ifndef AFS_ARM_DARWIN_ENV
.globl returnto
.type returnto, #function
returnto:
#else
.globl _returnto
_returnto:
#endif
@ restore r0-r10, fp
ldr r0, [r0, #0]
ldmfd r0, {r0, r1, r2, r3, r4, r5, r6, r7, r8, r9, r10, fp}

View File

@ -292,6 +292,9 @@ syscall.o: ${SYS}/syscall.s
$(PATH_CPP) ${SFLAGS} ${SYS}/syscall.s > syscall.ss; \
as -o syscall.o syscall.ss; \
$(RM) syscall.ss;; \
arm_darwin_* ) \
touch syscall.c ; \
${CC} ${AFS_CFLAGS} -c syscall.c;; \
sgi_* | *_darwin_* ) \
${CC} ${AFS_CFLAGS} -c ${SYS}/syscall.s;; \
alpha_dux?? ) \

View File

@ -33,7 +33,7 @@
#endif
#endif
#else /* AFS_VFSINCL_ENV */
#if !defined(AFS_AIX_ENV) && !defined(AFS_LINUX22_ENV) && !defined(AFS_XBSD_ENV)
#if !defined(AFS_AIX_ENV) && !defined(AFS_LINUX20_ENV) && !defined(AFS_XBSD_ENV) && !defined(AFS_ARM_DARWIN_ENV)
#include <sys/fs.h>
#endif
#endif /* AFS_VFSINCL_ENV */

View File

@ -60,7 +60,7 @@
#ifdef AFS_OSF_ENV
#include <ufs/inode.h>
#else /* AFS_OSF_ENV */
#if !defined(AFS_LINUX20_ENV) && !defined(AFS_XBSD_ENV)
#if !defined(AFS_LINUX20_ENV) && !defined(AFS_XBSD_ENV) && !defined(AFS_ARM_DARWIN_ENV)
#include <sys/inode.h>
#endif
#endif

View File

@ -63,7 +63,7 @@
#ifdef AFS_OSF_ENV
#include <ufs/inode.h>
#else /* AFS_OSF_ENV */
#if !defined(AFS_LINUX20_ENV) && !defined(AFS_XBSD_ENV)
#if !defined(AFS_LINUX20_ENV) && !defined(AFS_XBSD_ENV) && !defined(AFS_ARM_DARWIN_ENV)
#include <sys/inode.h>
#endif
#endif

View File

@ -130,7 +130,7 @@ Vnodes with 0 inode pointers in RW volumes are now deleted.
#ifdef AFS_OSF_ENV
#include <ufs/inode.h>
#else /* AFS_OSF_ENV */
#if !defined(AFS_LINUX20_ENV) && !defined(AFS_XBSD_ENV)
#if !defined(AFS_LINUX20_ENV) && !defined(AFS_XBSD_ENV) && !defined(AFS_ARM_DARWIN_ENV)
#include <sys/inode.h>
#endif
#endif

View File

@ -46,7 +46,7 @@
#endif
#endif
#else /* AFS_VFSINCL_ENV */
#if !defined(AFS_AIX_ENV) && !defined(AFS_LINUX20_ENV) && !defined(AFS_XBSD_ENV)
#if !defined(AFS_AIX_ENV) && !defined(AFS_LINUX20_ENV) && !defined(AFS_XBSD_ENV) && !defined(AFS_ARM_DARWIN_ENV)
#include <sys/fs.h>
#endif
#endif /* AFS_VFSINCL_ENV */