mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-11-24 10:33:22 +03:00
automatically generates header for embedded ivory.pill
This commit is contained in:
parent
7ce50ad75e
commit
0d3df28fdb
@ -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;
|
||||
|
@ -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;
|
||||
|
1
pkg/urbit/.gitignore
vendored
1
pkg/urbit/.gitignore
vendored
@ -4,6 +4,7 @@
|
||||
/config.mk
|
||||
include/config.h
|
||||
include/ca-bundle.h
|
||||
include/ivory.h
|
||||
#
|
||||
# Build Outputs
|
||||
#
|
||||
|
@ -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
|
||||
|
@ -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)) {
|
||||
|
352717
pkg/urbit/vere/ivory.c
352717
pkg/urbit/vere/ivory.c
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user