Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
131 commits
Select commit Hold shift + click to select a range
00e00ff
Update .gitignore
kvinwang Dec 22, 2025
84a43aa
Update yocto to whinlatter
kvinwang Dec 22, 2025
c7e3d52
Adding minimal stdio.h stub to satisfy libgcc-initial configure
kvinwang Dec 22, 2025
400b67c
systemd handle volatile deps
kvinwang Dec 22, 2025
2e56958
Volatile /etc/
kvinwang Dec 22, 2025
dd579e0
Rust 1.92.0
kvinwang Dec 22, 2025
ce97ff8
Suppress the warn Text file busy in build.sh
kvinwang Dec 22, 2025
d583c53
Remove CF_ZONE_ID
kvinwang Dec 22, 2025
afe5786
Rename DStack to dstack
kvinwang Dec 22, 2025
3c0e2a0
More stable network in bb build
kvinwang Dec 22, 2025
8fd64a5
Use custom kernel 6.17
kvinwang Dec 22, 2025
dd731b0
Make GCP image
kvinwang Dec 22, 2025
624131a
Add tpm-tools and lib
kvinwang Dec 22, 2025
f1ce527
Update dstack
kvinwang Dec 22, 2025
0aa78d4
Update zfs to 2.4.0
kvinwang Dec 22, 2025
92e7e54
v0.6.0
kvinwang Dec 22, 2025
2193b47
ssh: Disable password auth
kvinwang Dec 22, 2025
88ebc91
Update meta-confidential-compute
kvinwang Dec 22, 2025
29f2555
Use patched meta-rust-bin
kvinwang Dec 22, 2025
9b5f221
Update meta-virtualization
kvinwang Dec 22, 2025
78d1eb4
fixup zfs
kvinwang Dec 22, 2025
ed99054
Fix QA errors in meta-virtualization
kvinwang Dec 22, 2025
5a5e27e
Update nvidia receipes
kvinwang Dec 22, 2025
c1355e4
Update dstack/
kvinwang Dec 22, 2025
8fc9ddb
fixup zfs
kvinwang Dec 22, 2025
daed2d7
fixup meta-nvidia
kvinwang Dec 22, 2025
bbc89cc
Update dstack/
kvinwang Dec 22, 2025
169cf02
Adapt docker 29
kvinwang Dec 22, 2025
81da840
Remove mod-tdx-guest
kvinwang Dec 23, 2025
a9295ba
Update dstack/
kvinwang Dec 24, 2025
a4fbb92
Output gcp.tar.gz inside the image dir
kvinwang Dec 24, 2025
c22dfd4
Add cli dstack-cloud
kvinwang Dec 24, 2025
9163e80
Sync dstack/
kvinwang Dec 24, 2025
373ba08
Update dstack
kvinwang Jan 8, 2026
44a4444
Update url of dstack submodule
kvinwang Jan 8, 2026
ea76d25
Fix reproducibility issues
kvinwang Jan 15, 2026
268ce48
Update dstack
kvinwang Jan 15, 2026
d06a4d6
dstack-cloud: Add fw command group
kvinwang Jan 15, 2026
3dea1d5
dstack-cloud: Disable .env when kms is off
kvinwang Jan 15, 2026
8aa5409
dstack-cloud: Auto upload data-disk image
kvinwang Jan 16, 2026
5858bc0
Update dstack submodule url
kvinwang Jan 16, 2026
14b119f
Update dstack
kvinwang Jan 16, 2026
8980c09
Update submodules
kvinwang Jan 19, 2026
4da51e9
Update LICENSE
kvinwang Jan 19, 2026
4f72c0c
Update submodule URL
kvinwang Jan 19, 2026
d90c9fa
Update URL in README.md
kvinwang Jan 19, 2026
9a88cf4
Update dstack/
kvinwang Jan 19, 2026
78082be
Fix random fakeroot bb build error
kvinwang Jan 19, 2026
04288d0
bb: Rename image from dstack to dstack-cloud
kvinwang Jan 19, 2026
7cc276f
bb: Refactor image recipes to use multiconfig
kvinwang Jan 20, 2026
37531fe
bb: Move build config from bb-build to meta-dstack/conf
kvinwang Jan 20, 2026
6a0ae2a
Rename dist image prefix from dstack to dstack-cloud
kvinwang Jan 20, 2026
04100cd
mkimage: Fix UKI auth_hash not being written to output
kvinwang Jan 20, 2026
0ff95e2
Update LICENSE
kvinwang Jan 20, 2026
8e59b37
Fix uki filename in bb files
kvinwang Jan 20, 2026
1ee6539
Update dstack/ submodule
kvinwang Jan 20, 2026
2be0714
mkimage: Split output into bare-metal and UKI tarballs
kvinwang Jan 20, 2026
cd84be8
Fix filenames in dstack-cloud.py
kvinwang Jan 20, 2026
0a002d4
Fix url in repro-build.sh
kvinwang Jan 20, 2026
82555d3
mkimage: Fix authenticode_hash.py path resolution
kvinwang Jan 20, 2026
b964368
dstack-guest: Restore do_unpack nostamp flag
kvinwang Jan 20, 2026
c65b000
mkimage: Use stat -L to follow symlinks when getting rootfs size
kvinwang Jan 20, 2026
4775271
Remove tpm2 from DISTRO_FEATURES
kvinwang Jan 20, 2026
f1e2879
Remove unused systemd components completely
kvinwang Jan 20, 2026
d82f4d0
dstack-cloud: Remove init command and improve UX
kvinwang Jan 20, 2026
5652ee2
Update dstack/ submodule
kvinwang Jan 20, 2026
4f1d55a
Suppress meta-tpm warning
kvinwang Jan 20, 2026
f899c7e
Always calculate auth hash
kvinwang Jan 20, 2026
0b8d9c3
Update dstack/ submodule
kvinwang Jan 21, 2026
6afa83d
Update meta-virtualization
kvinwang Jan 22, 2026
65d6ffd
Fix env issue in dstack-cloud
kvinwang Jan 23, 2026
b49e84b
Update dstack/ submodule
kvinwang Jan 23, 2026
c92e0a8
Upgrade kernel to 6.18.7
kvinwang Jan 26, 2026
d748963
Merge pull request #1 from Phala-Network/upgrade-kernel-6.18.7
kvinwang Jan 26, 2026
7cf15f5
Update dstack/ submodule
kvinwang Jan 23, 2026
f9db23a
feat: Enable systemd socket proxy for dstack backward compatibility
kvinwang Jan 27, 2026
7d30c7b
Add ephemeral-docker.sh
kvinwang Jan 27, 2026
83f8d58
fix(dstack-cloud): fix env encryption format for CVM decryption
kvinwang Jan 29, 2026
6da8d86
feat: built-in systemd socket activation for dstack-guest-agent
kvinwang Jan 29, 2026
cb2c347
Move docker daemon config from package to image level
kvinwang Jan 29, 2026
557ff81
Merge pull request #2 from Phala-Network/fix-nvidia-docker-config
kvinwang Jan 29, 2026
0db86d1
Update dstack/ submodule
kvinwang Feb 5, 2026
b12b5c6
feat(guest): install conntrack sysctl config into CVM
kvinwang Feb 2, 2026
5d6a81f
feat(guest): add sysbox container runtime v0.6.7
kvinwang Feb 7, 2026
963789b
fix(sysbox): adapt services for dm-verity read-only rootfs
kvinwang Feb 8, 2026
78d8314
docs(sysbox): add comments explaining sysctl values
kvinwang Feb 8, 2026
69bb46e
refactor: move sysbox bind-mount from service into dstack-prepare
kvinwang Feb 8, 2026
ea244e2
refactor: move sysbox bind-mount from service into dstack-prepare
kvinwang Feb 8, 2026
1e20cc0
refactor: move sysbox bind-mount from service into dstack-prepare
kvinwang Feb 8, 2026
3aba6f8
Update dstack/ submodule
kvinwang Feb 10, 2026
b93d08d
Merge pull request #3 from Phala-Network/feat/sysbox-runtime
kvinwang Feb 10, 2026
08c1a62
feat(dstack-cloud): support absolute URL in pull command
kvinwang Feb 11, 2026
350002d
fix(gcp): preserve firewall reachability after instance recreation
kvinwang Feb 11, 2026
230c113
Update dstack/ submodule
kvinwang Feb 11, 2026
3865b26
fix: remove env_file from app.json in non-KMS mode
kvinwang Feb 12, 2026
962d729
chore: sync dstack submodule (rename network test -> custom)
kvinwang Feb 12, 2026
ec80adb
fix: handle missing instance gracefully in stop/start commands
kvinwang Feb 13, 2026
eb5b4e5
fix: distinguish "not found" from other gcloud errors
kvinwang Feb 13, 2026
ca1e9ab
Merge pull request #4 from Phala-Network/fix/stop-start-instance-not-…
kvinwang Feb 13, 2026
aa614d4
kernel: enable CONFIG_OVERLAY_FS_METACOPY for sysbox chown fallback
kvinwang Mar 7, 2026
0ddc6bd
dstack-sysbox: disable ovfs on idmapped mounts
kvinwang Mar 9, 2026
544e5b6
Merge pull request #6 from Phala-Network/enable-overlay-metacopy
kvinwang Mar 9, 2026
baf5631
libnvidia-container: fix TLS verification for build-time downloads
kvinwang Mar 9, 2026
98f4f9e
Merge pull request #7 from Phala-Network/fix/libnvidia-curl-tls
kvinwang Mar 9, 2026
50172d8
Add xt_comment, nf_tables and other iptables kernel modules for k3s s…
kvinwang Mar 17, 2026
d6478e3
add gcp service account and scope config
jerryrhyu Apr 2, 2026
4905ccc
Merge pull request #10 from jerryrhyu/gcp-sa-config
kvinwang Apr 3, 2026
2d56823
fix: add nftables kernel modules to 6.18 defconfig
kvinwang Apr 13, 2026
4e47e23
Merge pull request #9 from Phala-Network/add-k3s-kernel-modules
kvinwang Apr 13, 2026
4201d20
chore: update dstack submodule to latest master
kvinwang Apr 13, 2026
f1a35b7
kernel: enable CONFIG_CRYPTO_ECDSA for H100 confidential compute
kvinwang May 27, 2026
110991a
Merge pull request #14 from Phala-Network/kvin/fix-h100-cc-crypto-ecdsa
kvinwang May 27, 2026
bab2c0e
dstack-cloud: add gcp_config.provisioning_model for SPOT instances
kvinwang May 27, 2026
5a1bfea
Merge pull request #15 from Phala-Network/kvin/dstack-cloud-spot-prov…
kvinwang May 27, 2026
275ea21
bump dstack submodule to b051018a
kvinwang May 27, 2026
74a86df
Merge pull request #16 from Phala-Network/kvin/bump-dstack-submodule
kvinwang May 27, 2026
7477e4a
bump DISTRO_VERSION to 0.6.1
kvinwang May 27, 2026
7deca28
build: merge dstack-cloud build system; switch to Yocto split layout …
kvinwang May 31, 2026
aeb3e0a
kernel: switch from linux-custom to official linux-yocto 6.18
kvinwang May 31, 2026
4d4a0d3
build: fix flavor dist names (dstack* not dstack-cloud*) and UKI pyth…
kvinwang May 31, 2026
4925deb
build: wrynose migration fixes — parse clean (28395 targets, 0 errors)
kvinwang May 31, 2026
ba6c005
distro: set INIT_MANAGER=systemd (wrynose udev fix)
kvinwang May 31, 2026
dd12be4
dstack-ovmf: drop S = ${WORKDIR}/git (wrynose sets S for git fetches)
kvinwang May 31, 2026
d8da197
dstack-ovmf: add Upstream-Status to local patches (wrynose fatal QA)
kvinwang May 31, 2026
19114d9
dstack-ovmf: build on wrynose (edk2-stable202511 + NASM 3.0 fix)
kvinwang May 31, 2026
42f8b3f
meta-virtualization: bump to runc patch-fuzz fix
kvinwang May 31, 2026
3ac32c5
kernel: build CRYPTO_SHA256 in (dm-verity rootfs hash in initramfs)
kvinwang May 31, 2026
d403f7d
dstack-ovmf: keep edk2-stable202502 (dstack-mr compat) + build on wry…
kvinwang Jun 1, 2026
8f6b753
review: build-system fixes from PR review
kvinwang Jun 1, 2026
fed4cc1
Potential fix for pull request finding
kvinwang Jun 4, 2026
9de071b
mkimage: dedupe sgdisk check from autofix; clearer message
kvinwang Jun 4, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@
*.qcow2
__pycache__/
/.target
/.vscode
/.claude
17 changes: 13 additions & 4 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
[submodule "poky"]
path = poky
url = https://github.com/yoctoproject/poky.git
[submodule "bitbake"]
path = bitbake
url = https://git.openembedded.org/bitbake
branch = 2.18
[submodule "openembedded-core"]
path = openembedded-core
url = https://git.openembedded.org/openembedded-core
branch = wrynose
[submodule "meta-yocto"]
path = meta-yocto
url = https://git.yoctoproject.org/meta-yocto
branch = wrynose
[submodule "meta-confidential-compute"]
path = meta-confidential-compute
url = https://github.com/Dstack-TEE/meta-confidential-compute.git
Expand All @@ -12,7 +21,7 @@
url = https://github.com/openembedded/meta-openembedded
[submodule "meta-rust-bin"]
path = meta-rust-bin
url = https://github.com/rust-embedded/meta-rust-bin
url = https://github.com/Dstack-TEE/meta-rust-bin
[submodule "dstack"]
path = dstack
url = https://github.com/Dstack-TEE/dstack
Expand Down
115 changes: 94 additions & 21 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,21 +1,94 @@
MIT License

