add prereq checks for target/linux/* and target/image/*, check for fdisk for the x86 builds
SVN-Revision: 5569
This commit is contained in:
		
							
								
								
									
										12
									
								
								Makefile
									
									
									
									
									
								
							
							
						
						
									
										12
									
								
								Makefile
									
									
									
									
									
								
							| @@ -49,7 +49,7 @@ endif | |||||||
|  |  | ||||||
| ifeq ($(FORCE),) | ifeq ($(FORCE),) | ||||||
|   .config scripts/config/conf scripts/config/mconf: tmp/.prereq-build |   .config scripts/config/conf scripts/config/mconf: tmp/.prereq-build | ||||||
|   world: tmp/.prereq-packages |   world: tmp/.prereq-packages tmp/.prereq-target | ||||||
| endif | endif | ||||||
|  |  | ||||||
| tmp/.pkginfo: | tmp/.pkginfo: | ||||||
| @@ -134,7 +134,15 @@ tmp/.prereq-packages: include/prereq.mk tmp/.pkginfo .config | |||||||
| 	} | 	} | ||||||
| 	@touch $@ | 	@touch $@ | ||||||
|  |  | ||||||
| prereq: tmp/.prereq-build tmp/.prereq-packages FORCE | tmp/.prereq-target: include/prereq.mk tmp/.targetinfo .config | ||||||
|  | 	@mkdir -p tmp | ||||||
|  | 	@$(NO_TRACE_MAKE) -s -C target prereq 2>/dev/null || { \ | ||||||
|  | 		echo "Prerequisite check failed. Use FORCE=1 to override."; \ | ||||||
|  | 		false; \ | ||||||
|  | 	} | ||||||
|  | 	@touch $@ | ||||||
|  |  | ||||||
|  | prereq: tmp/.prereq-build tmp/.prereq-packages tmp/.prereq-target FORCE | ||||||
|  |  | ||||||
| download: .config FORCE | download: .config FORCE | ||||||
| 	$(MAKE) tools/download | 	$(MAKE) tools/download | ||||||
|   | |||||||
| @@ -5,6 +5,7 @@ | |||||||
| # See /LICENSE for more information. | # See /LICENSE for more information. | ||||||
| # | # | ||||||
|  |  | ||||||
|  | include $(INCLUDE_DIR)/prereq.mk | ||||||
| include $(INCLUDE_DIR)/kernel.mk | include $(INCLUDE_DIR)/kernel.mk | ||||||
| KDIR:=$(BUILD_DIR)/linux-$(KERNEL)-$(BOARD) | KDIR:=$(BUILD_DIR)/linux-$(KERNEL)-$(BOARD) | ||||||
|  |  | ||||||
|   | |||||||
| @@ -6,6 +6,8 @@ | |||||||
| # | # | ||||||
| KERNEL_BUILD:=1 | KERNEL_BUILD:=1 | ||||||
|  |  | ||||||
|  | include $(INCLUDE_DIR)/prereq.mk | ||||||
|  |  | ||||||
| # For target profile selection - the default set | # For target profile selection - the default set | ||||||
| DEFAULT_PACKAGES:=base-files libgcc uclibc bridge busybox dnsmasq dropbear iptables mtd ppp ppp-mod-pppoe mtd | DEFAULT_PACKAGES:=base-files libgcc uclibc bridge busybox dnsmasq dropbear iptables mtd ppp ppp-mod-pppoe mtd | ||||||
|  |  | ||||||
|   | |||||||
| @@ -25,6 +25,10 @@ compile: linux-compile image_compile | |||||||
| install: image_clean $(patsubst %,%-install,$(TARGETS-y)) image_install | install: image_clean $(patsubst %,%-install,$(TARGETS-y)) image_install | ||||||
| clean: $(patsubst %,%-clean,$(TARGETS-y)) image_clean | clean: $(patsubst %,%-clean,$(TARGETS-y)) image_clean | ||||||
|  |  | ||||||
|  | prereq: FORCE | ||||||
|  | 	$(MAKE) -C linux/$(BOARD)-$(KERNEL) prereq | ||||||
|  | 	$(MAKE) -C image/$(BOARD) prereq | ||||||
|  |  | ||||||
| image_clean: FORCE | image_clean: FORCE | ||||||
| 	$(MAKE) -C image/$(BOARD) clean | 	$(MAKE) -C image/$(BOARD) clean | ||||||
| 	rm -f $(BIN_DIR)/openwrt-* | 	rm -f $(BIN_DIR)/openwrt-* | ||||||
|   | |||||||
| @@ -54,5 +54,8 @@ define Image/Build | |||||||
| 	cp $(LINUX_DIR)/arch/i386/boot/bzImage $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-vmlinuz | 	cp $(LINUX_DIR)/arch/i386/boot/bzImage $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-vmlinuz | ||||||
| endef | endef | ||||||
|  |  | ||||||
|  |  | ||||||
| $(eval $(call BuildImage)) | $(eval $(call BuildImage)) | ||||||
|  |  | ||||||
|  | $(eval $(call RequireCommand,fdisk, \ | ||||||
|  | 	Please install fdisk \ | ||||||
|  | )) | ||||||
|   | |||||||
| @@ -16,4 +16,6 @@ LINUX_RELEASE:=1 | |||||||
| LINUX_KERNEL_MD5SUM:=37ddefe96625502161f075b9d907f21e | LINUX_KERNEL_MD5SUM:=37ddefe96625502161f075b9d907f21e | ||||||
|  |  | ||||||
| include $(INCLUDE_DIR)/kernel-build.mk | include $(INCLUDE_DIR)/kernel-build.mk | ||||||
|  |  | ||||||
| $(eval $(call BuildKernel)) | $(eval $(call BuildKernel)) | ||||||
|  |  | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Felix Fietkau
					Felix Fietkau