Skip to content

Commit

Permalink
build: Add targets to write back defconfig changes instead of manuall…
Browse files Browse the repository at this point in the history
…y syncing
  • Loading branch information
pojntfx committed Jun 28, 2024
1 parent 0d79c1a commit 838683a
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 9,941 deletions.
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@ build/os:
config/os:
$(MAKE) -C $(OUTPUT_DIR)/buildroot BR2_EXTERNAL="$(OS_BR2_EXTERNAL)" menuconfig

# Save OS defconfig changes
save/os:
$(MAKE) -C $(OUTPUT_DIR)/buildroot BR2_EXTERNAL="$(OS_BR2_EXTERNAL)" savedefconfig

# Unpack OCI runtime bundle
unpack/oci:
rm -rf $(OUTPUT_DIR)/oci-image
Expand Down
9 changes: 7 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ $ drafter-packager --package-path out/drafteros.tar.zst --extract --devices '[
"path": "out/blueprint/rootfs.ext4"
}
]'

$ drafter-packager --package-path out/oci-valkey.tar.zst --extract --devices '[
{
"name": "oci",
Expand Down Expand Up @@ -141,8 +142,11 @@ To build the blueprints locally, you can use the [included Makefile](./Makefile)

```shell
# Build the DrafterOS blueprint
$ make depend/os
$ make build/os OS_DEFCONFIG=drafteros-firecracker-x86_64_defconfig # Or `drafteros-firecracker-aarch64_defconfig` if you're on `aarch64`
$ make depend/os OS_DEFCONFIG=drafteros-firecracker-x86_64_defconfig # Or `drafteros-firecracker-aarch64_defconfig` if you're on `aarch64`
$ make config/os # Optional: Configure DrafterOS
$ make save/os # Optional: Write back the DrafterOS configuration to the defconfig
$ make build/os

# Build the Valkey OCI image blueprint
$ sudo make build/oci OCI_IMAGE_URI=docker://valkey/valkey:latest OCI_IMAGE_ARCHITECTURE=amd64 # Or `arm64` if you're on `aarch64`
```
Expand Down Expand Up @@ -172,6 +176,7 @@ $ drafter-packager --package-path out/drafteros.tar.zst --devices '[
"path": "out/blueprint/rootfs.ext4"
}
]'

$ drafter-packager --package-path out/oci-valkey.tar.zst --devices '[
{
"name": "oci",
Expand Down
Loading

0 comments on commit 838683a

Please sign in to comment.