lbreakout2: add LBREAKOUT2_VERSION_MAJOR variable
[buildroot-gz.git] / linux / linux.mk
blobeca1450d58fbe93d008f99eca6f18e7ccfea4a5a
1 ################################################################################
3 # Linux kernel target
5 ################################################################################
7 LINUX_VERSION = $(call qstrip,$(BR2_LINUX_KERNEL_VERSION))
8 LINUX_LICENSE = GPLv2
9 LINUX_LICENSE_FILES = COPYING
11 # Compute LINUX_SOURCE and LINUX_SITE from the configuration
12 ifeq ($(BR2_LINUX_KERNEL_CUSTOM_TARBALL),y)
13 LINUX_TARBALL = $(call qstrip,$(BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION))
14 LINUX_SITE = $(patsubst %/,%,$(dir $(LINUX_TARBALL)))
15 LINUX_SOURCE = $(notdir $(LINUX_TARBALL))
16 BR_NO_CHECK_HASH_FOR += $(LINUX_SOURCE)
17 else ifeq ($(BR2_LINUX_KERNEL_CUSTOM_LOCAL),y)
18 LINUX_SITE = $(call qstrip,$(BR2_LINUX_KERNEL_CUSTOM_LOCAL_PATH))
19 LINUX_SITE_METHOD = local
20 else ifeq ($(BR2_LINUX_KERNEL_CUSTOM_GIT),y)
21 LINUX_SITE = $(call qstrip,$(BR2_LINUX_KERNEL_CUSTOM_REPO_URL))
22 LINUX_SITE_METHOD = git
23 else ifeq ($(BR2_LINUX_KERNEL_CUSTOM_HG),y)
24 LINUX_SITE = $(call qstrip,$(BR2_LINUX_KERNEL_CUSTOM_REPO_URL))
25 LINUX_SITE_METHOD = hg
26 else
27 LINUX_SOURCE = linux-$(LINUX_VERSION).tar.xz
28 ifeq ($(BR2_LINUX_KERNEL_CUSTOM_VERSION),y)
29 BR_NO_CHECK_HASH_FOR += $(LINUX_SOURCE)
30 endif
31 ifeq ($(BR2_LINUX_KERNEL_SAME_AS_HEADERS)$(BR2_KERNEL_HEADERS_VERSION),yy)
32 BR_NO_CHECK_HASH_FOR += $(LINUX_SOURCE)
33 endif
34 # In X.Y.Z, get X and Y. We replace dots and dashes by spaces in order
35 # to use the $(word) function. We support versions such as 4.0, 3.1,
36 # 2.6.32, 2.6.32-rc1, 3.0-rc6, etc.
37 ifeq ($(findstring x2.6.,x$(LINUX_VERSION)),x2.6.)
38 LINUX_SITE = $(BR2_KERNEL_MIRROR)/linux/kernel/v2.6
39 else ifeq ($(findstring x3.,x$(LINUX_VERSION)),x3.)
40 LINUX_SITE = $(BR2_KERNEL_MIRROR)/linux/kernel/v3.x
41 else ifeq ($(findstring x4.,x$(LINUX_VERSION)),x4.)
42 LINUX_SITE = $(BR2_KERNEL_MIRROR)/linux/kernel/v4.x
43 endif
44 # release candidates are in testing/ subdir
45 ifneq ($(findstring -rc,$(LINUX_VERSION)),)
46 LINUX_SITE := $(LINUX_SITE)/testing
47 endif # -rc
48 endif
50 LINUX_PATCHES = $(call qstrip,$(BR2_LINUX_KERNEL_PATCH))
52 # We rely on the generic package infrastructure to download and apply
53 # remote patches (downloaded from ftp, http or https). For local
54 # patches, we can't rely on that infrastructure, because there might
55 # be directories in the patch list (unlike for other packages).
56 LINUX_PATCH = $(filter ftp://% http://% https://%,$(LINUX_PATCHES))
58 LINUX_INSTALL_IMAGES = YES
59 LINUX_DEPENDENCIES += host-kmod host-lzop
61 ifeq ($(BR2_LINUX_KERNEL_UBOOT_IMAGE),y)
62 LINUX_DEPENDENCIES += host-uboot-tools
63 endif
65 LINUX_MAKE_FLAGS = \
66 HOSTCC="$(HOSTCC)" \
67 HOSTCFLAGS="$(HOSTCFLAGS)" \
68 ARCH=$(KERNEL_ARCH) \
69 INSTALL_MOD_PATH=$(TARGET_DIR) \
70 CROSS_COMPILE="$(CCACHE) $(TARGET_CROSS)" \
71 DEPMOD=$(HOST_DIR)/sbin/depmod
73 LINUX_MAKE_ENV = \
74 $(TARGET_MAKE_ENV) \
75 BR_BINARIES_DIR=$(BINARIES_DIR)
77 # Get the real Linux version, which tells us where kernel modules are
78 # going to be installed in the target filesystem.
79 LINUX_VERSION_PROBED = $(shell $(MAKE) $(LINUX_MAKE_FLAGS) -C $(LINUX_DIR) --no-print-directory -s kernelrelease)
81 ifeq ($(BR2_LINUX_KERNEL_USE_INTREE_DTS),y)
82 KERNEL_DTS_NAME = $(call qstrip,$(BR2_LINUX_KERNEL_INTREE_DTS_NAME))
83 else ifeq ($(BR2_LINUX_KERNEL_USE_CUSTOM_DTS),y)
84 # We keep only the .dts files, so that the user can specify both .dts
85 # and .dtsi files in BR2_LINUX_KERNEL_CUSTOM_DTS_PATH. Both will be
86 # copied to arch/<arch>/boot/dts, but only the .dts files will
87 # actually be generated as .dtb.
88 KERNEL_DTS_NAME = $(basename $(filter %.dts,$(notdir $(call qstrip,$(BR2_LINUX_KERNEL_CUSTOM_DTS_PATH)))))
89 endif
91 ifeq ($(BR2_LINUX_KERNEL_DTS_SUPPORT)$(KERNEL_DTS_NAME),y)
92 $(error No kernel device tree source specified, check your \
93 BR2_LINUX_KERNEL_USE_INTREE_DTS / BR2_LINUX_KERNEL_USE_CUSTOM_DTS settings)
94 endif
96 ifeq ($(BR2_LINUX_KERNEL_APPENDED_DTB),y)
97 ifneq ($(words $(KERNEL_DTS_NAME)),1)
98 $(error Kernel with appended device tree needs exactly one DTS source. \
99 Check BR2_LINUX_KERNEL_INTREE_DTS_NAME or BR2_LINUX_KERNEL_CUSTOM_DTS_PATH.)
100 endif
101 endif
103 KERNEL_DTBS = $(addsuffix .dtb,$(KERNEL_DTS_NAME))
105 ifeq ($(BR2_LINUX_KERNEL_IMAGE_TARGET_CUSTOM),y)
106 LINUX_IMAGE_NAME = $(call qstrip,$(BR2_LINUX_KERNEL_IMAGE_NAME))
107 LINUX_TARGET_NAME = $(call qstrip,$(BR2_LINUX_KERNEL_IMAGE_TARGET_NAME))
108 ifeq ($(LINUX_IMAGE_NAME),)
109 LINUX_IMAGE_NAME = $(LINUX_TARGET_NAME)
110 endif
111 else
112 ifeq ($(BR2_LINUX_KERNEL_UIMAGE),y)
113 LINUX_IMAGE_NAME = uImage
114 else ifeq ($(BR2_LINUX_KERNEL_APPENDED_UIMAGE),y)
115 LINUX_IMAGE_NAME = uImage
116 else ifeq ($(BR2_LINUX_KERNEL_BZIMAGE),y)
117 LINUX_IMAGE_NAME = bzImage
118 else ifeq ($(BR2_LINUX_KERNEL_ZIMAGE),y)
119 LINUX_IMAGE_NAME = zImage
120 else ifeq ($(BR2_LINUX_KERNEL_APPENDED_ZIMAGE),y)
121 LINUX_IMAGE_NAME = zImage
122 else ifeq ($(BR2_LINUX_KERNEL_CUIMAGE),y)
123 LINUX_IMAGE_NAME = cuImage.$(KERNEL_DTS_NAME)
124 else ifeq ($(BR2_LINUX_KERNEL_SIMPLEIMAGE),y)
125 LINUX_IMAGE_NAME = simpleImage.$(KERNEL_DTS_NAME)
126 else ifeq ($(BR2_LINUX_KERNEL_LINUX_BIN),y)
127 LINUX_IMAGE_NAME = linux.bin
128 else ifeq ($(BR2_LINUX_KERNEL_VMLINUX_BIN),y)
129 LINUX_IMAGE_NAME = vmlinux.bin
130 else ifeq ($(BR2_LINUX_KERNEL_VMLINUX),y)
131 LINUX_IMAGE_NAME = vmlinux
132 else ifeq ($(BR2_LINUX_KERNEL_VMLINUZ),y)
133 LINUX_IMAGE_NAME = vmlinuz
134 endif
135 # The if-else blocks above are all the image types we know of, and all
136 # come from a Kconfig choice, so we know we have LINUX_IMAGE_NAME set
137 # to something
138 LINUX_TARGET_NAME = $(LINUX_IMAGE_NAME)
139 endif
141 LINUX_KERNEL_UIMAGE_LOADADDR = $(call qstrip,$(BR2_LINUX_KERNEL_UIMAGE_LOADADDR))
142 ifneq ($(LINUX_KERNEL_UIMAGE_LOADADDR),)
143 LINUX_MAKE_FLAGS += LOADADDR="$(LINUX_KERNEL_UIMAGE_LOADADDR)"
144 endif
146 # Compute the arch path, since i386 and x86_64 are in arch/x86 and not
147 # in arch/$(KERNEL_ARCH). Even if the kernel creates symbolic links
148 # for bzImage, arch/i386 and arch/x86_64 do not exist when copying the
149 # defconfig file.
150 ifeq ($(KERNEL_ARCH),i386)
151 KERNEL_ARCH_PATH = $(LINUX_DIR)/arch/x86
152 else ifeq ($(KERNEL_ARCH),x86_64)
153 KERNEL_ARCH_PATH = $(LINUX_DIR)/arch/x86
154 else
155 KERNEL_ARCH_PATH = $(LINUX_DIR)/arch/$(KERNEL_ARCH)
156 endif
158 ifeq ($(BR2_LINUX_KERNEL_VMLINUX),y)
159 LINUX_IMAGE_PATH = $(LINUX_DIR)/$(LINUX_IMAGE_NAME)
160 else ifeq ($(BR2_LINUX_KERNEL_VMLINUZ),y)
161 LINUX_IMAGE_PATH = $(LINUX_DIR)/$(LINUX_IMAGE_NAME)
162 else
163 LINUX_IMAGE_PATH = $(KERNEL_ARCH_PATH)/boot/$(LINUX_IMAGE_NAME)
164 endif # BR2_LINUX_KERNEL_VMLINUX
166 define LINUX_APPLY_LOCAL_PATCHES
167 for p in $(filter-out ftp://% http://% https://%,$(LINUX_PATCHES)) ; do \
168 if test -d $$p ; then \
169 $(APPLY_PATCHES) $(@D) $$p \*.patch || exit 1 ; \
170 else \
171 $(APPLY_PATCHES) $(@D) `dirname $$p` `basename $$p` || exit 1; \
172 fi \
173 done
174 endef
176 LINUX_POST_PATCH_HOOKS += LINUX_APPLY_LOCAL_PATCHES
178 ifeq ($(BR2_LINUX_KERNEL_USE_DEFCONFIG),y)
179 KERNEL_SOURCE_CONFIG = $(KERNEL_ARCH_PATH)/configs/$(call qstrip,$(BR2_LINUX_KERNEL_DEFCONFIG))_defconfig
180 else ifeq ($(BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG),y)
181 KERNEL_SOURCE_CONFIG = $(call qstrip,$(BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE))
182 endif
184 LINUX_KCONFIG_FILE = $(KERNEL_SOURCE_CONFIG)
185 LINUX_KCONFIG_FRAGMENT_FILES = $(call qstrip,$(BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES))
186 LINUX_KCONFIG_EDITORS = menuconfig xconfig gconfig nconfig
187 LINUX_KCONFIG_OPTS = $(LINUX_MAKE_FLAGS)
189 define LINUX_KCONFIG_FIXUP_CMDS
190 $(if $(BR2_arm)$(BR2_armeb),
191 $(call KCONFIG_ENABLE_OPT,CONFIG_AEABI,$(@D)/.config))
192 $(if $(BR2_TARGET_ROOTFS_CPIO),
193 $(call KCONFIG_ENABLE_OPT,CONFIG_BLK_DEV_INITRD,$(@D)/.config))
194 # As the kernel gets compiled before root filesystems are
195 # built, we create a fake cpio file. It'll be
196 # replaced later by the real cpio archive, and the kernel will be
197 # rebuilt using the linux-rebuild-with-initramfs target.
198 $(if $(BR2_TARGET_ROOTFS_INITRAMFS),
199 touch $(BINARIES_DIR)/rootfs.cpio
200 $(call KCONFIG_SET_OPT,CONFIG_INITRAMFS_SOURCE,"$${BR_BINARIES_DIR}/rootfs.cpio",$(@D)/.config)
201 $(call KCONFIG_SET_OPT,CONFIG_INITRAMFS_ROOT_UID,0,$(@D)/.config)
202 $(call KCONFIG_SET_OPT,CONFIG_INITRAMFS_ROOT_GID,0,$(@D)/.config))
203 $(if $(BR2_ROOTFS_DEVICE_CREATION_STATIC),,
204 $(call KCONFIG_ENABLE_OPT,CONFIG_DEVTMPFS,$(@D)/.config)
205 $(call KCONFIG_ENABLE_OPT,CONFIG_DEVTMPFS_MOUNT,$(@D)/.config))
206 $(if $(BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV),
207 $(call KCONFIG_ENABLE_OPT,CONFIG_INOTIFY_USER,$(@D)/.config))
208 $(if $(BR2_PACKAGE_KTAP),
209 $(call KCONFIG_ENABLE_OPT,CONFIG_DEBUG_FS,$(@D)/.config)
210 $(call KCONFIG_ENABLE_OPT,CONFIG_EVENT_TRACING,$(@D)/.config)
211 $(call KCONFIG_ENABLE_OPT,CONFIG_PERF_EVENTS,$(@D)/.config)
212 $(call KCONFIG_ENABLE_OPT,CONFIG_FUNCTION_TRACER,$(@D)/.config))
213 $(if $(BR2_PACKAGE_SYSTEMD),
214 $(call KCONFIG_ENABLE_OPT,CONFIG_CGROUPS,$(@D)/.config)
215 $(call KCONFIG_ENABLE_OPT,CONFIG_INOTIFY_USER,$(@D)/.config)
216 $(call KCONFIG_ENABLE_OPT,CONFIG_FHANDLE,$(@D)/.config)
217 $(call KCONFIG_ENABLE_OPT,CONFIG_AUTOFS4_FS,$(@D)/.config)
218 $(call KCONFIG_ENABLE_OPT,CONFIG_TMPFS_POSIX_ACL,$(@D)/.config)
219 $(call KCONFIG_ENABLE_OPT,CONFIG_TMPFS_POSIX_XATTR,$(@D)/.config))
220 $(if $(BR2_PACKAGE_SMACK),
221 $(call KCONFIG_ENABLE_OPT,CONFIG_SECURITY,$(@D)/.config)
222 $(call KCONFIG_ENABLE_OPT,CONFIG_SECURITY_SMACK,$(@D)/.config)
223 $(call KCONFIG_ENABLE_OPT,CONFIG_SECURITY_NETWORK,$(@D)/.config))
224 $(if $(BR2_PACKAGE_IPTABLES),
225 $(call KCONFIG_ENABLE_OPT,CONFIG_IP_NF_IPTABLES,$(@D)/.config)
226 $(call KCONFIG_ENABLE_OPT,CONFIG_IP_NF_FILTER,$(@D)/.config)
227 $(call KCONFIG_ENABLE_OPT,CONFIG_NETFILTER,$(@D)/.config)
228 $(call KCONFIG_ENABLE_OPT,CONFIG_NETFILTER_XTABLES,$(@D)/.config))
229 $(if $(BR2_PACKAGE_XTABLES_ADDONS),
230 $(call KCONFIG_ENABLE_OPT,CONFIG_NF_CONNTRACK,$(@D)/.config)
231 $(call KCONFIG_ENABLE_OPT,CONFIG_NF_CONNTRACK_MARK,$(@D)/.config))
232 $(if $(BR2_LINUX_KERNEL_APPENDED_DTB),
233 $(call KCONFIG_ENABLE_OPT,CONFIG_ARM_APPENDED_DTB,$(@D)/.config))
234 endef
236 ifeq ($(BR2_LINUX_KERNEL_DTS_SUPPORT),y)
237 ifeq ($(BR2_LINUX_KERNEL_DTB_IS_SELF_BUILT),)
238 define LINUX_BUILD_DTB
239 $(LINUX_MAKE_ENV) $(MAKE) $(LINUX_MAKE_FLAGS) -C $(@D) $(KERNEL_DTBS)
240 endef
241 define LINUX_INSTALL_DTB
242 # dtbs moved from arch/<ARCH>/boot to arch/<ARCH>/boot/dts since 3.8-rc1
243 cp $(addprefix \
244 $(KERNEL_ARCH_PATH)/boot/$(if $(wildcard \
245 $(addprefix $(KERNEL_ARCH_PATH)/boot/dts/,$(KERNEL_DTBS))),dts/),$(KERNEL_DTBS)) \
246 $(BINARIES_DIR)/
247 endef
248 define LINUX_INSTALL_DTB_TARGET
249 # dtbs moved from arch/<ARCH>/boot to arch/<ARCH>/boot/dts since 3.8-rc1
250 cp $(addprefix \
251 $(KERNEL_ARCH_PATH)/boot/$(if $(wildcard \
252 $(addprefix $(KERNEL_ARCH_PATH)/boot/dts/,$(KERNEL_DTBS))),dts/),$(KERNEL_DTBS)) \
253 $(TARGET_DIR)/boot/
254 endef
255 endif
256 endif
258 ifeq ($(BR2_LINUX_KERNEL_APPENDED_DTB),y)
259 # dtbs moved from arch/$ARCH/boot to arch/$ARCH/boot/dts since 3.8-rc1
260 define LINUX_APPEND_DTB
261 if [ -e $(KERNEL_ARCH_PATH)/boot/$(KERNEL_DTS_NAME).dtb ]; then \
262 cat $(KERNEL_ARCH_PATH)/boot/$(KERNEL_DTS_NAME).dtb; \
263 else \
264 cat $(KERNEL_ARCH_PATH)/boot/dts/$(KERNEL_DTS_NAME).dtb; \
265 fi >> $(KERNEL_ARCH_PATH)/boot/zImage
266 endef
267 ifeq ($(BR2_LINUX_KERNEL_APPENDED_UIMAGE),y)
268 # We need to generate a new u-boot image that takes into
269 # account the extra-size added by the device tree at the end
270 # of the image. To do so, we first need to retrieve both load
271 # address and entry point for the kernel from the already
272 # generate uboot image before using mkimage -l.
273 LINUX_APPEND_DTB += $(sep) MKIMAGE_ARGS=`$(MKIMAGE) -l $(LINUX_IMAGE_PATH) |\
274 sed -n -e 's/Image Name:[ ]*\(.*\)/-n \1/p' -e 's/Load Address:/-a/p' -e 's/Entry Point:/-e/p'`; \
275 $(MKIMAGE) -A $(MKIMAGE_ARCH) -O linux \
276 -T kernel -C none $${MKIMAGE_ARGS} \
277 -d $(KERNEL_ARCH_PATH)/boot/zImage $(LINUX_IMAGE_PATH);
278 endif
279 endif
281 # Compilation. We make sure the kernel gets rebuilt when the
282 # configuration has changed.
283 define LINUX_BUILD_CMDS
284 $(if $(BR2_LINUX_KERNEL_USE_CUSTOM_DTS),
285 cp $(call qstrip,$(BR2_LINUX_KERNEL_CUSTOM_DTS_PATH)) $(KERNEL_ARCH_PATH)/boot/dts/)
286 $(LINUX_MAKE_ENV) $(MAKE) $(LINUX_MAKE_FLAGS) -C $(@D) $(LINUX_TARGET_NAME)
287 @if grep -q "CONFIG_MODULES=y" $(@D)/.config; then \
288 $(LINUX_MAKE_ENV) $(MAKE) $(LINUX_MAKE_FLAGS) -C $(@D) modules ; \
290 $(LINUX_BUILD_DTB)
291 $(LINUX_APPEND_DTB)
292 endef
295 ifeq ($(BR2_LINUX_KERNEL_INSTALL_TARGET),y)
296 define LINUX_INSTALL_KERNEL_IMAGE_TO_TARGET
297 install -m 0644 -D $(LINUX_IMAGE_PATH) $(TARGET_DIR)/boot/$(LINUX_IMAGE_NAME)
298 $(LINUX_INSTALL_DTB_TARGET)
299 endef
300 endif
303 define LINUX_INSTALL_HOST_TOOLS
304 # Installing dtc (device tree compiler) as host tool, if selected
305 if grep -q "CONFIG_DTC=y" $(@D)/.config; then \
306 $(INSTALL) -D -m 0755 $(@D)/scripts/dtc/dtc $(HOST_DIR)/usr/bin/dtc ; \
308 endef
311 define LINUX_INSTALL_IMAGES_CMDS
312 cp $(LINUX_IMAGE_PATH) $(BINARIES_DIR)
313 $(LINUX_INSTALL_DTB)
314 endef
316 define LINUX_INSTALL_TARGET_CMDS
317 $(LINUX_INSTALL_KERNEL_IMAGE_TO_TARGET)
318 # Install modules and remove symbolic links pointing to build
319 # directories, not relevant on the target
320 @if grep -q "CONFIG_MODULES=y" $(@D)/.config; then \
321 $(LINUX_MAKE_ENV) $(MAKE1) $(LINUX_MAKE_FLAGS) -C $(@D) modules_install; \
322 rm -f $(TARGET_DIR)/lib/modules/$(LINUX_VERSION_PROBED)/build ; \
323 rm -f $(TARGET_DIR)/lib/modules/$(LINUX_VERSION_PROBED)/source ; \
325 $(LINUX_INSTALL_HOST_TOOLS)
326 endef
328 # Note: our package infrastructure uses the full-path of the last-scanned
329 # Makefile to determine what package we're currently defining, using the
330 # last directory component in the path. As such, including other Makefile,
331 # like below, before we call one of the *-package macro is usally not
332 # working.
333 # However, since the files we include here are in the same directory as
334 # the current Makefile, we are OK. But this is a hard requirement: files
335 # included here *must* be in the same directory!
336 include $(sort $(wildcard linux/linux-ext-*.mk))
338 LINUX_PATCH_DEPENDENCIES += $(foreach ext,$(LINUX_EXTENSIONS),\
339 $(if $(BR2_LINUX_KERNEL_EXT_$(call UPPERCASE,$(ext))),$(ext)))
341 LINUX_PRE_PATCH_HOOKS += $(foreach ext,$(LINUX_EXTENSIONS),\
342 $(if $(BR2_LINUX_KERNEL_EXT_$(call UPPERCASE,$(ext))),\
343 $(call UPPERCASE,$(ext))_PREPARE_KERNEL))
345 $(eval $(kconfig-package))
347 # Support for rebuilding the kernel after the cpio archive has
348 # been generated in $(BINARIES_DIR)/rootfs.cpio.
349 $(LINUX_DIR)/.stamp_initramfs_rebuilt: $(LINUX_DIR)/.stamp_target_installed $(LINUX_DIR)/.stamp_images_installed $(BINARIES_DIR)/rootfs.cpio
350 @$(call MESSAGE,"Rebuilding kernel with initramfs")
351 # Build the kernel.
352 $(LINUX_MAKE_ENV) $(MAKE) $(LINUX_MAKE_FLAGS) -C $(@D) $(LINUX_TARGET_NAME)
353 $(LINUX_APPEND_DTB)
354 # Copy the kernel image to its final destination
355 cp $(LINUX_IMAGE_PATH) $(BINARIES_DIR)
356 # If there is a .ub file copy it to the final destination
357 test ! -f $(LINUX_IMAGE_PATH).ub || cp $(LINUX_IMAGE_PATH).ub $(BINARIES_DIR)
358 $(Q)touch $@
360 # The initramfs building code must make sure this target gets called
361 # after it generated the initramfs list of files.
362 linux-rebuild-with-initramfs: $(LINUX_DIR)/.stamp_initramfs_rebuilt
364 # Checks to give errors that the user can understand
365 ifeq ($(BR_BUILDING),y)
366 ifeq ($(BR2_LINUX_KERNEL_USE_DEFCONFIG),y)
367 ifeq ($(call qstrip,$(BR2_LINUX_KERNEL_DEFCONFIG)),)
368 $(error No kernel defconfig name specified, check your BR2_LINUX_KERNEL_DEFCONFIG setting)
369 endif
370 endif
372 ifeq ($(BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG),y)
373 ifeq ($(call qstrip,$(BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE)),)
374 $(error No kernel configuration file specified, check your BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE setting)
375 endif
376 endif
378 endif