Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH v2 0/4] LEGO MINDSTORMS EV3 Updates
@ 2016-11-02  3:15 David Lechner
  2016-11-02  3:15 ` [Buildroot] [PATCH v2 1/4] configs/lego_ev3: add U-Boot support David Lechner
                   ` (3 more replies)
  0 siblings, 4 replies; 9+ messages in thread
From: David Lechner @ 2016-11-02  3:15 UTC (permalink / raw)
  To: buildroot

v2 changes:
* Specified specific U-Boot version
* Using config fragment for linux kernel config changes
* Added dependency host-dosfstool and host-mtools
* Renamed ev3dev package and kernel extension to ev3dev-linux-drivers
* Removed dest variable to simplify kernel extension makefile
* Fixed "from from" typo

David Lechner (4):
  configs/lego_ev3: add U-Boot support
  board/lego/ev3: Create images using genimage
  linux: add ev3dev extension
  board/lego/ev3: Use ev3dev linux ext for ev3dev drivers

 board/lego/ev3/genimage.cfg                        | 57 +++++++++++++++
 board/lego/ev3/linux.fragment                      |  7 ++
 .../0001-Create-empty-drivers-lego-Kconfig.patch   | 24 -------
 board/lego/ev3/post-image.sh                       | 14 ++++
 board/lego/ev3/readme.txt                          | 84 ++++++----------------
 configs/lego_ev3_defconfig                         | 21 ++++--
 linux/Config.ext.in                                | 10 +++
 linux/linux-ext-ev3dev-linux-drivers.mk            | 12 ++++
 package/Config.in                                  |  1 +
 package/ev3dev-linux-drivers/Config.in             | 12 ++++
 .../ev3dev-linux-drivers/ev3dev-linux-drivers.mk   | 11 +++
 .../ev3dev-linux-drivers/lego-linux-drivers.hash   |  2 +
 support/scripts/pkg-stats                          |  1 +
 13 files changed, 164 insertions(+), 92 deletions(-)
 create mode 100644 board/lego/ev3/genimage.cfg
 create mode 100644 board/lego/ev3/linux.fragment
 delete mode 100644 board/lego/ev3/patches/linux/0001-Create-empty-drivers-lego-Kconfig.patch
 create mode 100755 board/lego/ev3/post-image.sh
 create mode 100644 linux/linux-ext-ev3dev-linux-drivers.mk
 create mode 100644 package/ev3dev-linux-drivers/Config.in
 create mode 100644 package/ev3dev-linux-drivers/ev3dev-linux-drivers.mk
 create mode 100644 package/ev3dev-linux-drivers/lego-linux-drivers.hash

-- 
2.7.4

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Buildroot] [PATCH v2 1/4] configs/lego_ev3: add U-Boot support
  2016-11-02  3:15 [Buildroot] [PATCH v2 0/4] LEGO MINDSTORMS EV3 Updates David Lechner
@ 2016-11-02  3:15 ` David Lechner
  2016-11-02 16:31   ` Thomas Petazzoni
  2016-11-02  3:15 ` [Buildroot] [PATCH v2 2/4] board/lego/ev3: Create images using genimage David Lechner
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 9+ messages in thread
From: David Lechner @ 2016-11-02  3:15 UTC (permalink / raw)
  To: buildroot

This adds U-Boot configuration for LEGO MINDSTORMS EV3. U-Boot has
had support for LEGO MINDSTORMS EV3 since v2016.05.

Signed-off-by: David Lechner <david@lechnology.com>
---
 configs/lego_ev3_defconfig | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/configs/lego_ev3_defconfig b/configs/lego_ev3_defconfig
index 1ddc4f9..1521fa7 100644
--- a/configs/lego_ev3_defconfig
+++ b/configs/lego_ev3_defconfig
@@ -24,3 +24,10 @@ BR2_LINUX_KERNEL_UIMAGE=y
 BR2_TARGET_ROOTFS_EXT2=y
 BR2_TARGET_ROOTFS_EXT2_3=y
 # BR2_TARGET_ROOTFS_TAR is not set
+
+# U-Boot
+BR2_TARGET_UBOOT=y
+BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y
+BR2_TARGET_UBOOT_CUSTOM_VERSION=y
+BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2016.09.01"
+BR2_TARGET_UBOOT_BOARD_DEFCONFIG="legoev3"
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [Buildroot] [PATCH v2 2/4] board/lego/ev3: Create images using genimage
  2016-11-02  3:15 [Buildroot] [PATCH v2 0/4] LEGO MINDSTORMS EV3 Updates David Lechner
  2016-11-02  3:15 ` [Buildroot] [PATCH v2 1/4] configs/lego_ev3: add U-Boot support David Lechner
@ 2016-11-02  3:15 ` David Lechner
  2016-11-02 16:46   ` Thomas Petazzoni
  2016-11-02  3:15 ` [Buildroot] [PATCH v2 3/4] linux: add ev3dev extension David Lechner
  2016-11-02  3:15 ` [Buildroot] [PATCH v2 4/4] board/lego/ev3: Use ev3dev linux ext for ev3dev drivers David Lechner
  3 siblings, 1 reply; 9+ messages in thread
From: David Lechner @ 2016-11-02  3:15 UTC (permalink / raw)
  To: buildroot

This adds a script to create SD card and flash images for LEGO MINDSTORMS
EV3 using the genimage tool.

The default kernel config had to be modifed to add support for squashfs
and to add a ram disk.

Signed-off-by: David Lechner <david@lechnology.com>
---
 board/lego/ev3/genimage.cfg   | 57 ++++++++++++++++++++++++++++++
 board/lego/ev3/linux.fragment |  7 ++++
 board/lego/ev3/post-image.sh  | 14 ++++++++
 board/lego/ev3/readme.txt     | 80 ++++++++++---------------------------------
 configs/lego_ev3_defconfig    | 10 +++++-
 5 files changed, 105 insertions(+), 63 deletions(-)
 create mode 100644 board/lego/ev3/genimage.cfg
 create mode 100644 board/lego/ev3/linux.fragment
 create mode 100755 board/lego/ev3/post-image.sh

diff --git a/board/lego/ev3/genimage.cfg b/board/lego/ev3/genimage.cfg
new file mode 100644
index 0000000..6b8546c
--- /dev/null
+++ b/board/lego/ev3/genimage.cfg
@@ -0,0 +1,57 @@
+# LEGO MINDSTORMS EV3 can boot from a 16MB flash or from a microSD card.
+# The U-Boot bootloader from the flash is always used, even when booting
+# from a microSD card.
+
+# The Flash image
+
+flash nor-16M-256 {
+	pebsize = 4096
+	numpebs = 4096
+	minimum-io-unit-size = 256
+}
+
+image flash.bin {
+	flash {
+	}
+	flashtype = "nor-16M-256"
+	partition uboot {
+		image = "u-boot.bin"
+		size = 320K
+	}
+	partition uimage {
+		image = "uImage"
+		size = 3M
+		offset = 0x50000
+	}
+	partition rootfs {
+		image = "rootfs.squashfs"
+		size = 9600K
+		offset = 0x350000
+	}
+}
+
+# The SD card image
+
+image boot.vfat {
+	vfat {
+		files = {
+			"uImage"
+		}
+	}
+	size = 16M
+}
+
+image sdcard.img {
+	hdimage {
+	}
+	partition boot {
+		partition-type = 0xC
+		bootable = "true"
+		image = "boot.vfat"
+		offset = 4M
+	}
+	partition rootfs {
+		partition-type = 0x83
+		image = "rootfs.ext2"
+	}
+}
diff --git a/board/lego/ev3/linux.fragment b/board/lego/ev3/linux.fragment
new file mode 100644
index 0000000..5593636
--- /dev/null
+++ b/board/lego/ev3/linux.fragment
@@ -0,0 +1,7 @@
+CONFIG_BLK_DEV_RAM=y
+CONFIG_BLK_DEV_RAM_COUNT=1
+CONFIG_BLK_DEV_RAM_SIZE=32768
+CONFIG_SQUASHFS=y
+CONFIG_SQUASHFS_LZ4=y
+CONFIG_SQUASHFS_LZO=y
+CONFIG_SQUASHFS_XZ=y
diff --git a/board/lego/ev3/post-image.sh b/board/lego/ev3/post-image.sh
new file mode 100755
index 0000000..81626dc
--- /dev/null
+++ b/board/lego/ev3/post-image.sh
@@ -0,0 +1,14 @@
+#!/bin/sh
+
+BOARD_DIR="$(dirname $0)"
+GENIMAGE_CFG="${BOARD_DIR}/genimage.cfg"
+GENIMAGE_TMP="${BUILD_DIR}/genimage.tmp"
+
+rm -rf "${GENIMAGE_TMP}"
+
+genimage \
+  --rootpath "${TARGET_DIR}" \
+  --tmppath "${GENIMAGE_TMP}" \
+  --inputpath "${BINARIES_DIR}" \
+  --outputpath "${BINARIES_DIR}" \
+  --config "${GENIMAGE_CFG}"
diff --git a/board/lego/ev3/readme.txt b/board/lego/ev3/readme.txt
index 7d9ec4f..c075af5 100644
--- a/board/lego/ev3/readme.txt
+++ b/board/lego/ev3/readme.txt
@@ -25,9 +25,13 @@ How it works
 Boot process :
 --------------
 
-The u-boot on-board the EV3 brick has provision to boot a Linux kernel from the
-external ?SD card. It will try to load a uImage from the first ?SD card
-partition, which must be formatted with a FAT filesystem.
+The EV3 boots from an EEPROM. This loads whatever is on the built-in 16MB flash
+(usually U-Boot) and runs it. The U-Boot from the official LEGO firmware and
+mainline U-Boot will attempt to boot a Linux kernel from the external ?SD card.
+It will try to load a uImage (and optional boot.scr) from the first ?SD card
+partition, which must be formatted with a FAT filesystem. If no ?SD is found or
+it does not contain a uImage file, then the EV3 will boot the uImage from the
+built-in 16MB flash.
 
 How to build it
 ===============
@@ -54,74 +58,26 @@ Result of the build
 After building, you should obtain this tree:
 
     output/images/
+    ??? boot.vfat
+    ??? flash.bin
     ??? rootfs.ext2
     ??? rootfs.ext3 -> rootfs.ext2
+    ??? rootfs.squashfs
+    ??? sdcard.img
+    ??? u-boot.bin
     ??? uImage
 
-Prepare your SDcard
-===================
-
-The following ?SD card layout is recommended:
-
-- First partition formatted with a FAT filesystem, containing the uImage.
-- Second partition formatted as ext2 or ext3, containing the root filesystem.
-
-Create the SDcard partition table
-----------------------------------
-
-Determine the device associated to the SD card :
-
-  $ cat /proc/partitions
-
-Let's assume it is /dev/mmcblk0 :
-
-  $ sudo fdisk /dev/mmcblk0
-
-Delete all previous partitions by creating a new disklabel with 'o', then
-create the new partition table, using these options, pressing enter after each
-one:
-
-  * n p 1 2048 +10M t c
-  * n p 2 22528 +256M
-
-Using the 'p' option, the SD card's partition must look like this :
-
-Device          Boot  Start     End  Blocks  Id System
-/dev/mmcblk0p1         2048   22527   10240   c  W95 FAT32 (LBA)
-/dev/mmcblk0p2        22528  546815  262144  83  Linux
-
-Then write the partition table using 'w' and exit.
-
-Make partition one a DOS partition :
-
-  $ sudo mkfs.vfat /dev/mmcblk0p1
-
-Install the binaries to the SDcard
-----------------------------------
-
-Remember your binaries are located in output/images/, go inside that directory :
-
-  $ cd output/images
-
-Copy the Linux kernel:
-
-  $ sudo mkdir /mnt/sdcard
-  $ sudo mount /dev/mmcblk0p1 /mnt/sdcard
-  $ sudo cp uImage /mnt/sdcard
-  $ sudo umount /mnt/sdcard
-
-Copy the rootfs :
-
-  $ sudo dd if=rootfs.ext3 of=/dev/mmcblk0p2 bs=1M
-  $ sync
+Installation
+============
 
