MNET: wip makefile
This commit is contained in:
parent
708be6279a
commit
9afa3ca7a9
3 changed files with 70 additions and 0 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -3,3 +3,4 @@ _taler_exchange_sql
|
||||||
assets
|
assets
|
||||||
secrets
|
secrets
|
||||||
!secrets/.keep
|
!secrets/.keep
|
||||||
|
vendors
|
||||||
|
|
|
||||||
58
GNUmakefile
Normal file
58
GNUmakefile
Normal file
|
|
@ -0,0 +1,58 @@
|
||||||
|
vendor_list := \
|
||||||
|
mkernel miou zarith bstr mnet mirage-crypto-rng-mkernel gmp digestif \
|
||||||
|
kdf utcp flux h1 httpcats mhttp multipart_form-miou prettym tls \
|
||||||
|
x509 vifu cachet mfat mirage-mtime caqti caqti-miou caqti-mnet caqti-driver-pgx
|
||||||
|
|
||||||
|
secmod_fat=secrets/secmod.fat
|
||||||
|
tap_device=tap-mte
|
||||||
|
|
||||||
|
check-kvm:
|
||||||
|
$(if $(wildcard /dev/kvm),,$(error KVM support not enabled))
|
||||||
|
|
||||||
|
# todo: just opam install . --deps-only?
|
||||||
|
installs:
|
||||||
|
opam install --yes dune utop merlin ocp-browser ocamlformat
|
||||||
|
opam install --yes mcrunch
|
||||||
|
opam install --yes sqlite3 # needed for caqti even if not used
|
||||||
|
opam install --yes caqti-driver-pgx
|
||||||
|
opam install --yes $(vendor_list)
|
||||||
|
|
||||||
|
pins:
|
||||||
|
opam pin --no-action --yes "git+https://github.com/mirage/Zarith.git#zarith-1.14"
|
||||||
|
opam pin --no-action --yes "git+https://github.com/swrup/mirage-mtime.git#6a6bb4dd25624a3c43e6417dcdf73f3c689946a7"
|
||||||
|
opam pin --no-action --yes "git+https://github.com/robur-coop/vif.git#8c6ac3fb97cb9a31bf6ad8ec63c942336dcfd03e"
|
||||||
|
opam pin --no-action --yes add caqti "git+https://github.com/swrup/ocaml-caqti.git#7838c29ffa9095d32b95affee26b22ef2ad302fd"
|
||||||
|
opam pin --no-action --yes add caqti-miou "git+https://github.com/swrup/ocaml-caqti.git#7838c29ffa9095d32b95affee26b22ef2ad302fd"
|
||||||
|
opam pin --no-action --yes add caqti-mnet "git+https://github.com/swrup/ocaml-caqti.git#7838c29ffa9095d32b95affee26b22ef2ad302fd"
|
||||||
|
opam pin --no-action --yes add caqti-driver-pgx "git+https://github.com/swrup/ocaml-caqti.git#7838c29ffa9095d32b95affee26b22ef2ad302fd"
|
||||||
|
opam pin --no-action --yes "git+https://github.com/swrup/mfat.git#40afdb419df56d4932928a61906e012a3c534549"
|
||||||
|
|
||||||
|
|
||||||
|
.PHONY: vendors
|
||||||
|
vendors:
|
||||||
|
@mkdir -p vendors
|
||||||
|
@for v in $(vendor_list); do \
|
||||||
|
[ -d vendors/$$v ] || opam source $$v --dir vendors/$$v ; \
|
||||||
|
done
|
||||||
|
|
||||||
|
.PHONY: clean
|
||||||
|
clean:
|
||||||
|
rm -rf _build/
|
||||||
|
rm -rf vendors/
|
||||||
|
|
||||||
|
# todo: don't erase already existing
|
||||||
|
secmod-storage:
|
||||||
|
@mkdir -p secrets
|
||||||
|
mfat make --sectors=2048 $(secmod_fat)
|
||||||
|
|
||||||
|
assets:
|
||||||
|
cp default/assets ./
|
||||||
|
|
||||||
|
manifest:
|
||||||
|
dune exec src/mte.exe > manifest.json
|
||||||
|
|
||||||
|
build:
|
||||||
|
dune build src/mte.exe
|
||||||
|
|
||||||
|
run:
|
||||||
|
solo5-hvt --block:storage=$(secmod_fat) --net:service=$(tap_device) -- _build/solo5/main.exe --solo5:quiet
|
||||||
11
network.sh
Normal file
11
network.sh
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
#!/bin/bash
|
||||||
|
set -e
|
||||||
|
|
||||||
|
sudo ip link add name bridge-mte type bridge
|
||||||
|
sudo ip addr add 10.0.0.1/24 dev bridge-mte
|
||||||
|
sudo ip tuntap add name tap-mte mode tap
|
||||||
|
sudo ip link set tap-mte master bridge-mte
|
||||||
|
sudo ip link set bridge-mte up
|
||||||
|
sudo ip link set tap-mte up
|
||||||
|
|
||||||
|
# TODO setup postgresql
|
||||||
Loading…
Add table
Add a link
Reference in a new issue