Skip to content

Commit

Permalink
update quick start guide for BPSec
Browse files Browse the repository at this point in the history
  • Loading branch information
iondev33 committed Jul 22, 2024
1 parent dba789d commit 42d61b8
Show file tree
Hide file tree
Showing 253 changed files with 23,347 additions and 0 deletions.
33 changes: 33 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "(gdb) Launch sm_subsystem test",
"type": "cppdbg",
"request": "launch",
"program": "/home/jgao/iondev/ion-ios/tests/sm_subsystem/dotest",
"args": [],
"stopAtEntry": false,
"cwd": "${fileDirname}",
"environment": [],
"externalConsole": false,
"MIMode": "gdb",
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
},
{
"description": "Set Disassembly Flavor to Intel",
"text": "-gdb-set disassembly-flavor intel",
"ignoreFailures": true
}
]
}

]
}
45 changes: 45 additions & 0 deletions ams/Makefile.dev
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
OPT = /usr/local
HEAP_PTRS = 0
PLATFORMS = i86_64-fedora
# i86-redhat
# sparc-sol9
# i86-freebsd

all:
cd doc; \
mkdir -p man; \
mkdir -p man/man1; \
mkdir -p man/man3; \
mkdir -p man/man5; \
mkdir -p html; \
mkdir -p html/man1; \
mkdir -p html/man3; \
mkdir -p html/man5; \
gmake all ROOT=$(OPT); \
cd ..; \
for PF in $(PLATFORMS); \
do \
cd $$PF; \
mkdir -p bin; \
mkdir -p lib; \
gmake all ROOT=$(OPT) PTRS=$(HEAP_PTRS); \
cd ..; \
done

clean:
cd doc; \
gmake -i clean; \
cd ..;
for PF in $(PLATFORMS); \
do cd $$PF; gmake -i clean; cd ..; done

install:
cd doc; \
gmake -i install ROOT=$(OPT); \
cd ..;
for PF in $(PLATFORMS); \
do cd $$PF; gmake -i install ROOT=$(OPT); cd ..; done

uninstall:
for PF in $(PLATFORMS); \
do cd $$PF; gmake -i uninstall ROOT=$(OPT); cd ..; done
131 changes: 131 additions & 0 deletions ams/arm-uClibc/Makefile.dev
Original file line number Diff line number Diff line change
@@ -0,0 +1,131 @@
INCL = ../include
API = ../library
TEST = ../test
UTILS = ../utils
RAMS = ../rams

# OPT = -O -DuClibc
OPT = -g -fPIC -Wall -Werror -DuClibc -DUDPTS -DTCPTS -DDGRTS -DNOEXPAT
CC = $(TCC) $(OPT) -I$(API) -I$(INCL) -I$(RAMS) -I$(ROOT)/include
LDFLAGS = -fPIC -shared
LD = $(TLD) $(LDFLAGS)

LIBAMSOBJS = \
libams.o \
amscommon.o \
loadmib.o \
crypt.o \
dgrts.o \
udpts.o \
tcpts.o

AMSDOBJS = \
amsd.o \
libams.o \
amscommon.o \
loadmib.o \
crypt.o \
dgrts.o \
udpts.o \
tcpts.o

RAMSTESTOBJS = \
librams.o \
ramscommon.o \
ramsgate.o

PUBINCLS = \
$(INCL)/ams.h

LBP = -lbp -limcfw -lipnfw -ldtn2fw

RUNTIMES = amsd amshello amsshell amslog amslogprt amsbenchs amsbenchr ramsgate amsstop amsmib

ALL = check libams.so $(RUNTIMES)

all: $(ALL)

check: $(PUBINCLS)
rm -f *.o
touch check
mkdir -p lib
mkdir -p bin