-It's Done!
+You can use either flash.bin or the sdcard.img. To load flash.bin, use the
+official Lego Mindstorms EV3 programming software firmware update tool to load
+the image. To use sdcard.img, use a disk writing tool such as Etcher or dd to
+write the image to the ?SD card.
 
 Finish
 ======
 
-Eject your ?SD card, insert it in your Lego EV3, and power it up.
-
 To have a serial console, you will need a proper USB to Lego serial port
 adapter plugged into the EV3 sensors port 1.
 See:
diff --git a/configs/lego_ev3_defconfig b/configs/lego_ev3_defconfig
index 1521fa7..ea76d59 100644
--- a/configs/lego_ev3_defconfig
+++ b/configs/lego_ev3_defconfig
@@ -8,7 +8,7 @@ BR2_GLOBAL_PATCH_DIR="board/lego/ev3/patches"
 # system
 BR2_TARGET_GENERIC_GETTY=y
 BR2_TARGET_GENERIC_GETTY_PORT="ttyS1"
-
+BR2_ROOTFS_POST_IMAGE_SCRIPT="board/lego/ev3/post-image.sh"
 # Linux headers same as kernel, a 4.4 series
 BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_4=y
 
@@ -18,11 +18,14 @@ BR2_LINUX_KERNEL_CUSTOM_GIT=y
 BR2_LINUX_KERNEL_CUSTOM_REPO_URL="https://github.com/ev3dev/ev3dev-kernel.git"
 BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION="v4.4.19-15-ev3dev-ev3_1"
 BR2_LINUX_KERNEL_DEFCONFIG="ev3dev"
+BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="board/lego/ev3/linux.fragment"
 BR2_LINUX_KERNEL_UIMAGE=y
 
 # filesystem
 BR2_TARGET_ROOTFS_EXT2=y
 BR2_TARGET_ROOTFS_EXT2_3=y
+BR2_TARGET_ROOTFS_SQUASHFS=y
+BR2_TARGET_ROOTFS_SQUASHFS4_XZ=y
 # BR2_TARGET_ROOTFS_TAR is not set
 
 # U-Boot
@@ -31,3 +34,8 @@ BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y
 BR2_TARGET_UBOOT_CUSTOM_VERSION=y
 BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2016.09.01"
 BR2_TARGET_UBOOT_BOARD_DEFCONFIG="legoev3"
+
+# host
+BR2_PACKAGE_HOST_DOSFSTOOLS=y
+BR2_PACKAGE_HOST_GENIMAGE=y
+BR2_PACKAGE_HOST_MTOOLS=y
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [Buildroot] [PATCH v2 3/4] linux: add ev3dev extension
  2016-11-02  3:15 [Buildroot] [PATCH v2 0/4] LEGO MINDSTORMS EV3 Updates David Lechner
  2016-11-02  3:15 ` [Buildroot] [PATCH v2 1/4] configs/lego_ev3: add U-Boot support David Lechner
  2016-11-02  3:15 ` [Buildroot] [PATCH v2 2/4] board/lego/ev3: Create images using genimage David Lechner
