From 4597c5f0faafd1660ba02b1c5e5176c9c52492ea Mon Sep 17 00:00:00 2001 From: Wildan Mubarok Date: Sun, 28 Sep 2025 04:11:42 +0000 Subject: [PATCH] Add push recipe combination and more ports to forward on QEMU --- mk/qemu.mk | 8 ++++++-- mk/repo.mk | 29 +++++++++++++++++++++++++++++ 2 files changed, 35 insertions(+), 2 deletions(-) diff --git a/mk/qemu.mk b/mk/qemu.mk index b9740e619..688526a9e 100644 --- a/mk/qemu.mk +++ b/mk/qemu.mk @@ -200,9 +200,13 @@ else ifneq ($(bridge),) QEMUFLAGS+=-netdev bridge,br=$(bridge),id=net0 else ifeq ($(net),redir) - # port 8080 and 8083 - webservers + # port 8022 - ssh + # port 8080-8083 - webservers # port 64126 - our gdbserver implementation - QEMUFLAGS+=-netdev user,id=net0,hostfwd=tcp::8080-:8080,hostfwd=tcp::8083-:8083,hostfwd=tcp::64126-:64126$(EXTRANETARGS) + FWD_PORTS := 8081 8082 8083 64126 + FWD_FLAGS := hostfwd=tcp::8022-:22,hostfwd=tcp::8080-:80 + FWD_FLAGS2 := $(foreach p,$(FWD_PORTS),,hostfwd=tcp::$(p)-:$(p)) + QEMUFLAGS += -netdev user,id=net0,$(FWD_FLAGS)$(subst $(eval ) ,,$(FWD_FLAGS2))$(EXTRANETARGS) else ifeq ($(net),windows) QEMUFLAGS+=-netdev user,id=net0$(EXTRANETARGS) else diff --git a/mk/repo.mk b/mk/repo.mk index b617f1e5f..5535bfb9c 100644 --- a/mk/repo.mk +++ b/mk/repo.mk @@ -166,6 +166,35 @@ else $(MAKE) f.$* endif +# Invoke repo.sh and push for one of more targets separated by comma +rp.%: $(FSTOOLS_TAG) FORCE +ifeq ($(PODMAN_BUILD),1) + $(PODMAN_RUN) make $@ +else + $(MAKE) r.$* + $(MAKE) p.$* +endif + +# Invoke clean.sh, repo.sh and push for one of more targets separated by comma +crp.%: $(FSTOOLS_TAG) FORCE +ifeq ($(PODMAN_BUILD),1) + $(PODMAN_RUN) make $@ +else + $(MAKE) c.$* + $(MAKE) r.$* + $(MAKE) p.$* +endif + +# Invoke unfetch.sh. clean.sh, repo.sh and push for one of more targets separated by comma +ucrp.%: $(FSTOOLS_TAG) FORCE +ifeq ($(PODMAN_BUILD),1) + $(PODMAN_RUN) make $@ +else + $(MAKE) u.$* + $(MAKE) c.$* + $(MAKE) r.$* + $(MAKE) p.$* +endif export DEBUG_BIN?=