mirror of
https://git.yoctoproject.org/poky
synced 2026-09-20 03:49:32 +02:00
linux-dtb.inc: refactor common code to function normalize_dtb
(From OE-Core rev: 5dfa10978ef540a7a8cd89766c40625ccfeffda2) Signed-off-by: Stefan Christ <s.christ@phytec.de> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
7eecb81b6d
commit
af9c7a4c57
@@ -5,22 +5,25 @@ python __anonymous () {
|
|||||||
d.appendVar("PACKAGES", " kernel-devicetree")
|
d.appendVar("PACKAGES", " kernel-devicetree")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
normalize_dtb () {
|
||||||
|
DTB="$1"
|
||||||
|
if echo ${DTB} | grep -q '/dts/'; then
|
||||||
|
bbwarn "${DTB} contains the full path to the the dts file, but only the dtb name should be used."
|
||||||
|
DTB=`basename ${DTB} | sed 's,\.dts$,.dtb,g'`
|
||||||
|
fi
|
||||||
|
echo "${DTB}"
|
||||||
|
}
|
||||||
|
|
||||||
do_compile_append() {
|
do_compile_append() {
|
||||||
for DTB in ${KERNEL_DEVICETREE}; do
|
for DTB in ${KERNEL_DEVICETREE}; do
|
||||||
if echo ${DTB} | grep -q '/dts/'; then
|
DTB=`normalize_dtb "${DTB}"`
|
||||||
bbwarn "${DTB} contains the full path to the the dts file, but only the dtb name should be used."
|
|
||||||
DTB=`basename ${DTB} | sed 's,\.dts$,.dtb,g'`
|
|
||||||
fi
|
|
||||||
oe_runmake ${DTB}
|
oe_runmake ${DTB}
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
do_install_append() {
|
do_install_append() {
|
||||||
for DTB in ${KERNEL_DEVICETREE}; do
|
for DTB in ${KERNEL_DEVICETREE}; do
|
||||||
if echo ${DTB} | grep -q '/dts/'; then
|
DTB=`normalize_dtb "${DTB}"`
|
||||||
bbwarn "${DTB} contains the full path to the the dts file, but only the dtb name should be used."
|
|
||||||
DTB=`basename ${DTB} | sed 's,\.dts$,.dtb,g'`
|
|
||||||
fi
|
|
||||||
DTB_BASE_NAME=`basename ${DTB} .dtb`
|
DTB_BASE_NAME=`basename ${DTB} .dtb`
|
||||||
DTB_SYMLINK_NAME=`echo ${KERNEL_IMAGE_SYMLINK_NAME} | sed "s/${MACHINE}/${DTB_BASE_NAME}/g"`
|
DTB_SYMLINK_NAME=`echo ${KERNEL_IMAGE_SYMLINK_NAME} | sed "s/${MACHINE}/${DTB_BASE_NAME}/g"`
|
||||||
DTB_PATH="${B}/arch/${ARCH}/boot/dts/${DTB}"
|
DTB_PATH="${B}/arch/${ARCH}/boot/dts/${DTB}"
|
||||||
@@ -33,10 +36,7 @@ do_install_append() {
|
|||||||
|
|
||||||
do_deploy_append() {
|
do_deploy_append() {
|
||||||
for DTB in ${KERNEL_DEVICETREE}; do
|
for DTB in ${KERNEL_DEVICETREE}; do
|
||||||
if echo ${DTB} | grep -q '/dts/'; then
|
DTB=`normalize_dtb "${DTB}"`
|
||||||
bbwarn "${DTB} contains the full path to the the dts file, but only the dtb name should be used."
|
|
||||||
DTB=`basename ${DTB} | sed 's,\.dts$,.dtb,g'`
|
|
||||||
fi
|
|
||||||
DTB_BASE_NAME=`basename ${DTB} .dtb`
|
DTB_BASE_NAME=`basename ${DTB} .dtb`
|
||||||
DTB_NAME=`echo ${KERNEL_IMAGE_BASE_NAME} | sed "s/${MACHINE}/${DTB_BASE_NAME}/g"`
|
DTB_NAME=`echo ${KERNEL_IMAGE_BASE_NAME} | sed "s/${MACHINE}/${DTB_BASE_NAME}/g"`
|
||||||
DTB_SYMLINK_NAME=`echo ${KERNEL_IMAGE_SYMLINK_NAME} | sed "s/${MACHINE}/${DTB_BASE_NAME}/g"`
|
DTB_SYMLINK_NAME=`echo ${KERNEL_IMAGE_SYMLINK_NAME} | sed "s/${MACHINE}/${DTB_BASE_NAME}/g"`
|
||||||
|
|||||||
Reference in New Issue
Block a user