Added OpenSSL dependency
This commit is contained in:
parent
1204809ac6
commit
462138cb94
8
Makefile
8
Makefile
@ -1,11 +1,11 @@
|
|||||||
# LuPI2 Makefile
|
# LuPI2 Makefile
|
||||||
|
|
||||||
# Default compiler settings.
|
# Default compiler settings.
|
||||||
PREFIX?=musl-
|
PREFIX?=musl
|
||||||
|
|
||||||
CC = $(PREFIX)gcc
|
CC = $(PREFIX)-gcc
|
||||||
CFLAGS?=-O2 -std=c99
|
CFLAGS?=-O2 -std=c99
|
||||||
LDFLAGS+= -static
|
LDFLAGS+= -static -Ldependencies/lib-$(PREFIX)
|
||||||
|
|
||||||
# Project specific stuff
|
# Project specific stuff
|
||||||
BUILD = bin/
|
BUILD = bin/
|
||||||
@ -13,7 +13,7 @@ SOURCE = src/c
|
|||||||
|
|
||||||
CORELUA = src/lua/core
|
CORELUA = src/lua/core
|
||||||
RESOURCES = resources
|
RESOURCES = resources
|
||||||
LIBS=-lm
|
LIBS=-lm -lcrypto -lssl
|
||||||
|
|
||||||
INCLUDES=-I$(SOURCE) -Isrc/c/lib/lua -Iinclude
|
INCLUDES=-I$(SOURCE) -Isrc/c/lib/lua -Iinclude
|
||||||
|
|
||||||
|
13
README.md
13
README.md
@ -3,13 +3,16 @@ Second attempt at Lua based operating system, primarily aimed at RaspberryPi, bu
|
|||||||
fact that GNU/Linux + python solution isn't allays the best for people that haven't been programming ever, and Lua in one of the simplest, most
|
fact that GNU/Linux + python solution isn't allays the best for people that haven't been programming ever, and Lua in one of the simplest, most
|
||||||
intuitive languages. It has only 6 types, very simple syntax, yet supports many advanced mechanisms.
|
intuitive languages. It has only 6 types, very simple syntax, yet supports many advanced mechanisms.
|
||||||
|
|
||||||
Running
|
Build
|
||||||
-----
|
-----
|
||||||
1. Clone this repository
|
1. Clone this repository
|
||||||
2. Get musl libc(with musl-gcc wrapper)
|
2. Get musl libc (with musl-gcc wrapper), or compile musl cross compiler(like arm-linux-musleabihf)
|
||||||
2.5 Get `xxd` utility(usually packaged with vim)
|
3. Get `xxd` utility (usually packaged with vim)
|
||||||
3. Execute `make build`
|
4. Build dependencies using scripts/dependencies.sh script
|
||||||
4. You will need to put some OS to `root` directory where you run the binary. For now you can get plan9k at http://cloud.magik6k.net/index.php/s/7jPRAU037dzt8Ga/download
|
5. Execute `make build`
|
||||||
|
6. You will need to put some OS to `root` directory where you run the binary. For now you can get plan9k at https://cloud.magik6k.net/index.php/s/7jPRAU037dzt8Ga/download
|
||||||
|
|
||||||
|
In case of problems poke me/someone at #lupi on Freenode
|
||||||
|
|
||||||
Idea
|
Idea
|
||||||
-----
|
-----
|
||||||
|
53
scripts/dependencies.sh
Executable file
53
scripts/dependencies.sh
Executable file
@ -0,0 +1,53 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
#TOOL=arm-musl-linuxeabihf
|
||||||
|
TOOL=x86_64-unknown-linux-gnu
|
||||||
|
OPENSSL_TARGET=linux-generic32
|
||||||
|
OUT=$TOOL
|
||||||
|
# TODO: more targets / host target / musl target from host
|
||||||
|
|
||||||
|
if [ $# -lt 1 ]
|
||||||
|
then
|
||||||
|
echo "Usage : $0 [arm32-musl|x86_64|x86_64-musl]"
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
|
||||||
|
case "$1" in
|
||||||
|
arm32-musl )
|
||||||
|
TOOL=arm-linux-musleabihf
|
||||||
|
OUT=$TOOL
|
||||||
|
OPENSSL_TARGET=linux-generic32
|
||||||
|
;;
|
||||||
|
x86_64 )
|
||||||
|
TOOL=x86_64-unknown-linux-gnu
|
||||||
|
OUT=$TOOL
|
||||||
|
OPENSSL_TARGET=linux-generic64
|
||||||
|
;;
|
||||||
|
musl )
|
||||||
|
TOOL=x86_64-unknown-linux-gnu
|
||||||
|
OUT=musl
|
||||||
|
OPENSSL_TARGET=linux-generic64
|
||||||
|
;;
|
||||||
|
*) echo "Invalid target!" ; exit 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
mkdir -p dependencies
|
||||||
|
|
||||||
|
rm -rf dependencies/lib-$OUT
|
||||||
|
mkdir -p dependencies/lib-$OUT
|
||||||
|
|
||||||
|
cd dependencies
|
||||||
|
git clone git://git.openssl.org/openssl.git
|
||||||
|
cd openssl
|
||||||
|
|
||||||
|
#./Configure
|
||||||
|
cd ..
|
||||||
|
rm -rf openssl-build
|
||||||
|
mkdir openssl-build
|
||||||
|
cd openssl-build
|
||||||
|
../openssl/Configure $OPENSSL_TARGET --unified no-asm -DOPENSSL_NO_HEARTBEATS --openssldir=$(cd ../lib-$OUT; pwd) no-shared
|
||||||
|
make libcrypto.a -j8 CC=$TOOL-gcc RANLIB=$TOOL-ranlib LD=$TOOL-ld MAKEDEPPROG=$TOOL-gcc PROCESSOR=ARM
|
||||||
|
make libssl.a -j8 CC=$TOOL-gcc RANLIB=$TOOL-ranlib LD=$TOOL-ld MAKEDEPPROG=$TOOL-gcc PROCESSOR=ARM
|
||||||
|
|
||||||
|
cp libcrypto.a ../lib-$OUT
|
||||||
|
cp libssl.a ../lib-$OUT
|
Loading…
Reference in New Issue
Block a user