ARCHIVER: Update for fip build and release information
Change-Id: I8ddd8c61ff7488ce40f87a160f603de32425386a
This commit is contained in:
1 parent
cc43f8cd6e
commit
fef27aed02
12 files changed
+210
-66
No files matched your search
@@ -70,7 +70,7 @@ CPPFLAGS =
|
||||
UBOOT_LOCALVERSION = ${UBOOT_LOCALVERSION}
|
||||
|
||||
# Configure default fip feature
|
||||
ENABLE_FIP ?= "${@bb.utils.contains('MACHINE_FEATURES','fip','1','',d)}"
|
||||
ENABLE_FIP ?= ${@bb.utils.contains('MACHINE_FEATURES','fip','1','',d)}
|
||||
|
||||
# Display U-Boot config details
|
||||
define uboot-configs
|
||||
@@ -85,7 +85,7 @@ endef
|
||||
# Configure U-Boot configure rules (configure-DEFCONFIG-CONFIG)
|
||||
define configure-rules
|
||||
configure-\$(1)-\$(2): version
|
||||
ifeq (\$(ENABLE_FIP),)
|
||||
ifeq (\$(ENABLE_FIP),0)
|
||||
@if ! grep -q 'CONFIG_STM32MP15x_STM32IMAGE=y' \$(SRC_PATH)/configs/\$(1); then \\
|
||||
echo "CONFIG_STM32MP15x_STM32IMAGE=y" >> \$(SRC_PATH)/configs/\$(1) ; \\
|
||||
fi
|
||||
@@ -98,11 +98,19 @@ endef
|
||||
# Configure U-Boot make rules (uboot-DEFCONFIG-CONFIG)
|
||||
define uboot-rules
|
||||
uboot-\$(1)-\$(2): configure-\$(1)-\$(2)
|
||||
@mkdir -p \$(DEPLOYDIR)
|
||||
@\$(foreach dt, \$(if \$(DEVICETREE),\$(DEVICETREE),\$(UBOOT_DEVICETREE_\$(1))), \\
|
||||
\$(MAKE) -C \$(SRC_PATH) ${UBOOT_MAKE_TARGET} \\
|
||||
O=\$(BLD_PATH)/\$(1) \\
|
||||
DEVICE_TREE=\$(dt) \\
|
||||
DEVICE_TREE_EXT=\$(dt).dtb ; \\
|
||||
cp -f \$(BLD_PATH)/\$(1)/\$(3) \$(DEPLOYDIR)/u-boot-\$(dt)-\$(2).\$(shell echo \$(3) | cut -d'.' -f2) ; \\
|
||||
if [ -f \$(BLD_PATH)/\$(1)/\$(shell echo \$(3) | cut -d'.' -f1).stm32 ]; then \\
|
||||
cp -f \$(BLD_PATH)/\$(1)/\$(shell echo \$(3) | cut -d'.' -f1).stm32 \$(DEPLOYDIR)/u-boot-\$(dt)-\$(2).stm32 ; \\
|
||||
fi ; \\
|
||||
if [ -f \$(BLD_PATH)/\$(1)/${SPL_BINARY_STM32} ]; then \\
|
||||
cp -f \$(BLD_PATH)/\$(1)/${SPL_BINARY_STM32} \$(DEPLOYDIR)/${SPL_BINARYNAME}-\$(dt)-\$(2) ; \\
|
||||
fi ; \\
|
||||
)
|
||||
endef
|
||||
|
||||
@@ -112,18 +120,14 @@ deploy-\$(1)-\$(2): uboot-\$(1)-\$(2)
|
||||
@mkdir -p \$(DEPLOYDIR)
|
||||
@mkdir -p \$(DEPLOYDIR)/debug
|
||||
@\$(foreach dt, \$(if \$(DEVICETREE),\$(DEVICETREE),\$(UBOOT_DEVICETREE_\$(1))), \\
|
||||
cp -f \$(BLD_PATH)/\$(1)/\$(3) \$(DEPLOYDIR)/u-boot-\$(dt)-\$(2).\$(shell echo \$(3) | cut -d'.' -f2) ; \\
|
||||
if [ -f \$(BLD_PATH)/\$(1)/${SPL_BINARY_STM32} ]; then \\
|
||||
cp -f \$(BLD_PATH)/\$(1)/${SPL_BINARY_STM32} \$(DEPLOYDIR)/${SPL_BINARYNAME}-\$(dt)-\$(2) ; \\
|
||||
fi ; \\
|
||||
if [ "\$(shell echo \$(3) | cut -d'.' -f2)" = "dtb" ]; then \\
|
||||
cp -f \$(BLD_PATH)/\$(1)/u-boot-nodtb.bin \$(DEPLOYDIR)/u-boot-nodtb\$(foreach soc,${STM32MP_SOC_NAME},\$(if \$(shell echo \$(dt) | grep -c \$(soc)),-\$(soc),)).bin ; \\
|
||||
cp -f \$(BLD_PATH)/\$(1)/u-boot-nodtb.bin \$(DEPLOYDIR)/u-boot-nodtb\$(strip \$(foreach soc,${STM32MP_SOC_NAME},\$(if \$(findstring \$(soc),\$(dt)),-\$(soc),))).bin ; \\
|
||||
fi ; \\
|
||||
if [ -f \$(BLD_PATH)/\$(1)/${UBOOT_ELF} ]; then \\
|
||||
cp -f \$(BLD_PATH)/\$(1)/${UBOOT_ELF} \$(DEPLOYDIR)/debug/u-boot\$(foreach soc,${STM32MP_SOC_NAME},\$(if \$(shell echo \$(dt) | grep -c \$(soc)),-\$(soc),))-\$(2).${UBOOT_ELF_SUFFIX} ; \\
|
||||
cp -f \$(BLD_PATH)/\$(1)/${UBOOT_ELF} \$(DEPLOYDIR)/debug/u-boot\$(strip \$(foreach soc,${STM32MP_SOC_NAME},\$(if \$(findstring \$(soc),\$(dt)),-\$(soc),)))-\$(2).${UBOOT_ELF_SUFFIX} ; \\
|
||||
fi ; \\
|
||||
if [ -f \$(BLD_PATH)/\$(1)/${SPL_ELF} ]; then \\
|
||||
cp -f \$(BLD_PATH)/\$(1)/${SPL_ELF} \$(DEPLOYDIR)/debug/${SPL_ELF_NAME}\$(foreach soc,${STM32MP_SOC_NAME},\$(if \$(shell echo \$(dt) | grep -c \$(soc)),-\$(soc),))-\$(2) ; \\
|
||||
cp -f \$(BLD_PATH)/\$(1)/${SPL_ELF} \$(DEPLOYDIR)/debug/${SPL_ELF_NAME}\$(strip \$(foreach soc,${STM32MP_SOC_NAME},\$(if \$(findstring \$(soc),\$(dt)),-\$(soc),)))-\$(2) ; \\
|
||||
fi ; \\
|
||||
)
|
||||
endef
|
||||
@@ -133,6 +137,12 @@ deploy-targets := \$(foreach config, \$(if \$(UBOOT_CONFIG),\$(UBOOT_CONFIG),\$(
|
||||
\$(foreach defconfig, \$(if \$(UBOOT_DEFCONFIG),\$(UBOOT_DEFCONFIG),\$(UBOOT_DEFCONFIG_\$(config))), deploy-\$(defconfig)-\$(config)) \\
|
||||
)
|
||||
|
||||
# Set dependencies list for building all
|
||||
DEPS = \$(deploy-targets)
|
||||
ifeq (\$(ENABLE_FIP), 1)
|
||||
DEPS += fip
|
||||
endif
|
||||
|
||||
help:
|
||||
@echo
|
||||
@echo "U-Boot configuration:"
|
||||
@@ -161,7 +171,7 @@ endif
|
||||
@echo " fip : build FIP binaries"
|
||||
@echo " clean : clean build directories from generated files"
|
||||
|
||||
all: \$(deploy-targets) \$(if \$(ENABLE_FIP),fip)
|
||||
all: \$(DEPS)
|
||||
|
||||
clean:
|
||||
@for config in \$(UBOOT_CONFIGS); do \\
|
||||
@@ -174,7 +184,7 @@ clean:
|
||||
@echo
|
||||
|
||||
fip: \$(deploy-targets)
|
||||
FIP_DEPLOYDIR_UBOOT=\$(DEPLOYDIR) FIP_DEVICETREE="\$(DEVICE_TREE)" fiptool-stm32mp
|
||||
FIP_DEPLOYDIR_UBOOT=\$(DEPLOYDIR) FIP_DEVICETREE="\$(DEVICETREE)" fiptool-stm32mp
|
||||
|
||||
version:
|
||||
@if test ! -e \$(SRC_PATH)/.scmversion ; then echo \$(UBOOT_LOCALVERSION) > \$(SRC_PATH)/.scmversion; fi
|
||||
@@ -184,7 +194,8 @@ version:
|
||||
\$(foreach defconfig, \$(if \$(UBOOT_DEFCONFIG),\$(UBOOT_DEFCONFIG),\$(UBOOT_DEFCONFIG_\$(config))), \$(eval \$(call configure-rules,\$(defconfig),\$(config)))))
|
||||
# Set U-Boot make rules
|
||||
\$(foreach config, \$(if \$(UBOOT_CONFIG),\$(UBOOT_CONFIG),\$(UBOOT_CONFIGS)), \\
|
||||
\$(foreach defconfig, \$(if \$(UBOOT_DEFCONFIG),\$(UBOOT_DEFCONFIG),\$(UBOOT_DEFCONFIG_\$(config))), \$(eval \$(call uboot-rules,\$(defconfig),\$(config)))))
|
||||
\$(foreach defconfig, \$(if \$(UBOOT_DEFCONFIG),\$(UBOOT_DEFCONFIG),\$(UBOOT_DEFCONFIG_\$(config))), \\
|
||||
\$(eval \$(call uboot-rules,\$(defconfig),\$(config),\$(if \$(UBOOT_BINARY),\$(UBOOT_BINARY),\$(UBOOT_BINARY_\$(defconfig)))))))
|
||||
# Set U-Boot deploy rules
|
||||
\$(foreach config, \$(if \$(UBOOT_CONFIG),\$(UBOOT_CONFIG),\$(UBOOT_CONFIGS)), \\
|
||||
\$(foreach defconfig, \$(if \$(UBOOT_DEFCONFIG),\$(UBOOT_DEFCONFIG),\$(UBOOT_DEFCONFIG_\$(config))), \\
|
||||
|
||||
@@ -24,8 +24,15 @@ SRC_URI += "\
|
||||
file://0099-Add-external-var-to-allow-build-of-new-devicetree-fi.patch \
|
||||
"
|
||||
|
||||
U_BOOT_VERSION = "2020.10"
|
||||
PV = "${U_BOOT_VERSION}.r1"
|
||||
U_BOOT_VERSION = "v2020.10"
|
||||
U_BOOT_SUBVERSION = "stm32mp"
|
||||
U_BOOT_RELEASE = "r1"
|
||||
PV = "${U_BOOT_VERSION}-${U_BOOT_SUBVERSION}-${U_BOOT_RELEASE}"
|
||||
|
||||
ARCHIVER_ST_BRANCH = "${U_BOOT_VERSION}-${U_BOOT_SUBVERSION}"
|
||||
ARCHIVER_ST_REVISION = "${PV}"
|
||||
ARCHIVER_COMMUNITY_BRANCH = "master"
|
||||
ARCHIVER_COMMUNITY_REVISION = "${U_BOOT_VERSION}"
|
||||
|
||||
S = "${WORKDIR}/git"
|
||||
|
||||
@@ -34,7 +41,7 @@ S = "${WORKDIR}/git"
|
||||
# ---------------------------------
|
||||
BBCLASSEXTEND = "devupstream:target"
|
||||
|
||||
SRC_URI_class-devupstream = "git://github.com/STMicroelectronics/u-boot.git;protocol=https;branch=v${U_BOOT_VERSION}-stm32mp"
|
||||
SRC_URI_class-devupstream = "git://github.com/STMicroelectronics/u-boot.git;protocol=https;branch=${ARCHIVER_ST_BRANCH}"
|
||||
SRCREV_class-devupstream = "d2c99cb7e5b7dc74236f67fcced156956155cd71"
|
||||
|
||||
# ---------------------------------
|
||||
|
||||
@@ -63,11 +63,11 @@ you have 3 solutions to use git
|
||||
4.1 Get STMicroelectronics U-Boot source from GitHub
|
||||
|
||||
URL: https://github.com/STMicroelectronics/u-boot.git
|
||||
Branch: v##PV##-stm32mp
|
||||
Revision: v##PV##-stm32mp-##PR##
|
||||
Branch: ##ARCHIVER_ST_BRANCH##
|
||||
Revision: ##ARCHIVER_ST_REVISION##
|
||||
|
||||
$ git clone https://github.com/STMicroelectronics/u-boot.git
|
||||
$ git checkout -b WORKING v##PV##-stm32mp-##PR##
|
||||
$ git checkout -b WORKING ##ARCHIVER_ST_REVISION##
|
||||
|
||||
4.2 Create Git from tarball
|
||||
|
||||
@@ -80,15 +80,15 @@ you have 3 solutions to use git
|
||||
4.3 Get Git from community and apply STMicroelectronics patches
|
||||
|
||||
URL: git://git.denx.de/u-boot.git
|
||||
Branch: master
|
||||
Revision: v##PV##
|
||||
Branch: ##ARCHIVER_COMMUNITY_BRANCH##
|
||||
Revision: ##ARCHIVER_COMMUNITY_REVISION##
|
||||
|
||||
$ git clone git://git.denx.de/u-boot.git
|
||||
or
|
||||
$ git clone http://git.denx.de/u-boot.git
|
||||
|
||||
$ cd u-boot
|
||||
$ git checkout -b WORKING v##PV##
|
||||
$ git checkout -b WORKING ##ARCHIVER_COMMUNITY_REVISION##
|
||||
$ for p in `ls -1 ../*.patch`; do git am $p; done
|
||||
|
||||
5. Compilation U-Boot source code:
|
||||
@@ -141,7 +141,7 @@ The generated FIP images are available in $FIP_DEPLOYDIR_ROOT/fip
|
||||
|
||||
You can override the default U-Boot configuration if you specify these variables:
|
||||
- Compile default U-Boot configuration but applying specific devicetree(s):
|
||||
$ make -f $PWD/../Makefile.sdk all UBOOT_DEVICETREE="<devicetree1> <devicetree2>"
|
||||
$ make -f $PWD/../Makefile.sdk all DEVICETREE="<devicetree1> <devicetree2>"
|
||||
- Compile for a specific U-Boot configuration:
|
||||
$ make -f $PWD/../Makefile.sdk all UBOOT_CONFIG=trusted UBOOT_DEFCONFIG=stm32mp15_trusted_defconfig UBOOT_BINARY=u-boot.dtb DEVICETREE=stm32mp157f-dk2
|
||||
|
||||
|
||||
Reference in new issue
Block a user