mirror of
https://git.yoctoproject.org/poky
synced 2026-06-02 13:29:49 +00:00
linux-dtb.inc: explicit test for empty string not needed
The for loop already handles the case when KERNEL_DEVICETREE is empty. (From OE-Core rev: 49010f4a1ae9570e96691c9faeb17808174488fe) 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
54df911748
commit
7eecb81b6d
@@ -6,54 +6,48 @@ python __anonymous () {
|
|||||||
}
|
}
|
||||||
|
|
||||||
do_compile_append() {
|
do_compile_append() {
|
||||||
if test -n "${KERNEL_DEVICETREE}"; then
|
for DTB in ${KERNEL_DEVICETREE}; do
|
||||||
for DTB in ${KERNEL_DEVICETREE}; do
|
if echo ${DTB} | grep -q '/dts/'; then
|
||||||
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."
|
||||||
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'`
|
||||||
DTB=`basename ${DTB} | sed 's,\.dts$,.dtb,g'`
|
fi
|
||||||
fi
|
oe_runmake ${DTB}
|
||||||
oe_runmake ${DTB}
|
done
|
||||||
done
|
|
||||||
fi
|
|
||||||
}
|
}
|
||||||
|
|
||||||
do_install_append() {
|
do_install_append() {
|
||||||
if test -n "${KERNEL_DEVICETREE}"; then
|
for DTB in ${KERNEL_DEVICETREE}; do
|
||||||
for DTB in ${KERNEL_DEVICETREE}; do
|
if echo ${DTB} | grep -q '/dts/'; then
|
||||||
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."
|
||||||
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'`
|
||||||
DTB=`basename ${DTB} | sed 's,\.dts$,.dtb,g'`
|
fi
|
||||||
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}"
|
if [ ! -e "${DTB_PATH}" ]; then
|
||||||
if [ ! -e "${DTB_PATH}" ]; then
|
DTB_PATH="${B}/arch/${ARCH}/boot/${DTB}"
|
||||||
DTB_PATH="${B}/arch/${ARCH}/boot/${DTB}"
|
fi
|
||||||
fi
|
install -m 0644 ${DTB_PATH} ${D}/${KERNEL_IMAGEDEST}/devicetree-${DTB_SYMLINK_NAME}.dtb
|
||||||
install -m 0644 ${DTB_PATH} ${D}/${KERNEL_IMAGEDEST}/devicetree-${DTB_SYMLINK_NAME}.dtb
|
done
|
||||||
done
|
|
||||||
fi
|
|
||||||
}
|
}
|
||||||
|
|
||||||
do_deploy_append() {
|
do_deploy_append() {
|
||||||
if test -n "${KERNEL_DEVICETREE}"; then
|
for DTB in ${KERNEL_DEVICETREE}; do
|
||||||
for DTB in ${KERNEL_DEVICETREE}; do
|
if echo ${DTB} | grep -q '/dts/'; then
|
||||||
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."
|
||||||
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'`
|
||||||
DTB=`basename ${DTB} | sed 's,\.dts$,.dtb,g'`
|
fi
|
||||||
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"`
|
DTB_PATH="${B}/arch/${ARCH}/boot/dts/${DTB}"
|
||||||
DTB_PATH="${B}/arch/${ARCH}/boot/dts/${DTB}"
|
if [ ! -e "${DTB_PATH}" ]; then
|
||||||
if [ ! -e "${DTB_PATH}" ]; then
|
DTB_PATH="${B}/arch/${ARCH}/boot/${DTB}"
|
||||||
DTB_PATH="${B}/arch/${ARCH}/boot/${DTB}"
|
fi
|
||||||
fi
|
install -d ${DEPLOYDIR}
|
||||||
install -d ${DEPLOYDIR}
|
install -m 0644 ${DTB_PATH} ${DEPLOYDIR}/${DTB_NAME}.dtb
|
||||||
install -m 0644 ${DTB_PATH} ${DEPLOYDIR}/${DTB_NAME}.dtb
|
ln -sf ${DTB_NAME}.dtb ${DEPLOYDIR}/${DTB_SYMLINK_NAME}.dtb
|
||||||
ln -sf ${DTB_NAME}.dtb ${DEPLOYDIR}/${DTB_SYMLINK_NAME}.dtb
|
done
|
||||||
done
|
|
||||||
fi
|
|
||||||
}
|
}
|
||||||
|
|
||||||
pkg_postinst_kernel-devicetree () {
|
pkg_postinst_kernel-devicetree () {
|
||||||
|
|||||||
Reference in New Issue
Block a user