Conversation

Jarkko Sakkinen

Edited 6 days ago

I’m working on a bash and Makefile based project called “himmelblau-dev”, which provides low-barrier entry point to start contributing to that upstream project. I have not really contributed to that project much because there is no a meaningful edit-compile-run-cycle and that is what I’m resolving with this project.

I’ve taken a lot of trouble to not use containers, not even in the build, because containers always mean looking for problems when translating a development environment from one machine to another.

[To be completely honest, for any possible project I interpret “I have to use a container” into “my solution is going to be a trainwreck”]

Instead, I do the build with a combination of deboostrap and guestfish tricks. The project has makefile targets for running resulting QCOW2 in QEMU, contains a settings file (parser implemented in bash) and automatic download of OVMF images and logic for managing EFI vars file.

It’s a bit like embedded build system centered around a single upstream project.

Layout right now:

❯ tree
.
├── bootstrap
│   ├── settings.sh
│   └── start.sh
├── config
│   ├── debian.sh
│   ├── himmeblau.sh
│   └── start.sh
├── himmelblau.version
├── Makefile
├── qemu.json
├── README.md
└── vm
    ├── qemu.sh
    ├── start.sh
    └── swtpm.sh

I need to fine-tunet his for a while still before I publish it. It’s all GPL3 license as I see no point of using any other license for this.

qemu.json is just my own ad-hoc VM configuration format:

{
  "args": {
    "enable-kvm": true,
    "machine": "q35,accel=kvm",
    "cpu": "host",
    "memory": "4G",
    "rtc": "base=localtime"
  },
  "networking": {
    "user": [
      { "netdev": "user,id=net0,hostfwd=tcp::10022-:22" },
      { "device": "virtio-net-pci,netdev=net0" }
    ],
    "bridge": [
      { "netdev": "bridge,id=net0,br=br0" },
      { "device": "virtio-net-pci,netdev=net0" }
    ]
  },
  "tpm": {
    "enabled": true,
    "tpmdev": "emulator,id=tpm0,chardev=chrtpm",
    "device": "tpm-tis,tpmdev=tpm0"
  },
  "drives": [
    {
      "if": "pflash",
      "file": "OVMF_CODE.fd",
      "format": "raw",
      "readonly": "on"
    },
    {
      "if": "pflash",
      "file": "OVMF_VARS.fd",
      "format": "raw"
    },
    {
      "file": "himmelblau-demo.qcow2",
      "format": "qcow2"
    }
  ]
}

#azure #intune #himmelblau

0
0
0