mirror of
https://git.yoctoproject.org/meta-ti
synced 2026-03-10 14:01:46 +00:00
To reserve contiguous memory for CMEM: * include the "recipes-kernel/linux/cmem.inc" * Set CMEM_BASE and CMEM_SIZE to the physical memory address and size, respectively, to reserve for CMEM. Currently limited to reserving a single memory region used to create a single buffer pool of a single buffer. Signed-off-by: Jacob Stiffler <j-stiffler@ti.com> Signed-off-by: Denys Dmytriyenko <denys@ti.com>
24 lines
613 B
PHP
24 lines
613 B
PHP
SRC_URI += "file://cmem.dtsi"
|
|
|
|
CMEM_BASE ?= ""
|
|
CMEM_SIZE ?= ""
|
|
|
|
do_setup_cmem() {
|
|
if [ ! -z "${CMEM_BASE}" ]
|
|
then
|
|
cp ${WORKDIR}/cmem.dtsi ${S}/arch/arm/boot/dts/${MACHINE}-cmem.dtsi
|
|
|
|
sed -i -e "s|__CMEM_BASE__|${CMEM_BASE}|g" \
|
|
-e "s|__CMEM_SIZE__|${CMEM_SIZE}|g" \
|
|
${S}/arch/arm/boot/dts/${MACHINE}-cmem.dtsi
|
|
|
|
for dtb in ${KERNEL_DEVICETREE}
|
|
do
|
|
dts=`echo $dtb | sed -e 's|dtb$|dts|'`
|
|
echo "#include \"${MACHINE}-cmem.dtsi\"" >> ${S}/arch/arm/boot/dts/$dts
|
|
done
|
|
fi
|
|
}
|
|
|
|
do_patch[postfuncs] += "do_setup_cmem"
|