ARCHIVER: Update for fip build and release information
Change-Id: I8ddd8c61ff7488ce40f87a160f603de32425386a
This commit is contained in:
parent
cc43f8cd6e
commit
fef27aed02
|
|
@ -27,6 +27,7 @@ python archiver_clean_tarball() {
|
|||
do_ar_original[postfuncs] =+ "archiver_clean_tarball"
|
||||
|
||||
ARCHIVER_README = "README.HOW_TO.txt"
|
||||
|
||||
archiver_git_uri() {
|
||||
ret=`echo "${SRC_URI}" | grep branch | wc -l`
|
||||
if [ $ret -gt 0 ]; then
|
||||
|
|
@ -35,7 +36,14 @@ archiver_git_uri() {
|
|||
BRANCH=master
|
||||
fi
|
||||
|
||||
sed -i -e "s|##GIT_BRANCH##|$BRANCH|g" -e "s|##GIT_SRCREV##|${SRCREV}|g" -e "s|##BP##|${BP}|g" -e "s|##PV##|${PV}|g" -e "s|##PR##|${PR}|g" ${ARCHIVER_OUTDIR}/${ARCHIVER_README}
|
||||
if [ -z "${ARCHIVER_ST_BRANCH}" ]; then
|
||||
ARCHIVER_ST_BRANCH="${BRANCH}"
|
||||
fi
|
||||
if [ -z "${ARCHIVER_ST_REVISION}" ]; then
|
||||
ARCHIVER_ST_REVISION="${SRCREV}"
|
||||
fi
|
||||
|
||||
sed -i -e "s|##LINUX_TARNAME##|${LINUX_TARNAME}|g" -e "s|##ARCHIVER_COMMUNITY_BRANCH##|${ARCHIVER_COMMUNITY_BRANCH}|g" -e "s|##ARCHIVER_COMMUNITY_REVISION##|${ARCHIVER_COMMUNITY_REVISION}|g" -e "s|##ARCHIVER_ST_BRANCH##|${ARCHIVER_ST_BRANCH}|g" -e "s|##ARCHIVER_ST_REVISION##|${ARCHIVER_ST_REVISION}|g" -e "s|##BP##|${BP}|g" -e "s|##PV##|${PV}|g" -e "s|##PR##|${PR}|g" ${ARCHIVER_OUTDIR}/${ARCHIVER_README}
|
||||
}
|
||||
do_ar_original[postfuncs] =+ "archiver_git_uri"
|
||||
|
||||
|
|
|
|||
|
|
@ -27,7 +27,11 @@ TF_A_ENABLE_DEBUG_WRAPPER ?= ${TF_A_ENABLE_DEBUG_WRAPPER}
|
|||
ENABLE_FIP ?= ${@bb.utils.contains('MACHINE_FEATURES', 'fip', '1', '', d)}
|
||||
|
||||
# Set default TF-A config
|
||||
ifeq (\$(ENABLE_FIP), 1)
|
||||
TF_A_CONFIG ?= ${TF_A_CONFIG}
|
||||
else
|
||||
TF_A_CONFIG ?= ${BOOTSCHEME_LABELS} ${TF_A_CONFIG_4LEGACY}
|
||||
endif
|
||||
|
||||
# Default TF-A overall settings to null
|
||||
TF_A_BINARY ?=
|
||||
|
|
@ -35,6 +39,8 @@ TF_A_DEVICETREE ?=
|
|||
TF_A_MAKE_TARGET ?=
|
||||
TF_A_EXTRA_OPTFLAGS ?=
|
||||
|
||||
ifeq (\$(ENABLE_FIP), 1)
|
||||
|
||||
EOF
|
||||
unset i
|
||||
for config in ${TF_A_CONFIG}; do
|
||||
|
|
@ -49,6 +55,46 @@ TF_A_MAKE_TARGET_$config ?= $(echo ${TF_A_MAKE_TARGET} | cut -d',' -f${i})
|
|||
EOF
|
||||
done
|
||||
cat << EOF >> ${ARCHIVER_OUTDIR}/Makefile.sdk
|
||||
else
|
||||
|
||||
EOF
|
||||
for bootscheme in ${BOOTSCHEME_LABELS}; do
|
||||
unset i
|
||||
for config in ${TF_A_CONFIG}; do
|
||||
i=$(expr $i + 1)
|
||||
if [ "$bootscheme" = "$config" ]; then
|
||||
cat << EOF >> ${ARCHIVER_OUTDIR}/Makefile.sdk
|
||||
# Init default config settings
|
||||
TF_A_DEVICETREE_$config ?= $(echo ${TF_A_DEVICETREE} | cut -d',' -f${i})
|
||||
TF_A_EXTRA_OPTFLAGS_$config ?= $(echo ${TF_A_EXTRA_OPTFLAGS} | cut -d',' -f${i}) ${TF_A_EXTRACONF_LEGACY}
|
||||
TF_A_BINARY_$config ?= $(echo ${TF_A_BINARIES} | cut -d',' -f${i})
|
||||
TF_A_MAKE_TARGET_$config ?=
|
||||
|
||||
EOF
|
||||
fi
|
||||
done
|
||||
done
|
||||
|
||||
cat << EOF >> ${ARCHIVER_OUTDIR}/Makefile.sdk
|
||||
TF_A_DEVICETREE_$(echo ${TF_A_CONFIG_4LEGACY} | xargs) ?=
|
||||
TF_A_EXTRA_OPTFLAGS_$(echo ${TF_A_CONFIG_4LEGACY} | xargs) ?=
|
||||
TF_A_BINARY_$(echo ${TF_A_CONFIG_4LEGACY} | xargs) ?=
|
||||
TF_A_MAKE_TARGET_$(echo ${TF_A_CONFIG_4LEGACY} | xargs) ?=
|
||||
|
||||
ifeq (\$(TF_A_DEVICETREE_$(echo ${TF_A_CONFIG_4LEGACY} | xargs)),)
|
||||
\$(error "Please, define the variable TF_A_DEVICETREE_$(echo ${TF_A_CONFIG_4LEGACY} | xargs)")
|
||||
endif
|
||||
|
||||
ifeq (\$(TF_A_EXTRA_OPTFLAGS_$(echo ${TF_A_CONFIG_4LEGACY} | xargs)),)
|
||||
\$(error "Please, define the variable TF_A_EXTRA_OPTFLAGS_$(echo ${TF_A_CONFIG_4LEGACY} | xargs)")
|
||||
endif
|
||||
|
||||
ifeq (\$(TF_A_BINARY_$(echo ${TF_A_CONFIG_4LEGACY} | xargs)),)
|
||||
\$(error "Please, define the variable TF_A_BINARY_$(echo ${TF_A_CONFIG_4LEGACY} | xargs)")
|
||||
endif
|
||||
|
||||
endif
|
||||
|
||||
# Reset default variables
|
||||
LDFLAGS =
|
||||
CFLAGS =
|
||||
|
|
@ -84,7 +130,7 @@ tf-\$(1): \$2
|
|||
DTB_FILE_NAME=\$(dt).dtb \\
|
||||
\$(if \$(TF_A_EXTRA_OPTFLAGS),\$(TF_A_EXTRA_OPTFLAGS),\$(TF_A_EXTRA_OPTFLAGS_\$(1))) \\
|
||||
\$(if \$(TF_A_MAKE_TARGET),\$(TF_A_MAKE_TARGET),\$(TF_A_MAKE_TARGET_\$(1))) \\
|
||||
\$(foreach soc,${STM32MP_SOC_NAME},\$(if \$(shell echo \$(dt) | grep -c \$(soc)),\$(shell echo \$(soc) | tr a-z A-Z)=1,)) ; \\
|
||||
\$(foreach soc,${STM32MP_SOC_NAME},\$(if \$(findstring \$(soc),\$(dt)),\$(shell echo \$(soc) | tr a-z A-Z)=1,)) ; \\
|
||||
)
|
||||
endef
|
||||
|
||||
|
|
@ -102,13 +148,13 @@ deploy-\$(1): tf-\$(1)
|
|||
fi ; \\
|
||||
if [ -f \$(BLD_PATH)/\$(1)/${BL32_BASENAME}.${BL32_SUFFIX} ] ; then \\
|
||||
mkdir -p \$(BL32_DEPLOYDIR) ; \\
|
||||
cp -f \$(BLD_PATH)/\$(1)/${BL32_BASENAME}.${BL32_SUFFIX} \$(BL32_DEPLOYDIR)/\$(2)-${BL32_BASENAME}\$(foreach soc,${STM32MP_SOC_NAME},\$(if \$(shell echo \$(dt) | grep -c \$(soc)),-\$(soc),)).${BL32_SUFFIX} ; \\
|
||||
cp -f \$(BLD_PATH)/\$(1)/${BL32_BASENAME}.${BL32_SUFFIX} \$(BL32_DEPLOYDIR)/\$(2)-${BL32_BASENAME}\$(strip \$(foreach soc,${STM32MP_SOC_NAME},\$(if \$(findstring \$(soc),\$(dt)),-\$(soc),))).${BL32_SUFFIX} ; \\
|
||||
if [ -f \$(BLD_PATH)/\$(1)/fdts/\$(dt)-${BL32_BASENAME}.${DT_SUFFIX} ]; then \\
|
||||
cp -f \$(BLD_PATH)/\$(1)/fdts/\$(dt)-${BL32_BASENAME}.${DT_SUFFIX} \$(BL32_DEPLOYDIR)/ ; \\
|
||||
fi ; \\
|
||||
if [ -f \$(BLD_PATH)/\$(1)/${BL32_ELF} ]; then \\
|
||||
mkdir -p \$(BL32_DEPLOYDIR)/debug ; \\
|
||||
mv -f \$(BLD_PATH)/\$(1)/${BL32_ELF} \$(BL32_DEPLOYDIR)/debug/\$(2)-${BL32_BASENAME}\$(foreach soc,${STM32MP_SOC_NAME},\$(if \$(shell echo \$(dt) | grep -c \$(soc)),-\$(soc),)).${TF_A_ELF_SUFFIX} ; \\
|
||||
mv -f \$(BLD_PATH)/\$(1)/${BL32_ELF} \$(BL32_DEPLOYDIR)/debug/\$(2)-${BL32_BASENAME}\$(strip \$(foreach soc,${STM32MP_SOC_NAME},\$(if \$(findstring \$(soc),\$(dt)),-\$(soc),))).${TF_A_ELF_SUFFIX} ; \\
|
||||
fi ; \\
|
||||
fi ; \\
|
||||
if [ -f \$(BLD_PATH)/\$(1)/fdts/\$(dt)-${FWCONFIG_NAME}.${DT_SUFFIX} ]; then \\
|
||||
|
|
@ -124,6 +170,12 @@ deploy-\$(1): tf-\$(1)
|
|||
)
|
||||
endef
|
||||
|
||||
# Set dependencies list for building all
|
||||
DEPS = \$(addprefix deploy-,\$(TF_A_CONFIG))
|
||||
ifeq (\$(ENABLE_FIP), 1)
|
||||
DEPS += fip
|
||||
endif
|
||||
|
||||
help:
|
||||
@echo
|
||||
@echo "TF-A configuration:"
|
||||
|
|
@ -160,7 +212,7 @@ endif
|
|||
@echo " clean : clean build directories from generated files"
|
||||
@echo
|
||||
|
||||
all: \$(addprefix deploy-,\$(TF_A_CONFIG)) \$(if \$(ENABLE_FIP),fip)
|
||||
all: \$(DEPS)
|
||||
|
||||
host_tools:
|
||||
@\$(MAKE) --no-print-directory -C \$(SRC_PATH)/tools/stm32image
|
||||
|
|
|
|||
|
|
@ -47,20 +47,32 @@ git management on the code see section 4 [Management of tf-a source code]
|
|||
4. Management of tf-a source code:
|
||||
-----------------------------------
|
||||
If you like to have a better management of change made on tf-a source, you
|
||||
can use git:
|
||||
have 3 solutions to use git:
|
||||
|
||||
4.1 Get STMicroelectronics TF-A source from GitHub
|
||||
|
||||
URL: https://github.com/STMicroelectronics/arm-trusted-firmware.git
|
||||
Branch: ##ARCHIVER_ST_BRANCH##
|
||||
Revision: ##ARCHIVER_ST_REVISION##
|
||||
|
||||
$ git clone https://github.com/STMicroelectronics/arm-trusted-firmware.git
|
||||
$ git checkout -b WORKING ##ARCHIVER_ST_REVISION##
|
||||
|
||||
4.2 Create Git from tarball
|
||||
$ cd <directory to tf-a source code>
|
||||
$ test -d .git || git init . && git add . && git commit -m "tf-a source code" && git gc
|
||||
$ git checkout -b WORKING
|
||||
$ for p in `ls -1 <path to patch>/*.patch`; do git am $p; done
|
||||
|
||||
NB: you can use directly the source from the community:
|
||||
URL: git://github.com/ARM-software/arm-trusted-firmware.git
|
||||
Branch: ##GIT_BRANCH##
|
||||
Revision: ##GIT_SRCREV##
|
||||
4.3 Get Git from community and apply STMicroelectronics patches
|
||||
|
||||
$ git clone git://github.com/ARM-software/arm-trusted-firmware.git -b ##GIT_BRANCH##
|
||||
URL: git://github.com/ARM-software/arm-trusted-firmware.git
|
||||
Branch: ##ARCHIVER_COMMUNITY_BRANCH##
|
||||
Revision: ##ARCHIVER_COMMUNITY_REVISION##
|
||||
|
||||
$ git clone git://github.com/ARM-software/arm-trusted-firmware.git
|
||||
$ cd <directory to tf-a source code>
|
||||
$ git checkout -b WORKING ##GIT_SRCREV##
|
||||
$ git checkout -b WORKING ##ARCHIVER_COMMUNITY_REVISION##
|
||||
$ for p in `ls -1 <path to patch>/*.patch`; do git am $p; done
|
||||
|
||||
5. Build tf-a source code:
|
||||
|
|
@ -72,9 +84,9 @@ Since OpenSTLinux has activated FIP by default, so the FIP_artifacts should be s
|
|||
To compile tf-a source code
|
||||
$> make -f $PWD/../Makefile.sdk all
|
||||
or for a specific config :
|
||||
$ make -f $PWD/../Makefile.sdk TFA_DEVICETREE=stm32mp157c-ev1 TF_A_CONFIG=trusted ELF_DEBUG_ENABLE='1' all
|
||||
$ make -f $PWD/../Makefile.sdk TF_A_DEVICETREE=stm32mp157c-ev1 TF_A_CONFIG=trusted ELF_DEBUG_ENABLE='1' all
|
||||
|
||||
NB: TFA_DEVICETREE flag must be set to switch to correct board configuration.
|
||||
NB: TF_A_DEVICETREE flag must be set to switch to correct board configuration.
|
||||
|
||||
The generated FIP images are available in $FIP_DEPLOYDIR_ROOT/fip
|
||||
|
||||
|
|
|
|||
|
|
@ -16,8 +16,15 @@ SRC_URI += " \
|
|||
file://0001-st-update-v2.4-r1.0.0.patch \
|
||||
"
|
||||
|
||||
TF_VERSION = "2.4"
|
||||
PV = "${TF_VERSION}.r1"
|
||||
TF_A_VERSION = "v2.4"
|
||||
TF_A_SUBVERSION = "stm32mp"
|
||||
TF_A_RELEASE = "r1"
|
||||
PV = "${TF_A_VERSION}-${TF_A_SUBVERSION}-${TF_A_RELEASE}"
|
||||
|
||||
ARCHIVER_ST_BRANCH = "${TF_A_VERSION}-${TF_A_SUBVERSION}"
|
||||
ARCHIVER_ST_REVISION = "${PV}"
|
||||
ARCHIVER_COMMUNITY_BRANCH = "master"
|
||||
ARCHIVER_COMMUNITY_REVISION = "${TF_A_VERSION}"
|
||||
|
||||
S = "${WORKDIR}/git"
|
||||
|
||||
|
|
@ -39,7 +46,7 @@ include ${@oe.utils.ifelse(d.getVar('ST_ARCHIVER_ENABLE') == '1', 'tf-a-stm32mp-
|
|||
# ---------------------------------
|
||||
BBCLASSEXTEND = "devupstream:target"
|
||||
|
||||
SRC_URI_class-devupstream = "git://github.com/STMicroelectronics/arm-trusted-firmware.git;protocol=https;branch=v${TF_VERSION}-stm32mp"
|
||||
SRC_URI_class-devupstream = "git://github.com/STMicroelectronics/arm-trusted-firmware.git;protocol=https;branch=${ARCHIVER_ST_BRANCH}"
|
||||
SRCREV_class-devupstream = "40572e4067f205691a4dca3b5fdabe3a40c69594"
|
||||
|
||||
# ---------------------------------
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -49,9 +49,9 @@ sourced the SDK environment.
|
|||
-------------------------
|
||||
If you have the tarball and the list of patches, then you must extract the
|
||||
tarball and apply the patches.
|
||||
$> tar xfJ linux-##PV##.tar.xz
|
||||
$> tar xfJ ##LINUX_TARNAME##.tar.xz
|
||||
A new directory containing kernel standard source code will be created, go into it:
|
||||
$> cd linux-##PV##
|
||||
$> cd ##LINUX_TARNAME##
|
||||
|
||||
NB: if you like to have a git management of the code, see section 4 [Manage the
|
||||
kernel source code]
|
||||
|
|
@ -60,10 +60,20 @@ kernel source code]
|
|||
|
||||
4. Manage the kernel source code:
|
||||
---------------------------------
|
||||
4.1 Setup kernel source code under git
|
||||
--------------------------------------
|
||||
If you like to have a better management of change made on kernel source, you can
|
||||
use git.
|
||||
If you like to have a better management of change made on kernel source, you
|
||||
have 3 solutions to use git.
|
||||
|
||||
4.1 Get STMicroelectronics kernel source code from GitHub
|
||||
|
||||
|
||||
URL: https://github.com/STMicroelectronics/linux.git
|
||||
Branch: ##ARCHIVER_ST_BRANCH##
|
||||
Revision: ##ARCHIVER_ST_REVISION##
|
||||
|
||||
$ git clone https://github.com/STMicroelectronics/linux.git
|
||||
$ git checkout -b WORKING ##ARCHIVER_ST_REVISION##
|
||||
|
||||
4.2 Create Git from tarball
|
||||
|
||||
* With the kernel source code extracted in the section 3 [Prepare kernel source]
|
||||
$ cd <directory to kernel source code>
|
||||
|
|
@ -73,16 +83,16 @@ use git.
|
|||
$ for p in `ls -1 <path to patch>/*.patch`; do git am $p; done
|
||||
NB: this is the fastest way to get your kernel source code ready for development
|
||||
|
||||
Or
|
||||
4.3 Get Git from community and apply STMicroelectronics patches
|
||||
|
||||
* With the kernel source code from the Linux kernel git repositories:
|
||||
URL: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git
|
||||
Branch: ##GIT_BRANCH##
|
||||
Revision: ##GIT_SRCREV##
|
||||
Branch: ##ARCHIVER_COMMUNITY_BRANCH##
|
||||
Revision: ##ARCHIVER_COMMUNITY_REVISION##
|
||||
|
||||
$ git clone https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git
|
||||
$ cd <kernel source>
|
||||
$ git checkout -b WORKING ##GIT_SRCREV##
|
||||
$ git checkout -b WORKING ##ARCHIVER_COMMUNITY_REVISION##
|
||||
$ for p in `ls -1 <path to patch>/*.patch`; do git am $p; done
|
||||
NB: this way is slightly slower than the tarball extraction but you get
|
||||
advantage of all git history.
|
||||
|
|
|
|||
|
|
@ -8,7 +8,8 @@ include linux-stm32mp.inc
|
|||
|
||||
LINUX_VERSION = "5.10"
|
||||
LINUX_SUBVERSION = "10"
|
||||
SRC_URI = "https://cdn.kernel.org/pub/linux/kernel/v5.x/linux-${LINUX_VERSION}.${LINUX_SUBVERSION}.tar.xz;name=kernel"
|
||||
LINUX_TARNAME = "linux-${LINUX_VERSION}.${LINUX_SUBVERSION}"
|
||||
SRC_URI = "https://cdn.kernel.org/pub/linux/kernel/v5.x/${LINUX_TARNAME}.tar.xz;name=kernel"
|
||||
#SRC_URI = "https://git.kernel.org/torvalds/t/linux-${LINUX_VERSION}-${LINUX_SUBVERSION}.tar.gz;name=kernel"
|
||||
|
||||
SRC_URI[kernel.sha256sum] = "60ed866fa951522a5255ea37ec3ac2006d3f3427d4783a13ef478464f37cdb19"
|
||||
|
|
@ -38,18 +39,24 @@ SRC_URI += " \
|
|||
file://${LINUX_VERSION}/${LINUX_VERSION}.${LINUX_SUBVERSION}/0022-ARM-5.10.10-stm32mp1-r1-CONFIG.patch \
|
||||
"
|
||||
|
||||
PV = "${LINUX_VERSION}.${LINUX_SUBVERSION}"
|
||||
LINUX_TARGET = "stm32mp"
|
||||
LINUX_RELEASE = "r1"
|
||||
|
||||
PV = "${LINUX_VERSION}.${LINUX_SUBVERSION}-${LINUX_TARGET}-${LINUX_RELEASE}"
|
||||
|
||||
ARCHIVER_ST_BRANCH = "v${LINUX_VERSION}-${LINUX_TARGET}"
|
||||
ARCHIVER_ST_REVISION = "v${LINUX_VERSION}-${LINUX_TARGET}-${LINUX_RELEASE}"
|
||||
ARCHIVER_COMMUNITY_BRANCH = "linux-${LINUX_VERSION}.y"
|
||||
ARCHIVER_COMMUNITY_REVISION = "v${LINUX_VERSION}.${LINUX_SUBVERSION}"
|
||||
|
||||
S = "${WORKDIR}/linux-${LINUX_VERSION}.${LINUX_SUBVERSION}"
|
||||
#S = "${WORKDIR}/linux-${LINUX_VERSION}-${LINUX_SUBVERSION}"
|
||||
#S = "${WORKDIR}/linux-${LINUX_VERSION}"
|
||||
|
||||
# ---------------------------------
|
||||
# Configure devupstream class usage
|
||||
# ---------------------------------
|
||||
BBCLASSEXTEND = "devupstream:target"
|
||||
|
||||
SRC_URI_class-devupstream = "git://github.com/STMicroelectronics/linux.git;protocol=https;branch=v${LINUX_VERSION}-stm32mp"
|
||||
SRC_URI_class-devupstream = "git://github.com/STMicroelectronics/linux.git;protocol=https;branch=${ARCHIVER_ST_BRANCH}"
|
||||
SRCREV_class-devupstream = "ce6891abb1c895d4849e6f784615687341b3dbde"
|
||||
|
||||
# ---------------------------------
|
||||
|
|
|
|||
|
|
@ -30,10 +30,22 @@ CFLAGS =
|
|||
CPPFLAGS =
|
||||
# Define default make options
|
||||
EXTRA_OEMAKE = $(echo "${EXTRA_OEMAKE}" | sed "s|LIBGCC_LOCATE_CFLAGS=[^ ]* |LIBGCC_LOCATE_CFLAGS=\$(KCFLAGS) |;s|comp-cflagscore='[^']*'|comp-cflagscore='\$(KCFLAGS)'|")
|
||||
EXTRA_OEMAKE += \$(if \$(ENABLE_FIP),,CFG_STM32MP15x_STM32IMAGE=y)
|
||||
ifeq (\$(ENABLE_FIP), 0)
|
||||
EXTRA_OEMAKE += CFG_STM32MP15x_STM32IMAGE=y
|
||||
endif
|
||||
|
||||
# Configure default optee-os features
|
||||
OPTEE_SUFFIX ?= \$(if \$(ENABLE_FIP),bin,stm32)
|
||||
ifeq (\$(ENABLE_FIP), 1)
|
||||
OPTEE_SUFFIX ?= bin
|
||||
else
|
||||
OPTEE_SUFFIX ?= stm32
|
||||
endif
|
||||
|
||||
# Set dependencies list for building all
|
||||
DEPS = optee
|
||||
ifeq (\$(ENABLE_FIP), 1)
|
||||
DEPS += fip
|
||||
endif
|
||||
|
||||
help:
|
||||
@echo
|
||||
|
|
@ -56,7 +68,7 @@ endif
|
|||
@echo " clean : clean build directories from generated files"
|
||||
@echo
|
||||
|
||||
all: optee \$(if \$(ENABLE_FIP),fip)
|
||||
all: \$(DEPS)
|
||||
|
||||
optee:
|
||||
@mkdir -p \$(DEPLOYDIR)
|
||||
|
|
|
|||
|
|
@ -10,7 +10,15 @@ SRC_URI += " \
|
|||
"
|
||||
|
||||
OPTEE_VERSION = "3.12.0"
|
||||
PV = "${OPTEE_VERSION}.r1"
|
||||
OPTEE_SUBVERSION = "stm32mp"
|
||||
OPTEE_RELEASE = "r1"
|
||||
|
||||
PV = "${OPTEE_VERSION}-${OPTEE_SUBVERSION}-${OPTEE_RELEASE}"
|
||||
|
||||
ARCHIVER_ST_BRANCH = "${OPTEE_VERSION}-${OPTEE_SUBVERSION}"
|
||||
ARCHIVER_ST_REVISION = "${PV}"
|
||||
ARCHIVER_COMMUNITY_BRANCH = "master"
|
||||
ARCHIVER_COMMUNITY_REVISION = "${OPTEE_VERSION}"
|
||||
|
||||
S = "${WORKDIR}/git"
|
||||
|
||||
|
|
@ -38,7 +46,7 @@ include ${@oe.utils.ifelse(d.getVar('ST_ARCHIVER_ENABLE') == '1', 'optee-os-stm3
|
|||
# ---------------------------------
|
||||
BBCLASSEXTEND = "devupstream:target"
|
||||
|
||||
SRC_URI_class-devupstream = "git://github.com/STMicroelectronics/optee_os.git;protocol=https;branch=${OPTEE_VERSION}-stm32mp"
|
||||
SRC_URI_class-devupstream = "git://github.com/STMicroelectronics/optee_os.git;protocol=https;branch=${ARCHIVER_ST_BRANCH}"
|
||||
SRCREV_class-devupstream = "0bd33404e9581d00514034b7b05a2cbe8649c1fd"
|
||||
|
||||
# ---------------------------------
|
||||
|
|
|
|||
|
|
@ -41,10 +41,20 @@ on the code see section 4 [Management of optee-os source code]
|
|||
|
||||
4. Management of optee-os source code:
|
||||
-----------------------------------
|
||||
If you like to have a better management of change made on optee-os source, you
|
||||
can use git:
|
||||
If you like to have a better management of change made on optee-os source,
|
||||
you have 3 solutions to use git
|
||||
|
||||
4.1 Get STMicroelectronics optee-os source from GitHub
|
||||
URL: https://github.com/STMicroelectronics/optee_os.git
|
||||
Branch: ##ARCHIVER_ST_BRANCH##
|
||||
Revision: ##ARCHIVER_ST_REVISION##
|
||||
|
||||
$ git clone https://github.com/STMicroelectronics/optee_os.git
|
||||
$ git checkout -b WORKING ##ARCHIVER_ST_REVISION##
|
||||
|
||||
4.2 Create Git from tarball
|
||||
$ cd <optee-os source>
|
||||
$ test -d .git || git init . && git add . && git commit -m "optee-ossource code" && git gc
|
||||
$ test -d .git || git init . && git add . && git commit -m "optee-os source code" && git gc
|
||||
$ git checkout -b WORKING
|
||||
$ for p in `ls -1 <path to patch>/*.patch`; do git am $p; done
|
||||
|
||||
|
|
@ -52,14 +62,14 @@ MANDATORY: You must update sources
|
|||
$ cd <directory to optee-os source code>
|
||||
$ chmod 755 scripts/bin_to_c.py
|
||||
|
||||
NB: you can use directly the source from the community:
|
||||
4.3 Get Git from community and apply STMicroelectronics patches
|
||||
URL: git://github.com/OP-TEE/optee_os.git
|
||||
Branch: ##GIT_BRANCH##
|
||||
Revision: ##GIT_SRCREV##
|
||||
Branch: ##ARCHIVER_COMMUNITY_BRANCH##
|
||||
Revision: ##ARCHIVER_COMMUNITY_REVISION##
|
||||
|
||||
$ git clone git://github.com/OP-TEE/optee_os.git
|
||||
$ cd <optee-os source>
|
||||
$ git checkout -b WORKING ##GIT_SRCREV##
|
||||
$ git checkout -b WORKING ##ARCHIVER_COMMUNITY_REVISION##
|
||||
$ for p in `ls -1 <path to patch>/*.patch`; do git am $p; done
|
||||
|
||||
MANDATORY: You must update sources
|
||||
|
|
|
|||
Loading…
Reference in New Issue