From f57b0a9b3efff0410c758b662f8a717b643526fb Mon Sep 17 00:00:00 2001 From: Noel Georgi Date: Fri, 3 Nov 2023 15:41:12 +0530 Subject: [PATCH] chore: fix kernel target to honor `PLATFORM` Fixes the kernel target to honor the `PLATFORM` variable. Signed-off-by: Noel Georgi --- .kres.yaml | 2 +- Makefile | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.kres.yaml b/.kres.yaml index 0cbe2fbe5..228c173ef 100644 --- a/.kres.yaml +++ b/.kres.yaml @@ -73,7 +73,7 @@ spec: enabled: true script: - | - for platform in linux/amd64 linux/arm64; do \ + for platform in $(shell echo $(PLATFORM) | tr "," " "); do \ arch=`basename $$platform` ; \ $(MAKE) docker-kernel-prepare PLATFORM=$$platform TARGET_ARGS="--tag=$(REGISTRY)/$(USERNAME)/kernel:$(TAG)-$$arch --load"; \ docker run --rm -it --entrypoint=/toolchain/bin/bash -e PATH=/toolchain/bin:/bin -w /src -v $$PWD/kernel/build/config-$$arch:/host/.hostconfig $(REGISTRY)/$(USERNAME)/kernel:$(TAG)-$$arch -c 'cp /host/.hostconfig .config && make $* && cp .config /host/.hostconfig'; \ diff --git a/Makefile b/Makefile index 4aeed1c06..cd44fe6c9 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ # THIS FILE WAS AUTOMATICALLY GENERATED, PLEASE DO NOT EDIT. # -# Generated on 2023-11-02T18:46:07Z by kres 70e6597-dirty. +# Generated on 2023-11-03T10:10:36Z by kres latest. # common variables @@ -164,7 +164,7 @@ kernel-olddefconfig: @$(MAKE) local-kernel-build TARGET_ARGS="--build-arg=KERNEL_TARGET=olddefconfig" PLATFORM=linux/arm64 DEST="kernel/build" kernel-%: - for platform in linux/amd64 linux/arm64; do \ + for platform in $(shell echo $(PLATFORM) | tr "," " "); do \ arch=`basename $$platform` ; \ $(MAKE) docker-kernel-prepare PLATFORM=$$platform TARGET_ARGS="--tag=$(REGISTRY)/$(USERNAME)/kernel:$(TAG)-$$arch --load"; \ docker run --rm -it --entrypoint=/toolchain/bin/bash -e PATH=/toolchain/bin:/bin -w /src -v $$PWD/kernel/build/config-$$arch:/host/.hostconfig $(REGISTRY)/$(USERNAME)/kernel:$(TAG)-$$arch -c 'cp /host/.hostconfig .config && make $* && cp .config /host/.hostconfig'; \