• 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/package/linux-backports/linux-backports.mk
Rahul BedarkarRahul Bedarkar committed af31c309e7330 Mar 2017
Raw file
Source viewDiff to previous
xxxxxxxxxx
 
1
################################################################################
2
#
3
# linux-backports
4
#
5
################################################################################
6
​
7
LINUX_BACKPORTS_VERSION_MAJOR = 4.4.2
8
LINUX_BACKPORTS_VERSION = $(LINUX_BACKPORTS_VERSION_MAJOR)-1
9
LINUX_BACKPORTS_SOURCE = backports-$(LINUX_BACKPORTS_VERSION).tar.xz
10
LINUX_BACKPORTS_SITE = $(BR2_KERNEL_MIRROR)/linux/kernel/projects/backports/stable/v$(LINUX_BACKPORTS_VERSION_MAJOR)
11
LINUX_BACKPORTS_LICENSE = GPL-2.0
12
LINUX_BACKPORTS_LICENSE_FILES = COPYING
13
​
14
ifeq ($(BR2_PACKAGE_LINUX_BACKPORTS_USE_DEFCONFIG),y)
15
LINUX_BACKPORTS_KCONFIG_FILE = $(LINUX_BACKPORTS_DIR)/defconfigs/$(call qstrip,$(BR2_PACKAGE_LINUX_BACKPORTS_DEFCONFIG))
16
else ifeq ($(BR2_PACKAGE_LINUX_BACKPORTS_USE_CUSTOM_CONFIG),y)
17
LINUX_BACKPORTS_KCONFIG_FILE = $(call qstrip,$(BR2_PACKAGE_LINUX_BACKPORTS_CUSTOM_CONFIG_FILE))
18
endif
19
​
20
LINUX_BACKPORTS_KCONFIG_FRAGMENT_FILES = $(call qstrip,$(BR2_PACKAGE_LINUX_BACKPORTS_CONFIG_FRAGMENT_FILES))
21
LINUX_BACKPORTS_KCONFIG_OPTS = $(LINUX_BACKPORTS_MAKE_OPTS)
22
​
23
# linux-backports' build system expects the config options to be present
24
# in the environment, and it is so when using their custom buildsystem,
25
# because they are set in the main Makefile, which then calls a second
26
# Makefile.
27
#
28
# In our case, we do not use that first Makefile. So, we parse the
29
# .config file, filter-out comment lines and put the rest as command
30
# line variables.
31
#
32
# LINUX_BACKPORTS_MAKE_OPTS is used by the kconfig-package infra, while
33
# LINUX_BACKPORTS_MODULE_MAKE_OPTS is used by the kernel-module infra.
34
#
35
LINUX_BACKPORTS_MAKE_OPTS = \
36
    BACKPORT_DIR=$(@D) \
37
    KLIB_BUILD=$(LINUX_DIR) \
38
    KLIB=$(TARGET_DIR)/lib/modules/$(LINUX_VERSION_PROBED) \
39
    INSTALL_MOD_DIR=backports \
40
    `sed -r -e '/^\#/d;' $(@D)/.config`
41
​
42
LINUX_BACKPORTS_MODULE_MAKE_OPTS = $(LINUX_BACKPORTS_MAKE_OPTS)
43
​
44
# This file is not automatically generated by 'oldconfig' that we use in
45
# the kconfig-package infrastructure. In the linux buildsystem, it is
46
# generated by running silentoldconfig, but that's not the case for
47
# linux-backports: it uses a hand-crafted rule to generate that file.
48
define LINUX_BACKPORTS_KCONFIG_FIXUP_CMDS
49
    $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) $(LINUX_BACKPORTS_MAKE_OPTS) backport-include/backport/autoconf.h
50
endef
51
​
52
# Checks to give errors that the user can understand
53
ifeq ($(BR_BUILDING),y)
54
​
55
ifeq ($(BR2_PACKAGE_LINUX_BACKPORTS_USE_DEFCONFIG),y)
56
ifeq ($(call qstrip,$(BR2_PACKAGE_LINUX_BACKPORTS_DEFCONFIG)),)
57
$(error No linux-backports defconfig name specified, check your BR2_PACKAGE_LINUX_BACKPORTS_DEFCONFIG setting)
58
endif
59
endif
60
​
61
ifeq ($(BR2_PACKAGE_LINUX_BACKPORTS_USE_CUSTOM_CONFIG),y)
62
ifeq ($(call qstrip,$(BR2_PACKAGE_LINUX_BACKPORTS_CUSTOM_CONFIG_FILE)),)
63
$(error No linux-backports configuration file specified, check your BR2_PACKAGE_LINUX_BACKPORTS_CUSTOM_CONFIG_FILE setting)
64
endif
65
endif
66
​
67
endif # BR_BUILDING
68
​
69
$(eval $(kernel-module))
70
$(eval $(kconfig-package))
71
​
72
# linux-backports' own .config file needs options from the kernel's own
73
# .config file. The dependencies handling in the infrastructure does not
74
# allow to express this kind of dependencies. Besides, linux.mk might
75
# not have been parsed yet, so the Linux build dir LINUX_DIR is not yet
76
# known. Thus, we use a "secondary expansion" so the rule is re-evaluated
77
# after all Makefiles are parsed, and thus at that time we will have the
78
# LINUX_DIR variable set to the proper value.
79
#
80
# Furthermore, we want to check the kernel version, since linux-backports
81
# only supports kernels >= 3.0. To avoid overriding linux-backports'
82
# .config rule defined in the kconfig-package infra, we use an
83
# intermediate stamp-file.
84
#
85
# Finally, it must also come after the call to kconfig-package, so we get
86
# LINUX_BACKPORTS_DIR properly defined (because the target part of the
87
# rule is not re-evaluated).
88
#
89
$(LINUX_BACKPORTS_DIR)/.config: $(LINUX_BACKPORTS_DIR)/.stamp_check_kernel_version
90
​
91
.SECONDEXPANSION:
92
$(LINUX_BACKPORTS_DIR)/.stamp_check_kernel_version: $$(LINUX_DIR)/.config
  • 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.