mirror of
https://github.com/linux-sunxi/meta-sunxi.git
synced 2024-12-25 12:38:22 +01:00
Merge pull request #236 from geomatsi/fix-dtb-filenames
sdcard_image-sunxi.bbclass: fix dtb naming conventions
This commit is contained in:
commit
a66f824d6f
@ -71,16 +71,16 @@ IMAGE_CMD_sunxi-sdimg () {
|
||||
for DTS_FILE in ${KERNEL_DEVICETREE}; do
|
||||
DTS_BASE_NAME=`basename ${DTS_FILE} | awk -F "." '{print $1}'`
|
||||
DTS_DIR_NAME=`dirname ${DTS_FILE}`
|
||||
if [ -e ${DEPLOY_DIR_IMAGE}/"${KERNEL_IMAGETYPE}-${DTS_BASE_NAME}.dtb" ]; then
|
||||
if [ -e ${DEPLOY_DIR_IMAGE}/"${DTS_BASE_NAME}.dtb" ]; then
|
||||
|
||||
if [ ${DTS_FILE} != ${DTS_BASE_NAME}.dtb ]; then
|
||||
mmd -i ${WORKDIR}/boot.img ::/${DTS_DIR_NAME}
|
||||
fi
|
||||
|
||||
kernel_bin="`readlink ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}-${MACHINE}.bin`"
|
||||
kernel_bin_for_dtb="`readlink ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}-${DTS_BASE_NAME}.dtb | sed "s,$DTS_BASE_NAME,${MACHINE},g;s,\.dtb$,.bin,g"`"
|
||||
kernel_bin_for_dtb="`readlink ${DEPLOY_DIR_IMAGE}/${DTS_BASE_NAME}.dtb | sed "s,$DTS_BASE_NAME,${KERNEL_IMAGETYPE},g;s,\.dtb$,.bin,g"`"
|
||||
if [ $kernel_bin = $kernel_bin_for_dtb ]; then
|
||||
mcopy -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}-${DTS_BASE_NAME}.dtb ::/${DTS_FILE}
|
||||
mcopy -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/${DTS_BASE_NAME}.dtb ::/${DTS_FILE}
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
Loading…
Reference in New Issue
Block a user