1 .PHONY: config build all
8 petalinux-config --get-hw-description ../system --oldconfig
9 $(MAKE) subsystems/linux/configs/u-boot/platform-auto.h
12 build: .configured subsystems/linux/configs/u-boot/platform-auto.h
14 $(MAKE) bootscript images/linux/BOOT.BIN
16 images/linux/BOOT.BIN: FORCE
17 cd images/linux && petalinux-package --boot --fsbl zynq_fsbl.elf --u-boot u-boot.elf --force
19 bootscript: bootscript.txt
20 mkimage -A arm -O u-boot -T script -C none -a 0 -e 0 -n "t-Boot Script" -d $< $@
22 subsystems/linux/configs/u-boot/platform-auto.h: FORCE | build/linux/u-boot/Makefile
23 $(MAKE) UBOOT_AUTO_CONFIG=y -C build/linux/u-boot autogen-config
24 sed -r -i '/PSSERIAL0 \\/r uboot-extra-env.h' $@
25 # HACK: force enable legacy image format; it is needed for everything (script, kernel, device tree)
26 # but something sometimes will go crazy and disable it, sometimes it does not
27 # With this hack it works OK.
28 sed -r -i '/CONFIG_BOOTCOMMAND/a #define CONFIG_IMAGE_FORMAT_LEGACY' $@
29 sed -r -i '/CONFIG_BOOTCOMMAND/a #undef CONFIG_BOOTP_SERVERIP' $@
31 build/linux/u-boot/Makefile:
32 petalinux-build -c u-boot