ARM: ts4800: add basic board support
v6 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.
Changes v5->v6:
- removed mbrboot source as it was published by Technologic System
- removed custom U-boot v2016.07 which is now the default version in BR
Changes v4->v5 (after Peter Korsgaard's review):
- remove the unnecessary section from mbrboot binary to fix build
with Linaro toolchain
- cleanup Makefile
- delete all the unnecessary defconfig options
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 +++ board/technologic/ts4800/post-image.sh | 22 +++++++++++++++++++ configs/ts4800_defconfig | 19 ++++++++++++++++ package/Config.in | 1 + package/ts4800-mbrboot/Config.in | 5 +++++ package/ts4800-mbrboot/ts4800-mbrboot.mk | 20 +++++++++++++++++ 7 files changed, 107 insertions(+) create mode 100644 board/technologic/ts4800/genimage.cfg create mode 100644 board/technologic/ts4800/linux.fragment 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/ts4800-mbrboot.mk
Signature · 1 line
1.9.1
PATCH v6 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.
---
Changes v5->v6:
- removed mbrboot source as it was published by Technologic System
Changes v4->v5 (after Peter Korsgaard's review):
- remove the unnecessary section from output binary to fix build with
Linaro toolchain
- cleanup Makefile
package/Config.in | 1 + package/ts4800-mbrboot/Config.in | 5 +++++ package/ts4800-mbrboot/ts4800-mbrboot.mk | 20 ++++++++++++++++++++ 3 files changed, 26 insertions(+) create mode 100644 package/ts4800-mbrboot/Config.in create mode 100644 package/ts4800-mbrboot/ts4800-mbrboot.mk
package/Config.in +1 -0
@@ -330,6 +330,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/ts4800-mbrboot.mk new file +20 -0
@@ -0,0 +1,20 @@ +################################################################################ +# +# ts4800-mbrboot +# +################################################################################ + +TS4800_MBRBOOT_VERSION = master +TS4800_MBRBOOT_SITE = $(call github,embeddedarm,ts4800-mbrboot,$(TS4800_MBRBOOT_VERSION)) +TS4800_MBRBOOT_LICENSE = BSD-2c +TS4800_MBRBOOT_LICENSE_FILES = LICENSE + +define TS4800_MBRBOOT_BUILD_CMDS + $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D) +endef + +define TS4800_MBRBOOT_INSTALL_TARGET_CMDS + $(INSTALL) -D -m 0644 $(@D)/mbrboot.bin $(BINARIES_DIR)/mbrboot.bin +endef + +$(eval $(generic-package))
Signature · 1 line
1.9.1
PATCH v6 1/2 ts4800-mbrboot: new package
Patrick, All,
On 2016-07-15 11:00 -0400, Patrick Keroulas spake thusly:
Quoted 6 lines
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.Signed-off-by Patrick Keroulas <[email protected]>---
[--SNIP--]
package/ts4800-mbrboot/Config.in
Quoted 5 lines
package/ts4800-mbrboot/Config.in new file +0
-0
The firmware stuff is more for firmware blobs that need to be loaded into a device (e.g. a WiFi dongle, and ehternet card, a GPU...);
ts4800-mbrboot is really a bootloader, so it should probably go to boot/ rather than package/ and be added in the bootloader menu.
package/ts4800-mbrboot/Config.in line 5
Quoted 6 lines
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.
Please add a homepage (or if none, the github repo).
package/ts4800-mbrboot/ts4800-mbrboot.mk line 7
Quoted 13 lines
package/ts4800-mbrboot/ts4800-mbrboot.mk new file +7
-0@@ -0,0 +1,20 @@ +################################################################################ +# +# ts4800-mbrboot +# +################################################################################ + +TS4800_MBRBOOT_VERSION = master
Don;t use 'master' as it is a moving target: today, it points to a specific chageset, but tomorrow it may well point to another, thus rendering the build non-reproducible.
Please use a tag or the sha1 of a commit, like:
TS4800_MBRBOOT_VERSION = cf8f7072ed5a4a4e48fcb9841b2e31e519ec5dca
Otherwise looks sane.
Regards,
Yann E. MORIN.
Quoted 20 lines
package/ts4800-mbrboot/ts4800-mbrboot.mk new file +13
-0+TS4800_MBRBOOT_SITE = $(call github,embeddedarm,ts4800-mbrboot,$(TS4800_MBRBOOT_VERSION)) +TS4800_MBRBOOT_LICENSE = BSD-2c +TS4800_MBRBOOT_LICENSE_FILES = LICENSE + +define TS4800_MBRBOOT_BUILD_CMDS + $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D) +endef + +define TS4800_MBRBOOT_INSTALL_TARGET_CMDS + $(INSTALL) -D -m 0644 $(@D)/mbrboot.bin $(BINARIES_DIR)/mbrboot.bin +endef + +$(eval $(generic-package))Signature · 6 lines
1.9.1 _______________________________________________ buildroot mailing list buildroot at busybox.net http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------'
PATCH v6 1/2 ts4800-mbrboot: new package
Hello,
Quoted 1 line · Yann E. MORIN
Otherwise looks sane.
Since this package is a bootloader, it should be in boot/ and its option named BR2_TARGET_TS4800_MBRBOOT, to be consistent with other bootloaders.
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
PATCH v6 2/2 configs: add defconfig for TS-4800
In reply to Patrick KeroulasThe TS-4800 is supported by mainline Linux as of 4.5 and by U-boot as of v2016-07.
The package requires the custom ts4800-mbrboot routine.
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
---
Changes v5->v6:
- removed custom U-boot v2016.07 which is now the default version in BR
Changes v4->v5 (after Peter Korsgaard's review):
- delete all the unnecessary defconfig options
board/technologic/ts4800/genimage.cfg | 37 +++++++++++++++++++++++++++++++++ board/technologic/ts4800/linux.fragment | 3 +++ board/technologic/ts4800/post-image.sh | 22 ++++++++++++++++++++ configs/ts4800_defconfig | 19 +++++++++++++++++ 4 files changed, 81 insertions(+) create mode 100644 board/technologic/ts4800/genimage.cfg create mode 100644 board/technologic/ts4800/linux.fragment 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 = 256k + } + + 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/post-image.sh new file +22 -0
@@ -0,0 +1,22 @@ +#!/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 + +rm -rf ${GENIMAGE_TMP} + +${HOST_DIR}/usr/bin/genimage \ + --config ${GENIMAGE_CFG} \ + --rootpath ${TARGET_DIR} \ + --tmppath ${GENIMAGE_TMP} \ + --inputpath $IDIR \ + --outputpath $IDIR + +exit $?
configs/ts4800_defconfig new file +19 -0
@@ -0,0 +1,19 @@ +BR2_arm=y +BR2_cortex_a8=y +BR2_ROOTFS_POST_IMAGE_SCRIPT="board/technologic/ts4800/post-image.sh" +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_VERSION=y +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.6.3" +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_TS4800_MBRBOOT=y +BR2_TARGET_ROOTFS_EXT2=y +BR2_TARGET_ROOTFS_EXT2_4=y +BR2_TARGET_UBOOT=y +BR2_TARGET_UBOOT_BOARDNAME="ts4800" +BR2_PACKAGE_HOST_DOSFSTOOLS=y +BR2_PACKAGE_HOST_GENIMAGE=y +BR2_PACKAGE_HOST_MTOOLS=y
Signature · 1 line
1.9.1