Skip to content

Commit

Permalink
LINUX-STM32MP: v6.1-stm32mp-r1
Browse files Browse the repository at this point in the history
Change-Id: If47ceaa7d9ebee4efdaa45957f4101ad0db51e64
Signed-off-by: Romuald Jeanne <[email protected]>
  • Loading branch information
RJESTM committed Jun 28, 2023
1 parent 2bc9a0e commit 931b3f5
Show file tree
Hide file tree
Showing 44 changed files with 36,093 additions and 45,256 deletions.
2 changes: 1 addition & 1 deletion classes/archiver_stm32mp_clean.bbclass
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ archiver_git_uri() {
fi

if [ -e "${ARCHIVER_OUTDIR}/${ARCHIVER_README}" ]; then
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}"
sed -i -e "s|##LINUX_TARNAME##|${LINUX_TARNAME}|g" -e "s|##LINUX_TARBASE##|${LINUX_TARBASE}|g" -e "s|##GCNANO_TARNAME##|${GCNANO_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}"
fi
}
do_ar_original[postfuncs] =+ "archiver_git_uri"
Expand Down
36 changes: 14 additions & 22 deletions recipes-kernel/linux/linux-stm32mp.inc
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
COMPATIBLE_MACHINE = "(stm32mpcommon)"

#for EFI
include ${@bb.utils.contains('MACHINE_FEATURES', 'efi', 'conf/image-uefi.conf', '', d)}
inherit kernel

DEPENDS += "openssl-native util-linux-native libyaml-native"
DEPENDS += "gmp-native libmpc-native"

B = "${WORKDIR}/build"
# Configure build dir for externalsrc class usage through devtool
Expand All @@ -22,18 +23,6 @@ EXTRA_OEMAKE += "${@oe.utils.ifelse(d.getVar('KERNEL_SIGN_ENABLE') == '1', 'INST
# Deploy kernel config file to deploy folder
KERNEL_CONFIG_DEPLOY ??= "0"

# YoctoProject bugzilla : 140044
# There's a race between do_symlink_kernsrc and do_populate_lic, since the latter is ordered "after do_patch";
#
# Below a STMicroelectonics' hacks waiting for official Yocto patch:
# commit already exists in gathesgarth :
#a2b50b74d609ce079ab36b82d4c7c3539fb56485 kernel.bbclass: ensure symlink_kernsrc task gets run even with externalsrc
python () {
bb.build.deltask('do_symlink_kernsrc', d)
bb.build.addtask('do_symlink_kernsrc', 'do_patch do_configure', 'do_unpack', d)
}


# ---------------------------------------------------------------------
# Defconfig
#
Expand Down Expand Up @@ -80,14 +69,6 @@ do_configure:append() {
#oe_runmake -C ${S} O=${B} savedefconfig && cp ${B}/defconfig ${WORKDIR}/defconfig.saved
}

do_compile_kernelmodules:append() {
if (grep -q -i -e '^CONFIG_MODULES=y$' ${B}/.config); then
# 5.10+ kernels have module.lds that we need to copy for external module builds
if [ -e "${B}/scripts/module.lds" ]; then
install -Dm 0644 ${B}/scripts/module.lds ${STAGING_KERNEL_BUILDDIR}/scripts/module.lds
fi
fi
}
# ---------------------------------------------------------------------
do_install:append() {
# Install KERNEL_IMAGETYPE for kernel-imagebootfs package
Expand All @@ -100,12 +81,20 @@ do_install:append() {
#snd dependencies
install -d ${D}/${sysconfdir}/modprobe.d/
echo "softdep snd-soc-cs42l51 pre: snd-soc-cs42l51-i2c" > ${D}/${sysconfdir}/modprobe.d/stm32mp1-snd.conf

# efi
if ${@bb.utils.contains('MACHINE_FEATURES','efi','true','false',d)}; then
install -d ${D}${EFI_FILES_PATH}
install -m 0644 ${KERNEL_OUTPUT_DIR}/${KERNEL_IMAGETYPE} ${D}${EFI_FILES_PATH}/${EFI_BOOT_IMAGE}
install -d ${D}${EFI_PREFIX}/dtb
install -m 0664 ${D}${EFI_PREFIX}/*.dtb ${D}${EFI_PREFIX}/dtb/
fi
}
# ---------------------------------------------------------------------
do_deploy:append() {
if [ ${MODULE_TARBALL_DEPLOY} = "1" ] && (grep -q -i -e '^CONFIG_MODULES=y$' .config); then
mkdir -p ${D}${root_prefix}/lib
tar -cvzf $deployDir/modules-stripped-${MODULE_TARBALL_NAME}.tgz -C ${WORKDIR}/package/${root_prefix} lib
tar -cvzf $deployDir/modules-stripped-${MODULE_TARBALL_NAME}.tgz --exclude='.debug' -C ${WORKDIR}/package/${root_prefix} lib
ln -sf modules-stripped-${MODULE_TARBALL_NAME}.tgz $deployDir/modules-stripped-${MODULE_TARBALL_LINK_NAME}.tgz
fi
if [ ${KERNEL_CONFIG_DEPLOY} = "1" ] && [ -f "${D}/boot/config-${KERNEL_VERSION}" ]; then
Expand Down Expand Up @@ -138,3 +127,6 @@ FILES:${KERNEL_PACKAGE_NAME}-headers = "${exec_prefix}/src/linux*"
FILES:${KERNEL_PACKAGE_NAME}-image += "boot/ ${KERNEL_IMAGEDEST}"
FILES:${KERNEL_PACKAGE_NAME}-imagebootfs = "boot/*.dtb boot/${KERNEL_IMAGETYPE}"
FILES:${KERNEL_PACKAGE_NAME}-modules += "${sysconfdir}/modprobe.d"

PACKAGES =+ "${@bb.utils.contains('MACHINE_FEATURES', 'efi', '${KERNEL_PACKAGE_NAME}-imageefi', '', d)} "
FILES:${KERNEL_PACKAGE_NAME}-imageefi = "${EFI_PREFIX}/dtb/ ${EFI_FILES_PATH}"

This file was deleted.

Loading

0 comments on commit 931b3f5

Please sign in to comment.