UEFI EDK II, TPM minting, QEMU launcher and basic DHCP support
Test Plan:
You still need a recent version of QEMU and swtpm installed (these are not yet integrated)
Run `make launch` and have fun with a running Smalltown instance :)
X-Origin-Diff: phab/D159
GitOrigin-RevId: c7245bfbabebf92507445525bee009a71d19caea
diff --git a/cmd/mkimage/main.go b/cmd/mkimage/main.go
index e6c9c58..78eccfb 100644
--- a/cmd/mkimage/main.go
+++ b/cmd/mkimage/main.go
@@ -44,8 +44,12 @@
}
func main() {
- os.Remove("smalltown.img")
- diskImg, err := diskfs.Create("smalltown.img", 3*1024*1024*1024, diskfs.Raw)
+ if len(os.Args) < 3 {
+ fmt.Println("Usage: mkimage <UEFI payload> <image path>")
+ os.Exit(2)
+ }
+ os.Remove(os.Args[2])
+ diskImg, err := diskfs.Create(os.Args[2], 3*1024*1024*1024, diskfs.Raw)
if err != nil {
fmt.Printf("Failed to create disk: %v", err)
os.Exit(1)