Copyright (c) 2024 Phala Network

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Business Source License 1.1

Parameters

Licensor: Hashforest Technology LLC

Licensed Work: dstack-cloud
The Licensed Work is (c) Hashforest Technology LLC

Additional Use Grant: Notwithstanding the foregoing, the Licensor grants
to certain commercial partners a license to use the
Licensed Work for production and commercial purposes
pursuant to separate agreements.

Change Date: Two years from the date a MINOR version (SemVer) is
published.

Change License: GNU Affero General Public License Version 3 (AGPL-3.0)

Notice

License text copyright (c) 2023 MariaDB plc, All Rights Reserved.
“Business Source License” is a trademark of MariaDB plc.

-----------------------------------------------------------------------------

Business Source License 1.1

Terms

The Licensor hereby grants you the right to copy, modify, create derivative
works, redistribute, and make non-production use of the Licensed Work. The
Licensor may make an Additional Use Grant, above, permitting limited
production use.

Effective on the Change Date, or the fourth anniversary of the first publicly
available distribution of a specific version of the Licensed Work under this
License, whichever comes first, the Licensor hereby grants you rights under
the terms of the Change License, and the rights granted in the paragraph
above terminate.

If your use of the Licensed Work does not comply with the requirements
currently in effect as described in this License, you must purchase a
commercial license from the Licensor, its affiliated entities, or authorized
resellers, or you must refrain from using the Licensed Work.

