[yocto] [meta-raspberrypi][PATCH 1/5] devicetree: auto-disable dts for old kernels

Andrei Gherzan andrei at gherzan.ro
Sun May 17 15:46:19 PDT 2015


Hi Petter,

> +       # Check if we are building with device tree support
> +       DTS="${@get_dts(d, None)}"
>
>         # Initialize sdcard image file
>         dd if=/dev/zero of=${SDIMG} bs=1024 count=0 seek=${SDIMG_SIZE}
> @@ -112,7 +114,7 @@ IMAGE_CMD_rpi-sdimg () {
>                 mcopy -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}${KERNEL_INITRAMFS}-${MACHINE}.bin ::uImage
>                 ;;
>         *)
> -               if test -n "${KERNEL_DEVICETREE}"; then
> +               if test -n "${DTS}"; then
>                         # Copy board device trees to root folder
>                         for DTB in ${DT_ROOT}; do
>                                 DTB_BASE_NAME=`basename ${DTB} .dtb`

I started to review these patches and test. I have one concern related
to this patch. More specifically the fact that even though you check
for DTS now, we are still using DT_ROOT (and co) for the next loops
which use KERNEL_DEVICETREE. Maybe a better way to do it would be to
move
DT_ALL = "${@d.getVar('KERNEL_DEVICETREE', True) or ''}"
DT_OVERLAYS = "${@oe.utils.str_filter('\S+\-overlay\.dtb$',
'${DT_ALL}', d)}"
DT_ROOT = "${@oe.utils.str_filter_out('\S+\-overlay\.dtb$', '${DT_ALL}', d)}"
... after you define DTS and define these based on DTS variable.

Regards,
Andrei



More information about the yocto mailing list