]> rtime.felk.cvut.cz Git - fpga/zynq/canbench-sw.git/blob - petalinux/Makefile
7a71d5bc057649fa2cf88446a9204b2911fd4550
[fpga/zynq/canbench-sw.git] / petalinux / Makefile
1 .PHONY: config build all
2
3 all: build
4
5 config: .configured
6
7 .configured:
8         petalinux-config --get-hw-description ../system --oldconfig
9         $(MAKE) subsystems/linux/configs/u-boot/platform-auto.h
10         touch .configured
11
12 build: .configured
13         petalinux-build
14         $(MAKE) bootscript images/linux/BOOT.BIN
15
16 images/linux/BOOT.BIN: FORCE
17         cd images/linux && petalinux-package --boot --fsbl zynq_fsbl.elf --u-boot u-boot.elf --force
18
19 bootscript: bootscript.txt
20         mkimage -A arm -O u-boot -T script -C none -a 0 -e 0 -n "t-Boot Script" -d $< $@
21
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
26 build/linux/u-boot/Makefile:
27         petalinux-build -c u-boot
28
29 FORCE: