Closed alfreb closed 3 weeks ago
The last commit adds a unikernel parameter, allowing the same nix shell to build any unikernel. Tested with
nix-shell --argstr unikernel ./example
which succeeds, and nix-shell --argstr unikernel ./test/net/integration/udp/
which correctly fails as that test is broken and needs fixing.
Nice! I've merged #2246, this may need a rebase
Rebased now
Great! Now it looks like all we need to do is remove the conan stuff from cmake and some of these tests will build cleanly! I made the change for the UDP test as an example. I haven't run the test, but it boots!
SeaBIOS (version 1.16.3-debian-1.16.3-2)
Booting from ROM..* Multiboot begin: 0x9500
* Multiboot cmdline @ 0x234023: /nix/store/dcbw0cibwmfrlv8r79az05i7h1cygraf-chainloader-static-i686-unknown-linux-musl-dev/bin/chainloader ""
* Multiboot end: 0x234091
* Module list @ 0x234000
* Module @ 0x235000
* Args: net_udp.elf.bin ""
* End: 0x47dac0
* Multiboot end: 0x47dac0
<Multiboot>Booted with multiboot
* Boot flags: 0x24f
* Valid memory (409087 Kib):
0x00000000 - 0x0009fbff (639 Kib)
0x00100000 - 0x18fdffff (408448 Kib)
* Booted with parameters @ 0x234023: /nix/store/dcbw0cibwmfrlv8r79az05i7h1cygraf-chainloader-static-i686-unknown-linux-musl-dev/bin/chainloader ""
* Multiboot provided memory map (8 entries @ 0x9000)
0x0000000000 - 0x000009fbff FREE (639 Kb.)
0x000009fc00 - 0x000009ffff RESERVED (1 Kb.)
0x00000f0000 - 0x00000fffff RESERVED (64 Kb.)
0x0000100000 - 0x0018fdffff FREE (408448 Kb.)
0x0018fe0000 - 0x0018ffffff RESERVED (128 Kb.)
0x00feffc000 - 0x00feffffff RESERVED (16 Kb.)
0x00fffc0000 - 0x00ffffffff RESERVED (256 Kb.)
0x0000000000 - 0x00ffffffff RESERVED (0 Kb.)
<Multiboot>OS loaded with 1 modules
* net_udp.elf.bin "" @ 0x235000 - 0x47dac0, size: 2394816b
* Multiboot begin: 0x9500
* Multiboot end: 0x3a6468
[x86_64 PC] constructor
[ Machine ] Initializing heap
[ Machine ] Main memory detected as 415469376 b
[ Machine ] Reserving 1048576 b for machine use
<Multiboot>Booted with multiboot
* Boot flags: 0x24f
* Valid memory (409087 Kib):
0x00000000 - 0x0009fbff (639 Kib)
0x00100000 - 0x18fdffff (408448 Kib)
* Booted with parameters @ 0x8000: net_udp.elf.bin ""
* Multiboot provided memory map (8 entries @ 0x9000)
0x0000000000 - 0x000009fbff FREE (639 Kb.)
0x000009fc00 - 0x000009ffff RESERVED (1 Kb.)
0x00000f0000 - 0x00000fffff RESERVED (64 Kb.)
0x0000100000 - 0x0018fdffff FREE (408448 Kb.)
0x0018fe0000 - 0x0018ffffff RESERVED (128 Kb.)
0x00feffc000 - 0x00feffffff RESERVED (16 Kb.)
0x00fffc0000 - 0x00ffffffff RESERVED (256 Kb.)
0xfd00000000 - 0xffffffffff RESERVED (12582912 Kb.)
================================================================================
IncludeOS VERY_DIRTY (x86_64 / 64-bit)
+--> Running [ UDP test ]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[ Network ] Creating stack for VirtioNet on eth0 (MTU=1500)
[ Inet ] Bringing up eth0 on CPU 0
[ Inet ] Network configured (c0:01:0a:00:00:2a)
IP: 10.0.0.55
Netmask: 255.255.0.0
Gateway: 10.0.0.1
DNS Server: 10.0.0.1
[ Inet6 ] Address configured fe80:0:0:0:0:0:0:4242/64
[ UDP test service ] Listening on port 4242
Depends on #2246 and can only be merged after that.
Build tested with
It successfully builds and boots the example.
Shell tested with
nix-shell
andnix-shell --argstr build_example
. It successfully builds the example and enters the nix shell in a working cmake build dir.