Re: rumpbake support for baked-in rootfs

  • From: Andrew Stuart <andrew.stuart@xxxxxxxxxxxxxxxxxx>
  • To: Antti Kantee <pooka@xxxxxx>
  • Date: Wed, 10 Jun 2015 16:09:20 +1000

I’ll try now to hook that into the code as you suggest.

OK I’m still doing something wrong here because my kernels are not booting on
EC2. Any clues as to what I could try next?

Here is an extract from my callmain.c

#include <bmk-core/platform.h>
#include <bmk-core/printf.h>

static char hardcoded_jsoncfg[] = "{\"cmdline\": \"simple_baked.xen\", \"net\":
{\"cloner\": \"true\", \"type\": \"inet\", \"method\": \"dhcp\", \"if\":
\"xenif0\"}}";

static char *
jsonordie(void)
{

I then do:

(from rumprun directory)
build-rr.sh xen

(from my application directory)
(compile)
rumprun-xen-cc -o simple.xen simple.c
(bake)
rumpbake xen_pv simple_baked.xen simple.xen
(using the MirageOS script, prepare for EC2)
sh ec2.sh -k simple_baked.xen

I then start it up on EC2:

The last part of the EC2 boot logilfe looks like:


backend at /local/domain/0/backend/vbd/16644/2051
Failed to read /local/domain/0/backend/vbd/16644/2051/feature-barrier.
Failed to read /local/domain/0/backend/vbd/16644/2051/feature-flush-cache.
1835008 sectors of 512 bytes
**************************


GNU GRUB version 0.97 (1740800K lower / 0K upper memory)



+-------------------------------------------------------------------------+||||||||||||||||||||||||+-------------------------------------------------------------------------+

Use the ^ and v keys to select which entry is highlighted.

Press enter to boot the selected OS, 'e' to edit the

commands before booting, or 'c' for a command-line. 
Rump













  The highlighted entry will be
booted automatically in 1 seconds.  Booting 'Rump'



root (hd0)

Filesystem type is ext2fs, using whole disk

kernel /boot/rump-os.gz



============= Init TPM Front ================
Tpmfront:Error Unable to read device/vtpm/0/backend-id during tpmfront
initialization! error = ENOENT
Tpmfront:Info Shutting down tpmfront
close blk: backend=/local/domain/0/backend/vbd/16644/2049 node=device/vbd/2049
close blk: backend=/local/domain/0/backend/vbd/16644/2050 node=device/vbd/2050
close blk: backend=/local/domain/0/backend/vbd/16644/2051 node=device/vbd/2051
start_info: 0x7ca000(VA)
nr_pages: 0x6a400
shared_inf: 0x7e1b7000(MA)
pt_base: 0x7cd000(VA)
nr_pt_frames: 0x9
mfn_list: 0x478000(VA)
mod_start: 0x0(VA)
mod_len: 0
flags: 0x0
cmd_line:
stack: 0x3e9c40-0x469c40
MM: Init
_text: 0x0(VA)
_etext: 0x1bfa64(VA)
_erodata: 0x266000(VA)
_edata: 0x2717c0(VA)
stack start: 0x3e9c40(VA)
_end: 0x4779c0(VA)
start_pfn: 7d9
max_pfn: 6a400
Mapping memory range 0xc00000 - 0x6a400000
setting 0x0-0x266000 readonly
skipped 0x1000
MM: Initialise page allocator for b26000(b26000)-6a400000(6a400000)
MM: done
Demand map pfns at 6a401000-206a401000.
Initialising timer interface
Initialising console ... done.
gnttab_table mapped at 0x6a401000.
xenbus initialised on irq 1 mfn 0xa5ee0b
Failed to read device/pci/0/backend-id.
no backend
using hardcoded_jsoncfg
Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015
The NetBSD Foundation, Inc. All rights reserved.
Copyright (c) 1982, 1986, 1989, 1991, 1993
The Regents of the University of California. All rights reserved.

NetBSD 7.99.17 (RUMP-ROAST)
total memory = 844 MB
timecounter: Timecounters tick every 10.000 msec
timecounter: Timecounter "clockinterrupt" frequency 100 Hz quality 0
cpu0 at thinair0: rump virtual cpu
root file system type: rumpfs
kern.module.path=/stand/amd64/7.99.17/modules
mainbus0 (root)
pci0 at mainbus0 bus 0
pci0: i/o space, memory space enabled, rd/line, rd/mult, wr/inv ok
timecounter: Timecounter "rumpxen" frequency 1000000000 Hz quality 100
mounted tmpfs on /tmp
Page fault at linear address 0x0, rip 0x198a4e, regs 0x6a33fe28, sp 0x6a33fed0,
our_sp 0x6a33fe10, code 0
Thread: main
RIP: e030:[<0000000000198a4e>]
RSP: e02b:000000006a33fed0 EFLAGS: 00010202
RAX: 0000000000000000 RBX: 0000000000000000 RCX: 000000000000000a
RDX: 00000000003df480 RSI: 0000000000000000 RDI: 000000000020be43
RBP: 0000000000000000 R08: 0000000001202000 R09: 0000000001221ff0
R10: 0000000000fcf5d0 R11: 0000000000fd6e00 R12: 0000000000000000
R13: 000000206c404d20 R14: 0000000000001802 R15: 0000000000000000
base is 0 Page fault in pagetable walk (access to invalid memory?).


Other related posts: