From ae2d6d14123d0eae08b04e9e31bdd129aff119e6 Mon Sep 17 00:00:00 2001 From: Samuli Piippo Date: Thu, 1 Sep 2016 09:43:22 +0300 Subject: toradex: stop using meta-toradex All needed toradex recipes are now in meta-fsl-arm-extra Change-Id: I3eedacd83845087d2369cf4d4b6df2a030d6d283 Reviewed-by: Teemu Holappa --- .../recipes/linux/linux-toradex_3.14.%.bbappend | 37 +++++++++++ .../recipes/linux/linux-toradex_4.%.bbappend | 35 ++++++++++ .../recipes/u-boot/u-boot-script-toradex.bb | 76 ++++++++++++++++++++++ .../u-boot/u-boot-script-toradex/mx6/flash_blk.scr | 6 ++ .../u-boot/u-boot-script-toradex/mx6/flash_mmc.scr | 6 ++ .../u-boot/u-boot-script-toradex/mx7/flash_blk.scr | 6 ++ .../u-boot/u-boot-script-toradex/mx7/flash_mmc.scr | 6 ++ .../u-boot/u-boot-script-toradex/vf/flash_blk.scr | 2 + .../u-boot/u-boot-script-toradex/vf/flash_mmc.scr | 3 + .../0001-Update-default-args-for-apalis-imx6.patch | 47 +++++++++++++ .../0001-colibri-imx7-fix-update-u-boot.patch | 12 ++++ .../0001-colibri-vf-remove-console-from-tty1.patch | 25 +++++++ .../0002-colibri-vf-fix-mmc-boot.patch | 14 ++++ .../recipes/u-boot/u-boot-toradex_2015.04.bbappend | 43 ++++++++++++ 14 files changed, 318 insertions(+) create mode 100644 meta-fsl-extras/recipes/linux/linux-toradex_3.14.%.bbappend create mode 100644 meta-fsl-extras/recipes/linux/linux-toradex_4.%.bbappend create mode 100644 meta-fsl-extras/recipes/u-boot/u-boot-script-toradex.bb create mode 100644 meta-fsl-extras/recipes/u-boot/u-boot-script-toradex/mx6/flash_blk.scr create mode 100644 meta-fsl-extras/recipes/u-boot/u-boot-script-toradex/mx6/flash_mmc.scr create mode 100644 meta-fsl-extras/recipes/u-boot/u-boot-script-toradex/mx7/flash_blk.scr create mode 100644 meta-fsl-extras/recipes/u-boot/u-boot-script-toradex/mx7/flash_mmc.scr create mode 100644 meta-fsl-extras/recipes/u-boot/u-boot-script-toradex/vf/flash_blk.scr create mode 100644 meta-fsl-extras/recipes/u-boot/u-boot-script-toradex/vf/flash_mmc.scr create mode 100644 meta-fsl-extras/recipes/u-boot/u-boot-toradex/0001-Update-default-args-for-apalis-imx6.patch create mode 100644 meta-fsl-extras/recipes/u-boot/u-boot-toradex/0001-colibri-imx7-fix-update-u-boot.patch create mode 100644 meta-fsl-extras/recipes/u-boot/u-boot-toradex/0001-colibri-vf-remove-console-from-tty1.patch create mode 100644 meta-fsl-extras/recipes/u-boot/u-boot-toradex/0002-colibri-vf-fix-mmc-boot.patch create mode 100644 meta-fsl-extras/recipes/u-boot/u-boot-toradex_2015.04.bbappend (limited to 'meta-fsl-extras') diff --git a/meta-fsl-extras/recipes/linux/linux-toradex_3.14.%.bbappend b/meta-fsl-extras/recipes/linux/linux-toradex_3.14.%.bbappend new file mode 100644 index 0000000..b696b19 --- /dev/null +++ b/meta-fsl-extras/recipes/linux/linux-toradex_3.14.%.bbappend @@ -0,0 +1,37 @@ +############################################################################ +## +## Copyright (C) 2016 The Qt Company Ltd. +## Contact: https://www.qt.io/licensing/ +## +## This file is part of the Boot to Qt meta layer. +## +## $QT_BEGIN_LICENSE:GPL$ +## Commercial License Usage +## Licensees holding valid commercial Qt licenses may use this file in +## accordance with the commercial license agreement provided with the +## Software or, alternatively, in accordance with the terms contained in +## a written agreement between you and The Qt Company. For licensing terms +## and conditions see https://www.qt.io/terms-conditions. For further +## information use the contact form at https://www.qt.io/contact-us. +## +## GNU General Public License Usage +## Alternatively, this file may be used under the terms of the GNU +## General Public License version 3 or (at your option) any later version +## approved by the KDE Free Qt Foundation. The licenses are as published by +## the Free Software Foundation and appearing in the file LICENSE.GPL3 +## included in the packaging of this file. Please review the following +## information to ensure the GNU General Public License requirements will +## be met: https://www.gnu.org/licenses/gpl-3.0.html. +## +## $QT_END_LICENSE$ +## +############################################################################ + +# kernel image files are not needed in the image +RDEPENDS_kernel-base = "" + +do_configure_prepend () { + # FunctionFS for adb + echo "CONFIG_USB_FUNCTIONFS=m" >> ${WORKDIR}/defconfig + echo "CONFIG_USB_ACM=m" >> ${WORKDIR}/defconfig +} diff --git a/meta-fsl-extras/recipes/linux/linux-toradex_4.%.bbappend b/meta-fsl-extras/recipes/linux/linux-toradex_4.%.bbappend new file mode 100644 index 0000000..77ce484 --- /dev/null +++ b/meta-fsl-extras/recipes/linux/linux-toradex_4.%.bbappend @@ -0,0 +1,35 @@ +############################################################################ +## +## Copyright (C) 2016 The Qt Company Ltd. +## Contact: https://www.qt.io/licensing/ +## +## This file is part of the Boot to Qt meta layer. +## +## $QT_BEGIN_LICENSE:GPL$ +## Commercial License Usage +## Licensees holding valid commercial Qt licenses may use this file in +## accordance with the commercial license agreement provided with the +## Software or, alternatively, in accordance with the terms contained in +## a written agreement between you and The Qt Company. For licensing terms +## and conditions see https://www.qt.io/terms-conditions. For further +## information use the contact form at https://www.qt.io/contact-us. +## +## GNU General Public License Usage +## Alternatively, this file may be used under the terms of the GNU +## General Public License version 3 or (at your option) any later version +## approved by the KDE Free Qt Foundation. The licenses are as published by +## the Free Software Foundation and appearing in the file LICENSE.GPL3 +## included in the packaging of this file. Please review the following +## information to ensure the GNU General Public License requirements will +## be met: https://www.gnu.org/licenses/gpl-3.0.html. +## +## $QT_END_LICENSE$ +## +############################################################################ + +do_configure_prepend () { + # FunctionFS for adb + echo "CONFIG_USB_FUNCTIONFS=m" >> ${WORKDIR}/defconfig + echo "CONFIG_USB_ACM=m" >> ${WORKDIR}/defconfig + echo "TOUCHSCREEN_FUSION_F0710A=y" >> ${WORKDIR}/defconfig +} diff --git a/meta-fsl-extras/recipes/u-boot/u-boot-script-toradex.bb b/meta-fsl-extras/recipes/u-boot/u-boot-script-toradex.bb new file mode 100644 index 0000000..bb209ad --- /dev/null +++ b/meta-fsl-extras/recipes/u-boot/u-boot-script-toradex.bb @@ -0,0 +1,76 @@ +############################################################################ +## +## Copyright (C) 2016 The Qt Company Ltd. +## Contact: https://www.qt.io/licensing/ +## +## This file is part of the Boot to Qt meta layer. +## +## $QT_BEGIN_LICENSE:GPL$ +## Commercial License Usage +## Licensees holding valid commercial Qt licenses may use this file in +## accordance with the commercial license agreement provided with the +## Software or, alternatively, in accordance with the terms contained in +## a written agreement between you and The Qt Company. For licensing terms +## and conditions see https://www.qt.io/terms-conditions. For further +## information use the contact form at https://www.qt.io/contact-us. +## +## GNU General Public License Usage +## Alternatively, this file may be used under the terms of the GNU +## General Public License version 3 or (at your option) any later version +## approved by the KDE Free Qt Foundation. The licenses are as published by +## the Free Software Foundation and appearing in the file LICENSE.GPL3 +## included in the packaging of this file. Please review the following +## information to ensure the GNU General Public License requirements will +## be met: https://www.gnu.org/licenses/gpl-3.0.html. +## +## $QT_END_LICENSE$ +## +############################################################################ + +LICENSE = "The-Qt-Company-DCLA-2.1" +LIC_FILES_CHKSUM = "file://${QT_LICENSE};md5=80e06902b5f0e94ad0a78ee4f7fcb74b" +DEPENDS = "u-boot-mkimage-native" + +PV = "v2.3" + +SRC_URI = " \ + file://flash_mmc.scr \ + file://flash_blk.scr \ + " + +S = "${WORKDIR}" + +inherit deploy + +do_mkimage () { + uboot-mkimage -A arm -O linux -T script -C none -a 0 -e 0 \ + -n "update script" -d ${WORKDIR}/flash_mmc.scr \ + flash_mmc.img + + uboot-mkimage -A arm -O linux -T script -C none -a 0 -e 0 \ + -n "update script" -d ${WORKDIR}/flash_blk.scr \ + flash_blk.img +} + +addtask mkimage after do_compile before do_install + +do_deploy () { + install -d ${DEPLOYDIR} + install ${S}/flash_mmc.img ${DEPLOYDIR}/flash_mmc-${MACHINE}-${PV}-${PR}.img + install ${S}/flash_blk.img ${DEPLOYDIR}/flash_blk-${MACHINE}-${PV}-${PR}.img + + cd ${DEPLOYDIR} + rm -f flash_mmc-${MACHINE}.img + ln -sf flash_mmc-${MACHINE}-${PV}-${PR}.img flash_mmc-${MACHINE}.img + rm -f flash_blk-${MACHINE}.img + ln -sf flash_blk-${MACHINE}-${PV}-${PR}.img flash_blk-${MACHINE}.img +} + +addtask deploy after do_install before do_build + +do_compile[noexec] = "1" +do_install[noexec] = "1" +do_populate_sysroot[noexec] = "1" + +PACKAGE_ARCH = "${MACHINE_ARCH}" +COMPATIBLE_MACHINE = "(apalis-imx6|colibri-vf|colibri-imx6|colibri-imx7)" diff --git a/meta-fsl-extras/recipes/u-boot/u-boot-script-toradex/mx6/flash_blk.scr b/meta-fsl-extras/recipes/u-boot/u-boot-script-toradex/mx6/flash_blk.scr new file mode 100644 index 0000000..ee87e85 --- /dev/null +++ b/meta-fsl-extras/recipes/u-boot/u-boot-script-toradex/mx6/flash_blk.scr @@ -0,0 +1,6 @@ +test -n ${interface} || setenv interface mmc +test -n ${drive} || setenv drive 1 + +setenv set_blkcnt 'setexpr blkcnt ${filesize} + 0x1ff && setexpr blkcnt ${blkcnt} / 0x200' +setenv update_uboot 'fatload ${interface} ${drive}:1 ${loadaddr} u-boot.imx && run set_blkcnt && mmc dev 0 0 && mmc write ${loadaddr} 2 ${blkcnt}' +echo 'enter "run update_uboot" to update the uboot' diff --git a/meta-fsl-extras/recipes/u-boot/u-boot-script-toradex/mx6/flash_mmc.scr b/meta-fsl-extras/recipes/u-boot/u-boot-script-toradex/mx6/flash_mmc.scr new file mode 100644 index 0000000..207c7db --- /dev/null +++ b/meta-fsl-extras/recipes/u-boot/u-boot-script-toradex/mx6/flash_mmc.scr @@ -0,0 +1,6 @@ +#flash_mmc has been renamed to flash_blk, ensure compatibilty when updating from older versions +test -n ${interface} || setenv interface mmc +test -n ${drive} || setenv drive 1 + +fatload ${interface} ${drive}:1 ${loadaddr} flash_blk.img +source ${loadaddr} diff --git a/meta-fsl-extras/recipes/u-boot/u-boot-script-toradex/mx7/flash_blk.scr b/meta-fsl-extras/recipes/u-boot/u-boot-script-toradex/mx7/flash_blk.scr new file mode 100644 index 0000000..3e05a85 --- /dev/null +++ b/meta-fsl-extras/recipes/u-boot/u-boot-script-toradex/mx7/flash_blk.scr @@ -0,0 +1,6 @@ +test -n ${interface} || setenv interface mmc +test -n ${drive} || setenv drive 0 + +setenv set_blkcnt 'setexpr blkcnt ${filesize} + 0x1ff && setexpr blkcnt ${blkcnt} / 0x200' +setenv update_uboot 'fatload ${interface} ${drive}:1 ${loadaddr} u-boot.imx && run set_blkcnt && mmc dev 0 0 && mmc write ${loadaddr} 2 ${blkcnt}' +echo 'enter "run update_uboot" to update the uboot' diff --git a/meta-fsl-extras/recipes/u-boot/u-boot-script-toradex/mx7/flash_mmc.scr b/meta-fsl-extras/recipes/u-boot/u-boot-script-toradex/mx7/flash_mmc.scr new file mode 100644 index 0000000..0c16652 --- /dev/null +++ b/meta-fsl-extras/recipes/u-boot/u-boot-script-toradex/mx7/flash_mmc.scr @@ -0,0 +1,6 @@ +#flash_mmc has been renamed to flash_blk, ensure compatibility when updating from older versions +test -n ${interface} || setenv interface mmc +test -n ${drive} || setenv drive 0 + +fatload ${interface} ${drive}:1 ${loadaddr} flash_blk.img +source ${loadaddr} diff --git a/meta-fsl-extras/recipes/u-boot/u-boot-script-toradex/vf/flash_blk.scr b/meta-fsl-extras/recipes/u-boot/u-boot-script-toradex/vf/flash_blk.scr new file mode 100644 index 0000000..be8ec8d --- /dev/null +++ b/meta-fsl-extras/recipes/u-boot/u-boot-script-toradex/vf/flash_blk.scr @@ -0,0 +1,2 @@ +setenv update_uboot 'fatload ${interface} 0:1 ${loadaddr} u-boot.imx && nand erase.part u-boot && nand erase.part u-boot-env && nand write ${loadaddr} u-boot' +echo 'enter "run update_uboot" to update the uboot' diff --git a/meta-fsl-extras/recipes/u-boot/u-boot-script-toradex/vf/flash_mmc.scr b/meta-fsl-extras/recipes/u-boot/u-boot-script-toradex/vf/flash_mmc.scr new file mode 100644 index 0000000..e0770a0 --- /dev/null +++ b/meta-fsl-extras/recipes/u-boot/u-boot-script-toradex/vf/flash_mmc.scr @@ -0,0 +1,3 @@ +setenv interface mmc +fatload ${interface} 0:1 ${loadaddr} flash_blk.img +source ${loadaddr} diff --git a/meta-fsl-extras/recipes/u-boot/u-boot-toradex/0001-Update-default-args-for-apalis-imx6.patch b/meta-fsl-extras/recipes/u-boot/u-boot-toradex/0001-Update-default-args-for-apalis-imx6.patch new file mode 100644 index 0000000..5a456c5 --- /dev/null +++ b/meta-fsl-extras/recipes/u-boot/u-boot-toradex/0001-Update-default-args-for-apalis-imx6.patch @@ -0,0 +1,47 @@ +From 4569a8b4997340aae34365f2f896b842f8cc114b Mon Sep 17 00:00:00 2001 +From: Samuli Piippo +Date: Mon, 27 Oct 2014 14:53:25 +0200 +Subject: [PATCH] Update default args for apalis imx6 + +Boot from sd card by default +--- + include/configs/apalis_imx6.h | 13 +++++++------ + 1 file changed, 7 insertions(+), 6 deletions(-) + +diff --git a/include/configs/apalis_imx6.h b/include/configs/apalis_imx6.h +index 3ea4a5c..53d9a0c 100644 +--- a/include/configs/apalis_imx6.h ++++ b/include/configs/apalis_imx6.h +@@ -252,14 +252,14 @@ + "&& setenv dtbparam \" - ${fdt_addr_r}\" && true\0" + + #define SD_BOOTCMD \ +- "sdargs=ip=off root=/dev/mmcblk1p2 rw,noatime rootfstype=ext3 " \ +- "rootwait\0" \ ++ "drive=2\0" \ + "sdboot=run setup; " \ +- "setenv bootargs ${defargs} ${sdargs} ${setupargs} " \ ++ "setenv bootargs ${defargs} ip=off root=/dev/mmcblk${drive}p2 " \ ++ "rw,noatime rootfstype=ext3 rootwait ${setupargs} " \ + "${vidargs}; echo Booting from SD card in 8-bit slot...; " \ +- "run sddtbload; load mmc 1:1 ${kernel_addr_r} " \ ++ "run sddtbload; load mmc ${drive}:1 ${kernel_addr_r} " \ + "${boot_file} && bootm ${kernel_addr_r} ${dtbparam}\0" \ +- "sddtbload=setenv dtbparam; load mmc 1:1 ${fdt_addr_r} " \ ++ "sddtbload=setenv dtbparam; load mmc ${drive}:1 ${fdt_addr_r} " \ + "${fdt_file} && setenv dtbparam \" - ${fdt_addr_r}\" && true\0" + + #define USB_BOOTCMD \ +@@ -279,7 +279,8 @@ + #define FDT_FILE "imx6q-apalis_v1_0-eval.dtb" + #endif + #define CONFIG_EXTRA_ENV_SETTINGS \ +- "bootcmd=run emmcboot ; echo ; echo emmcboot failed ; " \ ++ "bootcmd=run sdboot ; echo ; echo sdboot failed ; " \ ++ "run emmcboot ; echo ; echo emmcboot failed ; " \ + "run nfsboot ; echo ; echo nfsboot failed ; " \ + "usb start ;" \ + "setenv stdout serial,vga ; setenv stdin serial,usbkbd\0" \ +-- +1.9.1 + diff --git a/meta-fsl-extras/recipes/u-boot/u-boot-toradex/0001-colibri-imx7-fix-update-u-boot.patch b/meta-fsl-extras/recipes/u-boot/u-boot-toradex/0001-colibri-imx7-fix-update-u-boot.patch new file mode 100644 index 0000000..501ad33 --- /dev/null +++ b/meta-fsl-extras/recipes/u-boot/u-boot-toradex/0001-colibri-imx7-fix-update-u-boot.patch @@ -0,0 +1,12 @@ +diff -Naur git.orig/include/configs/colibri_imx7.h git/include/configs/colibri_imx7.h +--- git.orig/include/configs/colibri_imx7.h 2016-07-15 12:31:35.915934824 +0300 ++++ git/include/configs/colibri_imx7.h 2016-07-15 12:32:40.867937388 +0300 +@@ -248,7 +248,7 @@ + "${board}/flash_eth.img && source ${loadaddr}\0" \ + "setsdupdate=mmc rescan && setenv interface mmc && " \ + "fatload ${interface} 0:1 ${loadaddr} " \ +- "${board}/flash_blk.img && source ${loadaddr}\0" \ ++ "/flash_blk.img && source ${loadaddr}\0" \ + "setup=setenv setupargs " \ + "console=tty1 console=${console}" \ + ",${baudrate}n8 ${memargs} consoleblank=0 ${mtdparts}\0" \ diff --git a/meta-fsl-extras/recipes/u-boot/u-boot-toradex/0001-colibri-vf-remove-console-from-tty1.patch b/meta-fsl-extras/recipes/u-boot/u-boot-toradex/0001-colibri-vf-remove-console-from-tty1.patch new file mode 100644 index 0000000..b54a4ae --- /dev/null +++ b/meta-fsl-extras/recipes/u-boot/u-boot-toradex/0001-colibri-vf-remove-console-from-tty1.patch @@ -0,0 +1,25 @@ +From f480a948551b0e5592d93cb7a5dc1653de900909 Mon Sep 17 00:00:00 2001 +From: Samuli Piippo +Date: Wed, 24 Feb 2016 16:01:33 +0200 +Subject: [PATCH] colibri vf: remove console from tty1 + +--- + include/configs/colibri_vf.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/include/configs/colibri_vf.h b/include/configs/colibri_vf.h +index b870812..0726fc5 100644 +--- a/include/configs/colibri_vf.h ++++ b/include/configs/colibri_vf.h +@@ -202,7 +202,7 @@ + "fatload ${interface} 0:1 ${loadaddr} flash_blk.img && " \ + "source ${loadaddr}\0" \ + "setup=setenv setupargs " \ +- "console=tty1 console=${console}" \ ++ "console=${console}" \ + ",${baudrate}n8 ${memargs} consoleblank=0\0" \ + "setupdate=run setsdupdate || run setusbupdate || run setethupdate\0" \ + "setusbupdate=usb start && setenv interface usb && " \ +-- +1.9.1 + diff --git a/meta-fsl-extras/recipes/u-boot/u-boot-toradex/0002-colibri-vf-fix-mmc-boot.patch b/meta-fsl-extras/recipes/u-boot/u-boot-toradex/0002-colibri-vf-fix-mmc-boot.patch new file mode 100644 index 0000000..25476dd --- /dev/null +++ b/meta-fsl-extras/recipes/u-boot/u-boot-toradex/0002-colibri-vf-fix-mmc-boot.patch @@ -0,0 +1,14 @@ +diff -Naur git.orig/include/configs/colibri_vf.h git/include/configs/colibri_vf.h +--- git.orig/include/configs/colibri_vf.h 2016-07-15 12:05:41.263873456 +0300 ++++ git/include/configs/colibri_vf.h 2016-07-15 12:06:19.759874976 +0300 +@@ -161,8 +161,8 @@ + "sdargs=root=/dev/mmcblk0p2 rw rootwait\0" \ + "sdboot=run setup; setenv bootargs ${defargs} ${sdargs} " \ + "${setupargs} ${vidargs}; echo Booting from MMC/SD card...; " \ +- "load mmc 0:2 ${kernel_addr_r} /boot/${kernel_file} && " \ +- "load mmc 0:2 ${fdt_addr_r} /boot/${soc}-colibri-${fdt_board}.dtb && " \ ++ "load mmc 0:1 ${kernel_addr_r} /${kernel_file} && " \ ++ "load mmc 0:1 ${fdt_addr_r} /${soc}-colibri-${fdt_board}.dtb && " \ + "run fdt_fixup && bootz ${kernel_addr_r} - ${fdt_addr_r}\0" \ + + #define NFS_BOOTCMD \ diff --git a/meta-fsl-extras/recipes/u-boot/u-boot-toradex_2015.04.bbappend b/meta-fsl-extras/recipes/u-boot/u-boot-toradex_2015.04.bbappend new file mode 100644 index 0000000..cb94605 --- /dev/null +++ b/meta-fsl-extras/recipes/u-boot/u-boot-toradex_2015.04.bbappend @@ -0,0 +1,43 @@ +############################################################################ +## +## Copyright (C) 2016 The Qt Company Ltd. +## Contact: https://www.qt.io/licensing/ +## +## This file is part of the Boot to Qt meta layer. +## +## $QT_BEGIN_LICENSE:GPL$ +## Commercial License Usage +## Licensees holding valid commercial Qt licenses may use this file in +## accordance with the commercial license agreement provided with the +## Software or, alternatively, in accordance with the terms contained in +## a written agreement between you and The Qt Company. For licensing terms +## and conditions see https://www.qt.io/terms-conditions. For further +## information use the contact form at https://www.qt.io/contact-us. +## +## GNU General Public License Usage +## Alternatively, this file may be used under the terms of the GNU +## General Public License version 3 or (at your option) any later version +## approved by the KDE Free Qt Foundation. The licenses are as published by +## the Free Software Foundation and appearing in the file LICENSE.GPL3 +## included in the packaging of this file. Please review the following +## information to ensure the GNU General Public License requirements will +## be met: https://www.gnu.org/licenses/gpl-3.0.html. +## +## $QT_END_LICENSE$ +## +############################################################################ + +FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" +SRC_URI += " \ + file://0001-colibri-vf-remove-console-from-tty1.patch \ + file://0002-colibri-vf-fix-mmc-boot.patch \ + file://0001-Update-default-args-for-apalis-imx6.patch \ + file://0001-colibri-imx7-fix-update-u-boot.patch \ + " + +do_compile_append () { + if [ "${MACHINE}" = "colibri-vf" ]; then + oe_runmake u-boot-nand.imx + fi + +} -- cgit v1.2.3-54-g00ecf