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 bootscript.its
20 #mkimage -A arm -O u-boot -T script -C none -a 0 -e 0 -n "t-Boot Script" -d $< $@
21 mkimage -f bootscript.its $@
23 subsystems/linux/configs/u-boot/platform-auto.h: FORCE | build/linux/u-boot/Makefile
24 $(MAKE) UBOOT_AUTO_CONFIG=y -C build/linux/u-boot autogen-config
25 sed -r -i '/PSSERIAL0 \\/r uboot-extra-env.h' $@
26 # HACK: force enable legacy image format; it is needed for everything (script, kernel, device tree)
27 # but something sometimes will go crazy and disable it, sometimes it does not
28 # With this hack it works OK.
29 sed -r -i '/CONFIG_BOOTCOMMAND/a #define CONFIG_IMAGE_FORMAT_LEGACY' $@
30 sed -r -i '/CONFIG_BOOTCOMMAND/a #undef CONFIG_BOOTP_SERVERIP' $@
32 build/linux/u-boot/Makefile:
33 petalinux-build -c u-boot
35 images/linux/system.bit.gz: ../system/system.bit
38 images/linux/image.ub: FORCE images/linux/system.bit.gz
39 mkimage -f uboot-image.its $@