Files
docker-builder/openwrt/Makefile
Martin Kennedy 0f86363b3f openwrt: Add Makefile targets for building / debugging OpenWrt
The output-${remote}_${revision} (or output-${revision} from the main
remote) target builds OpenWrt with the given input diffconfig,
after checking out ${revision} from ${remote}. Note that neither the
remote nor the ref or revision can have an underscore in them and
still be properly interpreted.

Still, this is all very useful -- I can kick off a from-scratch build
with `make output-pr_p2041-mpc85xx` and in a few minutes it's ready to
review.
2021-02-18 02:30:55 +00:00

60 lines
1.6 KiB
Makefile

define INC_NEWOPENWRT =
1
endef
$(info Defined INC_NEWOPENWRT)
include /devel/docker/docker_vars.sh
export
unexport INC_DOCKER
ifndef INC_DOCKER
include ${docker_src}/Makefile
endif
.PHONY: input
input:
rm -rf input; mkdir -p input; chmod 777 input;
.PHONY: prep-output
prep-output:
rm -rf output; mkdir output; chmod 777 output;
diffconfig:
touch $@;
input/diffconfig: diffconfig input
cp $< $@
output: diffconfig ${docker_src}/built/openwrt-builder-master.sentinel prep-output input/diffconfig input.sh output.sh
docker run \
-v $$PWD/output:/output \
-v $$PWD/input:/input \
-v $$PWD/input.sh:/input.sh \
-v $$PWD/output.sh:/output.sh \
--rm -it openwrt-builder-master make V=ssc -j24 build
output-%: diffconfig ${docker_src}/built/openwrt-builder-%.sentinel prep-output input/diffconfig input.sh output.sh
docker run \
-v $$PWD/output:/output \
-v $$PWD/input:/input \
-v $$PWD/input.sh:/input.sh \
-v $$PWD/output.sh:/output.sh \
--rm -it openwrt-builder-$* make V=ssc -j24
debug-%: diffconfig ${docker_src}/built/openwrt-builder-%.sentinel prep-output input/diffconfig input.sh output.sh
docker run \
-v $$PWD/output:/output \
-v $$PWD/input:/input \
-v $$PWD/input.sh:/input.sh \
-v $$PWD/output.sh:/output.sh \
-it openwrt-builder-$* /bin/bash
.PHONY: menuconfig
menuconfig-%: ${docker_src}/built/openwrt-builder-%.sentinel prep-output input/diffconfig input.sh output.sh
docker run \
-v $$PWD/output:/output \
-v $$PWD/input:/input \
-v $$PWD/input.sh:/input.sh \
-v $$PWD/output.sh:/output.sh \
--rm -it openwrt-builder-$* make menuconfig