All copies of the original and modified Licensed Work, and derivative works
of the Licensed Work, are subject to this License. This License applies
separately for each version of the Licensed Work and the Change Date may vary
for each version of the Licensed Work released by Licensor.

You must conspicuously display this License on each original or modified copy
of the Licensed Work. If you receive the Licensed Work in original or
modified form from a third party, the terms and conditions set forth in this
License apply to your use of that work.

Any use of the Licensed Work in violation of this License will automatically
terminate your rights under this License for the current and all other
versions of the Licensed Work.

This License does not grant you any right in any trademark or logo of
Licensor or its affiliates (provided that you may use a trademark or logo of
Licensor as expressly required by this License).

TO THE EXTENT PERMITTED BY APPLICABLE LAW, THE LICENSED WORK IS PROVIDED ON
AN “AS IS” BASIS. LICENSOR HEREBY DISCLAIMS ALL WARRANTIES AND CONDITIONS,
EXPRESS OR IMPLIED, INCLUDING (WITHOUT LIMITATION) WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT, AND
TITLE.

MariaDB hereby grants you permission to use this License’s text to license
your works, and to refer to it using the trademark “Business Source License”,
as long as you comply with the Covenants of Licensor below.

Covenants of Licensor

In consideration of the right to use this License’s text and the “Business
Source License” name and trademark, Licensor covenants to MariaDB, and to all
other recipients of the licensed work to be provided by Licensor:

