|
| 1 | +u-boot: |
| 2 | + git clone https://github.com/linux-sunxi/u-boot $@ --single-branch --depth=30 |
| 3 | + |
| 4 | +.PHONY: u-boot-menuconfig |
| 5 | +u-boot-menuconfig: u-boot |
| 6 | + make -C $< ARCH=arm $(UBOOT_CONFIG)_defconfig KBUILD_OUTPUT=$(CURDIR)/tmp/u-boot-menuconfig |
| 7 | + make -C $< ARCH=arm menuconfig KBUILD_OUTPUT=$(CURDIR)/tmp/u-boot-menuconfig |
| 8 | + make -C $< ARCH=arm savedefconfig KBUILD_OUTPUT=$(CURDIR)/tmp/u-boot-menuconfig |
| 9 | + mv $(CURDIR)/tmp/u-boot-menuconfig/defconfig $</configs/$(UBOOT_CONFIG)_defconfig |
| 10 | + |
| 11 | +u-boot/configs/%_defconfig: u-boot |
| 12 | + |
| 13 | +tmp/u-boot-%/.config: u-boot/configs/%_defconfig |
| 14 | + make -C u-boot ARCH=arm $(shell basename $<) KBUILD_OUTPUT=$(CURDIR)/$(shell dirname $@) |
| 15 | + |
| 16 | +tmp/u-boot-%/spl/sunxi-spl.bin tmp/u-boot-%/u-boot.itb tmp/u-boot-%/u-boot.bin: tmp/u-boot-%/.config \ |
| 17 | + $(ATF) |
| 18 | + make -C u-boot ARCH=arm \ |
| 19 | + CROSS_COMPILE="$(LINARO_CC)" \ |
| 20 | + BL31="$(CURDIR)/$(word 2,$^)" \ |
| 21 | + KBUILD_OUTPUT=$(CURDIR)/$(shell dirname $<) \ |
| 22 | + -j$$(nproc) \ |
| 23 | + u-boot-with-spl.bin spl/sunxi-spl.bin u-boot.itb u-boot.bin |
| 24 | + |
| 25 | +tmp/u-boot-spl32/spl/sunxi-spl.bin: |
| 26 | + make -C u-boot ARCH=arm \ |
| 27 | + CROSS_COMPILE="ccache arm-linux-gnueabihf-" \ |
| 28 | + KBUILD_OUTPUT=$(CURDIR)/tmp/u-boot-spl32 \ |
| 29 | + -j$$(nproc) \ |
| 30 | + sun50i_spl32_defconfig |
| 31 | + make -C u-boot ARCH=arm \ |
| 32 | + CROSS_COMPILE="ccache arm-linux-gnueabihf-" \ |
| 33 | + KBUILD_OUTPUT=$(CURDIR)/tmp/u-boot-spl32 \ |
| 34 | + -j$$(nproc) \ |
| 35 | + spl/sunxi-spl.bin |
| 36 | + |
| 37 | +tmp/u-boot-%/u-boot-with-spl.bin: tmp/u-boot-%/spl/sunxi-spl.bin \ |
| 38 | + tmp/u-boot-%/u-boot.itb |
| 39 | + cat $^ > $@.tmp |
| 40 | + mv $@.tmp $@ |
0 commit comments