* [Buildroot] [PATCH v6 0/2] ARM: ts4800: add basic board support
@ 2016-07-15 15:00 Patrick Keroulas
2016-07-15 15:00 ` [Buildroot] [PATCH v6 1/2] ts4800-mbrboot: new package Patrick Keroulas
2016-07-15 15:01 ` [Buildroot] [PATCH v6 2/2] configs: add defconfig for TS-4800 Patrick Keroulas
0 siblings, 2 replies; 5+ messages in thread
From: Patrick Keroulas @ 2016-07-15 15:00 UTC (permalink / raw)
To: buildroot
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
--
1.9.1
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Buildroot] [PATCH v6 1/2] ts4800-mbrboot: new package
2016-07-15 15:00 [Buildroot] [PATCH v6 0/2] ARM: ts4800: add basic board support Patrick Keroulas
@ 2016-07-15 15:00 ` Patrick Keroulas
2016-07-15 16:12 ` Yann E. MORIN
2016-07-15 15:01 ` [Buildroot] [PATCH v6 2/2] configs: add defconfig for TS-4800 Patrick Keroulas
1 sibling, 1 reply; 5+ messages in thread
From: Patrick Keroulas @ 2016-07-15 15:00 UTC (permalink / raw)
To: buildroot
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 <patrick.keroulas@savoirfairelinux.com>
---
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
diff --git a/package/Config.in b/package/Config.in
index 1910251..3c099c8 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -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"
diff --git a/package/ts4800-mbrboot/Config.in b/package/ts4800-mbrboot/Config.in
new file mode 100644
index 0000000..556b0ec
--- /dev/null
+++ b/package/ts4800-mbrboot/Config.in
@@ -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.
diff --git a/package/ts4800-mbrboot/ts4800-mbrboot.mk b/package/ts4800-mbrboot/ts4800-mbrboot.mk
new file mode 100644
index 0000000..825a66b
--- /dev/null
+++ b/package/ts4800-mbrboot/ts4800-mbrboot.mk
@@ -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))
--
1.9.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [Buildroot] [PATCH v6 2/2] configs: add defconfig for TS-4800
2016-07-15 15:00 [Buildroot] [PATCH v6 0/2] ARM: ts4800: add basic board support Patrick Keroulas
2016-07-15 15:00 ` [Buildroot] [PATCH v6 1/2] ts4800-mbrboot: new package Patrick Keroulas
@ 2016-07-15 15:01 ` Patrick Keroulas
1 sibling, 0 replies; 5+ messages in thread
From: Patrick Keroulas @ 2016-07-15 15:01 UTC (permalink / raw)
To: buildroot
The 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
Signed-off-by: Damien Riegel <damien.riegel@savoirfairelinux.com>
Signed-off-by: Patrick Keroulas <patrick.keroulas@savoirfairelinux.com>
---
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
diff --git a/board/technologic/ts4800/genimage.cfg b/board/technologic/ts4800/genimage.cfg
new file mode 100644
index 0000000..2070cc5
--- /dev/null
+++ b/board/technologic/ts4800/genimage.cfg
@@ -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
+ }
+}
diff --git a/board/technologic/ts4800/linux.fragment b/board/technologic/ts4800/linux.fragment
new file mode 100644
index 0000000..0451c86
--- /dev/null
+++ b/board/technologic/ts4800/linux.fragment
@@ -0,0 +1,3 @@
+CONFIG_TOUCHSCREEN_TS4800=y
+CONFIG_TS4800_WATCHDOG=y
+CONFIG_TS4800_IRQ=y
diff --git a/board/technologic/ts4800/post-image.sh b/board/technologic/ts4800/post-image.sh
new file mode 100755
index 0000000..bbfea28
--- /dev/null
+++ b/board/technologic/ts4800/post-image.sh
@@ -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 $?
diff --git a/configs/ts4800_defconfig b/configs/ts4800_defconfig
new file mode 100644
index 0000000..eacf8ff
--- /dev/null
+++ b/configs/ts4800_defconfig
@@ -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
--
1.9.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [Buildroot] [PATCH v6 1/2] ts4800-mbrboot: new package
2016-07-15 15:00 ` [Buildroot] [PATCH v6 1/2] ts4800-mbrboot: new package Patrick Keroulas
@ 2016-07-15 16:12 ` Yann E. MORIN
2016-07-15 17:24 ` Thomas Petazzoni
0 siblings, 1 reply; 5+ messages in thread
From: Yann E. MORIN @ 2016-07-15 16:12 UTC (permalink / raw)
To: buildroot
Patrick, All,
On 2016-07-15 11:00 -0400, Patrick Keroulas spake thusly:
> 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 <patrick.keroulas@savoirfairelinux.com>
> ---
[--SNIP--]
> diff --git a/package/ts4800-mbrboot/Config.in b/package/ts4800-mbrboot/Config.in
> new file mode 100644
> index 0000000..556b0ec
> --- /dev/null
> +++ b/package/ts4800-mbrboot/Config.in
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.
> @@ -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).
> diff --git a/package/ts4800-mbrboot/ts4800-mbrboot.mk b/package/ts4800-mbrboot/ts4800-mbrboot.mk
> new file mode 100644
> index 0000000..825a66b
> --- /dev/null
> +++ b/package/ts4800-mbrboot/ts4800-mbrboot.mk
> @@ -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.
> +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))
> --
> 1.9.1
>
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot
--
.-----------------.--------------------.------------------.--------------------.
| 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. |
'------------------------------^-------^------------------^--------------------'
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Buildroot] [PATCH v6 1/2] ts4800-mbrboot: new package
2016-07-15 16:12 ` Yann E. MORIN
@ 2016-07-15 17:24 ` Thomas Petazzoni
0 siblings, 0 replies; 5+ messages in thread
From: Thomas Petazzoni @ 2016-07-15 17:24 UTC (permalink / raw)
To: buildroot
Hello,
On Fri, 15 Jul 2016 18:12:17 +0200, Yann E. MORIN wrote:
> 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
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2016-07-15 17:24 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-07-15 15:00 [Buildroot] [PATCH v6 0/2] ARM: ts4800: add basic board support Patrick Keroulas
2016-07-15 15:00 ` [Buildroot] [PATCH v6 1/2] ts4800-mbrboot: new package Patrick Keroulas
2016-07-15 16:12 ` Yann E. MORIN
2016-07-15 17:24 ` Thomas Petazzoni
2016-07-15 15:01 ` [Buildroot] [PATCH v6 2/2] configs: add defconfig for TS-4800 Patrick Keroulas
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox