ers35 / luakernel Goto Github PK
View Code? Open in Web Editor NEWLua + SQLite + musl libc running on x86.
License: Creative Commons Zero v1.0 Universal
Lua + SQLite + musl libc running on x86.
License: Creative Commons Zero v1.0 Universal
Hi,
Been playing around with this for a few hours. Neat project! I wonder though, is there a way to persist files to a local file system? I've noticed that there is a syscall wrapper for open/write etc. calls, but it isn't used in the actual lua demo.
What I want to do is basically build a disk image, instead of an ISO, so files can be written/read from the "OS".
Side question: Is there a technical reason why this uses lua, instead of luajit? Could it be easily replaced?
shutit.install('git')
shutit.install('make')
shutit.install('gcc')
shutit.install('mlocate')
shutit.install('libc6-dev-i386')
shutit.install('lua5.2')
shutit.send('updatedb')
shutit.send('export CPATH=/usr/include/x86_64-linux-gnu:/usr/include')
shutit.send('git clone https://github.com/ers35/luakernel.git')
shutit.send('cd luakernel')
shutit.send('make')
Running the above commands (with the shutit commands taken out) on docker ubuntu 14.04 I get this error:
./musl-custom-gcc -std=gnu99 -m64 -fno-PIC -nostdlib -nodefaultlibs -fno-stack-protector -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=0 -masm=intel -O1 -g -c init.S -o bin/initS.o
gcc -std=gnu99 -m64 -fno-PIC -nostdlib -nodefaultlibs -fno-stack-protector -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=0 -masm=intel -O1 -g -c -m32 init.c -o bin/init.o
objcopy -I elf32-i386 -O elf64-x86-64 bin/init.o bin/init.o
./generate-lua-bundle.sh
./musl-custom-gcc -std=gnu99 -m64 -fno-PIC -nostdlib -nodefaultlibs -fno-stack-protector -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=0 -masm=intel -O1 -g -c -Idep/lua-5.2.3/src -Idep/sqlite3 luakernel.c -fno-stack-protector -o bin/luakernel.o
In file included from /usr/include/libio.h:31:0,
from /usr/include/stdio.h:74,
from luakernel.c:3:
/usr/include/_G_config.h:46:20: error: unknown type name '__gnuc_va_list'
#define _G_va_list __gnuc_va_list
^
/usr/include/libio.h:44:21: note: in expansion of macro '_G_va_list'
#define _IO_va_list _G_va_list
^
/usr/include/libio.h:465:4: note: in expansion of macro '_IO_va_list'
_IO_va_list, int *__restrict);
^
...
Tried fiddling with err.h includes with no success.
In many countries you cannot just disclaim copyright.
It would clarify things if you used something like CC0: http://creativecommons.org/about/cc0
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.