clean:
rm -f *.o
rm -f $(ALL)
rm -f ./lib/*
rm -f ./bin/*

install:
cp ../include/* $(ROOT)/include
cp lib/* $(ROOT)/lib
cp bin/* $(ROOT)/bin

# - - Daemon executable - - - -

amsd: $(AMSDOBJS) $(API)/amscommon.h
$(CC) -o amsd $(AMSDOBJS) -L./lib -L$(ROOT)/lib -ldgr -lici -lpthread -lm
cp amsd ./bin

# - - Test executables - - - -

amshello: amshello.o libams.so $(INCL)/ams.h
$(CC) -o amshello amshello.o -L./lib -L$(ROOT)/lib -lams -ldgr -lici -lpthread -lm
cp amshello ./bin

amsbenchs: amsbenchs.o libams.so $(INCL)/ams.h
$(CC) -o amsbenchs amsbenchs.o -L./lib -L$(ROOT)/lib -lams -ldgr -lici -lpthread -lm
cp amsbenchs ./bin

amsbenchr: amsbenchr.o libams.so $(INCL)/ams.h
$(CC) -o amsbenchr amsbenchr.o -L./lib -L$(ROOT)/lib -lams -ldgr -lici -lpthread -lm
cp amsbenchr ./bin

# - - Utility executables - - - -

amsshell: amsshell.o libams.so $(INCL)/ams.h
$(CC) -o amsshell amsshell.o -L./lib -L$(ROOT)/lib -lams -ldgr -lici -lpthread -lm
cp amsshell ./bin

amslog: amslog.o libams.so $(INCL)/ams.h
$(CC) -o amslog amslog.o -L./lib -L$(ROOT)/lib -lams -ldgr -lici -lpthread -lm
cp amslog ./bin

amslogprt: amslogprt.o
$(CC) -o amslogprt amslogprt.o -L./lib -L$(ROOT)/lib
cp amslogprt ./bin

amsstop: amsstop.o libams.so $(INCL)/ams.h
$(CC) -o amsstop amsstop.o -L./lib -L$(ROOT)/lib -lams -ldgr -lici -lpthread -lm
cp amsstop ./bin

amsmib: amsmib.o libams.so $(INCL)/ams.h
$(CC) -o amsmib amsmib.o -L./lib -L$(ROOT)/lib -lams -ldgr -lici -lpthread -lm
cp amsmib ./bin

# - - RAMS executable - - - -

ramsgate: $(RAMSTESTOBJS) $(RAMS)/rams.h $(RAMS)/ramscommon.h libams.so $(INCL)/ams.h
$(CC) -o ramsgate $(RAMSTESTOBJS) -L./lib -L$(ROOT)/lib $(LBP) -lams -ldgr -lici -lpthread -lm
cp ramsgate ./bin

# - - Libraries - - - - -

libams.so: $(LIBAMSOBJS) $(API)/amsP.h
$(LD) -o libams.so $(LIBAMSOBJS)
cp libams.so ./lib

# - - Object modules - - - - -

%.o: $(API)/%.c
$(CC) -c $<

%.o: $(TEST)/%.c
$(CC) -c $<

%.o: $(UTILS)/%.c
$(CC) -c $<

%.o: $(RAMS)/%.c
$(CC) -c $<
78 changes: 78 additions & 0 deletions ams/doc/Makefile.dev
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
PODM1 = pod2man -s 1 -c "AMS executables"
PODM3 = pod2man -s 3 -c "AMS library functions"
PODM5 = pod2man -s 5 -c "AMS configuration files"
PODH = pod2html --noindex

MANFILES = \
./man/man1/amsbenchr.1 \
./man/man1/amsbenchs.1 \
./man/man1/amsd.1 \
./man/man1/amshello.1 \
./man/man1/amslog.1 \
./man/man1/amslogprt.1 \
./man/man1/amspub.1 \
./man/man1/amsshell.1 \
./man/man1/amsstop.1 \
./man/man1/amsmib.1 \
./man/man1/amssub.1 \
./man/man1/ramsgate.1 \
./man/man3/ams.3 \
./man/man5/petition_log.5 \
./man/man5/amsrc.5 \
./man/man5/amsxml.5

HTMLFILES = \
./html/man1/amsbenchr.html \
./html/man1/amsbenchs.html \
./html/man1/amsd.html \
./html/man1/amshello.html \
./html/man1/amslog.html \
./html/man1/amslogprt.html \
./html/man1/amspub.html \
./html/man1/amsshell.html \
./html/man1/amsstop.html \
./html/man1/amsmib.html \
./html/man1/amssub.html \
./html/man1/ramsgate.html \
./html/man3/ams.html \
./html/man5/petition_log.html \
./html/man5/amsrc.html \
./html/man5/amsxml.html

ALL = $(MANFILES) $(HTMLFILES)

all: $(ALL)

clean:
rm -f man/man1/*.1
rm -f man/man3/*.3
rm -f man/man5/*.5
rm -f html/man1/*.html
rm -f html/man3/*.html
rm -f html/man5/*.html
rm -f *.tmp

install:
cp man/man1/*.1 $(ROOT)/man/man1
cp man/man3/*.3 $(ROOT)/man/man3
cp man/man5/*.5 $(ROOT)/man/man5

# - - Man files - - - - -

./man/man1/%.1: pod1/%.pod
$(PODM1) $< $@

./man/man3/%.3: pod3/%.pod
$(PODM3) $< $@

./man/man5/%.5: pod5/%.pod
$(PODM5) $< $@

./html/man1/%.html: pod1/%.pod
$(PODH) --infile=$< --outfile=$@

./html/man3/%.html: pod3/%.pod
$(PODH) --infile=$< --outfile=$@

./html/man5/%.html: pod5/%.pod
$(PODH) --infile=$< --outfile=$@
Loading

0 comments on commit 42d61b8

Please sign in to comment.