redox/Makefile

533 lines
16 KiB
Makefile
Raw Normal View History

# Configuration
2016-08-29 02:38:53 +02:00
ARCH?=x86_64
2016-08-14 02:21:46 +02:00
# Automatic variables
2016-12-30 05:35:48 +01:00
ROOT=$(PWD)
export RUST_TARGET_PATH=$(ROOT)/targets
export CC=$(ROOT)/libc-artifacts/gcc.sh
export CFLAGS=-fno-stack-protector -U_FORTIFY_SOURCE
2016-12-30 05:35:48 +01:00
2016-09-10 03:08:04 +02:00
# Kernel variables
KTARGET=$(ARCH)-unknown-none
KBUILD=build/kernel
KRUSTC=./krustc.sh
2016-10-16 22:06:01 +02:00
KRUSTDOC=./krustdoc.sh
KCARGO=RUSTC="$(KRUSTC)" RUSTDOC="$(KRUSTDOC)" cargo
2016-12-30 05:35:48 +01:00
KCARGOFLAGS=--target $(KTARGET) --release -- -C soft-float
2016-09-10 03:08:04 +02:00
# Userspace variables
2017-01-03 00:50:05 +01:00
export TARGET=$(ARCH)-unknown-redox
2016-09-10 03:08:04 +02:00
BUILD=build/userspace
RUSTC=./rustc.sh
2016-10-16 22:06:01 +02:00
RUSTDOC=./rustdoc.sh
CARGO=RUSTC="$(RUSTC)" RUSTDOC="$(RUSTDOC)" cargo
2017-01-05 21:30:09 +01:00
CARGOFLAGS=--target $(TARGET) --release -- -C codegen-units=`nproc`
2016-09-10 03:08:04 +02:00
# Default targets
2016-12-14 17:49:05 +01:00
.PHONY: all live iso clean doc ref test update pull qemu bochs drivers schemes binutils coreutils extrautils netutils userutils wireshark FORCE
2016-09-10 03:08:04 +02:00
all: build/harddrive.bin
live: build/livedisk.bin
2016-08-26 01:03:01 +02:00
2016-12-01 04:58:22 +01:00
iso: build/livedisk.iso
2016-11-02 15:32:14 +01:00
FORCE:
2016-09-10 03:08:04 +02:00
clean:
cargo clean
2017-01-05 21:30:09 +01:00
cargo clean --manifest-path rust/src/libcollections/Cargo.toml
cargo clean --manifest-path rust/src/libstd/Cargo.toml
-$(FUMOUNT) build/filesystem/ || true
rm -rf initfs/bin
rm -rf filesystem/bin filesystem/sbin filesystem/ui/bin
2016-09-10 03:08:04 +02:00
rm -rf build
2016-11-02 15:32:14 +01:00
2016-11-02 04:33:28 +01:00
doc: \
doc-kernel \
2016-11-02 15:32:14 +01:00
doc-std
2016-09-10 03:08:04 +02:00
#FORCE to let cargo decide if docs need updating
2016-11-02 15:32:14 +01:00
doc-kernel: $(KBUILD)/libkernel.a FORCE
$(KCARGO) doc --target $(KTARGET).json --manifest-path kernel/Cargo.toml
2016-10-16 22:06:01 +02:00
2016-11-02 15:32:14 +01:00
doc-std: $(BUILD)/libstd.rlib FORCE
$(CARGO) doc --target $(TARGET).json --manifest-path rust/src/libstd/Cargo.toml
2016-11-08 17:00:21 +01:00
ref: FORCE
rm -rf filesystem/ref/
mkdir -p filesystem/ref/
2016-11-18 17:01:39 +01:00
cargo run --manifest-path crates/docgen/Cargo.toml -- programs/binutils/src/bin/ filesystem/ref/
2016-11-08 17:00:21 +01:00
cargo run --manifest-path crates/docgen/Cargo.toml -- programs/coreutils/src/bin/ filesystem/ref/
cargo run --manifest-path crates/docgen/Cargo.toml -- programs/extrautils/src/bin/ filesystem/ref/
2016-11-08 17:09:14 +01:00
cargo run --manifest-path crates/docgen/Cargo.toml -- programs/netutils/src/ filesystem/ref/
2016-11-08 17:00:21 +01:00
2016-10-14 19:37:50 +02:00
update:
cargo update
2016-10-14 19:37:50 +02:00
2016-12-14 17:49:05 +01:00
pull:
git pull --rebase --recurse-submodules
2016-12-14 18:06:09 +01:00
git submodule sync
2016-12-14 17:49:05 +01:00
git submodule update --recursive --init
2016-12-19 16:00:19 +01:00
git clean -X -f -d
2016-12-14 17:49:05 +01:00
make clean
make update
2016-09-10 03:08:04 +02:00
# Emulation
QEMU=SDL_VIDEO_X11_DGAMOUSE=0 qemu-system-$(ARCH)
2016-09-27 19:14:27 +02:00
QEMUFLAGS=-serial mon:stdio -d cpu_reset -d guest_errors
2016-08-26 01:03:01 +02:00
ifeq ($(ARCH),arm)
QEMUFLAGS+=-cpu arm1176 -machine integratorcp
QEMUFLAGS+=-nographic
2016-09-10 03:08:04 +02:00
2016-12-30 05:35:48 +01:00
export CC=$(ARCH)-none-eabi-gcc
export LD=$(ARCH)-none-eabi-ld
2016-12-20 19:25:19 +01:00
%.list: %
2016-09-10 03:08:04 +02:00
$(ARCH)-none-eabi-objdump -C -D $< > $@
build/harddrive.bin: $(KBUILD)/kernel
2016-09-10 03:08:04 +02:00
cp $< $@
qemu: build/harddrive.bin
2016-09-10 03:08:04 +02:00
$(QEMU) $(QEMUFLAGS) -kernel $<
2016-08-26 01:03:01 +02:00
else
QEMUFLAGS+=-smp 4 -m 1024
2016-11-05 15:01:12 +01:00
ifeq ($(iommu),yes)
QEMUFLAGS+=-machine q35,iommu=on
2016-11-05 15:01:12 +01:00
else
QEMUFLAGS+=-machine q35
endif
2016-10-08 04:18:05 +02:00
ifeq ($(net),no)
QEMUFLAGS+=-net none
else
QEMUFLAGS+=-net nic,model=e1000 -net user -net dump,file=build/network.pcap
2016-10-24 03:02:48 +02:00
ifeq ($(net),redir)
2017-01-04 22:45:02 +01:00
QEMUFLAGS+=-redir tcp:8023::8023 -redir tcp:8080::8080
2016-10-24 03:02:48 +02:00
endif
2016-10-08 04:18:05 +02:00
endif
ifeq ($(vga),no)
QEMUFLAGS+=-nographic -vga none
endif
2016-08-26 01:03:01 +02:00
#,int,pcall
#-device intel-iommu
UNAME := $(shell uname)
ifeq ($(UNAME),Darwin)
2016-10-16 04:56:03 +02:00
ECHO=/bin/echo
FUMOUNT=sudo umount
2016-12-30 05:35:48 +01:00
export LD=$(ARCH)-elf-ld
export LDFLAGS=--gc-sections
2017-01-03 00:31:54 +01:00
export STRIP=$(ARCH)-elf-strip
2016-11-07 01:35:56 +01:00
VB_AUDIO=coreaudio
VBM="/Applications/VirtualBox.app/Contents/MacOS/VBoxManage"
2016-10-16 04:56:03 +02:00
else
ECHO=echo
FUMOUNT=fusermount -u
2016-12-30 05:35:48 +01:00
export LD=ld
export LDFLAGS=--gc-sections
2017-01-03 00:31:54 +01:00
export STRIP=strip
2016-10-16 04:56:03 +02:00
ifneq ($(kvm),no)
QEMUFLAGS+=-enable-kvm -cpu host
endif
2016-11-07 01:35:56 +01:00
VB_AUDIO="pulse"
VBM=VBoxManage
2016-08-26 01:03:01 +02:00
endif
2016-08-20 17:44:14 +02:00
%.list: %
2016-09-10 03:08:04 +02:00
objdump -C -M intel -D $< > $@
2016-08-14 02:58:31 +02:00
build/harddrive.bin: $(KBUILD)/kernel bootloader/$(ARCH)/** build/filesystem.bin
2016-09-11 06:06:09 +02:00
nasm -f bin -o $@ -D ARCH_$(ARCH) -ibootloader/$(ARCH)/ bootloader/$(ARCH)/harddrive.asm
2016-08-14 02:58:31 +02:00
build/livedisk.bin: $(KBUILD)/kernel_live bootloader/$(ARCH)/**
nasm -f bin -o $@ -D ARCH_$(ARCH) -ibootloader/$(ARCH)/ bootloader/$(ARCH)/livedisk.asm
2016-12-01 04:58:22 +01:00
build/%.bin.gz: build/%.bin
gzip -k -f $<
build/livedisk.iso: build/livedisk.bin.gz
rm -rf build/iso/
mkdir -p build/iso/
cp -RL isolinux build/iso/
cp $< build/iso/livedisk.gz
genisoimage -o $@ -b isolinux/isolinux.bin -c isolinux/boot.cat \
2016-12-01 04:58:22 +01:00
-no-emul-boot -boot-load-size 4 -boot-info-table \
build/iso/
isohybrid $@
2016-12-01 04:58:22 +01:00
qemu: build/harddrive.bin
$(QEMU) $(QEMUFLAGS) -drive file=$<,format=raw
2016-12-14 16:34:45 +01:00
qemu_extra: build/harddrive.bin
2017-01-03 01:19:49 +01:00
if [ ! -e build/extra.bin ]; then dd if=/dev/zero of=build/extra.bin bs=1048576 count=1024; fi
2016-12-14 16:34:45 +01:00
$(QEMU) $(QEMUFLAGS) -drive file=$<,format=raw -drive file=build/extra.bin,format=raw
qemu_no_build:
$(QEMU) $(QEMUFLAGS) -drive file=build/harddrive.bin,format=raw
qemu_live: build/livedisk.bin
$(QEMU) $(QEMUFLAGS) -device usb-ehci,id=flash_bus -drive id=flash_drive,file=$<,format=raw,if=none -device usb-storage,drive=flash_drive,bus=flash_bus.0
qemu_live_no_build:
$(QEMU) $(QEMUFLAGS) -device usb-ehci,id=flash_bus -drive id=flash_drive,file=build/livedisk.bin,format=raw,if=none -device usb-storage,drive=flash_drive,bus=flash_bus.0
2016-12-01 04:58:22 +01:00
qemu_iso: build/livedisk.iso
$(QEMU) $(QEMUFLAGS) -boot d -cdrom $<
qemu_iso_no_build:
$(QEMU) $(QEMUFLAGS) -boot d -cdrom build/livedisk.iso
2016-09-10 03:08:04 +02:00
endif
2016-08-14 02:21:46 +02:00
bochs: build/harddrive.bin
2016-08-14 02:21:46 +02:00
bochs -f bochs.$(ARCH)
virtualbox: build/harddrive.bin
2016-11-07 01:35:56 +01:00
echo "Delete VM"
-$(VBM) unregistervm Redox --delete; \
if [ $$? -ne 0 ]; \
then \
if [ -d "$$HOME/VirtualBox VMs/Redox" ]; \
then \
echo "Redox directory exists, deleting..."; \
$(RM) -rf "$$HOME/VirtualBox VMs/Redox"; \
fi \
fi
echo "Delete Disk"
-$(RM) harddrive.vdi
echo "Create VM"
$(VBM) createvm --name Redox --register
echo "Set Configuration"
$(VBM) modifyvm Redox --memory 1024
$(VBM) modifyvm Redox --vram 16
2016-12-06 23:31:24 +01:00
if [ "$(net)" != "no" ]; \
then \
$(VBM) modifyvm Redox --nic1 nat; \
$(VBM) modifyvm Redox --nictype1 82540EM; \
$(VBM) modifyvm Redox --cableconnected1 on; \
$(VBM) modifyvm Redox --nictrace1 on; \
$(VBM) modifyvm Redox --nictracefile1 build/network.pcap; \
fi
2016-11-07 01:35:56 +01:00
$(VBM) modifyvm Redox --uart1 0x3F8 4
$(VBM) modifyvm Redox --uartmode1 file build/serial.log
2016-11-07 01:35:56 +01:00
$(VBM) modifyvm Redox --usb off # on
$(VBM) modifyvm Redox --keyboard ps2
$(VBM) modifyvm Redox --mouse ps2
$(VBM) modifyvm Redox --audio $(VB_AUDIO)
$(VBM) modifyvm Redox --audiocontroller ac97
$(VBM) modifyvm Redox --nestedpaging off
2016-11-07 01:35:56 +01:00
echo "Create Disk"
$(VBM) convertfromraw $< build/harddrive.vdi
2016-11-07 01:35:56 +01:00
echo "Attach Disk"
$(VBM) storagectl Redox --name ATA --add sata --controller IntelAHCI --bootable on --portcount 1
$(VBM) storageattach Redox --storagectl ATA --port 0 --device 0 --type hdd --medium build/harddrive.vdi
2016-11-07 01:35:56 +01:00
echo "Run VM"
$(VBM) startvm Redox
2016-09-10 03:08:04 +02:00
# Kernel recipes
2017-01-05 21:30:09 +01:00
$(KBUILD)/libcollections.rlib: rust/src/libcollections/Cargo.toml rust/src/libcollections/**
2016-09-10 03:08:04 +02:00
mkdir -p $(KBUILD)
2017-01-05 21:30:09 +01:00
$(KCARGO) rustc --verbose --manifest-path $< $(KCARGOFLAGS) -o $@
cp rust/src/target/$(KTARGET)/release/deps/*.rlib $(KBUILD)
2016-08-14 02:21:46 +02:00
2017-01-05 21:30:09 +01:00
$(KBUILD)/libkernel.a: kernel/Cargo.toml kernel/arch/** kernel/src/** $(KBUILD)/libcollections.rlib $(BUILD)/initfs.rs
$(KCARGO) rustc --manifest-path $< --lib $(KCARGOFLAGS) -C lto --emit obj=$@
2017-01-05 21:30:09 +01:00
$(KBUILD)/libkernel_live.a: kernel/Cargo.toml kernel/arch/** kernel/src/** $(KBUILD)/libcollections.rlib $(BUILD)/initfs.rs build/filesystem.bin
$(KCARGO) rustc --manifest-path $< --lib --features live $(KCARGOFLAGS) -C lto --emit obj=$@
2016-09-11 06:06:09 +02:00
$(KBUILD)/kernel: $(KBUILD)/libkernel.a
$(LD) $(LDFLAGS) -z max-page-size=0x1000 -T kernel/arch/$(ARCH)/src/linker.ld -o $@ $<
$(KBUILD)/kernel_live: $(KBUILD)/libkernel_live.a
$(LD) $(LDFLAGS) -z max-page-size=0x1000 -T kernel/arch/$(ARCH)/src/linker.ld -o $@ $<
2016-09-10 03:08:04 +02:00
# Userspace recipes
$(BUILD)/libstd.rlib: rust/src/libstd/Cargo.toml rust/src/libstd/**
mkdir -p $(BUILD)
$(CARGO) rustc --verbose --manifest-path $< --features "panic-unwind" $(CARGOFLAGS) -L native=libc-artifacts/usr/lib -o $@
cp rust/src/target/$(TARGET)/release/deps/*.rlib $(BUILD)
$(BUILD)/libtest.rlib: rust/src/libtest/Cargo.toml rust/src/libtest/** $(BUILD)/libstd.rlib
2016-09-10 03:08:04 +02:00
mkdir -p $(BUILD)
$(CARGO) rustc --verbose --manifest-path $< $(CARGOFLAGS) -L native=libc-artifacts/usr/lib -o $@
cp rust/src/target/$(TARGET)/release/deps/*.rlib $(BUILD)
2016-11-10 01:00:48 +01:00
initfs/bin/%: drivers/%/Cargo.toml drivers/%/src/** $(BUILD)/libstd.rlib
mkdir -p initfs/bin
$(CARGO) rustc --manifest-path $< $(CARGOFLAGS) -o $@
2017-01-03 00:31:54 +01:00
$(STRIP) $@
initfs/bin/%: programs/%/Cargo.toml programs/%/src/** $(BUILD)/libstd.rlib
mkdir -p initfs/bin
$(CARGO) rustc --manifest-path $< $(CARGOFLAGS) -o $@
2017-01-03 00:31:54 +01:00
$(STRIP) $@
initfs/bin/%: schemes/%/Cargo.toml schemes/%/src/** $(BUILD)/libstd.rlib
2016-09-21 05:56:40 +02:00
mkdir -p initfs/bin
2016-09-28 05:20:14 +02:00
$(CARGO) rustc --manifest-path $< --bin $* $(CARGOFLAGS) -o $@
2017-01-03 00:31:54 +01:00
$(STRIP) $@
2016-09-28 17:00:28 +02:00
$(BUILD)/initfs.rs: \
initfs/bin/init \
initfs/bin/ahcid \
2016-12-14 16:34:45 +01:00
initfs/bin/bgad \
initfs/bin/pcid \
initfs/bin/ps2d \
initfs/bin/redoxfs \
initfs/bin/vesad \
initfs/etc/**
2016-09-28 17:00:28 +02:00
echo 'use collections::BTreeMap;' > $@
echo 'pub fn gen() -> BTreeMap<&'"'"'static [u8], (&'"'"'static [u8], bool)> {' >> $@
echo ' let mut files: BTreeMap<&'"'"'static [u8], (&'"'"'static [u8], bool)> = BTreeMap::new();' >> $@
for folder in `find initfs -type d | sort`; do \
name=$$(echo $$folder | sed 's/initfs//' | cut -d '/' -f2-) ; \
2016-10-16 04:56:03 +02:00
$(ECHO) -n ' files.insert(b"'$$name'", (b"' >> $@ ; \
2016-09-28 17:00:28 +02:00
ls -1 $$folder | sort | awk 'NR > 1 {printf("\\n")} {printf("%s", $$0)}' >> $@ ; \
echo '", true));' >> $@ ; \
done
find initfs -type f -o -type l | cut -d '/' -f2- | sort | awk '{printf(" files.insert(b\"%s\", (include_bytes!(\"../../initfs/%s\"), false));\n", $$0, $$0)}' >> $@
echo ' files' >> $@
echo '}' >> $@
filesystem/sbin/%: drivers/%/Cargo.toml drivers/%/src/** $(BUILD)/libstd.rlib
mkdir -p filesystem/sbin
2016-09-28 17:00:28 +02:00
$(CARGO) rustc --manifest-path $< $(CARGOFLAGS) -o $@
2017-01-03 00:31:54 +01:00
$(STRIP) $@
2016-09-28 17:00:28 +02:00
2016-09-28 05:56:29 +02:00
filesystem/bin/%: programs/%/Cargo.toml programs/%/src/** $(BUILD)/libstd.rlib
mkdir -p filesystem/bin
$(CARGO) rustc --manifest-path $< --bin $* $(CARGOFLAGS) -o $@
2017-01-03 00:31:54 +01:00
$(STRIP) $@
2016-09-28 05:56:29 +02:00
# Example of compiling tests - still TODO
filesystem/test/%: programs/%/Cargo.toml programs/%/src/** $(BUILD)/libstd.rlib $(BUILD)/libtest.rlib
mkdir -p filesystem/test
$(CARGO) test --no-run --manifest-path $< $(CARGOFLAGS)
cp programs/$*/target/$(TARGET)/release/deps/$*-* $@
2016-10-18 04:14:53 +02:00
filesystem/bin/sh: filesystem/bin/ion
cp $< $@
2016-11-18 17:01:39 +01:00
filesystem/bin/%: programs/binutils/Cargo.toml programs/binutils/src/bin/%.rs $(BUILD)/libstd.rlib
mkdir -p filesystem/bin
$(CARGO) rustc --manifest-path $< --bin $* $(CARGOFLAGS) -o $@
2017-01-03 00:31:54 +01:00
$(STRIP) $@
2016-11-18 17:01:39 +01:00
2016-09-28 05:56:29 +02:00
filesystem/bin/%: programs/coreutils/Cargo.toml programs/coreutils/src/bin/%.rs $(BUILD)/libstd.rlib
mkdir -p filesystem/bin
$(CARGO) rustc --manifest-path $< --bin $* $(CARGOFLAGS) -o $@
2017-01-03 00:31:54 +01:00
$(STRIP) $@
2016-09-28 05:56:29 +02:00
2016-09-28 19:07:54 +02:00
filesystem/bin/%: programs/extrautils/Cargo.toml programs/extrautils/src/bin/%.rs $(BUILD)/libstd.rlib
mkdir -p filesystem/bin
$(CARGO) rustc --manifest-path $< --bin $* $(CARGOFLAGS) -o $@
2017-01-03 00:31:54 +01:00
$(STRIP) $@
2016-09-28 19:07:54 +02:00
2016-12-28 04:23:05 +01:00
filesystem/bin/%: programs/games/Cargo.toml programs/games/src/%/**.rs $(BUILD)/libstd.rlib
mkdir -p filesystem/bin
$(CARGO) rustc --manifest-path $< --bin $* $(CARGOFLAGS) -o $@
2017-01-03 00:31:54 +01:00
$(STRIP) $@
2016-12-28 04:23:05 +01:00
filesystem/bin/%: programs/netutils/Cargo.toml programs/netutils/src/%/**.rs $(BUILD)/libstd.rlib
mkdir -p filesystem/bin
$(CARGO) rustc --manifest-path $< --bin $* $(CARGOFLAGS) -o $@
2017-01-03 00:31:54 +01:00
$(STRIP) $@
filesystem/ui/bin/%: programs/orbutils/Cargo.toml programs/orbutils/src/%/**.rs $(BUILD)/libstd.rlib
mkdir -p filesystem/ui/bin
$(CARGO) rustc --manifest-path $< --bin $* $(CARGOFLAGS) -o $@
2017-01-03 00:31:54 +01:00
$(STRIP) $@
filesystem/bin/%: programs/pkgutils/Cargo.toml programs/pkgutils/src/%/**.rs $(BUILD)/libstd.rlib
mkdir -p filesystem/bin
$(CARGO) rustc --manifest-path $< --bin $* $(CARGOFLAGS) -o $@
2017-01-03 00:31:54 +01:00
$(STRIP) $@
2016-10-07 18:42:17 +02:00
filesystem/bin/%: programs/userutils/Cargo.toml programs/userutils/src/bin/%.rs $(BUILD)/libstd.rlib
mkdir -p filesystem/bin
$(CARGO) rustc --manifest-path $< --bin $* $(CARGOFLAGS) -o $@
2017-01-03 00:31:54 +01:00
$(STRIP) $@
2016-10-07 18:42:17 +02:00
filesystem/sbin/%: schemes/%/Cargo.toml schemes/%/src/** $(BUILD)/libstd.rlib
mkdir -p filesystem/sbin
2016-09-28 17:00:28 +02:00
$(CARGO) rustc --manifest-path $< --bin $* $(CARGOFLAGS) -o $@
2017-01-03 00:31:54 +01:00
$(STRIP) $@
2016-09-28 17:00:28 +02:00
2016-12-14 16:34:45 +01:00
filesystem/sbin/redoxfs-mkfs: schemes/redoxfs/Cargo.toml schemes/redoxfs/src/** $(BUILD)/libstd.rlib
mkdir -p filesystem/bin
$(CARGO) rustc --manifest-path $< --bin redoxfs-mkfs $(CARGOFLAGS) -o $@
2017-01-03 00:31:54 +01:00
$(STRIP) $@
2016-12-14 16:34:45 +01:00
2016-09-28 17:00:28 +02:00
drivers: \
filesystem/sbin/pcid \
filesystem/sbin/e1000d \
filesystem/sbin/rtl8168d
2016-09-28 17:00:28 +02:00
2016-11-18 17:01:39 +01:00
binutils: \
filesystem/bin/hex \
filesystem/bin/hexdump \
filesystem/bin/strings
2016-09-28 05:56:29 +02:00
coreutils: \
2016-09-28 19:07:54 +02:00
filesystem/bin/basename \
2016-09-28 05:56:29 +02:00
filesystem/bin/cat \
2016-11-16 01:08:14 +01:00
filesystem/bin/chmod \
2016-09-28 19:07:54 +02:00
filesystem/bin/clear \
filesystem/bin/cp \
filesystem/bin/cut \
filesystem/bin/date \
2016-10-09 05:36:21 +02:00
filesystem/bin/dd \
2016-11-18 16:44:03 +01:00
filesystem/bin/df \
2016-09-28 19:07:54 +02:00
filesystem/bin/du \
2016-09-28 05:56:29 +02:00
filesystem/bin/echo \
filesystem/bin/env \
2016-09-28 19:07:54 +02:00
filesystem/bin/false \
2016-11-07 20:47:32 +01:00
filesystem/bin/free \
2016-09-28 19:07:54 +02:00
filesystem/bin/head \
2016-11-17 20:12:02 +01:00
filesystem/bin/kill \
2016-09-28 05:56:29 +02:00
filesystem/bin/ls \
2016-09-28 19:07:54 +02:00
filesystem/bin/mkdir \
filesystem/bin/mv \
2016-09-28 05:56:29 +02:00
filesystem/bin/printenv \
filesystem/bin/ps \
2016-09-28 05:56:29 +02:00
filesystem/bin/pwd \
2016-09-28 19:07:54 +02:00
filesystem/bin/realpath \
filesystem/bin/reset \
filesystem/bin/rmdir \
filesystem/bin/rm \
filesystem/bin/seq \
filesystem/bin/sleep \
2016-11-03 05:23:59 +01:00
filesystem/bin/sort \
2016-09-28 19:07:54 +02:00
filesystem/bin/tail \
2016-11-03 05:25:03 +01:00
filesystem/bin/tee \
2016-09-28 19:07:54 +02:00
filesystem/bin/time \
filesystem/bin/touch \
filesystem/bin/true \
filesystem/bin/wc \
filesystem/bin/yes
2016-11-07 20:47:32 +01:00
#filesystem/bin/shutdown filesystem/bin/test
2016-09-28 19:07:54 +02:00
extrautils: \
filesystem/bin/calc \
filesystem/bin/cksum \
filesystem/bin/cur \
filesystem/bin/grep \
filesystem/bin/less \
2016-11-08 17:00:21 +01:00
filesystem/bin/man \
2016-09-28 19:07:54 +02:00
filesystem/bin/mdless \
filesystem/bin/mtxt \
filesystem/bin/rem \
2016-11-08 17:00:21 +01:00
#filesystem/bin/dmesg filesystem/bin/info filesystem/bin/watch
2016-09-28 19:07:54 +02:00
2016-12-28 04:23:05 +01:00
games: \
filesystem/bin/ice \
filesystem/bin/minesweeper \
filesystem/bin/reblox \
filesystem/bin/rusthello \
filesystem/bin/snake
netutils: \
filesystem/bin/dhcpd \
filesystem/bin/dns \
2016-10-24 03:02:48 +02:00
filesystem/bin/httpd \
filesystem/bin/irc \
filesystem/bin/nc \
2016-12-28 00:59:45 +01:00
filesystem/bin/ntp \
2017-01-04 22:45:02 +01:00
filesystem/bin/telnetd \
2016-12-28 00:59:45 +01:00
filesystem/bin/wget
orbutils: \
filesystem/ui/bin/browser \
filesystem/ui/bin/calculator \
filesystem/ui/bin/character_map \
filesystem/ui/bin/editor \
filesystem/ui/bin/file_manager \
filesystem/ui/bin/launcher \
filesystem/ui/bin/orblogin \
filesystem/ui/bin/terminal \
filesystem/ui/bin/viewer
pkgutils: \
filesystem/bin/pkg
2016-10-07 18:42:17 +02:00
userutils: \
filesystem/bin/getty \
filesystem/bin/id \
filesystem/bin/login \
filesystem/bin/passwd \
2016-10-07 18:42:17 +02:00
filesystem/bin/su \
filesystem/bin/sudo
2016-09-28 05:56:29 +02:00
2016-09-28 17:00:28 +02:00
schemes: \
filesystem/sbin/ethernetd \
filesystem/sbin/ipd \
filesystem/sbin/orbital \
filesystem/sbin/ptyd \
filesystem/sbin/randd \
2016-12-14 16:34:45 +01:00
filesystem/sbin/redoxfs \
filesystem/sbin/redoxfs-mkfs \
filesystem/sbin/tcpd \
filesystem/sbin/udpd
2016-09-28 05:56:29 +02:00
build/filesystem.bin: \
2016-09-28 17:00:28 +02:00
drivers \
2016-09-28 05:56:29 +02:00
coreutils \
2016-09-28 19:52:40 +02:00
extrautils \
2016-12-28 04:23:05 +01:00
games \
netutils \
orbutils \
pkgutils \
2016-10-07 18:42:17 +02:00
userutils \
2016-09-28 17:00:28 +02:00
schemes \
2016-10-18 04:14:53 +02:00
filesystem/bin/acid \
filesystem/bin/contain \
2016-09-28 05:56:29 +02:00
filesystem/bin/ion \
2016-10-18 04:14:53 +02:00
filesystem/bin/sh \
filesystem/bin/smith \
filesystem/bin/tar
-$(FUMOUNT) build/filesystem/ || true
rm -rf $@ build/filesystem/
2017-01-03 01:19:49 +01:00
dd if=/dev/zero of=$@ bs=1048576 count=64
cargo run --manifest-path schemes/redoxfs/Cargo.toml --release --bin redoxfs-mkfs $@
mkdir -p build/filesystem/
cargo build --manifest-path schemes/redoxfs/Cargo.toml --release --bin redoxfs
cargo run --manifest-path schemes/redoxfs/Cargo.toml --release --bin redoxfs -- $@ build/filesystem/
2016-09-28 05:56:29 +02:00
sleep 2
pgrep redoxfs
cp -RL filesystem/* build/filesystem/
chown -R 0:0 build/filesystem
chown -R 1000:1000 build/filesystem/home/user
chmod -R uog+rX build/filesystem
chmod -R u+w build/filesystem
chmod -R og-w build/filesystem
chmod -R 755 build/filesystem/bin
chmod -R u+rwX build/filesystem/root
chmod -R og-rwx build/filesystem/root
chmod -R u+rwX build/filesystem/home/user
chmod -R og-rwx build/filesystem/home/user
chmod +s build/filesystem/bin/passwd
chmod +s build/filesystem/bin/su
chmod +s build/filesystem/bin/sudo
mkdir build/filesystem/tmp
chmod 1777 build/filesystem/tmp
2016-09-28 05:56:29 +02:00
sync
-$(FUMOUNT) build/filesystem/ || true
rm -rf build/filesystem/
2016-09-28 17:00:28 +02:00
mount: FORCE
mkdir -p build/filesystem/
cargo build --manifest-path schemes/redoxfs/Cargo.toml --release --bin redoxfs
cargo run --manifest-path schemes/redoxfs/Cargo.toml --release --bin redoxfs -- build/harddrive.bin build/filesystem/
2016-09-28 17:00:28 +02:00
sleep 2
pgrep redoxfs
2016-09-28 17:00:28 +02:00
unmount: FORCE
sync
-$(FUMOUNT) build/filesystem/ || true
rm -rf build/filesystem/
wireshark: FORCE
wireshark build/network.pcap