diff options
author | Jeremy Grosser <jeremy@synack.me> | 2018-10-18 13:35:23 +0000 |
---|---|---|
committer | Denys Dmytriyenko <denys@ti.com> | 2018-10-18 22:51:45 +0000 |
commit | e3e20300d40e0d3577d0d25af151c9d4b69cf44b (patch) | |
tree | 2cb2d6c1c9d1b8a4ff011fbb4e1a5284604fbfef | |
parent | fab8b9c0331533cfdf02a390bd1d2bcfce557c95 (diff) | |
download | meta-ti-e3e20300d40e0d3577d0d25af151c9d4b69cf44b.tar.gz |
lego-ev3: Add support for LEGO Mindstorms EV3 (AM1808)
Thanks for the feedback! Updated patch below. Changes:
- Change SERIAL_CONSOLE to new SERIAL_CONSOLES format.
- Move SPL_BINARY variable into lego-ev3 machine config
- Check for KERNEL_DEVICETREE_BUNDLE before uImage manipulation.
- Fix line wrapping errors introduced by MUA
Signed-off-by: Jeremy Grosser <jeremy@synack.me>
Signed-off-by: Denys Dmytriyenko <denys@ti.com>
-rw-r--r-- | conf/machine/lego-ev3.conf | 22 | ||||
-rw-r--r-- | recipes-bsp/u-boot/u-boot-ti.inc | 1 | ||||
-rw-r--r-- | recipes-kernel/linux/bundle-devicetree.inc | 26 | ||||
-rw-r--r-- | recipes-kernel/linux/linux-ti-staging_4.14.bb | 1 |
4 files changed, 50 insertions, 0 deletions
diff --git a/conf/machine/lego-ev3.conf b/conf/machine/lego-ev3.conf new file mode 100644 index 00000000..5c425221 --- /dev/null +++ b/conf/machine/lego-ev3.conf | |||
@@ -0,0 +1,22 @@ | |||
1 | #@TYPE: Machine | ||
2 | #@NAME: LEGO Mindstorms EV3 | ||
3 | #@DESCRIPTION: Machine configuration for the LEGO Mindstorms EV3 | ||
4 | |||
5 | require conf/machine/include/davinci.inc | ||
6 | require conf/machine/include/omapl138.inc | ||
7 | |||
8 | UBOOT_MACHINE = "legoev3_config" | ||
9 | UBOOT_SUFFIX = "bin" | ||
10 | UBOOT_ENTRYPOINT = "0xC0008000" | ||
11 | UBOOT_LOADADDRESS = "0xC0008000" | ||
12 | SPL_BINARY = "" | ||
13 | |||
14 | KERNEL_DEVICETREE = "da850-lego-ev3.dtb" | ||
15 | KERNEL_IMAGETYPES = "uImage" | ||
16 | KERNEL_DEVICETREE_BUNDLE = "1" | ||
17 | SERIAL_CONSOLES = "115200;ttyS1" | ||
18 | |||
19 | IMAGE_FSTYPES += " wic" | ||
20 | WKS_FILE = "sdimage-bootpart.wks" | ||
21 | WIC_CREATE_EXTRA_ARGS += " --no-fstab-update" | ||
22 | 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 d3267be1..62f04f7c 100644 --- a/recipes-bsp/u-boot/u-boot-ti.inc +++ b/recipes-bsp/u-boot/u-boot-ti.inc | |||
@@ -55,6 +55,7 @@ export TI_SECURE_DEV_PKG | |||
55 | SPL_UART_BINARY = "u-boot-spl.bin" | 55 | SPL_UART_BINARY = "u-boot-spl.bin" |
56 | SPL_UART_BINARY_keystone = "" | 56 | SPL_UART_BINARY_keystone = "" |
57 | SPL_UART_BINARY_k3 = "" | 57 | SPL_UART_BINARY_k3 = "" |
58 | SPL_UART_BINARY_lego-ev3 = "" | ||
58 | 59 | ||
59 | SPL_UART_IMAGE ?= "${SPL_UART_BINARY}-${MACHINE}-${PV}-${PR}" | 60 | SPL_UART_IMAGE ?= "${SPL_UART_BINARY}-${MACHINE}-${PV}-${PR}" |
60 | SPL_UART_SYMLINK ?= "${SPL_UART_BINARY}-${MACHINE}" | 61 | 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..4d450374 --- /dev/null +++ b/recipes-kernel/linux/bundle-devicetree.inc | |||
@@ -0,0 +1,26 @@ | |||
1 | # Upstream kernel-devicetree.bbclass only supports bundling the DTB with | ||
2 | # zImage. The factory u-boot on lego-ev3 EEPROM only supports uImage, so we | ||
3 | # append the DTB to the final uImage here. | ||
4 | |||
5 | do_deploy_append() { | ||
6 | if [ "${KERNEL_DEVICETREE_BUNDLE}" = "1" ]; then | ||
7 | install -d ${DEPLOYDIR} | ||
8 | for dtbf in ${KERNEL_DEVICETREE}; do | ||
9 | dtb=`normalize_dtb "$dtbf"` | ||
10 | dtb_ext=${dtb##*.} | ||
11 | dtb_base_name=`basename $dtb .$dtb_ext` | ||
12 | for type in ${KERNEL_IMAGETYPE_FOR_MAKE}; do | ||
13 | if [ "$type" = "uImage" ]; then | ||
14 | cat ${D}/${KERNEL_IMAGEDEST}/$type \ | ||
15 | ${DEPLOYDIR}/$dtb_base_name-${KERNEL_DTB_NAME}.$dtb_ext \ | ||
16 | > ${DEPLOYDIR}/$type-$dtb_base_name-${KERNEL_DTB_NAME}.$dtb_ext.bin | ||
17 | ln -sf $type-$dtb_base_name-${KERNEL_DTB_NAME}.$dtb_ext.bin \ | ||
18 | ${DEPLOYDIR}/$type-$dtb_base_name-${KERNEL_DTB_LINK_NAME}.$dtb_ext.bin | ||
19 | cat ${D}/${KERNEL_IMAGEDEST}/$type \ | ||
20 | ${DEPLOYDIR}/$dtb_base_name-${KERNEL_DTB_NAME}.$dtb_ext \ | ||
21 | > ${DEPLOYDIR}/$type | ||
22 | fi | ||
23 | done | ||
24 | done | ||
25 | fi | ||
26 | } | ||
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 | |||
8 | require recipes-kernel/linux/setup-defconfig.inc | 8 | require recipes-kernel/linux/setup-defconfig.inc |
9 | require recipes-kernel/linux/cmem.inc | 9 | require recipes-kernel/linux/cmem.inc |
10 | require recipes-kernel/linux/ti-uio.inc | 10 | require recipes-kernel/linux/ti-uio.inc |
11 | require recipes-kernel/linux/bundle-devicetree.inc | ||
11 | 12 | ||
12 | # Look in the generic major.minor directory for files | 13 | # Look in the generic major.minor directory for files |
13 | FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}-4.14:" | 14 | FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}-4.14:" |