tn3399_openwrt/target/linux/gemini
Yousong Zhou 6d819fae53 gemini: image: fix race condition when building copy-kernel.bin
Make treat copy-kernel.o as intermediate and delete it when it's no
longer needed.  This can fail when the same submake was triggered
multiple times for different devices.

	arm-openwrt-linux-muslgnueabi-as  -k -o copy-kernel.o copy-kernel.S
	export MAKEFLAGS= ;make -w -C copy-kernel CROSS_COMPILE=arm-openwrt-linux-muslgnueabi-
	arm-openwrt-linux-muslgnueabi-objcopy -O binary -S copy-kernel.o copy-kernel.bin
	make[5]: Entering directory '/builder/shared-workdir/build/target/linux/gemini/image/copy-kernel'
	arm-openwrt-linux-muslgnueabi-objcopy -O binary -S copy-kernel.o copy-kernel.bin
	rm copy-kernel.o
	make[5]: Leaving directory '/builder/shared-workdir/build/target/linux/gemini/image/copy-kernel'
	# "App" partition is the rootfs
	arm-openwrt-linux-muslgnueabi-objcopy: 'copy-kernel.o': No such file
	Makefile:27: recipe for target 'copy-kernel.bin' failed
	make[5]: Leaving directory '/builder/shared-workdir/build/target/linux/gemini/image/copy-kernel'
	make[5]: *** [copy-kernel.bin] Error 1
	Makefile:244: recipe for target '/builder/shared-workdir/build/build_dir/target-arm_fa526_musl_eabi/linux-gemini/tmp/openwrt-gemini-storlink_sl93512r-ext4-factory.bin' failed
	make[4]: *** [/builder/shared-workdir/build/build_dir/target-arm_fa526_musl_eabi/linux-gemini/tmp/openwrt-gemini-storlink_sl93512r-ext4-factory.bin] Error 2

With this change, output files are directed to $(KDIR)

Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
2019-09-11 01:31:53 +00:00
..
base-files treewide: convert MAC address location offsets to hexadecimal 2019-08-14 12:10:12 +02:00
image gemini: image: fix race condition when building copy-kernel.bin 2019-09-11 01:31:53 +00:00
patches-4.14 gemini: Fix up DNS-313 compatible string 2019-06-20 20:02:30 +02:00
patches-4.19 gemini: Enable flash boot on reference design type 2019-08-17 16:57:32 +02:00
config-4.14 gemini: Stop enforcing command line 2019-07-14 14:37:45 +02:00
config-4.19 gemini: Stop enforcing command line 2019-07-14 14:37:45 +02:00
Makefile treewide: kernel: bump some targets to 4.19 2019-06-18 16:08:55 +02:00