Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Side deck for plugins #30

Open
wants to merge 6 commits into
base: v1.x/staging
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 41 additions & 0 deletions build/gen-side-deck.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
#!/bin/bash
trap 'exit 1' ERR

ZSS=${ZSS:-$PWD/..}

DEFS=$ZSS/build/side-deck-defs
FILES="`cat $DEFS/files`"

cd $ZSS/build/tmp-zss

dd if=zssServer.x conv=unblock cbs=80 of=side-deck

rm -f relevant-functions
for f in $FILES
do
if [ -f $DEFS/$f-bl ]
then
echo "Found blacklist file for $f"
nm $f |grep ' T ' |awk '{ print $3 }' |grep -v -f $DEFS/$f-bl >>relevant-functions
elif [ -f $DEFS/$f-wl ]
then
echo "Found whilelist file for $f"
nm $f |grep ' T ' |awk '{ print $3 }' |grep -f $DEFS/$f-wl >>relevant-functions
else
echo "Adding all functions from $f to the side deck"
nm $f |grep ' T ' |awk '{ print $3 }' >>relevant-functions
fi
done
sort -u -o relevant-functions relevant-functions

cat relevant-functions |while read fn; do grep ",'"$fn"'" side-deck; done >side-deck-filtered

# dd doesn't support file tags, while cat does.
cat side-deck-filtered |dd conv=block cbs=80 bs=80 |sed 's/\(.\{79\}\)./\1\n/g' >zss.x

mkdir -p $ZSS/lib
cp zss.x $ZSS/lib
echo Side deck $ZSS/lib/zss.x build successfully out of $FILES



1 change: 1 addition & 0 deletions build/side-deck-defs/client.o-wl
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
zisCallService
4 changes: 4 additions & 0 deletions build/side-deck-defs/files
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
recovery.o http.o httpserver.o utils.o
dataservice.o json.o xml.o logging.o
client.o

18 changes: 18 additions & 0 deletions build/side-deck-defs/httpserver.o-bl
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
registerHttpServerModuleWithBase
httpServerSetSessionTokenKey
registerHttpService
dequeueHttpRequest
makeHttpRequestParser
makeHttpResponse
makeHttpServer2
makeHttpServer
makeSecureHttpServer
makeHttpConversation
processHttpFragment
setHttpParseTrace
setHttpDispatchTrace
setHttpHeadersTrace
setHttpSocketTrace
setHttpCloseConversationTrace
setHttpAuthTrace
mainHttpLoop
25 changes: 25 additions & 0 deletions build/side-deck-defs/utils.o-wl
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
addToStringList
addToStringList
addToStringListUnique
firstStringListElt
makeStringList
stringListContains
stringListContains
stringListLast
stringListLength
stringListPrint
SLHAlloc
SLHAlloc
SLHFree
makeShortLivedHeap
makeShortLivedHeap64
destructivelyUnasciify
nullTerminate
dumpbuffer
cnvintst
makeBufferCharStream
charStreamPosition
charStreamGet
charStreamEOF
charStreamClose
charStreamFree
2 changes: 1 addition & 1 deletion build/zss.xml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
<arg value="-DHTTPSERVER_BPX_IMPERSONATION=1"/>
<arg value="${compilerAPFArg}"/>
<arg value="-Wc,dll,expo,langlvl(extc99),gonum,goff,hgpr,roconst,ASM,asmlib('CEE.SCEEMAC','SYS1.MACLIB','SYS1.MODGEN')"/>
<arg value="-Wl,ac=1"/>
<arg value="-Wl,ac=1,dll"/>
<arg line="-I ${COMMON}/h"/>
<arg line="-I ${ZSS}/h"/>
<arg line="-o ${ZSS}/bin/zssServer"/>
Expand Down
12 changes: 12 additions & 0 deletions h/zss-plugin.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#ifndef __ZSS_PLUGIN_H__
#define __ZSS_PLUGIN_H__

#include "zowetypes.h"
#include "httpserver.h"
#include "utils.h"
#include "dataservice.h"
#include "json.h"
#include "alloc.h"
#include "logging.h"

#endif /* __ZSS_PLUGIN_H__ */
255 changes: 255 additions & 0 deletions lib/zss.x

Large diffs are not rendered by default.