Control PXE tarball builds with Makefile
This commit is contained in:
parent
89e3affa22
commit
fc80523768
12
Makefile
12
Makefile
|
@ -10,15 +10,19 @@ T_ARCHS=i686 x86_64{,-musl} armv{6,7}l{,-musl} aarch64{,-musl}
|
||||||
T_SBC_IMGS=rpi{,2,3}{,-musl} beaglebone{,-musl} cubieboard2{,-musl} odroid-c2{,-musl} usbarmory{,-musl}
|
T_SBC_IMGS=rpi{,2,3}{,-musl} beaglebone{,-musl} cubieboard2{,-musl} odroid-c2{,-musl} usbarmory{,-musl}
|
||||||
T_CLOUD_IMGS=GCP{,-musl}
|
T_CLOUD_IMGS=GCP{,-musl}
|
||||||
|
|
||||||
|
T_PXE_ARCHS=x86_64{,-musl}
|
||||||
|
|
||||||
ARCHS=$(shell echo $(T_ARCHS))
|
ARCHS=$(shell echo $(T_ARCHS))
|
||||||
PLATFORMS=$(shell echo $(T_PLATFORMS))
|
PLATFORMS=$(shell echo $(T_PLATFORMS))
|
||||||
SBC_IMGS=$(shell echo $(T_SBC_IMGS))
|
SBC_IMGS=$(shell echo $(T_SBC_IMGS))
|
||||||
CLOUD_IMGS=$(shell echo $(T_CLOUD_IMGS))
|
CLOUD_IMGS=$(shell echo $(T_CLOUD_IMGS))
|
||||||
|
PXE_ARCHS=$(shell echo $(T_PXE_ARCHS))
|
||||||
|
|
||||||
ALL_ROOTFS=$(foreach arch,$(ARCHS),void-$(arch)-ROOTFS-$(DATE).tar.xz)
|
ALL_ROOTFS=$(foreach arch,$(ARCHS),void-$(arch)-ROOTFS-$(DATE).tar.xz)
|
||||||
ALL_PLATFORMFS=$(foreach platform,$(PLATFORMS),void-$(platform)-PLATFORMFS-$(DATE).tar.xz)
|
ALL_PLATFORMFS=$(foreach platform,$(PLATFORMS),void-$(platform)-PLATFORMFS-$(DATE).tar.xz)
|
||||||
ALL_SBC_IMAGES=$(foreach platform,$(SBC_IMGS),void-$(platform)-$(DATE).img.xz)
|
ALL_SBC_IMAGES=$(foreach platform,$(SBC_IMGS),void-$(platform)-$(DATE).img.xz)
|
||||||
ALL_CLOUD_IMAGES=$(foreach cloud,$(CLOUD_IMGS),void-$(cloud)-$(DATE).tar.gz)
|
ALL_CLOUD_IMAGES=$(foreach cloud,$(CLOUD_IMGS),void-$(cloud)-$(DATE).tar.gz)
|
||||||
|
ALL_PXE_ARCHS=$(foreach arch,$(PXE_ARCHS),void-$(arch)-NETBOOT-$(DATE).tar.gz)
|
||||||
|
|
||||||
SUDO := sudo
|
SUDO := sudo
|
||||||
|
|
||||||
|
@ -75,6 +79,12 @@ void-GCP-$(DATE).tar.gz:
|
||||||
void-GCP-musl-$(DATE).tar.gz:
|
void-GCP-musl-$(DATE).tar.gz:
|
||||||
$(SUDO) ./mkimage.sh -x $(COMPRESSOR_THREADS) void-GCP-musl-PLATFORMFS-$(DATE).tar.xz
|
$(SUDO) ./mkimage.sh -x $(COMPRESSOR_THREADS) void-GCP-musl-PLATFORMFS-$(DATE).tar.xz
|
||||||
|
|
||||||
|
pxe-all: $(ALL_PXE_ARCHS)
|
||||||
|
|
||||||
|
pxe-all-print:
|
||||||
|
@echo $(ALL_PXE_ARCHS)
|
||||||
|
|
||||||
.PHONY: clean dist rootfs-all-print platformfs-all-print
|
void-%-NETBOOT-$(DATE).tar.gz: $(SCRIPTS)
|
||||||
|
$(SUDO) ./mknet.sh void-$*-ROOTFS-$(DATE).tar.xz
|
||||||
|
|
||||||
|
.PHONY: clean dist rootfs-all-print platformfs-all-print pxe-all-print
|
||||||
|
|
|
@ -7,7 +7,7 @@ check() {
|
||||||
}
|
}
|
||||||
|
|
||||||
depends() {
|
depends() {
|
||||||
return 0
|
echo network
|
||||||
}
|
}
|
||||||
|
|
||||||
install() {
|
install() {
|
||||||
|
@ -43,6 +43,7 @@ install() {
|
||||||
inst /usr/bin/reboot
|
inst /usr/bin/reboot
|
||||||
inst /usr/bin/rm
|
inst /usr/bin/rm
|
||||||
inst /usr/bin/sed
|
inst /usr/bin/sed
|
||||||
|
inst /usr/bin/sh
|
||||||
inst /usr/bin/sort
|
inst /usr/bin/sort
|
||||||
inst /usr/bin/sync
|
inst /usr/bin/sync
|
||||||
inst /usr/bin/stdbuf
|
inst /usr/bin/stdbuf
|
||||||
|
|
|
@ -8,7 +8,7 @@ dialog --colors --keep-tite --no-shadow --no-mouse \
|
||||||
"Shell" "Run dash" \
|
"Shell" "Run dash" \
|
||||||
2>/tmp/netmenu.action
|
2>/tmp/netmenu.action
|
||||||
|
|
||||||
if ! $? ; then
|
if [ ! $? ] ; then
|
||||||
reboot -f
|
reboot -f
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
|
@ -211,10 +211,10 @@ sed -i -e "s|@@SPLASHIMAGE@@|$(basename "${SPLASH_IMAGE}")|" \
|
||||||
"$PXELINUX_DIR/default"
|
"$PXELINUX_DIR/default"
|
||||||
|
|
||||||
# Default output file format
|
# Default output file format
|
||||||
OUTPUT_FILE="void-netboot-${XBPS_TARGET_ARCH}-${KERNELVERSION}-$(date +%Y%m%d)"
|
OUTPUT_FILE="void-${XBPS_TARGET_ARCH}-NETBOOT-$(date +%Y%m%d).tar.gz"
|
||||||
info_msg "Compressing results to $OUTPUT_FILE.tar.gz"
|
info_msg "Compressing results to $OUTPUT_FILE"
|
||||||
cd "$BOOT_DIR" || die "Could not enter image dir"
|
cd "$BOOT_DIR" || die "Could not enter image dir"
|
||||||
tar -zcvf "$CURDIR/$OUTPUT_FILE.tar.gz" .
|
tar -zcvf "$CURDIR/$OUTPUT_FILE" .
|
||||||
cd "$CURDIR" || die "Could not return to working directory"
|
cd "$CURDIR" || die "Could not return to working directory"
|
||||||
|
|
||||||
# As a final cleanup step, remove the ROOTFS and the expanded BOOT_DIR
|
# As a final cleanup step, remove the ROOTFS and the expanded BOOT_DIR
|
||||||
|
|
Loading…
Reference in New Issue