@ 2016-11-02  3:15 ` David Lechner
  2016-11-02 20:48   ` Thomas Petazzoni
  2016-11-02  3:15 ` [Buildroot] [PATCH v2 4/4] board/lego/ev3: Use ev3dev linux ext for ev3dev drivers David Lechner
  3 siblings, 1 reply; 9+ messages in thread
From: David Lechner @ 2016-11-02  3:15 UTC (permalink / raw)
  To: buildroot

This adds an ev3dev Linux drivers extension that provides Linux kernel
drivers for LEGO MINDSTORMS EV3 from the ev3dev project.

Signed-off-by: David Lechner <david@lechnology.com>
---
 linux/Config.ext.in                                  | 10 ++++++++++
 linux/linux-ext-ev3dev-linux-drivers.mk              | 12 ++++++++++++
 package/Config.in                                    |  1 +
 package/ev3dev-linux-drivers/Config.in               | 12 ++++++++++++
 package/ev3dev-linux-drivers/ev3dev-linux-drivers.mk | 11 +++++++++++
 package/ev3dev-linux-drivers/lego-linux-drivers.hash |  2 ++
 support/scripts/pkg-stats                            |  1 +
 7 files changed, 49 insertions(+)
 create mode 100644 linux/linux-ext-ev3dev-linux-drivers.mk
 create mode 100644 package/ev3dev-linux-drivers/Config.in
 create mode 100644 package/ev3dev-linux-drivers/ev3dev-linux-drivers.mk
 create mode 100644 package/ev3dev-linux-drivers/lego-linux-drivers.hash

diff --git a/linux/Config.ext.in b/linux/Config.ext.in
index 5d5e7ef..011dffb 100644
--- a/linux/Config.ext.in
+++ b/linux/Config.ext.in
@@ -46,6 +46,16 @@ config BR2_LINUX_KERNEL_EXT_RTAI
 	  RTAI Kernel part.
 
 #-------------------------------------------------------------------------------
+# ev3dev Linux drivers
+config BR2_LINUX_KERNEL_EXT_EV3DEV_LINUX_DRIVERS
+	bool "ev3dev Linux drivers"
+	select BR2_PACKAGE_EV3DEV_LINUX_DRIVERS
+	help
+	  Linux drivers for LEGO MINDSTORMS EV3 from the ev3dev project.
+
+	  https://github.com/ev3dev/lego-linux-drivers
+
+#-------------------------------------------------------------------------------
 # fbtft
 config BR2_LINUX_KERNEL_EXT_FBTFT
 	bool "FB TFT drivers"
diff --git a/linux/linux-ext-ev3dev-linux-drivers.mk b/linux/linux-ext-ev3dev-linux-drivers.mk
new file mode 100644
index 0000000..f5fec51
--- /dev/null
+++ b/linux/linux-ext-ev3dev-linux-drivers.mk
@@ -0,0 +1,12 @@
+################################################################################
+# Linux ev3dev extensions
+#
+# Patch the linux kernel with ev3dev extension
+################################################################################
+
+LINUX_EXTENSIONS += ev3dev-linux-drivers
+
+define EV3DEV_LINUX_DRIVERS_PREPARE_KERNEL
+	mkdir -p $(LINUX_DIR)/drivers/lego; \
+	cp -dpfr $(EV3DEV_LINUX_DRIVERS_DIR)/* $(LINUX_DIR)/drivers/lego/
+endef
diff --git a/package/Config.in b/package/Config.in
index 0f6260b..9ed296f 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -369,6 +369,7 @@ endmenu
 	source "package/edid-decode/Config.in"
 	source "package/eeprog/Config.in"
 	source "package/eudev/Config.in"
+	source "package/ev3dev-linux-drivers/Config.in"
 	source "package/evemu/Config.in"
 	source "package/evtest/Config.in"
 	source "package/fan-ctrl/Config.in"
diff --git a/package/ev3dev-linux-drivers/Config.in b/package/ev3dev-linux-drivers/Config.in
new file mode 100644
index 0000000..9be2f28
--- /dev/null
+++ b/package/ev3dev-linux-drivers/Config.in
@@ -0,0 +1,12 @@
+# Prompt-less option, because this package is not doing anything except
+# downloading the ev3dev driver sources. The real work is done by a Linux
+# extension.
+config BR2_PACKAGE_EV3DEV_LINUX_DRIVERS
+	bool
+	depends on BR2_LINUX_KERNEL
+	help
+	  Linux drivers for LEGO MINDSTORMS EV3
+
+	  This is only the download helper for the kernel patch.
+
+	  https://github.com/ev3dev/lego-linux-drivers
diff --git a/package/ev3dev-linux-drivers/ev3dev-linux-drivers.mk b/package/ev3dev-linux-drivers/ev3dev-linux-drivers.mk
new file mode 100644
index 0000000..55e26f0
--- /dev/null
+++ b/package/ev3dev-linux-drivers/ev3dev-linux-drivers.mk
@@ -0,0 +1,11 @@
+################################################################################
+#
+# ev3dev Linux drivers
+#
+################################################################################
+
+EV3DEV_LINUX_DRIVERS_VERSION = 0e551eb25ae8600c1f178814781bfb42dc835496
+EV3DEV_LINUX_DRIVERS_SITE = $(call github,ev3dev,lego-linux-drivers,$(EV3DEV_LINUX_DRIVERS_VERSION))
+EV3DEV_LINUX_DRIVERS_LICENSE = GPLv2
+
+$(eval $(generic-package))
diff --git a/package/ev3dev-linux-drivers/lego-linux-drivers.hash b/package/ev3dev-linux-drivers/lego-linux-drivers.hash
new file mode 100644
index 0000000..cc48f65
--- /dev/null
+++ b/package/ev3dev-linux-drivers/lego-linux-drivers.hash
@@ -0,0 +1,2 @@
+# locally computed
+sha256  9d2740b348c8d43e7e15fedc4cec99bf351a3a2ba8691f2a07c439a9c034bc04  lego-linux-drivers-0e551eb25ae8600c1f178814781bfb42dc835496.tar.gz
diff --git a/support/scripts/pkg-stats b/support/scripts/pkg-stats
index cc3bef4..421fa5c 100755
--- a/support/scripts/pkg-stats
+++ b/support/scripts/pkg-stats
@@ -94,6 +94,7 @@ for i in $(find boot/ linux/ package/ -name '*.mk' | sort) ; do
 
     if test \
 	$i = "boot/common.mk" -o \
+	$i = "linux/linux-ext-ev3dev-linux-drivers.mk" -o \
 	$i = "linux/linux-ext-fbtft.mk" -o \
 	$i = "linux/linux-ext-xenomai.mk" -o \
 	$i = "linux/linux-ext-rtai.mk" -o \
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [Buildroot] [PATCH v2 4/4] board/lego/ev3: Use ev3dev linux ext for ev3dev drivers
  2016-11-02  3:15 [Buildroot] [PATCH v2 0/4] LEGO MINDSTORMS EV3 Updates David Lechner
                   ` (2 preceding siblings ...)
  2016-11-02  3:15 ` [Buildroot] [PATCH v2 3/4] linux: add ev3dev extension David Lechner
@ 2016-11-02  3:15 ` David Lechner
  2016-11-02 20:48   ` Thomas Petazzoni
  3 siblings, 1 reply; 9+ messages in thread
From: David Lechner @ 2016-11-02  3:15 UTC (permalink / raw)
  To: buildroot

This uses the ev3dev linux extension to compile the ev3dev drivers for
LEGO MINDSTORMS EV3.

Signed-off-by: David Lechner <david@lechnology.com>
---
 .../0001-Create-empty-drivers-lego-Kconfig.patch   | 24 ----------------------
 board/lego/ev3/readme.txt                          |  4 ++--
 configs/lego_ev3_defconfig                         |  4 +---
 3 files changed, 3 insertions(+), 29 deletions(-)
 delete mode 100644 board/lego/ev3/patches/linux/0001-Create-empty-drivers-lego-Kconfig.patch

diff --git a/board/lego/ev3/patches/linux/0001-Create-empty-drivers-lego-Kconfig.patch b/board/lego/ev3/patches/linux/0001-Create-empty-drivers-lego-Kconfig.patch
deleted file mode 100644
index 614d53d..0000000
--- a/board/lego/ev3/patches/linux/0001-Create-empty-drivers-lego-Kconfig.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-From 72c5727488f10160abfadcc77dd9763c4408b5e9 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Vincent=20Stehl=C3=A9?= <vincent.stehle@laposte.net>
-Date: Sat, 15 Oct 2016 16:23:31 +0200
-Subject: [PATCH] Create empty drivers/lego/Kconfig
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Signed-off-by: Vincent Stehl? <vincent.stehle@laposte.net>
----
- drivers/lego/Kconfig | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 drivers/lego/Kconfig
-
-diff --git a/drivers/lego/Kconfig b/drivers/lego/Kconfig
-new file mode 100644
-index 0000000..d7cbf4f
---- /dev/null
-+++ b/drivers/lego/Kconfig
-@@ -0,0 +1 @@
-+# Empty Kconfig just to make source from drivers/Kconfig succeed.
--- 
-2.9.3
-
diff --git a/board/lego/ev3/readme.txt b/board/lego/ev3/readme.txt
index c075af5..c40907c 100644
--- a/board/lego/ev3/readme.txt
+++ b/board/lego/ev3/readme.txt
@@ -4,8 +4,7 @@ Intro
 =====
 
 This is the buildroot basic board support for the Lego Mindstorms EV3
-programmable brick. No support for sensors and drivers is provided for the
-moment.
+programmable brick.
 
 The Lego Mindstorms EV3 brick comprises a Texas Instruments AM1808 SoC, with
 an ARM 926EJ-S main processor running at 300 MHz.
@@ -17,6 +16,7 @@ See:
 The buildroot configuration uses the Linux kernel of the ev3dev project.
 See:
 - https://github.com/ev3dev/ev3-kernel/
+- https://github.com/ev3dev/lego-linux-drivers/
 - http://www.ev3dev.org/
 
 How it works
diff --git a/configs/lego_ev3_defconfig b/configs/lego_ev3_defconfig
index ea76d59..543a227 100644
--- a/configs/lego_ev3_defconfig
+++ b/configs/lego_ev3_defconfig
@@ -2,9 +2,6 @@
 BR2_arm=y
 BR2_arm926t=y
 
-# patches
-BR2_GLOBAL_PATCH_DIR="board/lego/ev3/patches"
-
 # system
 BR2_TARGET_GENERIC_GETTY=y
 BR2_TARGET_GENERIC_GETTY_PORT="ttyS1"
@@ -20,6 +17,7 @@ BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION="v4.4.19-15-ev3dev-ev3_1"
 BR2_LINUX_KERNEL_DEFCONFIG="ev3dev"
 BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="board/lego/ev3/linux.fragment"
 BR2_LINUX_KERNEL_UIMAGE=y
+BR2_LINUX_KERNEL_EXT_EV3DEV_LINUX_DRIVERS=y
 
 # filesystem
 BR2_TARGET_ROOTFS_EXT2=y
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [Buildroot] [PATCH v2 1/4] configs/lego_ev3: add U-Boot support
  2016-11-02  3:15 ` [Buildroot] [PATCH v2 1/4] configs/lego_ev3: add U-Boot support David Lechner
