ARM: ts4800: add basic board support
v3 cover ARM: ts4800: add basic board support
This patchset adds support for the TS-4800 SoM manufactured by Technologic Systems based on the Freescale i.MX515 SoC.
Patrick Keroulas (2):
ts4800-mbrboot: new package
configs: add defconfig for TS-4800
board/technologic/ts4800/genimage.cfg | 37 +++++++++++ board/technologic/ts4800/linux.fragment | 3 + ...800-add-CONFIG_SYS_FSL_ERRATUM_ESDHC_A001.patch | 36 +++++++++++ .../uboot/0002-ts4800-patch-env-to-boot-dts.patch | 56 +++++++++++++++++ board/technologic/ts4800/post-image.sh | 23 +++++++ configs/ts4800_defconfig | 28 +++++++++ package/Config.in | 1 + package/ts4800-mbrboot/Config.in | 5 ++ package/ts4800-mbrboot/src/LICENSE | 25 ++++++++ package/ts4800-mbrboot/src/Makefile | 21 +++++++ package/ts4800-mbrboot/src/mbrboot.c | 72 ++++++++++++++++++++++ package/ts4800-mbrboot/src/mbrboot.ld | 56 +++++++++++++++++ package/ts4800-mbrboot/ts4800-mbrboot.mk | 22 +++++++ 13 files changed, 385 insertions(+) create mode 100644 board/technologic/ts4800/genimage.cfg create mode 100644 board/technologic/ts4800/linux.fragment create mode 100644 board/technologic/ts4800/patches/uboot/0001-ts4800-add-CONFIG_SYS_FSL_ERRATUM_ESDHC_A001.patch create mode 100644 board/technologic/ts4800/patches/uboot/0002-ts4800-patch-env-to-boot-dts.patch create mode 100755 board/technologic/ts4800/post-image.sh create mode 100644 configs/ts4800_defconfig create mode 100644 package/ts4800-mbrboot/Config.in create mode 100644 package/ts4800-mbrboot/src/LICENSE create mode 100644 package/ts4800-mbrboot/src/Makefile create mode 100644 package/ts4800-mbrboot/src/mbrboot.c create mode 100644 package/ts4800-mbrboot/src/mbrboot.ld create mode 100644 package/ts4800-mbrboot/ts4800-mbrboot.mk
Signature · 1 line
1.9.1
PATCH v3 1/2 ts4800-mbrboot: new package
This MBR routine is based on TS' original bootloader. It is loaded by the bootrom stored in the companion FPGA, and chainloads an executable located at the beginning of the first non-fs (0xda) partition.
--- package/Config.in | 1 + package/ts4800-mbrboot/Config.in | 5 +++ package/ts4800-mbrboot/src/LICENSE | 25 +++++++++++ package/ts4800-mbrboot/src/Makefile | 21 ++++++++++ package/ts4800-mbrboot/src/mbrboot.c | 72 ++++++++++++++++++++++++++++++++ package/ts4800-mbrboot/src/mbrboot.ld | 56 +++++++++++++++++++++++++ package/ts4800-mbrboot/ts4800-mbrboot.mk | 22 ++++++++++ 7 files changed, 202 insertions(+) create mode 100644 package/ts4800-mbrboot/Config.in create mode 100644 package/ts4800-mbrboot/src/LICENSE create mode 100644 package/ts4800-mbrboot/src/Makefile create mode 100644 package/ts4800-mbrboot/src/mbrboot.c create mode 100644 package/ts4800-mbrboot/src/mbrboot.ld create mode 100644 package/ts4800-mbrboot/ts4800-mbrboot.mk
package/Config.in +1 -0
@@ -336,6 +336,7 @@ menu "Firmware" source "package/linux-firmware/Config.in" source "package/rpi-firmware/Config.in" source "package/sunxi-boards/Config.in" + source "package/ts4800-mbrboot/Config.in" source "package/ux500-firmware/Config.in" source "package/wilc1000-firmware/Config.in" source "package/zd1211-firmware/Config.in"
package/ts4800-mbrboot/Config.in new file +5 -0
@@ -0,0 +1,5 @@ +config BR2_PACKAGE_TS4800_MBRBOOT + bool "ts4800-mbrboot" + depends on BR2_ARM_CPU_ARMV7A + help + This package generate the ts4800 bootloader.
package/ts4800-mbrboot/src/LICENSE new file +25 -0
@@ -0,0 +1,25 @@ + Copyright (C) 2009, Technologic Systems Inc. + Copyright (C) 2016, Savoir-faire Linux Inc. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + +1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS +IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR +CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; +OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
package/ts4800-mbrboot/src/Makefile new file +21 -0
@@ -0,0 +1,21 @@ +COPTS=-march=armv7-a -marm -mno-thumb-interwork -Os -mno-apcs-frame -fomit-frame-pointer -ffunction-sections -fdata-sections + +.PHONY: all clean + +all: mbrboot.bin + +mbrboot.bin : mbrboot.elf + $(OBJCOPY) -S -O binary mbrboot.elf mbrboot.bin + +mbrboot.s : mbrboot.c + $(CC) -Wall $(COPTS) -S -c mbrboot.c + +mbrboot.o : mbrboot.c + $(CC) -Wall $(COPTS) -c mbrboot.c + +mbrboot.elf : mbrboot.o mbrboot.ld + $(CC) -Wl,--gc-sections -Wl,-static -o mbrboot.elf -nostdlib -Tmbrboot.ld -fno-pic mbrboot.o + size mbrboot.elf + +clean: + rm -f *.elf *.bin *.o
package/ts4800-mbrboot/src/mbrboot.c new file +72 -0
72 lines not on this page · raw message
package/ts4800-mbrboot/src/mbrboot.ld new file +56 -0
56 lines not on this page · raw message
package/ts4800-mbrboot/ts4800-mbrboot.mk new file +22 -0
@@ -0,0 +1,22 @@ +################################################################################ +# +# ts4800-mbrboot +# +################################################################################ + +TS4800_MBRBOOT_VERSION = 1.0 +TS4800_MBRBOOT_SITE = $(TOPDIR)/package/ts4800-mbrboot/src +TS4800_MBRBOOT_SITE_METHOD = local +TS4800_MBRBOOT_LICENSE = BSD-2c +TS4800_MBRBOOT_LICENSE_FILES = LICENSE + +define TS4800_MBRBOOT_BUILD_CMDS + $(MAKE) CC="$(TARGET_CC)" LD="$(TARGET_LD)" \ + OBJCOPY="$(TARGET_OBJCOPY)" -C $(@D) +endef + +define TS4800_MBRBOOT_INSTALL_TARGET_CMDS + $(INSTALL) -m 0644 $(@D)/mbrboot.bin $(BINARIES_DIR)/ +endef + +$(eval $(generic-package))
Signature · 1 line
1.9.1
PATCH v3 2/2 configs: add defconfig for TS-4800
In reply to Patrick KeroulasThe TS-4800 is supported by mainline Linux as of 4.5.
There are two patches for U-Boot. The first one modifies the default environment to more sane values. The second defines an errata that affects the board. These patches were sent upstream, on u-boot-imx branch which, hopefully, will be merged soon and then, removed from Buildroot.
A post-image script is provided to generate an image that can be "dd" directly to an SD card.
More details on the board here:
http://wiki.embeddedarm.com/wiki/TS-4800
--- board/technologic/ts4800/genimage.cfg | 37 ++++++++++++++ board/technologic/ts4800/linux.fragment | 3 ++ ...800-add-CONFIG_SYS_FSL_ERRATUM_ESDHC_A001.patch | 36 ++++++++++++++ .../uboot/0002-ts4800-patch-env-to-boot-dts.patch | 56 ++++++++++++++++++++++ board/technologic/ts4800/post-image.sh | 23 +++++++++ configs/ts4800_defconfig | 28 +++++++++++ 6 files changed, 183 insertions(+) create mode 100644 board/technologic/ts4800/genimage.cfg create mode 100644 board/technologic/ts4800/linux.fragment create mode 100644 board/technologic/ts4800/patches/uboot/0001-ts4800-add-CONFIG_SYS_FSL_ERRATUM_ESDHC_A001.patch create mode 100644 board/technologic/ts4800/patches/uboot/0002-ts4800-patch-env-to-boot-dts.patch create mode 100755 board/technologic/ts4800/post-image.sh create mode 100644 configs/ts4800_defconfig
board/technologic/ts4800/genimage.cfg new file +37 -0
@@ -0,0 +1,37 @@ +image boot.vfat { + vfat { + files = { + "zImage", + "imx51-ts4800.dtb" + } + } + size = 8M +} + +image sdcard.img { + hdimage { + } + + partition mbrboot { + in-partition-table = "no" + image = "mbrboot.bin" + offset = 0 + } + + partition uboot { + partition-type = 0xda + image = "u-boot.bin" + size = 8M + } + + partition kernel { + partition-type = 0xC + image = "boot.vfat" + } + + partition rootfs { + partition-type = 0x83 + image = "rootfs.ext4" + size = 256M + } +}
board/technologic/ts4800/linux.fragment new file +3 -0
@@ -0,0 +1,3 @@ +CONFIG_TOUCHSCREEN_TS4800=y +CONFIG_TS4800_WATCHDOG=y +CONFIG_TS4800_IRQ=y
board/technologic/ts4800/patches/uboot/0001-ts4800-add-CONFIG_SYS_FSL_ERRATUM_ESDHC_A001.patch new file +36 -0
@@ -0,0 +1,36 @@ +From dd52f1df6da0c03c8a8367385a375d6abdf67b0b Mon Sep 17 00:00:00 2001 +From: Sebastien Bourdelin <[email protected]> +Date: Thu, 21 Apr 2016 11:49:31 -0400 +Subject: [PATCH] ts4800: add CONFIG_SYS_FSL_ERRATUM_ESDHC_A001 + +This commit fixes the MMC data transactions timeout problem on the +TS4800. + +The changes introduced in the commit e978a31 on the timeout calculation +for the MMC data transactions has revealed there is something wrong with +the timeout setting of the eSDHC controller used in the IMX51. + +The IMX51 seems to be concerned by this erratum and without this change +the MMC driver is unable to do any transactions. + +Signed-off-by: Sebastien Bourdelin <[email protected]> +--- + include/configs/ts4800.h | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/include/configs/ts4800.h b/include/configs/ts4800.h +index fcc9d80..5e5e4d3 100644 +--- a/include/configs/ts4800.h ++++ b/include/configs/ts4800.h +@@ -63,6 +63,8 @@ + #define CONFIG_FSL_ESDHC + #define CONFIG_SYS_FSL_ESDHC_ADDR MMC_SDHC1_BASE_ADDR + ++#define CONFIG_SYS_FSL_ERRATUM_ESDHC_A001 ++ + #define CONFIG_MMC + + #define CONFIG_CMD_MMC +-- +2.5.0 +
board/technologic/ts4800/patches/uboot/0002-ts4800-patch-env-to-boot-dts.patch new file +56 -0
56 lines not on this page · raw message
board/technologic/ts4800/post-image.sh new file +23 -0
@@ -0,0 +1,23 @@ +#!/bin/bash +# +# Copyright (C) 2015 Savoir-faire Linux +# Post image generation script. + +IDIR="$1" + +BOARD_DIR="board/technologic/ts4800" +GENIMAGE_CFG_DEFAULT="${BOARD_DIR}/genimage.cfg" +GENIMAGE_CFG=${GENIMAGE_CFG_DEFAULT} +GENIMAGE_TMP=${BUILD_DIR}/.genimage_tmp + +${HOST_DIR}/usr/bin/genimage \ + --config ${GENIMAGE_CFG} \ + --rootpath ${TARGET_DIR} \ + --tmppath ${GENIMAGE_TMP} \ + --inputpath $IDIR \ + --outputpath $IDIR + +ret=${?} +rm -rf ${GENIMAGE_TMP} +exit ${ret} +
configs/ts4800_defconfig new file +28 -0
@@ -0,0 +1,28 @@ +BR2_arm=y +BR2_cortex_a8=y +BR2_ARM_FPU_NEON=y +BR2_GLOBAL_PATCH_DIR="$(TOPDIR)/board/technologic/ts4800/patches/" +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_5=y +BR2_TOOLCHAIN_BUILDROOT_LOCALE=y +BR2_BINUTILS_VERSION_2_24_X=y +BR2_TOOLCHAIN_BUILDROOT_CXX=y +BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_MDEV=y +BR2_TARGET_GENERIC_GETTY_PORT="ttymxc0" +BR2_TARGET_GENERIC_GETTY_BAUDRATE_115200=y +# BR2_TARGET_GENERIC_REMOUNT_ROOTFS_RW is not set +BR2_ROOTFS_POST_IMAGE_SCRIPT="board/technologic/ts4800/post-image.sh" +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_DEFCONFIG="imx_v6_v7" +BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="$(TOPDIR)/board/technologic/ts4800/linux.fragment" +BR2_LINUX_KERNEL_DTS_SUPPORT=y +BR2_LINUX_KERNEL_INTREE_DTS_NAME="imx51-ts4800" +BR2_PACKAGE_BUSYBOX_WATCHDOG=y +BR2_PACKAGE_FBTERM=y +BR2_PACKAGE_TS4800_MBRBOOT=y +BR2_TARGET_ROOTFS_EXT2=y +BR2_TARGET_ROOTFS_EXT2_4=y +# BR2_TARGET_ROOTFS_TAR is not set +BR2_TARGET_UBOOT=y +BR2_TARGET_UBOOT_BOARDNAME="ts4800" +BR2_PACKAGE_HOST_GENIMAGE=y +BR2_PACKAGE_HOST_SQUASHFS=y
Signature · 1 line
1.9.1
PATCH v3 2/2 configs: add defconfig for TS-4800
board/technologic/ts4800/genimage.cfg line 23
Quoted 3 lines · Patrick Keroulas
board/technologic/ts4800/genimage.cfg new file +3
-0+ partition uboot { + partition-type = 0xda + image = "u-boot.bin"
Just curious: why do you use u-boot.bin instead of u-boot.imx?
PATCH v3 2/2 configs: add defconfig for TS-4800
Quoted 1 line · Fabio Estevam
Just curious: why do you use u-boot.bin instead of u-boot.imx?
Ok, got it now. Looking at your other patch I see you have an initial bootloader that loads u-boot.bin.
v3 cover ARM: ts4800: add basic board support
In reply to Patrick KeroulasHello,
Can anyone take a look at this patch set please?
Thank you,
Signature · 56 lines
Patrick Keroulas Consultant en logiciel libre, Savoir-faire Linux Inc. 7275 Saint-Urbain, bureau 200 Montr?al, Qu?bec H2R 2Y5 t?l: (514) 276-5468 ext. 167 fax: (514) 276-5465 _____________________ From: "Patrick Keroulas" <[email protected]> To: "buildroot" <[email protected]>, embedded-discuss-bounces at lists.savoirfairelinux.net Cc: "Patrick Keroulas" <[email protected]> Sent: Thursday, May 26, 2016 5:03:51 PM Subject: [PATCH v3 0/2] ARM: ts4800: add basic board support This patchset adds support for the TS-4800 SoM manufactured by Technologic Systems based on the Freescale i.MX515 SoC. Patrick Keroulas (2): ts4800-mbrboot: new package configs: add defconfig for TS-4800 board/technologic/ts4800/genimage.cfg | 37 +++++++++++ board/technologic/ts4800/linux.fragment | 3 + ...800-add-CONFIG_SYS_FSL_ERRATUM_ESDHC_A001.patch | 36 +++++++++++ .../uboot/0002-ts4800-patch-env-to-boot-dts.patch | 56 +++++++++++++++++ board/technologic/ts4800/post-image.sh | 23 +++++++ configs/ts4800_defconfig | 28 +++++++++ package/Config.in | 1 + package/ts4800-mbrboot/Config.in | 5 ++ package/ts4800-mbrboot/src/LICENSE | 25 ++++++++ package/ts4800-mbrboot/src/Makefile | 21 +++++++ package/ts4800-mbrboot/src/mbrboot.c | 72 ++++++++++++++++++++++ package/ts4800-mbrboot/src/mbrboot.ld | 56 +++++++++++++++++ package/ts4800-mbrboot/ts4800-mbrboot.mk | 22 +++++++ 13 files changed, 385 insertions(+) create mode 100644 board/technologic/ts4800/genimage.cfg create mode 100644 board/technologic/ts4800/linux.fragment create mode 100644 board/technologic/ts4800/patches/uboot/0001-ts4800-add-CONFIG_SYS_FSL_ERRATUM_ESDHC_A001.patch create mode 100644 board/technologic/ts4800/patches/uboot/0002-ts4800-patch-env-to-boot-dts.patch create mode 100755 board/technologic/ts4800/post-image.sh create mode 100644 configs/ts4800_defconfig create mode 100644 package/ts4800-mbrboot/Config.in create mode 100644 package/ts4800-mbrboot/src/LICENSE create mode 100644 package/ts4800-mbrboot/src/Makefile create mode 100644 package/ts4800-mbrboot/src/mbrboot.c create mode 100644 package/ts4800-mbrboot/src/mbrboot.ld create mode 100644 package/ts4800-mbrboot/ts4800-mbrboot.mk -- 1.9.1 -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20160601/901914cb/attachment.html>