Baremetal Projects

One of important Codezero features is ability to run baremetal containers. For demonstration purposes and to help new Codezero users the vx-hello meta-config has been prepared.

It’s advised to first try building and running the vx-single-initramfs demo. See Running and Debugging page if you haven’t read it yet. To load the config run:

./ vx-hello

then build it:


If it’s a first time you’re trying to run vx-hello, the building system will copy a template source to codezero-meta/hello_world. Use it latter to discover project details and modify according to your own needs.

The baremetal demonstration uses serial port to print output messages. Use:


script to connect to it.

In another terminal start the debug session using:


And use continue command to start the system.

As a result you should get a bit of output from Codezero loader, kernel and then the baremetal container. The end of it should look like this:

code0: start kernel...

code0: Init kernel mappings...
code0: Virtual memory enabled.
code0: CPU: Cortex-A9, r0p0
code0: CPU supports: ThumbEE/Thumb2/TrustZone
code0: D-cache: PIPT, I-cache: VIPT
code0: Cache Write-back granule: 4 bytes
code0: Exclusive reservation granule: 2048 bytes
code0: D-cache minimum line: 32 bytes
code0: I-cache minimum line: 32 bytes
code0: 1 Levels of caches.
code0: Required LoUUP/LoC/LoUIS levels: 1, 1, 0
code0: L1 cache(s): 192Kb, 3-way, 128 sets, 512-byte lines.
code0: Separate I+D caches with ReadAlloc/WriteBack/WriteThrough support.
code0: icache/enabled, dcache/enabled.
code0: SMP: 1 CPU cluster, CPU0/ are participating in SMP
code0: Kernel area 0xf0000000 - 0xf0035000 remapped as 53 pages
code0: Kernel built on Jun 26 2012, 11:16:33
code0: Allocating 256 pgds
code0: Allocating 256 address_space structs
code0: Allocating 500 ktcbs
code0: Allocating 100 mutexes
code0: Allocating 8000 pmds
code0: Mapping 0xe000 bytes (14 pages) from 0x64000000 to 0xc0000000 for hello
code0: Enabling platform timer.
cont0: Hello world!

Only the last line is from the container itself. Not much, but by modifying the codezero-meta/hello_world project you can get desired results. Use the Hypervisor API page for a reference of Codezero API calls that you may use to build full featured baremetal container, that you can later run in parallel with other baremetal or Linux containers.

Comments are closed.