UBOOT_IMAGE ?= "${UBOOT_BINARYNAME}-${MACHINE}-${UBOOT_VERSION}.${UBOOT_SUFFIX}"
UBOOT_SYMLINK ?= "${UBOOT_BINARYNAME}-${MACHINE}.${UBOOT_SUFFIX}"
UBOOT_MAKE_TARGET ?= "all"
+UBOOT_MAKE_OPTS ?= ""
# Output the ELF generated. Some platforms can use the ELF file and directly
# load it (JTAG booting, QEMU) additionally the ELF can be used for debugging
ubootconfigflags = d.getVarFlags('UBOOT_CONFIG')
ubootbinary = d.getVar('UBOOT_BINARY')
ubootbinaries = d.getVar('UBOOT_BINARIES')
+ ubootconfigmakeopts = d.getVar('UBOOT_CONFIG_MAKE_OPTS')
# The "doc" varflag is special, we don't want to see it here
ubootconfigflags.pop('doc', None)
ubootconfig = (d.getVar('UBOOT_CONFIG') or "").split()
if ubootconfigflags and ubootbinaries:
raise bb.parse.SkipRecipe("You cannot use UBOOT_BINARIES as it is internal to uboot_config.bbclass.")
+ if ubootconfigflags and ubootconfigmakeopts:
+ raise bb.parse.SkipRecipe("You cannot use UBOOT_CONFIG_MAKE_OPTS as it is internal to uboot_config.bbclass.")
+
if len(ubootconfig) > 0:
for config in ubootconfig:
found = False
if config == f:
found = True
items = v.split(',')
- if items[0] and len(items) > 3:
- raise bb.parse.SkipRecipe('Only config,images,binary can be specified!')
+ if items[0] and len(items) > 4:
+ raise bb.parse.SkipRecipe('Only config,images,binary,make_opts can be specified!')
d.appendVar('UBOOT_MACHINE', ' ' + items[0])
# IMAGE_FSTYPES appending
if len(items) > 1 and items[1]:
else:
bb.debug(1, "Appending '%s' to UBOOT_BINARIES." % ubootbinary)
d.appendVar('UBOOT_BINARIES', ' ' + ubootbinary)
+ if len(items) > 3 and items[3]:
+ bb.debug(1, "Appending '%s' to UBOOT_CONFIG_MAKE_OPTS." % items[3])
+ d.appendVar('UBOOT_CONFIG_MAKE_OPTS', items[3] + " ? ")
+ else:
+ bb.debug(1, "Appending '%s' to UBOOT_CONFIG_MAKE_OPTS." % "")
+ d.appendVar('UBOOT_CONFIG_MAKE_OPTS', " ? ")
break
if not found:
config=$1
type=$2
- oe_runmake -C ${S} O=${B}/${config} ${config}
+ unset k
+ IFS="?"
+ uboot_config_make_opts="${UBOOT_CONFIG_MAKE_OPTS}"
+ for config_make_opts in $uboot_config_make_opts; do
+ k=$(expr $k + 1);
+ if [ $k -eq $i ]; then
+ break
+ fi
+ done
+ unset IFS
+ unset k
+
+ oe_runmake -C ${S} O=${B}/${config} ${config_make_opts} ${UBOOT_MAKE_OPTS} ${config}
if [ -n "${@' '.join(find_cfgs(d))}" ]; then
merge_config.sh -m -O ${B}/${config} ${B}/${config}/.config ${@" ".join(find_cfgs(d))}
oe_runmake -C ${S} O=${B}/${config} oldconfig
uboot_configure () {
if [ -n "${UBOOT_MACHINE}" ]; then
- oe_runmake -C ${S} O=${B} ${UBOOT_MACHINE}
+ oe_runmake -C ${S} O=${B} ${UBOOT_MAKE_OPTS} ${UBOOT_MACHINE}
else
- oe_runmake -C ${S} O=${B} oldconfig
+ oe_runmake -C ${S} O=${B} ${UBOOT_MAKE_OPTS} oldconfig
fi
merge_config.sh -m .config ${@" ".join(find_cfgs(d))}
cml1_do_configure
config=$2
type=$3
- oe_runmake -C ${S} O=${B}/${config} ${UBOOT_MAKE_TARGET}
+ unset k
+ IFS="?"
+ uboot_config_make_opts="${UBOOT_CONFIG_MAKE_OPTS}"
+ for config_make_opts in $uboot_config_make_opts; do
+ k=$(expr $k + 1);
+ if [ $k -eq $i ]; then
+ break
+ fi
+ done
+ unset IFS
+ unset k
+
+ oe_runmake -C ${S} O=${B}/${config} ${config_make_opts} ${UBOOT_MAKE_OPTS} ${UBOOT_MAKE_TARGET}
unset k
for binary in ${UBOOT_BINARIES}; do
}
uboot_compile () {
- oe_runmake -C ${S} O=${B} ${UBOOT_MAKE_TARGET}
+ oe_runmake -C ${S} O=${B} ${UBOOT_MAKE_OPTS} ${UBOOT_MAKE_TARGET}
# Generate the uboot-initial-env
if [ -n "${UBOOT_INITIAL_ENV}" ]; then