@ 2016-11-02 16:31   ` Thomas Petazzoni
  0 siblings, 0 replies; 9+ messages in thread
From: Thomas Petazzoni @ 2016-11-02 16:31 UTC (permalink / raw)
  To: buildroot

Hello,

On Tue,  1 Nov 2016 22:15:53 -0500, David Lechner wrote:
> This adds U-Boot configuration for LEGO MINDSTORMS EV3. U-Boot has
> had support for LEGO MINDSTORMS EV3 since v2016.05.
> 
> Signed-off-by: David Lechner <david@lechnology.com>
> ---
>  configs/lego_ev3_defconfig | 7 +++++++
>  1 file changed, 7 insertions(+)

Applied to master, thanks.

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Buildroot] [PATCH v2 2/4] board/lego/ev3: Create images using genimage
  2016-11-02  3:15 ` [Buildroot] [PATCH v2 2/4] board/lego/ev3: Create images using genimage David Lechner
@ 2016-11-02 16:46   ` Thomas Petazzoni
  0 siblings, 0 replies; 9+ messages in thread
From: Thomas Petazzoni @ 2016-11-02 16:46 UTC (permalink / raw)
  To: buildroot

Hello,

On Tue,  1 Nov 2016 22:15:54 -0500, David Lechner wrote:
> This adds a script to create SD card and flash images for LEGO MINDSTORMS
> EV3 using the genimage tool.
> 
> The default kernel config had to be modifed to add support for squashfs
> and to add a ram disk.
> 
> Signed-off-by: David Lechner <david@lechnology.com>
> ---
>  board/lego/ev3/genimage.cfg   | 57 ++++++++++++++++++++++++++++++
>  board/lego/ev3/linux.fragment |  7 ++++
>  board/lego/ev3/post-image.sh  | 14 ++++++++
>  board/lego/ev3/readme.txt     | 80 ++++++++++---------------------------------
>  configs/lego_ev3_defconfig    | 10 +++++-
>  5 files changed, 105 insertions(+), 63 deletions(-)
>  create mode 100644 board/lego/ev3/genimage.cfg
>  create mode 100644 board/lego/ev3/linux.fragment
>  create mode 100755 board/lego/ev3/post-image.sh

Applied to master, thanks.

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Buildroot] [PATCH v2 3/4] linux: add ev3dev extension
  2016-11-02  3:15 ` [Buildroot] [PATCH v2 3/4] linux: add ev3dev extension David Lechner
