Merge branch 'relibc'
This commit is contained in:
commit
e1b7b0e8cb
3
.gitignore
vendored
3
.gitignore
vendored
|
@ -1 +1,2 @@
|
|||
build
|
||||
/build/
|
||||
/prefix/
|
||||
|
|
3
.gitmodules
vendored
3
.gitmodules
vendored
|
@ -22,3 +22,6 @@
|
|||
[submodule "redoxfs"]
|
||||
path = redoxfs
|
||||
url = https://gitlab.redox-os.org/redox-os/redoxfs.git
|
||||
[submodule "relibc"]
|
||||
path = relibc
|
||||
url = https://gitlab.redox-os.org/redox-os/relibc.git
|
||||
|
|
22
Makefile
22
Makefile
|
@ -40,10 +40,8 @@ fetch:
|
|||
"$$(cargo run --manifest-path ../installer/Cargo.toml -- --list-packages -c ../initfs.toml)" \
|
||||
"$$(cargo run --manifest-path ../installer/Cargo.toml -- --list-packages -c ../filesystem.toml)"
|
||||
|
||||
# Emulation recipes
|
||||
include mk/qemu.mk
|
||||
include mk/bochs.mk
|
||||
include mk/virtualbox.mk
|
||||
# Cross compiler recipes
|
||||
include mk/prefix.mk
|
||||
|
||||
# Kernel recipes
|
||||
include mk/kernel.mk
|
||||
|
@ -55,6 +53,11 @@ include mk/filesystem.mk
|
|||
# Disk images
|
||||
include mk/disk.mk
|
||||
|
||||
# Emulation recipes
|
||||
include mk/qemu.mk
|
||||
include mk/bochs.mk
|
||||
include mk/virtualbox.mk
|
||||
|
||||
# CI image target
|
||||
ci-img: FORCE
|
||||
make INSTALLER_FLAGS= build/harddrive.bin.gz build/harddrive-efi.bin.gz build/livedisk.iso build/livedisk-efi.iso
|
||||
|
@ -67,11 +70,12 @@ ci-img: FORCE
|
|||
cd build/img && sha256sum -b * > SHA256SUM
|
||||
|
||||
# CI packaging target
|
||||
ci-pkg: FORCE
|
||||
cd cookbook && ./fetch.sh \
|
||||
"$$(cargo run --manifest-path ../installer/Cargo.toml -- --list-packages -c ../ci.toml)"
|
||||
cd cookbook && ./repo.sh \
|
||||
"$$(cargo run --manifest-path ../installer/Cargo.toml -- --list-packages -c ../ci.toml)"
|
||||
ci-pkg: prefix FORCE
|
||||
export PATH="$(PREFIX_PATH):$$PATH" && \
|
||||
PACKAGES="$$(cargo run --manifest-path installer/Cargo.toml -- --list-packages -c ci.toml)" && \
|
||||
cd cookbook && \
|
||||
./fetch.sh "$${PACKAGES}" && \
|
||||
./repo.sh "$${PACKAGES}"
|
||||
|
||||
# An empty target
|
||||
FORCE:
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit 615d9e136512a21cc5fb22b5ab74389e078d3fb7
|
||||
Subproject commit ad8f6a97e9205552e1414bb481b3d13ec9ae5fae
|
|
@ -1 +1 @@
|
|||
Subproject commit de305ff651b811f2640ea685bbd9f2b12b974f15
|
||||
Subproject commit 555b236027a32a87bca273999b008e9534f9f876
|
85
ci.toml
85
ci.toml
|
@ -5,88 +5,89 @@ prompt = false
|
|||
|
||||
[packages]
|
||||
acid = {}
|
||||
autoconf = {}
|
||||
automake = {}
|
||||
bash = {}
|
||||
binutils = {}
|
||||
#autoconf = {}
|
||||
#automake = {}
|
||||
#bash = {}
|
||||
#binutils = {}
|
||||
ca-certificates = {}
|
||||
#cargo = {}
|
||||
cleye = {}
|
||||
#cmatrix = {}
|
||||
contain = {}
|
||||
coreutils = {}
|
||||
curl = {}
|
||||
#curl = {}
|
||||
dash = {}
|
||||
diffutils = {}
|
||||
dosbox = {}
|
||||
#diffutils = {}
|
||||
#dosbox = {}
|
||||
drivers = {}
|
||||
#drivers-041 = {}
|
||||
duktape = {}
|
||||
#duktape = {}
|
||||
expat = {}
|
||||
extrautils = {}
|
||||
#fd = {}
|
||||
ffmpeg = {}
|
||||
#ffmpeg = {}
|
||||
findutils = {}
|
||||
freedoom = {}
|
||||
freetype = {}
|
||||
#freedoom = {}
|
||||
#freetype = {}
|
||||
game-2048 = {}
|
||||
games = {}
|
||||
gawk = {}
|
||||
gcc = {}
|
||||
generaluser-gs = {}
|
||||
#gawk = {}
|
||||
#gcc = {}
|
||||
#generaluser-gs = {}
|
||||
#gigalomania = {}
|
||||
git = {}
|
||||
gnu-binutils = {}
|
||||
gnu-grep = {}
|
||||
gnu-make = {}
|
||||
#git = {}
|
||||
#gnu-binutils = {}
|
||||
#gnu-grep = {}
|
||||
#gnu-make = {}
|
||||
init = {}
|
||||
installer = {}
|
||||
ion = {}
|
||||
ipcd = {}
|
||||
jansson = {}
|
||||
#jansson = {}
|
||||
keyboard-sfx = {}
|
||||
lci = {}
|
||||
#lci = {}
|
||||
libjpeg = {}
|
||||
liborbital = {}
|
||||
libpng = {}
|
||||
#libsodium = {}
|
||||
libsodium = {}
|
||||
logd = {}
|
||||
lua = {}
|
||||
mdp = {}
|
||||
nasm = {}
|
||||
ncdu = {}
|
||||
ncurses = {}
|
||||
ncursesw = {}
|
||||
#lua = {}
|
||||
#mdp = {}
|
||||
#nasm = {}
|
||||
#ncdu = {}
|
||||
#ncurses = {}
|
||||
#ncursesw = {}
|
||||
netdb = {}
|
||||
netstack = {}
|
||||
netsurf = {}
|
||||
#netsurf = {}
|
||||
netutils = {}
|
||||
newlib = {}
|
||||
newlibtest = {}
|
||||
#newlib = {}
|
||||
#newlibtest = {}
|
||||
nulld = {}
|
||||
openssl = {}
|
||||
openttd = {}
|
||||
openttd-opengfx = {}
|
||||
openttd-openmsx = {}
|
||||
#openttd = {}
|
||||
#openttd-opengfx = {}
|
||||
#openttd-openmsx = {}
|
||||
orbdata = {}
|
||||
orbital = {}
|
||||
orbterm = {}
|
||||
orbutils = {}
|
||||
pastel = {}
|
||||
patch = {}
|
||||
#patch = {}
|
||||
periodictable = {}
|
||||
#perl = {}
|
||||
pixelcannon = {}
|
||||
pkgutils = {}
|
||||
#powerline = {}
|
||||
prboom = {}
|
||||
#prboom = {}
|
||||
ptyd = {}
|
||||
python = {}
|
||||
#python = {}
|
||||
randd = {}
|
||||
readline = {}
|
||||
#readline = {}
|
||||
redoxfs = {}
|
||||
#redox-ssh = {}
|
||||
relibc = {}
|
||||
ripgrep = {}
|
||||
rs-nes = {}
|
||||
#rust = {}
|
||||
rust64 = {}
|
||||
|
@ -94,19 +95,19 @@ rustual-boy = {}
|
|||
sdl = {}
|
||||
sdl_image = {}
|
||||
sdl_mixer = {}
|
||||
sed = {}
|
||||
#sed = {}
|
||||
shellstorm = {}
|
||||
smith = {}
|
||||
sodium = {}
|
||||
#ssh = {}
|
||||
terminfo = {}
|
||||
termplay = {}
|
||||
timidity = {}
|
||||
#timidity = {}
|
||||
ttf-hack = {}
|
||||
userutils = {}
|
||||
uutils = {}
|
||||
vim = {}
|
||||
vttest = {}
|
||||
xz = {}
|
||||
#vim = {}
|
||||
#vttest = {}
|
||||
#xz = {}
|
||||
zerod = {}
|
||||
zlib = {}
|
||||
|
|
2
cookbook
2
cookbook
|
@ -1 +1 @@
|
|||
Subproject commit 79e8d44a2e65acb0e74170209d7d551a1b997048
|
||||
Subproject commit 3bcea75ac2223757b9529d0d91e78d1401305ce1
|
|
@ -16,7 +16,7 @@ ca-certificates = {}
|
|||
#cargo = {}
|
||||
#cleye = {}
|
||||
#cmatrix = {}
|
||||
#contain = {}
|
||||
contain = {}
|
||||
coreutils = {}
|
||||
#curl = {}
|
||||
#dash = {}
|
||||
|
@ -24,6 +24,7 @@ coreutils = {}
|
|||
#dosbox = {}
|
||||
drivers = {}
|
||||
#duktape = {}
|
||||
#exampled = {}
|
||||
extrautils = {}
|
||||
#fd = {}
|
||||
#ffmpeg = {}
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit 33fa0af5214decdda7cc7ac39407ad18d727583b
|
||||
Subproject commit 49b7a5f427aaa08c217d784ec4b643d285cce5a8
|
2
kernel
2
kernel
|
@ -1 +1 @@
|
|||
Subproject commit 054fc41beb82019152bfc5186557aedb4e8b5d2a
|
||||
Subproject commit 3b1bf1bac1aa21eed53c3465d7b1a470f5922396
|
|
@ -1,4 +1,4 @@
|
|||
build/filesystem.bin: filesystem.toml build/bootloader build/kernel
|
||||
build/filesystem.bin: filesystem.toml build/bootloader build/kernel prefix
|
||||
-$(FUMOUNT) build/filesystem/ || true
|
||||
rm -rf $@ $@.partial build/filesystem/
|
||||
dd if=/dev/zero of=$@.partial bs=1048576 count=256
|
||||
|
@ -8,7 +8,10 @@ build/filesystem.bin: filesystem.toml build/bootloader build/kernel
|
|||
cargo run --manifest-path redoxfs/Cargo.toml --release --bin redoxfs -- $@.partial build/filesystem/
|
||||
sleep 2
|
||||
pgrep redoxfs
|
||||
cp filesystem.toml build/bootloader build/kernel build/filesystem/
|
||||
cp $< build/filesystem/filesystem.toml
|
||||
cp build/bootloader build/filesystem/bootloader
|
||||
cp build/kernel build/filesystem/kernel
|
||||
export PATH="$(PREFIX_PATH):$$PATH" && \
|
||||
cargo run --manifest-path installer/Cargo.toml --release -- $(INSTALLER_FLAGS) -c $< build/filesystem/
|
||||
sync
|
||||
-$(FUMOUNT) build/filesystem/ || true
|
||||
|
|
|
@ -1,13 +1,15 @@
|
|||
build/initfs.tag: initfs.toml
|
||||
build/initfs.tag: initfs.toml prefix
|
||||
cd kernel && xargo clean
|
||||
rm -rf build/initfs
|
||||
mkdir -p build/initfs
|
||||
export PATH="$(PREFIX_PATH):$$PATH" && \
|
||||
cargo run --manifest-path installer/Cargo.toml -- $(INSTALLER_FLAGS) -c $< build/initfs/
|
||||
touch $@
|
||||
|
||||
build/initfs_live.tag: initfs_live.toml
|
||||
build/initfs_live.tag: initfs_live.toml prefix
|
||||
cd kernel && xargo clean
|
||||
rm -rf build/initfs_live
|
||||
mkdir -p build/initfs_live
|
||||
export PATH="$(PREFIX_PATH):$$PATH" && \
|
||||
cargo run --manifest-path installer/Cargo.toml -- $(INSTALLER_FLAGS) -c $< build/initfs_live/
|
||||
touch $@
|
||||
|
|
|
@ -16,6 +16,8 @@ build/kernel: kernel/linkers/$(ARCH).ld build/libkernel.a
|
|||
|
||||
build/kernel_live: kernel/linkers/$(ARCH).ld build/libkernel_live.a build/live.o
|
||||
$(LD) --gc-sections -z max-page-size=0x1000 -T $< -o $@ build/libkernel_live.a build/live.o
|
||||
objcopy --only-keep-debug $@ $@.sym
|
||||
objcopy --strip-debug $@
|
||||
|
||||
build/live.o: build/filesystem.bin
|
||||
#TODO: More general use of $(ARCH)
|
||||
|
|
75
mk/prefix.mk
Normal file
75
mk/prefix.mk
Normal file
|
@ -0,0 +1,75 @@
|
|||
PREFIX=$(ROOT)/prefix
|
||||
|
||||
PREFIX_BINUTILS_PATH=$(PREFIX)/binutils-install/bin
|
||||
PREFIX_FREESTANDING_PATH=$(PREFIX_BINUTILS_PATH):$(PREFIX)/gcc-freestanding-install/bin
|
||||
PREFIX_PATH=$(PREFIX_BINUTILS_PATH):$(PREFIX)/gcc-install/bin
|
||||
|
||||
prefix: $(PREFIX)/gcc-install
|
||||
touch "$@"
|
||||
|
||||
$(PREFIX)/binutils.tar.bz2:
|
||||
mkdir -p "$(@D)"
|
||||
wget -O $@.partial "https://gitlab.redox-os.org/redox-os/binutils-gdb/-/archive/master/binutils-gdb-master.tar.bz2"
|
||||
mv $@.partial $@
|
||||
|
||||
$(PREFIX)/binutils: $(PREFIX)/binutils.tar.bz2
|
||||
mkdir -p "$@.partial"
|
||||
tar --extract --file "$<" --directory "$@.partial" --strip-components=1
|
||||
mv "$@.partial" "$@"
|
||||
touch "$@"
|
||||
|
||||
$(PREFIX)/binutils-install: $(PREFIX)/binutils
|
||||
rm -rf "$<-build" "$@"
|
||||
mkdir -p "$<-build" "$@"
|
||||
cd "$<-build" && \
|
||||
"$</configure" --target="$(TARGET)" --disable-werror --prefix="$@" && \
|
||||
make all -j `nproc` && \
|
||||
make install -j `nproc`
|
||||
touch "$@"
|
||||
|
||||
$(PREFIX)/gcc.tar.bz2:
|
||||
mkdir -p "$(@D)"
|
||||
wget -O $@.partial "https://gitlab.redox-os.org/redox-os/gcc/-/archive/redox/gcc-redox.tar.bz2"
|
||||
mv "$@.partial" "$@"
|
||||
|
||||
$(PREFIX)/gcc: $(PREFIX)/gcc.tar.bz2
|
||||
mkdir -p "$@.partial"
|
||||
tar --extract --file "$<" --directory "$@.partial" --strip-components=1
|
||||
cd "$@.partial" && ./contrib/download_prerequisites
|
||||
mv "$@.partial" "$@"
|
||||
touch "$@"
|
||||
|
||||
$(PREFIX)/gcc-freestanding-install: $(PREFIX)/gcc
|
||||
rm -rf "$<-freestanding-build" "$@"
|
||||
mkdir -p "$<-freestanding-build" "$@"
|
||||
cd "$<-freestanding-build" && \
|
||||
export PATH="$(PREFIX_BINUTILS_PATH):$$PATH" && \
|
||||
"$</configure" --target="$(TARGET)" --prefix="$@" --disable-nls --enable-languages=c,c++ --without-headers && \
|
||||
make all-gcc -j `nproc` && \
|
||||
make all-target-libgcc -j `nproc` && \
|
||||
make install-gcc -j `nproc` && \
|
||||
make install-target-libgcc -j `nproc`
|
||||
touch "$@"
|
||||
|
||||
$(PREFIX)/relibc-install: $(PREFIX)/binutils-install $(PREFIX)/gcc-freestanding-install
|
||||
rm -rf "$@"
|
||||
cd relibc && \
|
||||
export PATH="$(PREFIX_FREESTANDING_PATH):$$PATH" && \
|
||||
rustup target add "$(TARGET)" && \
|
||||
make all && \
|
||||
make DESTDIR="$@/usr" install
|
||||
touch "$@"
|
||||
|
||||
$(PREFIX)/gcc-install: $(PREFIX)/gcc | $(PREFIX)/relibc-install
|
||||
rm -rf "$<-build" "$@"
|
||||
mkdir -p "$<-build" "$@"
|
||||
cd "$<-build" && \
|
||||
export PATH="$(PREFIX_FREESTANDING_PATH):$$PATH" && \
|
||||
"$</configure" --target="$(TARGET)" --disable-werror --prefix="$@" --with-sysroot="$(PREFIX)/relibc-install" --disable-nls --enable-languages=c,c++ && \
|
||||
make all-gcc -j `nproc` && \
|
||||
make all-target-libgcc -j `nproc` && \
|
||||
make install-gcc -j `nproc` && \
|
||||
make install-target-libgcc -j `nproc` && \
|
||||
make all-target-libstdc++-v3 -j `nproc` && \
|
||||
make install-target-libstdc++-v3 -j `nproc`
|
||||
touch "$@"
|
1
relibc
Submodule
1
relibc
Submodule
|
@ -0,0 +1 @@
|
|||
Subproject commit 23fe526c555e894916b1a17df2f5fc1a44a16d23
|
2
rust
2
rust
|
@ -1 +1 @@
|
|||
Subproject commit fbb1fd15d7c3ef511d785c7718899eddde095ccc
|
||||
Subproject commit 2385b0853d779371f02166746be21a5296cc5a75
|
Loading…
Reference in a new issue