mirror of
https://github.com/urbit/shrub.git
synced 2024-11-28 22:33:06 +03:00
Merge pull request #1085 from urbit/boot-pill-userspace
boot with lifecycle-formula, userspace from pill
This commit is contained in:
commit
de29eb602c
@ -15,10 +15,6 @@ before_install:
|
||||
install:
|
||||
# pwd: ~/urbit
|
||||
- pip3 install --user -I meson==0.44.1
|
||||
- git clone https://github.com/urbit/arvo
|
||||
- cd ./arvo
|
||||
- git checkout $(cat ../.travis/pin-arvo-commit.txt)
|
||||
- cd ..
|
||||
|
||||
script:
|
||||
- meson . ./build --buildtype=debugoptimized -Dgc=true -Dprof=true
|
||||
|
@ -1 +1 @@
|
||||
e71c57b4455c84062230b4277f95eb7047a26146
|
||||
cae4b03c5c95722fb0e5f1947ba988f72703816d
|
||||
|
@ -1,11 +1,15 @@
|
||||
'use strict';
|
||||
|
||||
var fs = require('fs')
|
||||
var runner = require('urbit-runner')
|
||||
var Urbit = runner.Urbit;
|
||||
var ERROR = runner.ERROR;
|
||||
var actions = runner.actions
|
||||
|
||||
var args = ['-A', '../arvo', '-csgPSF', 'zod', 'zod'];
|
||||
var hash = fs.readFileSync('./pin-arvo-commit.txt', 'utf-8').slice(0, 10)
|
||||
var pill = 'https://bootstrap.urbit.org/git-' + hash + '.pill'
|
||||
|
||||
var args = ['-u', pill, '-cgPSF', 'zod', 'zod'];
|
||||
var urbit = new Urbit(args);
|
||||
|
||||
// vere hangs (always?) with run in travis-ci with -P
|
||||
|
@ -33,7 +33,6 @@
|
||||
u3_noun roe; // temporary unsaved events
|
||||
u3_noun key; // log key, or 0
|
||||
|
||||
u3_noun ken; // kernel formula
|
||||
u3_noun roc; // kernel core
|
||||
|
||||
struct { // ova waiting to process
|
||||
@ -65,15 +64,10 @@
|
||||
u3_noun
|
||||
u3v_do(const c3_c* txt_c, u3_noun arg);
|
||||
|
||||
/* u3v_make(): make a new pier by loading a pill.
|
||||
/* u3v_boot(): evaluate boot sequence, making a kernel
|
||||
*/
|
||||
void
|
||||
u3v_make(c3_c* pas_c);
|
||||
|
||||
/* u3v_jack(): execute kernel formula to bind jets.
|
||||
*/
|
||||
void
|
||||
u3v_jack(void);
|
||||
u3v_boot(u3_noun eve);
|
||||
|
||||
/* u3v_start(): start time.
|
||||
*/
|
||||
@ -160,11 +154,6 @@
|
||||
void
|
||||
u3v_hose(void);
|
||||
|
||||
/* u3v_louse(): last-minute deviltry upon a bail.
|
||||
*/
|
||||
void
|
||||
u3v_louse(c3_m how_m);
|
||||
|
||||
/* u3v_mark(): mark arvo kernel.
|
||||
*/
|
||||
c3_w
|
||||
|
@ -1710,11 +1710,17 @@ u3m_boot(c3_o nuu_o, c3_o bug_o, c3_c* dir_c,
|
||||
_boot_home(dir_c, pil_c, url_c, arv_c);
|
||||
|
||||
snprintf(ful_c, 2048, "%s/.urb/urbit.pill", dir_c);
|
||||
|
||||
printf("boot: loading %s\r\n", ful_c);
|
||||
u3v_make(ful_c);
|
||||
|
||||
u3v_jack();
|
||||
{
|
||||
u3_noun sys = u3ke_cue(u3m_file(ful_c));
|
||||
u3_noun bot;
|
||||
|
||||
u3x_trel(sys, &bot, 0, 0);
|
||||
u3v_boot(u3k(bot));
|
||||
|
||||
u3z(sys);
|
||||
}
|
||||
}
|
||||
else {
|
||||
u3v_hose();
|
||||
|
@ -66,7 +66,7 @@ u3t_slog(u3_noun hod)
|
||||
old = 1;
|
||||
|
||||
#endif
|
||||
if ( c3y == u3du(hod) ) {
|
||||
if ( (0 != u3A->roc) && (c3y == u3du(hod)) ) {
|
||||
u3_noun pri = u3h(hod);
|
||||
|
||||
switch ( pri ) {
|
||||
|
@ -24,29 +24,26 @@ _cv_nock_wish(u3_noun txt)
|
||||
return pro;
|
||||
}
|
||||
|
||||
/* u3v_make(): make a new pier and instantiate pill.
|
||||
/* u3v_boot(): evaluate boot sequence, making a kernel
|
||||
*/
|
||||
void
|
||||
u3v_make(c3_c* pas_c)
|
||||
u3v_boot(u3_noun eve)
|
||||
{
|
||||
u3_noun sys = u3ke_cue(u3m_file(pas_c));
|
||||
// ensure zero-initialized kernel
|
||||
//
|
||||
// So that u3t_slog won't try to print tanks.
|
||||
//
|
||||
u3A->roc = 0;
|
||||
|
||||
u3A->ken = u3k(u3h(sys));
|
||||
u3A->roc = u3k(u3t(sys));
|
||||
// lifecycle formula
|
||||
//
|
||||
u3_noun lyf = u3nt(2, u3nc(0, 3), u3nc(0, 2));
|
||||
u3_noun cor = u3n_nock_on(eve, lyf);
|
||||
|
||||
u3z(sys);
|
||||
}
|
||||
// save the Arvo core (at +7 of the Arvo gate)
|
||||
//
|
||||
u3A->roc = u3k(u3x_at(7, cor));
|
||||
|
||||
/* u3v_jack(): execute kernel formula to bind jets.
|
||||
*/
|
||||
void
|
||||
u3v_jack(void)
|
||||
{
|
||||
u3_noun cor;
|
||||
|
||||
fprintf(stderr, "jack: kernel %x\r\n", u3r_mug(u3A->ken));
|
||||
cor = u3n_nock_on(0, u3k(u3A->ken));
|
||||
fprintf(stderr, "jacked\r\n");
|
||||
u3z(cor);
|
||||
}
|
||||
|
||||
@ -453,22 +450,6 @@ u3v_plow(u3_noun ova)
|
||||
u3z(ova);
|
||||
}
|
||||
|
||||
/* u3v_louse(): last-minute deviltry upon a bail.
|
||||
*/
|
||||
void
|
||||
u3v_louse(c3_m how_m)
|
||||
{
|
||||
#if 0
|
||||
if ( c3__exit == how_m ) {
|
||||
printf("louse: nocks: %d\n", NOX);
|
||||
printf("louse: washing kernel %x %d\n", u3A->ken, u3a_is_dog(u3A->ken));
|
||||
u3m_wash(u3A->ken);
|
||||
|
||||
printf("kernel %x; washed mug %x\n", u3A->ken, u3r_mug(u3A->ken));
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
/* _cv_mark_ova(): mark ova queue.
|
||||
*/
|
||||
c3_w
|
||||
@ -506,7 +487,6 @@ u3v_mark(void)
|
||||
tot_w += u3a_mark_noun(arv_u->roe);
|
||||
tot_w += u3a_mark_noun(arv_u->key);
|
||||
|
||||
tot_w += u3a_mark_noun(arv_u->ken);
|
||||
tot_w += u3a_mark_noun(arv_u->roc);
|
||||
|
||||
tot_w += _cv_mark_ova(arv_u->ova.egg_p);
|
||||
|
11
vere/main.c
11
vere/main.c
@ -200,11 +200,6 @@ _main_getopt(c3_i argc, c3_c** argv)
|
||||
|
||||
c3_t imp_t = ( (0 != u3_Host.ops_u.who_c) && (4 == strlen(u3_Host.ops_u.who_c)) );
|
||||
|
||||
if ( u3_Host.ops_u.arv_c != 0 && !imp_t ) {
|
||||
fprintf(stderr, "-A only makes sense when creating a new galaxy\n");
|
||||
return c3n;
|
||||
}
|
||||
|
||||
if ( u3_Host.ops_u.ets_c == 0 && c3y == u3_Host.ops_u.etn ) {
|
||||
fprintf(stderr, "can't trust Ethereum snapshot without specifying "
|
||||
"snapshot with -E\n");
|
||||
@ -217,12 +212,6 @@ _main_getopt(c3_i argc, c3_c** argv)
|
||||
return c3n;
|
||||
}
|
||||
|
||||
if ( u3_Host.ops_u.arv_c == 0 && imp_t ) {
|
||||
fprintf(stderr, "can't create a new galaxy without specifying "
|
||||
"the initial sync path with -A\n");
|
||||
return c3n;
|
||||
}
|
||||
|
||||
if ( u3_Host.ops_u.gen_c != 0 && u3_Host.ops_u.nuu == c3n ) {
|
||||
fprintf(stderr, "-G only makes sense when bootstrapping a new instance\n");
|
||||
return c3n;
|
||||
|
26
vere/sist.c
26
vere/sist.c
@ -1696,15 +1696,27 @@ u3_sist_boot(void)
|
||||
// Authenticate and initialize terminal.
|
||||
u3_term_ef_bake(pig);
|
||||
|
||||
// queue initial galaxy sync
|
||||
{
|
||||
u3_noun rac = u3do("clan:title", u3k(u3A->own));
|
||||
// queue initial filesystem sync
|
||||
//
|
||||
// from the Arvo directory if specified
|
||||
if ( 0 != u3_Host.ops_u.arv_c ) {
|
||||
u3_unix_ef_initial_into();
|
||||
}
|
||||
// otherwise from the pill
|
||||
else {
|
||||
c3_c ful_c[2048];
|
||||
|
||||
if ( c3__czar == rac ) {
|
||||
u3_unix_ef_initial_into();
|
||||
snprintf(ful_c, 2048, "%s/.urb/urbit.pill", u3_Host.dir_c);
|
||||
|
||||
{
|
||||
u3_noun sys = u3ke_cue(u3m_file(ful_c));
|
||||
u3_noun fil;
|
||||
|
||||
u3x_trel(sys, 0, 0, &fil);
|
||||
u3v_plow(u3k(fil));
|
||||
|
||||
u3z(sys);
|
||||
}
|
||||
|
||||
u3z(rac);
|
||||
}
|
||||
|
||||
// Create the event log
|
||||
|
Loading…
Reference in New Issue
Block a user