1. To specify as the Change License the GPL Version 2.0 or any later version,
or a license that is compatible with GPL Version 2.0 or a later version,
where “compatible” means that software provided under the Change License can
be included in a program with software provided under GPL Version 2.0 or a
later version. Licensor may specify additional Change Licenses without
limitation.

2. To either: (a) specify an additional grant of rights to use that does not
impose any additional restriction on the right granted in this License, as
the Additional Use Grant; or (b) insert the text “None”.

3. To specify a Change Date.

4. Not to modify this License in any other way.
30 changes: 22 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,31 +2,45 @@ ifeq ($(BBPATH),)
$(error BBPATH is not set. Run `source dev-setup` first)
endif

.PHONY: all dist clean-dstack clean-initrd images
.PHONY: all dist clean-dstack clean-initrd images images-common images-flavors

BB_BUILD_DIR ?= bb-build
DIST_DIR ?= ${BB_BUILD_DIR}/dist
export BB_BUILD_DIR
export DIST_DIR

DIST_NAMES ?= dstack dstack-dev dstack-nvidia dstack-nvidia-dev
ROOTFS_IMAGE_NAMES = $(addsuffix -rootfs,${DIST_NAMES})
# Flavor names map to multiconfig names: prod, dev, nvidia, nvidia-dev
FLAVORS ?= prod dev nvidia nvidia-dev

