automatically generates header for embedded ivory.pill

This commit is contained in:
Joe Bryan 2019-07-23 10:38:06 -07:00
parent 7ce50ad75e
commit 0d3df28fdb
6 changed files with 26 additions and 352724 deletions

View File

@ -1,6 +1,7 @@
{
pkgs,
debug,
ivory ? ../../../bin/ivory.pill,
argon2, ed25519, ent, ge-additions, h2o, murmur3, scrypt, secp256k1, sni, softfloat3, uv
}:
@ -30,6 +31,7 @@ pkgs.stdenv.mkDerivation {
hardeningDisable = if debug then [ "all" ] else [];
CFLAGS = if debug then "-O3 -g -Werror" else "-O3 -Werror";
IVORY = ivory;
MEMORY_DEBUG = debug;
CPU_DEBUG = debug;
EVENT_TIME_DEBUG = false;

View File

@ -1,6 +1,12 @@
{ env_name, env, deps }:
{ ent, ge-additions, cacert, xxd, name ? "urbit", debug ? false }:
{
ent,
name ? "urbit",
debug ? false,
ivory ? ../../../bin/ivory.pill,
ge-additions, cacert, xxd
}:
let
@ -22,6 +28,7 @@ env.make_derivation {
EVENT_TIME_DEBUG = false;
NCURSES = env.ncurses;
SSL_CERT_FILE = "${cacert}/etc/ssl/certs/ca-bundle.crt";
IVORY = ivory;
name = "${name}-${env_name}";
exename = name;

View File

@ -4,6 +4,7 @@
/config.mk
include/config.h
include/ca-bundle.h
include/ivory.h
#
# Build Outputs
#

View File

@ -7,7 +7,7 @@ daemon = $(wildcard daemon/*.c)
worker = $(wildcard worker/*.c)
common = $(jets) $(noun) $(vere)
headers = $(shell find include -type f) include/ca-bundle.h
headers = $(shell find include -type f) include/ca-bundle.h include/ivory.h
common_objs = $(shell echo $(common) | sed 's/\.c/.o/g')
daemon_objs = $(shell echo $(daemon) | sed 's/\.c/.o/g')
@ -27,6 +27,10 @@ ifeq ($(SSL_CERT_FILE),)
$(error SSL_CERT_FILE is undefined)
endif
ifeq ($(IVORY),)
$(error IVORY is undefined)
endif
################################################################################
.PHONY: all test clean mkproper
@ -44,7 +48,7 @@ clean:
rm -f ./tags $(all_objs) $(all_exes)
mrproper: clean
rm -f config.mk include/config.h include/ca-bundle.h
rm -f config.mk include/config.h include/ca-bundle.h include/ivory.h
################################################################################
@ -54,6 +58,12 @@ include/ca-bundle.h:
@xxd -i include/ca-bundle.crt > include/ca-bundle.h
@rm include/ca-bundle.crt
include/ivory.h:
@echo XXD -i $(IVORY)
@cat $(IVORY) > u3_Ivory.pill
@xxd -i u3_Ivory.pill > include/ivory.h
@rm u3_Ivory.pill
build/hashtable_tests: $(common_objs) tests/hashtable_tests.o
@echo CC -o $@
@mkdir -p ./build

View File

@ -8,6 +8,8 @@
#include "all.h"
#include "vere/vere.h"
#include "ivory.h"
// stash config flags for worker
//
static c3_w sag_w;
@ -873,10 +875,7 @@ u3_daemon_commence()
lit = u3m_file(u3_Host.ops_u.lit_c);
}
else {
extern c3_w u3_Ivory_length_w;
extern c3_y u3_Ivory_pill_y[];
lit = u3i_bytes(u3_Ivory_length_w, u3_Ivory_pill_y);
lit = u3i_bytes(u3_Ivory_pill_len, u3_Ivory_pill);
}
if ( c3n == u3v_boot_lite(lit)) {

File diff suppressed because it is too large Load Diff