@ 2016-11-02 20:48   ` Thomas Petazzoni
  0 siblings, 0 replies; 9+ messages in thread
From: Thomas Petazzoni @ 2016-11-02 20:48 UTC (permalink / raw)
  To: buildroot

Hello,

On Tue,  1 Nov 2016 22:15:55 -0500, David Lechner wrote:
> This adds an ev3dev Linux drivers extension that provides Linux kernel
> drivers for LEGO MINDSTORMS EV3 from the ev3dev project.
> 
> Signed-off-by: David Lechner <david@lechnology.com>

I've applied, with one minor change, see below.


> +define EV3DEV_LINUX_DRIVERS_PREPARE_KERNEL
> +	mkdir -p $(LINUX_DIR)/drivers/lego; \

The ; \ was useless, those two commands can be separate.

> +	cp -dpfr $(EV3DEV_LINUX_DRIVERS_DIR)/* $(LINUX_DIR)/drivers/lego/

The rest is applied as-is.

Could you submit a patch to the DEVELOPERS file that adds you as a
developer for the ev3dev package, the linux extension, and the board?

Something along those lines:

N:	David Lechner <david@lechnology.com>
F:	board/lego/ev3/
F:	configs/lego_ev3_defconfig
F:	package/ev3dev-linux-drivers/
F:	linux/linux-ext-ev3dev-linux-drivers.mk

Thanks!

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Buildroot] [PATCH v2 4/4] board/lego/ev3: Use ev3dev linux ext for ev3dev drivers
  2016-11-02  3:15 ` [Buildroot] [PATCH v2 4/4] board/lego/ev3: Use ev3dev linux ext for ev3dev drivers David Lechner
