mirror of
https://github.com/linux-sunxi/meta-sunxi.git
synced 2024-12-27 05:28:22 +01:00
sdcard_image-sunxi.bbclass: fix copying device tree files not working
The image class assumes the working directory is the directory containg the kernel and device tree files but this isn't always the case. Signed-off-by: Jonathan Liu <net147@gmail.com>
This commit is contained in:
parent
0da0fd6531
commit
26c32a3228
@ -74,9 +74,9 @@ IMAGE_CMD_sunxi-sdimg () {
|
||||
if test -n "${KERNEL_DEVICETREE}"; then
|
||||
for DTS_FILE in ${KERNEL_DEVICETREE}; do
|
||||
DTS_BASE_NAME=`basename ${DTS_FILE} | awk -F "." '{print $1}'`
|
||||
if [ -e "${KERNEL_IMAGETYPE}-${DTS_BASE_NAME}.dtb" ]; then
|
||||
kernel_bin="`readlink ${KERNEL_IMAGETYPE}-${MACHINE}.bin`"
|
||||
kernel_bin_for_dtb="`readlink ${KERNEL_IMAGETYPE}-${DTS_BASE_NAME}.dtb | sed "s,$DTS_BASE_NAME,${MACHINE},g;s,\.dtb$,.bin,g"`"
|
||||
if [ -e ${DEPLOY_DIR_IMAGE}/"${KERNEL_IMAGETYPE}-${DTS_BASE_NAME}.dtb" ]; then
|
||||
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"`"
|
||||
if [ $kernel_bin = $kernel_bin_for_dtb ]; then
|
||||
mcopy -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}-${DTS_BASE_NAME}.dtb ::/${DTS_BASE_NAME}.dtb
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user