Instead of copying the Portage configuration files to `/etc/portage` and
`/usr/${target}/etc/portage`, the build scripts now use the
configuration directories from the source directory. This avoids issues
with changes (especially removal of files) getting propagated to the
actual configuration paths.
114 lines
2.1 KiB
Makefile
114 lines
2.1 KiB
Makefile
O ?= .
|
|
IMAGESDIR ?= $(O)/images
|
|
|
|
update.tar: $(IMAGESDIR)/update.tar.zstd
|
|
|
|
$(O)/.prepared: \
|
|
prepare.sh \
|
|
setup-local-repo.sh \
|
|
$(shell find patches/ebuilds -type f)
|
|
./prepare.sh
|
|
./setup-local-repo.sh
|
|
mkdir -p $(O)
|
|
touch $(O)/.prepared
|
|
|
|
prepare: $(O)/.prepared
|
|
|
|
$(O)/.host-tools: \
|
|
build-host-tools.sh \
|
|
host-tools.packages \
|
|
$(O)/.prepared
|
|
./build-host-tools.sh
|
|
touch $(O)/.host-tools
|
|
|
|
host-tools: $(O)/.host-tools
|
|
|
|
$(O)/.built: \
|
|
build.sh \
|
|
build.packages \
|
|
install.packages \
|
|
$(O)/.host-tools \
|
|
$(O)/.prepared
|
|
./build.sh
|
|
touch $(O)/.built
|
|
|
|
$(O)/.ready: \
|
|
build-rootfs.sh \
|
|
install.packages \
|
|
installonly.packages \
|
|
busybox.symlinks \
|
|
$(O)/linux/arch/arm64/boot/Image.gz \
|
|
$(O)/.host-tools \
|
|
$(O)/.built
|
|
./build-rootfs.sh
|
|
touch $(O)/.ready
|
|
|
|
$(IMAGESDIR)/rootfs.squashfs: \
|
|
build-squashfs.sh \
|
|
squashfs.exclude \
|
|
$(O)/.ready
|
|
./build-squashfs.sh "$(IMAGESDIR)"
|
|
|
|
squashfs: $(IMAGESDIR)/rootfs.squashfs
|
|
|
|
$(O)/linux/arch/arm64/boot/Image.gz: \
|
|
build-kernel.sh \
|
|
linux.config \
|
|
$(O)/.host-tools \
|
|
$(O)/.prepared
|
|
./build-kernel.sh "$(O)"
|
|
|
|
kernel: $(O)/linux/arch/arm64/boot/Image.gz
|
|
|
|
$(O)/efi-part/EFI/BOOT/BOOTAA64.efi: \
|
|
build-grub.sh \
|
|
grub.cfg \
|
|
$(O)/.host-tools \
|
|
$(O)/.prepared
|
|
./build-grub.sh "$(O)"
|
|
|
|
grub: $(O)/efi-part/EFI/BOOT/BOOTAA64.efi
|
|
|
|
$(O)/efi-part/u-boot.bin: \
|
|
build-uboot.sh \
|
|
u-boot.config
|
|
./build-uboot.sh "$(O)"
|
|
|
|
uboot: $(O)/efi-part/u-boot.bin
|
|
|
|
$(IMAGESDIR)/sdcard.img: \
|
|
genimage.cfg \
|
|
genimage.sh \
|
|
post-build.sh \
|
|
$(O)/efi-part/u-boot.bin \
|
|
$(O)/efi-part/EFI/BOOT/BOOTAA64.efi
|
|
./post-build.sh "$(O)"
|
|
./genimage.sh "$(O)" "$(IMAGESDIR)"
|
|
|
|
sdcard.img: $(IMAGESDIR)/sdcard.img
|
|
|
|
$(IMAGESDIR)/firmware.img: $(IMAGESDIR)/sdcard.img
|
|
|
|
$(IMAGESDIR)/update.tar.zstd: \
|
|
$(IMAGESDIR)/rootfs.squashfs \
|
|
$(IMAGESDIR)/firmware.img \
|
|
install-update.sh \
|
|
$(O)/.host-tools \
|
|
$(O)/.prepared
|
|
./build-update.sh "$(IMAGESDIR)"
|
|
|
|
clean:
|
|
git -C u-boot clean -fdx && git -C u-boot checkout -- .
|
|
rm -rf $(O)/linux $(O)/output $(IMAGESDIR) $(O)/tmp
|
|
rm -f $(O)/.prepared $(O)/.host-tools
|
|
|
|
.PHONY: \
|
|
grub \
|
|
host-tools \
|
|
kernel \
|
|
prepare \
|
|
sdcard.img \
|
|
squashfs \
|
|
uboot \
|
|
update.tar
|