@ 2016-11-02 20:48   ` Thomas Petazzoni
  0 siblings, 0 replies; 9+ messages in thread
From: Thomas Petazzoni @ 2016-11-02 20:48 UTC (permalink / raw)
  To: buildroot

Hello,

On Tue,  1 Nov 2016 22:15:56 -0500, David Lechner wrote:
> This uses the ev3dev linux extension to compile the ev3dev drivers for
> LEGO MINDSTORMS EV3.
> 
> Signed-off-by: David Lechner <david@lechnology.com>
> ---
>  .../0001-Create-empty-drivers-lego-Kconfig.patch   | 24 ----------------------
>  board/lego/ev3/readme.txt                          |  4 ++--
>  configs/lego_ev3_defconfig                         |  4 +---
>  3 files changed, 3 insertions(+), 29 deletions(-)
>  delete mode 100644 board/lego/ev3/patches/linux/0001-Create-empty-drivers-lego-Kconfig.patch

Applied to master, thanks.

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2016-11-02 20:48 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-11-02  3:15 [Buildroot] [PATCH v2 0/4] LEGO MINDSTORMS EV3 Updates David Lechner
2016-11-02  3:15 ` [Buildroot] [PATCH v2 1/4] configs/lego_ev3: add U-Boot support David Lechner
2016-11-02 16:31   ` Thomas Petazzoni
2016-11-02  3:15 ` [Buildroot] [PATCH v2 2/4] board/lego/ev3: Create images using genimage David Lechner
2016-11-02 16:46   ` Thomas Petazzoni
2016-11-02  3:15 ` [Buildroot] [PATCH v2 3/4] linux: add ev3dev extension David Lechner
2016-11-02 20:48   ` Thomas Petazzoni
2016-11-02  3:15 ` [Buildroot] [PATCH v2 4/4] board/lego/ev3: Use ev3dev linux ext for ev3dev drivers David Lechner
2016-11-02 20:48   ` Thomas Petazzoni

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox