From: Denys Dmytriyenko <denys@ti.com>
To: Jeremy Grosser <jeremy@synack.me>
Cc: meta-ti@yoctoproject.org
Subject: Re: [PATCH] lego-ev3: Add support for LEGO Mindstorms EV3 (AM1808)
Date: Wed, 17 Oct 2018 19:12:03 -0400 [thread overview]
Message-ID: <20181017231203.GP4031@beryl> (raw)
In-Reply-To: <CANg34PkEbA1B1q+3dK4TWCHzg6RhPD6skB8bgCqWGU8VCUx1xw@mail.gmail.com>
Thanks! Looks very intersting. Please see comments inline.
On Mon, Oct 15, 2018 at 08:19:02PM -0700, Jeremy Grosser wrote:
> Signed-off-by: Jeremy Grosser <jeremy@synack.me>
> ---
> conf/machine/lego-ev3.conf | 21 ++++++++++++++++
> recipes-bsp/u-boot/u-boot-ti.inc | 2 ++
> recipes-kernel/linux/bundle-devicetree.inc | 24 +++++++++++++++++++
> recipes-kernel/linux/linux-ti-staging_4.14.bb | 1 +
> 4 files changed, 48 insertions(+)
> create mode 100644 conf/machine/lego-ev3.conf
> create mode 100644 recipes-kernel/linux/bundle-devicetree.inc
>
> diff --git a/conf/machine/lego-ev3.conf b/conf/machine/lego-ev3.conf
> new file mode 100644
> index 00000000..18626001
> --- /dev/null
> +++ b/conf/machine/lego-ev3.conf
> @@ -0,0 +1,21 @@
> +#@TYPE: Machine
> +#@NAME: LEGO Mindstorms EV3
> +#@DESCRIPTION: Machine configuration for the LEGO Mindstorms EV3
> +
> +require conf/machine/include/davinci.inc
> +require conf/machine/include/omapl138.inc
> +
> +UBOOT_MACHINE = "legoev3_config"
> +UBOOT_SUFFIX = "bin"
> +UBOOT_ENTRYPOINT = "0xC0008000"
> +UBOOT_LOADADDRESS = "0xC0008000"
> +
> +KERNEL_DEVICETREE = "da850-lego-ev3.dtb"
> +KERNEL_IMAGETYPES = "uImage"
> +KERNEL_DEVICETREE_BUNDLE = "1"
> +SERIAL_CONSOLE ?= "115200 ttyS1"
Can you please rebase with recent changes to deprecate SERIAL_CONSOLE.
> +
> +IMAGE_FSTYPES += " wic"
> +WKS_FILE = "sdimage-bootpart.wks"
> +WIC_CREATE_EXTRA_ARGS += " --no-fstab-update"
> +IMAGE_BOOT_FILES = "${KERNEL_IMAGETYPES}"
> diff --git a/recipes-bsp/u-boot/u-boot-ti.inc b/recipes-bsp/u-boot/u-boot-ti.inc
> index f22fcb4d..aba5e90c 100644
> --- a/recipes-bsp/u-boot/u-boot-ti.inc
> +++ b/recipes-bsp/u-boot/u-boot-ti.inc
> @@ -57,12 +57,14 @@ SPL_BINARY_k2hk-hs-evm = ""
> SPL_BINARY_k2g-hs-evm = ""
> SPL_BINARY_k2l-hs-evm = ""
> SPL_BINARY_omapl138 = ""
> +SPL_BINARY_lego-ev3 = ""
Sorry, this has also just changed, please move to machine config.
> SPL_BINARY_k3 = "tispl.bin"
>
> # SPL (Second Program Loader) to be loaded over UART
> SPL_UART_BINARY = "u-boot-spl.bin"
> SPL_UART_BINARY_keystone = ""
> SPL_UART_BINARY_k3 = ""
> +SPL_UART_BINARY_lego-ev3 = ""
>
> SPL_UART_IMAGE ?= "${SPL_UART_BINARY}-${MACHINE}-${PV}-${PR}"
> SPL_UART_SYMLINK ?= "${SPL_UART_BINARY}-${MACHINE}"
> diff --git a/recipes-kernel/linux/bundle-devicetree.inc
> b/recipes-kernel/linux/bundle-devicetree.inc
> new file mode 100644
> index 00000000..ce159878
> --- /dev/null
> +++ b/recipes-kernel/linux/bundle-devicetree.inc
> @@ -0,0 +1,24 @@
> +# Upstream kernel-devicetree.bbclass only supports bundling the DTB with
> +# zImage. The factory u-boot on lego-ev3 EEPROM only supports uImage, so we
> +# append the DTB to the final uImage here.
> +
> +do_deploy_append() {
Can you check for KERNEL_DEVICETREE_BUNDLE being set right away here, so
normally it won't even go into all the loops inside.
> + for dtbf in ${KERNEL_DEVICETREE}; do
> + dtb=`normalize_dtb "$dtbf"`
> + dtb_ext=${dtb##*.}
> + dtb_base_name=`basename $dtb .$dtb_ext`
> + install -d ${DEPLOYDIR}
For all the DTBs listed (and some platforms have tens of them!) you'd be
creating DEPLOYDIR over and over again...
> + for type in ${KERNEL_IMAGETYPE_FOR_MAKE}; do
> + if [ "$type" = "uImage" ] && [
> "${KERNEL_DEVICETREE_BUNDLE}" = "1" ]; then
> + cat ${D}/${KERNEL_IMAGEDEST}/$type \
> + ${DEPLOYDIR}/$dtb_base_name-${KERNEL_DTB_NAME}.$dtb_ext \
> + >
> ${DEPLOYDIR}/$type-$dtb_base_name-${KERNEL_DTB_NAME}.$dtb_ext.bin
> + ln -sf $type-$dtb_base_name-${KERNEL_DTB_NAME}.$dtb_ext.bin \
> +
> ${DEPLOYDIR}/$type-$dtb_base_name-${KERNEL_DTB_LINK_NAME}.$dtb_ext.bin
> + cat ${D}/${KERNEL_IMAGEDEST}/$type \
> + ${DEPLOYDIR}/$dtb_base_name-${KERNEL_DTB_NAME}.$dtb_ext \
> + > ${DEPLOYDIR}/$type
> + fi
> + done
> + done
> +}
> diff --git a/recipes-kernel/linux/linux-ti-staging_4.14.bb
> b/recipes-kernel/linux/linux-ti-staging_4.14.bb
> index 5ee206ec..13b94ffe 100644
> --- a/recipes-kernel/linux/linux-ti-staging_4.14.bb
> +++ b/recipes-kernel/linux/linux-ti-staging_4.14.bb
> @@ -8,6 +8,7 @@ inherit kernel
> require recipes-kernel/linux/setup-defconfig.inc
> require recipes-kernel/linux/cmem.inc
> require recipes-kernel/linux/ti-uio.inc
> +require recipes-kernel/linux/bundle-devicetree.inc
>
> # Look in the generic major.minor directory for files
> FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}-4.14:"
> --
> 2.19.1
> --
> _______________________________________________
> meta-ti mailing list
> meta-ti@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/meta-ti
next prev parent reply other threads:[~2018-10-17 23:12 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-16 3:19 [PATCH] lego-ev3: Add support for LEGO Mindstorms EV3 (AM1808) Jeremy Grosser
2018-10-17 23:12 ` Denys Dmytriyenko [this message]
2018-10-17 23:23 ` Denys Dmytriyenko
2018-10-18 7:35 ` Jeremy Grosser
2018-10-19 0:27 ` Denys Dmytriyenko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20181017231203.GP4031@beryl \
--to=denys@ti.com \
--cc=jeremy@synack.me \
--cc=meta-ti@yoctoproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.