summaryrefslogtreecommitdiffstats
path: root/meta/classes-recipe
diff options
context:
space:
mode:
Diffstat (limited to 'meta/classes-recipe')
-rw-r--r--meta/classes-recipe/kernel-module-split.bbclass25
-rw-r--r--meta/classes-recipe/setuptools3.bbclass1
-rw-r--r--meta/classes-recipe/setuptools3_legacy.bbclass1
-rw-r--r--meta/classes-recipe/uboot-sign.bbclass12
4 files changed, 29 insertions, 10 deletions
diff --git a/meta/classes-recipe/kernel-module-split.bbclass b/meta/classes-recipe/kernel-module-split.bbclass
index 9487365eb7..a2d81f18e2 100644
--- a/meta/classes-recipe/kernel-module-split.bbclass
+++ b/meta/classes-recipe/kernel-module-split.bbclass
@@ -99,9 +99,12 @@ python split_kernel_module_packages () {
99 bb.warn("module_autoload_%s was replaced by KERNEL_MODULE_AUTOLOAD for cases where basename == module name, please drop it" % basename) 99 bb.warn("module_autoload_%s was replaced by KERNEL_MODULE_AUTOLOAD for cases where basename == module name, please drop it" % basename)
100 if autoload and basename not in autoloadlist: 100 if autoload and basename not in autoloadlist:
101 bb.warn("module_autoload_%s is defined but '%s' isn't included in KERNEL_MODULE_AUTOLOAD, please add it there" % (basename, basename)) 101 bb.warn("module_autoload_%s is defined but '%s' isn't included in KERNEL_MODULE_AUTOLOAD, please add it there" % (basename, basename))
102
103 # The .conf file can either be installed by a recipe or generated from module_autoload_*
104 conf = '%s/%s.conf' % (d.getVar('modulesloaddir'), basename)
105 name = '%s%s' % (dvar, conf)
106 # If module name is in KERNEL_MODULE_AUTOLOAD, then generate the .conf file and write to `name`.
102 if basename in autoloadlist: 107 if basename in autoloadlist:
103 conf = '%s/%s.conf' % (d.getVar('modulesloaddir'), basename)
104 name = '%s%s' % (dvar, conf)
105 os.makedirs(os.path.dirname(name), exist_ok=True) 108 os.makedirs(os.path.dirname(name), exist_ok=True)
106 with open(name, 'w') as f: 109 with open(name, 'w') as f:
107 if autoload: 110 if autoload:
@@ -109,6 +112,9 @@ python split_kernel_module_packages () {
109 f.write('%s\n' % m) 112 f.write('%s\n' % m)
110 else: 113 else:
111 f.write('%s\n' % basename) 114 f.write('%s\n' % basename)
115 # If the .conf file exits, then add it to FILES:* and CONFFILES:* and add postinstall hook.
116 # It doesn't matter if it was generated from module_autoload_* or installed by the recipe.
117 if os.path.exists(name):
112 conf2append = ' %s' % conf 118 conf2append = ' %s' % conf
113 d.appendVar('FILES:%s' % pkg, conf2append) 119 d.appendVar('FILES:%s' % pkg, conf2append)
114 d.appendVar('CONFFILES:%s' % pkg, conf2append) 120 d.appendVar('CONFFILES:%s' % pkg, conf2append)
@@ -121,19 +127,24 @@ python split_kernel_module_packages () {
121 # Write out any modconf fragment 127 # Write out any modconf fragment
122 modconflist = (d.getVar("KERNEL_MODULE_PROBECONF") or "").split() 128 modconflist = (d.getVar("KERNEL_MODULE_PROBECONF") or "").split()
123 modconf = d.getVar('module_conf_%s' % basename) 129 modconf = d.getVar('module_conf_%s' % basename)
130
131 # The .conf file can either be installed by a recipe or generated from module_conf_*
132 conf = '%s/%s.conf' % (d.getVar('modprobedir'), basename)
133 name = '%s%s' % (dvar, conf)
134 # If module name is in KERNEL_MODULE_PROBECONF, then generate the .conf file and write to `name`.
124 if modconf and basename in modconflist: 135 if modconf and basename in modconflist:
125 conf = '%s/%s.conf' % (d.getVar('modprobedir'), basename)
126 name = '%s%s' % (dvar, conf)
127 os.makedirs(os.path.dirname(name), exist_ok=True) 136 os.makedirs(os.path.dirname(name), exist_ok=True)
128 with open(name, 'w') as f: 137 with open(name, 'w') as f:
129 f.write("%s\n" % modconf) 138 f.write("%s\n" % modconf)
139 elif modconf:
140 bb.error("Please ensure module %s is listed in KERNEL_MODULE_PROBECONF since module_conf_%s is set" % (basename, basename))
141 # If the .conf file exits, then add it to FILES:* and CONFFILES:*.
142 # It doesn't matter if it was generated from module_conf_* or installed by the recipe.
143 if os.path.exists(name):
130 conf2append = ' %s' % conf 144 conf2append = ' %s' % conf
131 d.appendVar('FILES:%s' % pkg, conf2append) 145 d.appendVar('FILES:%s' % pkg, conf2append)
132 d.appendVar('CONFFILES:%s' % pkg, conf2append) 146 d.appendVar('CONFFILES:%s' % pkg, conf2append)
133 147
134 elif modconf:
135 bb.error("Please ensure module %s is listed in KERNEL_MODULE_PROBECONF since module_conf_%s is set" % (basename, basename))
136
137 if "description" in vals: 148 if "description" in vals:
138 old_desc = d.getVar('DESCRIPTION:' + pkg) or "" 149 old_desc = d.getVar('DESCRIPTION:' + pkg) or ""
139 d.setVar('DESCRIPTION:' + pkg, old_desc + "; " + vals["description"]) 150 d.setVar('DESCRIPTION:' + pkg, old_desc + "; " + vals["description"])
diff --git a/meta/classes-recipe/setuptools3.bbclass b/meta/classes-recipe/setuptools3.bbclass
index f19899d42e..0adce5e2ec 100644
--- a/meta/classes-recipe/setuptools3.bbclass
+++ b/meta/classes-recipe/setuptools3.bbclass
@@ -32,7 +32,6 @@ setuptools3_do_configure() {
32 32
33setuptools3_do_compile() { 33setuptools3_do_compile() {
34 cd ${SETUPTOOLS_SETUP_PATH} 34 cd ${SETUPTOOLS_SETUP_PATH}
35 NO_FETCH_BUILD=1 \
36 STAGING_INCDIR=${STAGING_INCDIR} \ 35 STAGING_INCDIR=${STAGING_INCDIR} \
37 STAGING_LIBDIR=${STAGING_LIBDIR} \ 36 STAGING_LIBDIR=${STAGING_LIBDIR} \
38 ${STAGING_BINDIR_NATIVE}/python3-native/python3 setup.py \ 37 ${STAGING_BINDIR_NATIVE}/python3-native/python3 setup.py \
diff --git a/meta/classes-recipe/setuptools3_legacy.bbclass b/meta/classes-recipe/setuptools3_legacy.bbclass
index 030c3d9e0e..166808a695 100644
--- a/meta/classes-recipe/setuptools3_legacy.bbclass
+++ b/meta/classes-recipe/setuptools3_legacy.bbclass
@@ -35,7 +35,6 @@ setuptools3_legacy_do_configure() {
35 35
36setuptools3_legacy_do_compile() { 36setuptools3_legacy_do_compile() {
37 cd ${SETUPTOOLS_SETUP_PATH} 37 cd ${SETUPTOOLS_SETUP_PATH}
38 NO_FETCH_BUILD=1 \
39 STAGING_INCDIR=${STAGING_INCDIR} \ 38 STAGING_INCDIR=${STAGING_INCDIR} \
40 STAGING_LIBDIR=${STAGING_LIBDIR} \ 39 STAGING_LIBDIR=${STAGING_LIBDIR} \
41 ${STAGING_BINDIR_NATIVE}/python3-native/python3 setup.py \ 40 ${STAGING_BINDIR_NATIVE}/python3-native/python3 setup.py \
diff --git a/meta/classes-recipe/uboot-sign.bbclass b/meta/classes-recipe/uboot-sign.bbclass
index e0771b5429..796c040e8b 100644
--- a/meta/classes-recipe/uboot-sign.bbclass
+++ b/meta/classes-recipe/uboot-sign.bbclass
@@ -101,6 +101,10 @@ UBOOT_FIT_TEE_IMAGE ?= "tee-raw.bin"
101# User specific settings 101# User specific settings
102UBOOT_FIT_USER_SETTINGS ?= "" 102UBOOT_FIT_USER_SETTINGS ?= ""
103 103
104# Sets the firmware property to select the image to boot first.
105# If not set, the first entry in "loadables" is used instead.
106UBOOT_FIT_CONF_FIRMWARE ?= ""
107
104# Unit name containing a list of users additional binaries to be loaded. 108# Unit name containing a list of users additional binaries to be loaded.
105# It is a comma-separated list of strings. 109# It is a comma-separated list of strings.
106UBOOT_FIT_CONF_USER_LOADABLES ?= '' 110UBOOT_FIT_CONF_USER_LOADABLES ?= ''
@@ -361,6 +365,7 @@ EOF
361# we want to sign it so that the SPL can verify it 365# we want to sign it so that the SPL can verify it
362uboot_fitimage_assemble() { 366uboot_fitimage_assemble() {
363 conf_loadables="\"uboot\"" 367 conf_loadables="\"uboot\""
368 conf_firmware=""
364 rm -f ${UBOOT_ITS} ${UBOOT_FITIMAGE_BINARY} 369 rm -f ${UBOOT_ITS} ${UBOOT_FITIMAGE_BINARY}
365 370
366 # First we create the ITS script 371 # First we create the ITS script
@@ -425,13 +430,17 @@ EOF
425 fi 430 fi
426 431
427 if [ -n "${UBOOT_FIT_USER_SETTINGS}" ] ; then 432 if [ -n "${UBOOT_FIT_USER_SETTINGS}" ] ; then
428 echo -e "${UBOOT_FIT_USER_SETTINGS}" >> ${UBOOT_ITS} 433 printf "%b" "${UBOOT_FIT_USER_SETTINGS}" >> ${UBOOT_ITS}
429 fi 434 fi
430 435
431 if [ -n "${UBOOT_FIT_CONF_USER_LOADABLES}" ] ; then 436 if [ -n "${UBOOT_FIT_CONF_USER_LOADABLES}" ] ; then
432 conf_loadables="${conf_loadables}${UBOOT_FIT_CONF_USER_LOADABLES}" 437 conf_loadables="${conf_loadables}${UBOOT_FIT_CONF_USER_LOADABLES}"
433 fi 438 fi
434 439
440 if [ -n "${UBOOT_FIT_CONF_FIRMWARE}" ] ; then
441 conf_firmware="firmware = \"${UBOOT_FIT_CONF_FIRMWARE}\";"
442 fi
443
435 cat << EOF >> ${UBOOT_ITS} 444 cat << EOF >> ${UBOOT_ITS}
436 }; 445 };
437 446
@@ -439,6 +448,7 @@ EOF
439 default = "conf"; 448 default = "conf";
440 conf { 449 conf {
441 description = "Boot with signed U-Boot FIT"; 450 description = "Boot with signed U-Boot FIT";
451 ${conf_firmware}
442 loadables = ${conf_loadables}; 452 loadables = ${conf_loadables};
443 fdt = "fdt"; 453 fdt = "fdt";
444 }; 454 };