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

fixes several rpi3 issues and adds zsh support #34

Open
wants to merge 1 commit into
base: master
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
2 changes: 2 additions & 0 deletions patches/include/types.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@
typedef unsigned char byte;
typedef unsigned short word;
typedef unsigned int dword;
#ifndef __bool_true_false_are_defined //is this really necessary to have your own types.h?
typedef unsigned char bool;
#endif
typedef signed char int8_t;
typedef unsigned char uint8_t;
typedef signed short int int16_t;
Expand Down
12 changes: 8 additions & 4 deletions setup_env.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
OLD_PWD=$(pwd)
cd $(dirname ${BASH_SOURCE[0]})
if [[ $0 == *"bash"* ]]; then
cd $(dirname ${BASH_SOURCE[0]})
elif [[ $0 == *"zsh"* ]]; then
cd ${(%):-%N}
fi

export ARCH=arm
export SUBARCH=arm
Expand All @@ -10,15 +14,15 @@ export PLATFORMUNAME=$(uname -m)

export NEXMON_ROOT=$(pwd)

if [ $HOSTUNAME == "Darwin" ]; then
if [ $HOSTUNAME '==' "Darwin" ]; then
export CC=$NEXMON_ROOT/buildtools/gcc-arm-none-eabi-5_4-2016q2-osx/bin/arm-none-eabi-
export CCPLUGIN=$NEXMON_ROOT/buildtools/gcc-nexmon-plugin-osx/nexmon.so
export ZLIBFLATE="openssl zlib"
else if [ $HOSTUNAME == "Linux" ] && [ $PLATFORMUNAME == "x86_64" ]; then
else if [ $HOSTUNAME '==' "Linux" ] && [ $PLATFORMUNAME '==' "x86_64" ]; then
export CC=$NEXMON_ROOT/buildtools/gcc-arm-none-eabi-5_4-2016q2-linux-x86/bin/arm-none-eabi-
export CCPLUGIN=$NEXMON_ROOT/buildtools/gcc-nexmon-plugin/nexmon.so
export ZLIBFLATE="zlib-flate -compress"
else if [ $HOSTUNAME == "Linux" ] && [ $PLATFORMUNAME == "armv7l" ]; then
else if [ $HOSTUNAME '==' "Linux" ] && [ $PLATFORMUNAME '==' "armv7l" ]; then
export CC=$NEXMON_ROOT/buildtools/gcc-arm-none-eabi-5_4-2016q2-linux-armv7l/bin/arm-none-eabi-
export CCPLUGIN=$NEXMON_ROOT/buildtools/gcc-nexmon-plugin-arm/nexmon.so
export ZLIBFLATE="zlib-flate -compress"
Expand Down
10 changes: 10 additions & 0 deletions utilities/libnexio/Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
GIT_VERSION := $(shell git describe --abbrev=4 --dirty --always --tags)

all: libs/armeabi/libnexio.a

ifneq ($(shell uname -m),armv7l)
libs/armeabi/libnexio.a: Android.mk
$(NDK_ROOT)/ndk-build NDK_APPLICATION_MK=`pwd`/Application.mk NDK_APP_OUT=. TARGET_PLATFORM=android-21
else
libs/armeabi/libnexio.a: libnexio.c
gcc -c libnexio.c -o libnexio.o -DBUILD_ON_RPI -DVERSION=\"$GIT_VERSION\" -I../../patches/include
ar rcs libnexio.a libnexio.o
endif

clean:
rm -Rf libs
Expand Down
4 changes: 2 additions & 2 deletions utilities/nexutil/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ libs/armeabi/nexutil: Android.mk nexutil.c ../libargp/local/armeabi/libargp.a ..
$(NDK_ROOT)/ndk-build NDK_APPLICATION_MK=`pwd`/Application.mk NDK_APP_OUT=. TARGET_PLATFORM=android-21 GIT_VERSION=$(GIT_VERSION)
else
libs/armeabi/nexutil: nexutil.c FORCE
gcc -o nexutil nexutil.c -DBUILD_ON_RPI -DVERSION=\"$GIT_VERSION\" -I../../patches/include
gcc -static -o nexutil nexutil.c -DBUILD_ON_RPI -DVERSION=\"$GIT_VERSION\" -I../../patches/include -L../libnexio/ -lnexio
endif

../libargp/local/armeabi/libargp.a: FORCE
Expand All @@ -33,4 +33,4 @@ clean:
rm -Rf local

FORCE:


5 changes: 3 additions & 2 deletions utilities/nexutil/nexutil.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@

#include <stdio.h>
#include <stdlib.h>
#include <argp-extern.h>
//#include <argp-extern.h>
#include <argp.h>
#include <string.h>
#include <byteswap.h>

Expand All @@ -53,7 +54,7 @@
#include <stdbool.h>
#include <errno.h>

#include <wlcnt.h>
#include "wlcnt.h"

#include <nexioctls.h>

Expand Down
2 changes: 2 additions & 0 deletions utilities/nexutil/wlcnt.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@
* *
**************************************************************************/

#include <types.h>

typedef uint32_t uint32;
typedef uint16_t uint16;

Expand Down