• Skip to sidebar navigation
  • Skip to content

Bitbucket

  • More
    ProjectsRepositories
  • Help
    • Online help
    • Learn Git
    • Welcome to Bitbucket
    • Keyboard shortcuts
  • Log In
Alexander Dahl
  1. Alexander Dahl

buildroot

Public
Actions
  • Clone
  • Compare

Learn more about cloning repositories

You have read-only access

Navigation
  • Source
  • Commits
  • Branches
  • All Branches Graph
  • Forks
  1. Alexander Dahl
  2. buildroot

Source

buildroot/linux/linux.mk
Arnout VandecappelleArnout Vandecappelle committed ee995b1819010 Apr 2017
Raw file
Source viewDiff to previous
xxxxxxxxxx
$(LINUX_DIR)/.stamp_initramfs_rebuilt: $(LINUX_DIR)/.stamp_target_installed $(LINUX_DIR)/.stamp_images_installed $(BINARIES_DIR)/rootfs.cpio
 
1
################################################################################
2
#
3
# Linux kernel target
4
#
5
################################################################################
6
​
7
LINUX_VERSION = $(call qstrip,$(BR2_LINUX_KERNEL_VERSION))
8
LINUX_LICENSE = GPL-2.0
9
LINUX_LICENSE_FILES = COPYING
10
​
11
define LINUX_HELP_CMDS
12
    @echo '  linux-menuconfig       - Run Linux kernel menuconfig'
13
    @echo '  linux-savedefconfig    - Run Linux kernel savedefconfig'
14
    @echo '  linux-update-defconfig - Save the Linux configuration to the path specified'
15
    @echo '                             by BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE'
16
endef
17
​
18
# Compute LINUX_SOURCE and LINUX_SITE from the configuration
19
ifeq ($(BR2_LINUX_KERNEL_CUSTOM_TARBALL),y)
20
LINUX_TARBALL = $(call qstrip,$(BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION))
21
LINUX_SITE = $(patsubst %/,%,$(dir $(LINUX_TARBALL)))
22
LINUX_SOURCE = $(notdir $(LINUX_TARBALL))
23
BR_NO_CHECK_HASH_FOR += $(LINUX_SOURCE)
24
else ifeq ($(BR2_LINUX_KERNEL_CUSTOM_GIT),y)
25
LINUX_SITE = $(call qstrip,$(BR2_LINUX_KERNEL_CUSTOM_REPO_URL))
26
LINUX_SITE_METHOD = git
27
else ifeq ($(BR2_LINUX_KERNEL_CUSTOM_HG),y)
28
LINUX_SITE = $(call qstrip,$(BR2_LINUX_KERNEL_CUSTOM_REPO_URL))
29
LINUX_SITE_METHOD = hg
30
else ifeq ($(BR2_LINUX_KERNEL_CUSTOM_SVN),y)
31
LINUX_SITE = $(call qstrip,$(BR2_LINUX_KERNEL_CUSTOM_REPO_URL))
32
LINUX_SITE_METHOD = svn
33
else ifeq ($(BR2_LINUX_KERNEL_LATEST_CIP_VERSION),y)
34
LINUX_SITE = git://git.kernel.org/pub/scm/linux/kernel/git/bwh/linux-cip.git
35
else
36
LINUX_SOURCE = linux-$(LINUX_VERSION).tar.xz
37
ifeq ($(BR2_LINUX_KERNEL_CUSTOM_VERSION),y)
38
BR_NO_CHECK_HASH_FOR += $(LINUX_SOURCE)
39
endif
40
# In X.Y.Z, get X and Y. We replace dots and dashes by spaces in order
41
# to use the $(word) function. We support versions such as 4.0, 3.1,
42
# 2.6.32, 2.6.32-rc1, 3.0-rc6, etc.
43
ifeq ($(findstring x2.6.,x$(LINUX_VERSION)),x2.6.)
44
LINUX_SITE = $(BR2_KERNEL_MIRROR)/linux/kernel/v2.6
45
else ifeq ($(findstring x3.,x$(LINUX_VERSION)),x3.)
46
LINUX_SITE = $(BR2_KERNEL_MIRROR)/linux/kernel/v3.x
47
else ifeq ($(findstring x4.,x$(LINUX_VERSION)),x4.)
48
LINUX_SITE = $(BR2_KERNEL_MIRROR)/linux/kernel/v4.x
49
endif
50
# release candidates are in testing/ subdir
51
ifneq ($(findstring -rc,$(LINUX_VERSION)),)
52
LINUX_SITE := $(LINUX_SITE)/testing
53
endif # -rc
54
endif
55
​
56
LINUX_PATCHES = $(call qstrip,$(BR2_LINUX_KERNEL_PATCH))
57
​
58
# We rely on the generic package infrastructure to download and apply
59
# remote patches (downloaded from ftp, http or https). For local
60
# patches, we can't rely on that infrastructure, because there might
61
# be directories in the patch list (unlike for other packages).
62
LINUX_PATCH = $(filter ftp://% http://% https://%,$(LINUX_PATCHES))
63
​
64
LINUX_INSTALL_IMAGES = YES
65
LINUX_DEPENDENCIES += host-kmod
66
​
67
# host tools needed for kernel compression
68
ifeq ($(BR2_LINUX_KERNEL_LZ4),y)
69
LINUX_DEPENDENCIES += host-lz4
70
else ifeq ($(BR2_LINUX_KERNEL_LZMA),y)
71
LINUX_DEPENDENCIES += host-lzma
72
else ifeq ($(BR2_LINUX_KERNEL_LZO),y)
73
LINUX_DEPENDENCIES += host-lzop
74
else ifeq ($(BR2_LINUX_KERNEL_XZ),y)
75
LINUX_DEPENDENCIES += host-xz
76
endif
77
LINUX_COMPRESSION_OPT_$(BR2_LINUX_KERNEL_GZIP) = CONFIG_KERNEL_GZIP
78
LINUX_COMPRESSION_OPT_$(BR2_LINUX_KERNEL_LZ4) = CONFIG_KERNEL_LZ4
79
LINUX_COMPRESSION_OPT_$(BR2_LINUX_KERNEL_LZMA) = CONFIG_KERNEL_LZMA
80
LINUX_COMPRESSION_OPT_$(BR2_LINUX_KERNEL_LZO) = CONFIG_KERNEL_LZO
81
LINUX_COMPRESSION_OPT_$(BR2_LINUX_KERNEL_XZ) = CONFIG_KERNEL_XZ
82
​
83
# If host-uboot-tools is selected by the user, assume it is needed to
84
# create a custom image
85
ifeq ($(BR2_PACKAGE_HOST_UBOOT_TOOLS),y)
86
LINUX_DEPENDENCIES += host-uboot-tools
87
endif
88
​
89
LINUX_MAKE_FLAGS = \
90
    HOSTCC="$(HOSTCC)" \
91
    HOSTCFLAGS="$(HOSTCFLAGS)" \
92
    ARCH=$(KERNEL_ARCH) \
  • Git repository management for enterprise teams powered by Atlassian Bitbucket
  • Atlassian Bitbucket v6.7.2
  • Documentation
  • Request a feature
  • About
  • Contact Atlassian
Atlassian

Everything looks good. We'll let you know here if there's anything you should know about.