# Map flavor to dist name for mkimage.sh
flavor_to_dist = $(if $(filter prod,$1),dstack,$(if $(filter dev,$1),dstack-dev,$(if $(filter nvidia,$1),dstack-nvidia,$(if $(filter nvidia-dev,$1),dstack-nvidia-dev,$1))))

all: dist

-include $(wildcard mk.d/*.mk)

dist: images
$(foreach dist_name,${DIST_NAMES},./mkimage.sh --dist-name $(dist_name);)
$(foreach flavor,$(FLAVORS),./mkimage.sh --dist-name $(call flavor_to_dist,$(flavor)) --flavor $(flavor);)

# Build common artifacts (shared across all flavors)
# dstack-guest is built here first to warm sstate/downloads and avoid concurrent
# fetch/build conflicts when the per-flavor multiconfigs build it in parallel.
images-common:
bitbake virtual/kernel dstack-initramfs dstack-ovmf dstack-guest

# Build flavor-specific artifacts using multiconfig (serial to avoid deadlock warnings)
images-flavors:
$(foreach flavor,$(FLAVORS),bitbake mc:$(flavor):dstack-rootfs mc:$(flavor):dstack-uki;)

images:
bitbake virtual/kernel dstack-initramfs dstack-ovmf $(ROOTFS_IMAGE_NAMES)
images: images-common images-flavors

clean:
bitbake -c cleansstate virtual/kernel dstack-initramfs dstack-ovmf $(ROOTFS_IMAGE_NAMES)
bitbake -c cleansstate virtual/kernel dstack-initramfs dstack-ovmf
$(foreach flavor,$(FLAVORS),bitbake -c cleansstate mc:$(flavor):dstack-rootfs mc:$(flavor):dstack-uki;)

clean-dstack:
bitbake -c cleansstate dstack-guest $(ROOTFS_IMAGE_NAMES)
bitbake -c cleansstate dstack-guest
$(foreach flavor,$(FLAVORS),bitbake -c cleansstate mc:$(flavor):dstack-rootfs;)

clean-initrd:
bitbake -c cleansstate dstack-initramfs
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# Yocto support for DStack Guest
# Yocto support for dstack guest OS

This project implements Yocto layer and the overall build scripts for DStack Base OS image.
This project implements Yocto layer and the overall build scripts for dstack Base OS image.

## Build

See https://github.com/Dstack-TEE/dstack for more details.
See https://github.com/Phala-Network/dstack-cloud for more details.

## Reproducible Build The Guest Image

Expand All @@ -22,4 +22,4 @@ cd meta-dstack/repro-build/

## License

This project is licensed under the MIT License. See the LICENSE file for more details.
See the LICENSE file for more details.
1 change: 1 addition & 0 deletions bitbake
Submodule bitbake added at 220217
4 changes: 2 additions & 2 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -306,9 +306,9 @@ download_image() {

TAG=v$VERSION
if [ x"$IS_DEV" = x"1" ]; then
BASENAME=dstack-dev-$VERSION
BASENAME=dstack-cloud-dev-$VERSION
else
BASENAME=dstack-$VERSION
BASENAME=dstack-cloud-$VERSION
fi
URL=https://github.com/Dstack-TEE/meta-dstack/releases/download/$TAG/$BASENAME.tar.gz
if [ -d $IMAGES_DIR/$BASENAME ]; then
Comment thread
kvinwang marked this conversation as resolved.
Expand Down
21 changes: 13 additions & 8 deletions dev-setup
Original file line number Diff line number Diff line change
Expand Up @@ -16,34 +16,39 @@ fi
THIS_SCRIPT=$(realpath "$THIS_SCRIPT")
THIS_DIR=$(dirname "$THIS_SCRIPT")

LAYERS="$THIS_DIR/meta-confidential-compute \
LAYERS="$THIS_DIR/meta-yocto/meta-poky \
$THIS_DIR/meta-yocto/meta-yocto-bsp \
$THIS_DIR/meta-confidential-compute \
$THIS_DIR/meta-openembedded/meta-oe \
$THIS_DIR/meta-openembedded/meta-python \
$THIS_DIR/meta-openembedded/meta-networking \
$THIS_DIR/meta-openembedded/meta-filesystems \
$THIS_DIR/meta-virtualization \
$THIS_DIR/meta-rust-bin \
$THIS_DIR/meta-security \
$THIS_DIR//meta-security/meta-tpm \
$THIS_DIR/meta-dstack"

if [ -z "$1" ]; then
BUILD_DIR=$THIS_DIR/bb-build
else
BUILD_DIR=$(realpath "$1")
fi
if [ ! -f "$BUILD_DIR/conf/local.conf" ]; then
mkdir -p "$BUILD_DIR/conf"
cp -f "$THIS_DIR/bb-build/conf/local.conf" "$BUILD_DIR/conf/local.conf"
fi

OE_INIT=$THIS_DIR/poky/oe-init-build-env
# Sync build config from meta-dstack/conf (always overwrite)
CONF_SRC=$THIS_DIR/meta-dstack/conf
mkdir -p "$BUILD_DIR/conf"
cp -f "$CONF_SRC/local.conf" "$BUILD_DIR/conf/local.conf"
cp -rf "$CONF_SRC/multiconfig" "$BUILD_DIR/conf/"

OE_INIT=$THIS_DIR/openembedded-core/oe-init-build-env

for script in $THIS_DIR/setup.d/*.sh; do
source "$script"
done

pushd .
source $OE_INIT $BUILD_DIR
pushd "$BUILD_DIR"
BDIR="." TEMPLATECONF=$THIS_DIR/openembedded-core/meta/conf/templates/default source $OE_INIT
popd

bitbake-layers add-layer $LAYERS
Expand Down
2 changes: 1 addition & 1 deletion dstack
Submodule dstack updated 114 files
25 changes: 18 additions & 7 deletions meta-dstack/conf/distro/dstack.conf
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
# Select systemd init before requiring poky-derived distro config, otherwise
# poky.conf's POKY_INIT_MANAGER="sysvinit" pulls init-manager-sysvinit.inc which
# appends sysvinit to DISTRO_FEATURES and conflicts with systemd (breaks udev).
INIT_MANAGER = "systemd"
require conf/distro/cvm.conf
DISTRO = "dstack"
DISTRO_NAME = "DStack"
DISTRO_FEATURES:append = " virtualization seccomp systemd usrmerge security dm-verity ipv6"
DISTRO_FEATURES_BACKFILL_CONSIDERED += "sysvinit"

DISTRO_VERSION = "0.5.11"
DISTRO_VERSION = "0.6.0"
DISTROOVERRIDES = "poky:dstack"
INITRAMFS_IMAGE = ""
VOLATILE_LOG_DIR = "no"
VOLATILE_TMP_DIR = "yes"

PREFERRED_PROVIDER_virtual/kernel = "linux-yocto-dev"
PREFERRED_VERSION_linux-yocto-dev ?= "6.9%"
PREFERRED_PROVIDER_virtual/kernel = "linux-yocto"
PREFERRED_VERSION_linux-yocto ?= "6.18%"
LINUX_KERNEL_TYPE = "tiny"

MACHINE_FEATURES += "numa"
Expand All @@ -31,4 +32,14 @@ PREFERRED_VERSION_nvidia = "${NVIDIA_VERSION}"
PREFERRED_VERSION_nvidia-fabricmanager = "${NVIDIA_VERSION}"
PREFERRED_VERSION_libnvidia-nscq = "${NVIDIA_VERSION}"

BAD_RECOMMENDATIONS = "busybox-syslog"
BAD_RECOMMENDATIONS = "busybox-syslog systemd-compat-units"

# Skip unused components that fail metadata checks
SKIP_RECIPE[ostree] = "not required for dstack"

# Suppress meta-tpm warning (we use TPM drivers directly without tpm2 DISTRO_FEATURES)
SKIP_META_TPM_SANITY_CHECK = "1"

# EFI/UKI support for GCP images
MACHINE_FEATURES:append = " efi"
EFI_PROVIDER = "systemd-boot"
2 changes: 1 addition & 1 deletion meta-dstack/conf/layer.conf
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ BBFILE_COLLECTIONS += "dstack"
BBFILE_PATTERN_dstack := "^${LAYERDIR}/"
BBFILE_PRIORITY_dstack = "20"
LAYERVERSION_dstack = "4"
LAYERSERIES_COMPAT_dstack = "scarthgap"
LAYERSERIES_COMPAT_dstack = "wrynose"
4 changes: 4 additions & 0 deletions bb-build/conf/local.conf → meta-dstack/conf/local.conf
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,9 @@ DISTRO ?= "dstack"
# - 'buildstats' collect build statistics
USER_CLASSES ?= "buildstats"

# Prefer faster GNU mirror
GNU_MIRRORS = "https://ftpmirror.gnu.org/gnu/"

#
# Runtime testing of images
#
Expand Down Expand Up @@ -293,3 +296,4 @@ SOURCE_MIRROR_URL = "https://mirrors.kernel.org/yocto-sources/"

# Improve resilience for large files on unstable links
FETCHCMD_wget = "wget --progress=dot --inet4-only -c"
BBMULTICONFIG = "prod dev nvidia nvidia-dev"
7 changes: 7 additions & 0 deletions meta-dstack/conf/multiconfig/dev.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Development flavor configuration
DSTACK_FLAVOR = "dev"
DSTACK_NVIDIA = "0"
DSTACK_DEV = "1"

# Use separate TMPDIR to avoid conflicts between multiconfigs
TMPDIR = "${TOPDIR}/tmp-mc-dev"
7 changes: 7 additions & 0 deletions meta-dstack/conf/multiconfig/nvidia-dev.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# NVIDIA development flavor configuration
DSTACK_FLAVOR = "nvidia-dev"
DSTACK_NVIDIA = "1"
DSTACK_DEV = "1"

# Use separate TMPDIR to avoid conflicts between multiconfigs
TMPDIR = "${TOPDIR}/tmp-mc-nvidia-dev"
7 changes: 7 additions & 0 deletions meta-dstack/conf/multiconfig/nvidia.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# NVIDIA production flavor configuration
DSTACK_FLAVOR = "nvidia"
DSTACK_NVIDIA = "1"
DSTACK_DEV = "0"

# Use separate TMPDIR to avoid conflicts between multiconfigs
TMPDIR = "${TOPDIR}/tmp-mc-nvidia"
7 changes: 7 additions & 0 deletions meta-dstack/conf/multiconfig/prod.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Production flavor configuration
DSTACK_FLAVOR = "prod"
DSTACK_NVIDIA = "0"
DSTACK_DEV = "0"

# Use separate TMPDIR to avoid conflicts between multiconfigs
TMPDIR = "${TOPDIR}/tmp-mc-prod"
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ SRC_URI += "file://disable-password-auth.conf"

do_install:append() {
install -d ${D}${sysconfdir}/ssh/sshd_config.d
install -m 0644 ${WORKDIR}/disable-password-auth.conf ${D}${sysconfdir}/ssh/sshd_config.d/
install -m 0644 ${UNPACKDIR}/disable-password-auth.conf ${D}${sysconfdir}/ssh/sshd_config.d/
}

FILES:${PN}-sshd += "${sysconfdir}/ssh/sshd_config.d/"
Loading