# read environment variables from ./env include ./env export CTR := sudo -n podman MOUNT := sudo -n mount UMOUNT := sudo -n umount CP := sudo -n cp GIT := git CTR_IMG_TAG := avans-linux CTRIZE := $(CTR) run --rm --interactive --tty CTRIZE += --volume .:/workdir:rw # CTRIZE += --volume /tmp:/tmp:rw CTRIZE += --user $(shell id -u):$(shell id -g) CTRIZE += --env-file ./env CTRIZE += $(CTR_IMG_TAG) .PHONY: all all: os_bootloader .PHONY: container_img container_img: Containerfile $(CTR) build --tag $(CTR_IMG_TAG) . # this list holds the .git files in each submodule folder (add # $(SUBMODULE_INIT) as prerequisite to require the submodules to exist) SUBMODULE_INIT += ./u-boot/.git $(SUBMODULE_INIT): $(GIT) submodule init $(GIT) submodule update .PHONY: os_bootloader os_bootloader: container_img $(SUBMODULE_INIT) $(CTRIZE) $(MAKE) -$(MAKEFLAGS) -C u-boot am335x_evm_config $(CTRIZE) $(MAKE) -$(MAKEFLAGS) -C u-boot # sd card block device (assumed partition numbers, see readme.md) SDCARD_BD := $(shell realpath /dev/disk/by-id/usb-Generic-_Multi-Card_20071114173400000-0:0) load_bootloader: $(os_bootloader) mkdir -p /tmp/sdcard-boot $(MOUNT) $(SDCARD_BD)1 /tmp/sdcard-boot $(CP) u-boot/MLO u-boot/u-boot.img u-boot/u-boot.dtb /tmp/sdcard-boot $(UMOUNT) $(SDCARD_BD)1