All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH v2 0/9] configs: defconfigs for Atmel boards
@ 2015-05-13 19:22 Alexandre Belloni
  2015-05-13 19:22 ` [Buildroot] [PATCH v2 1/9] configs: update at91sam9g45m10ek defconfig Alexandre Belloni
                   ` (8 more replies)
  0 siblings, 9 replies; 15+ messages in thread
From: Alexandre Belloni @ 2015-05-13 19:22 UTC (permalink / raw)
  To: buildroot

Hi,

This series updates and adds defconfigs for the recent(ish) atmel boards. They
use Atmel's u-boot and kernel tree and are meant to be flashed on the NAND
flash.

It also provides a flahing helper to ease the flashing of the board and
includes documentation on how to do so.

Changes in v2:
 - Add flashing helper and instructions
 - Update the existing xplained readme
 - Use commit ids instead of branch names
 - Include ubi image generation in the defconfig

Alexandre Belloni (9):
  configs: update at91sam9g45m10ek defconfig
  configs: add defconfig for Atmel at91sam9rlek
  configs: add defconfig for Atmel at91sam9x5ek
  configs: add defconfig for Atmel sama5d3xek
  configs: add defconfig for Atmel sama5d4ek
  configs: add defconfig for Atmel sama5d4 Xplained Ultra
  configs: add defconfig for Atmel sama5d3 Xplained
  atmel: add a flashing helper and documentation
  configs: rename atmel_xplained_defconfig

 board/atmel/flasher.sh                             |  74 +++++
 board/atmel/nandflash.tcl                          | 346 +++++++++++++++++++++
 board/atmel/nandflash.txt                          | 106 +++++++
 board/atmel/xplained/readme.txt                    |   8 +-
 configs/at91sam9g45m10ek_defconfig                 |  22 +-
 configs/at91sam9rlek_defconfig                     |  21 ++
 configs/at91sam9x5ek_defconfig                     |  22 ++
 configs/atmel_sama5d3_xplained_defconfig           |  26 ++
 ...config => atmel_sama5d3_xplained_mmc_defconfig} |   0
 configs/atmel_sama5d3xek_defconfig                 |  26 ++
 configs/atmel_sama5d4_xplained_defconfig           |  30 ++
 configs/atmel_sama5d4ek_defconfig                  |  30 ++
 12 files changed, 702 insertions(+), 9 deletions(-)
 create mode 100755 board/atmel/flasher.sh
 create mode 100644 board/atmel/nandflash.tcl
 create mode 100644 board/atmel/nandflash.txt
 create mode 100644 configs/at91sam9rlek_defconfig
 create mode 100644 configs/at91sam9x5ek_defconfig
 create mode 100644 configs/atmel_sama5d3_xplained_defconfig
 rename configs/{atmel_xplained_defconfig => atmel_sama5d3_xplained_mmc_defconfig} (100%)
 create mode 100644 configs/atmel_sama5d3xek_defconfig
 create mode 100644 configs/atmel_sama5d4_xplained_defconfig
 create mode 100644 configs/atmel_sama5d4ek_defconfig

-- 
2.1.4

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

* [Buildroot] [PATCH v2 1/9] configs: update at91sam9g45m10ek defconfig
  2015-05-13 19:22 [Buildroot] [PATCH v2 0/9] configs: defconfigs for Atmel boards Alexandre Belloni
@ 2015-05-13 19:22 ` Alexandre Belloni
  2015-05-18 21:06   ` Thomas Petazzoni
  2015-05-13 19:22 ` [Buildroot] [PATCH v2 2/9] configs: add defconfig for Atmel at91sam9rlek Alexandre Belloni
                   ` (7 subsequent siblings)
  8 siblings, 1 reply; 15+ messages in thread
From: Alexandre Belloni @ 2015-05-13 19:22 UTC (permalink / raw)
  To: buildroot

Use kernel (3.18) and u-boot (2015.01) from Atmel's repositories.

Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
---
 configs/at91sam9g45m10ek_defconfig | 22 +++++++++++++++++-----
 1 file changed, 17 insertions(+), 5 deletions(-)

diff --git a/configs/at91sam9g45m10ek_defconfig b/configs/at91sam9g45m10ek_defconfig
index c958859df1a3..147789d165df 100644
--- a/configs/at91sam9g45m10ek_defconfig
+++ b/configs/at91sam9g45m10ek_defconfig
@@ -1,9 +1,21 @@
 BR2_arm=y
 BR2_arm926t=y
-BR2_PACKAGE_HOST_SAM_BA=y
-BR2_TARGET_AT91BOOTSTRAP=y
-BR2_TARGET_AT91BOOTSTRAP_BOARD="at91sam9m10g45ek"
+BR2_LINUX_KERNEL=y
+BR2_LINUX_KERNEL_CUSTOM_GIT=y
+BR2_LINUX_KERNEL_CUSTOM_REPO_URL="https://github.com/linux4sam/linux-at91.git"
+BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION="03329ca4cf6b94acc5c65b59b2d1f90fdeee0887"
+BR2_LINUX_KERNEL_DEFCONFIG="at91_dt"
+BR2_LINUX_KERNEL_ZIMAGE=y
+BR2_LINUX_KERNEL_DTS_SUPPORT=y
+BR2_LINUX_KERNEL_INTREE_DTS_NAME="at91sam9m10g45ek"
+BR2_TARGET_ROOTFS_UBIFS=y
+BR2_TARGET_ROOTFS_UBIFS_MAXLEBCNT=2047
+BR2_TARGET_ROOTFS_UBI=y
+BR2_TARGET_AT91BOOTSTRAP3=y
+BR2_TARGET_AT91BOOTSTRAP3_DEFCONFIG="at91sam9m10g45eknf_uboot"
 BR2_TARGET_UBOOT=y
 BR2_TARGET_UBOOT_BOARDNAME="at91sam9m10g45ek_nandflash"
-BR2_LINUX_KERNEL=y
-BR2_LINUX_KERNEL_DEFCONFIG="at91sam9g45"
+BR2_TARGET_UBOOT_CUSTOM_GIT=y
+BR2_TARGET_UBOOT_CUSTOM_REPO_URL="git://github.com/linux4sam/u-boot-at91.git"
+BR2_TARGET_UBOOT_CUSTOM_REPO_VERSION="677f3c2340b72131beebace8e96cac17b9569887"
+BR2_PACKAGE_HOST_SAM_BA=y
-- 
2.1.4

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

* [Buildroot] [PATCH v2 2/9] configs: add defconfig for Atmel at91sam9rlek
  2015-05-13 19:22 [Buildroot] [PATCH v2 0/9] configs: defconfigs for Atmel boards Alexandre Belloni
  2015-05-13 19:22 ` [Buildroot] [PATCH v2 1/9] configs: update at91sam9g45m10ek defconfig Alexandre Belloni
@ 2015-05-13 19:22 ` Alexandre Belloni
  2015-05-13 19:22 ` [Buildroot] [PATCH v2 3/9] configs: add defconfig for Atmel at91sam9x5ek Alexandre Belloni
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 15+ messages in thread
From: Alexandre Belloni @ 2015-05-13 19:22 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
---
 configs/at91sam9rlek_defconfig | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)
 create mode 100644 configs/at91sam9rlek_defconfig

diff --git a/configs/at91sam9rlek_defconfig b/configs/at91sam9rlek_defconfig
new file mode 100644
index 000000000000..16e2ec711cdb
--- /dev/null
+++ b/configs/at91sam9rlek_defconfig
@@ -0,0 +1,21 @@
+BR2_arm=y
+BR2_arm926t=y
+BR2_LINUX_KERNEL=y
+BR2_LINUX_KERNEL_CUSTOM_GIT=y
+BR2_LINUX_KERNEL_CUSTOM_REPO_URL="https://github.com/linux4sam/linux-at91.git"
+BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION="03329ca4cf6b94acc5c65b59b2d1f90fdeee0887"
+BR2_LINUX_KERNEL_DEFCONFIG="at91_dt"
+BR2_LINUX_KERNEL_ZIMAGE=y
+BR2_LINUX_KERNEL_DTS_SUPPORT=y
+BR2_LINUX_KERNEL_INTREE_DTS_NAME="at91sam9rlek"
+BR2_TARGET_ROOTFS_UBIFS=y
+BR2_TARGET_ROOTFS_UBIFS_MAXLEBCNT=2047
+BR2_TARGET_ROOTFS_UBI=y
+BR2_TARGET_AT91BOOTSTRAP3=y
+BR2_TARGET_AT91BOOTSTRAP3_DEFCONFIG="at91sam9rleknf_uboot"
+BR2_TARGET_UBOOT=y
+BR2_TARGET_UBOOT_BOARDNAME="at91sam9rlek_nandflash"
+BR2_TARGET_UBOOT_CUSTOM_GIT=y
+BR2_TARGET_UBOOT_CUSTOM_REPO_URL="git://github.com/linux4sam/u-boot-at91.git"
+BR2_TARGET_UBOOT_CUSTOM_REPO_VERSION="677f3c2340b72131beebace8e96cac17b9569887"
+BR2_PACKAGE_HOST_SAM_BA=y
-- 
2.1.4

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

* [Buildroot] [PATCH v2 3/9] configs: add defconfig for Atmel at91sam9x5ek
  2015-05-13 19:22 [Buildroot] [PATCH v2 0/9] configs: defconfigs for Atmel boards Alexandre Belloni
  2015-05-13 19:22 ` [Buildroot] [PATCH v2 1/9] configs: update at91sam9g45m10ek defconfig Alexandre Belloni
  2015-05-13 19:22 ` [Buildroot] [PATCH v2 2/9] configs: add defconfig for Atmel at91sam9rlek Alexandre Belloni
@ 2015-05-13 19:22 ` Alexandre Belloni
  2015-05-13 19:22 ` [Buildroot] [PATCH v2 4/9] configs: add defconfig for Atmel sama5d3xek Alexandre Belloni
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 15+ messages in thread
From: Alexandre Belloni @ 2015-05-13 19:22 UTC (permalink / raw)
  To: buildroot

This supports:
 - at91sam9g15ek
 - at91sam9g25ek
 - at91sam9g35ek
 - at91sam9x25ek
 - at91sam9x35ek

Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
---
 configs/at91sam9x5ek_defconfig | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)
 create mode 100644 configs/at91sam9x5ek_defconfig

diff --git a/configs/at91sam9x5ek_defconfig b/configs/at91sam9x5ek_defconfig
new file mode 100644
index 000000000000..46a8e02a2c52
--- /dev/null
+++ b/configs/at91sam9x5ek_defconfig
@@ -0,0 +1,22 @@
+BR2_arm=y
+BR2_arm926t=y
+BR2_LINUX_KERNEL=y
+BR2_LINUX_KERNEL_CUSTOM_GIT=y
+BR2_LINUX_KERNEL_CUSTOM_REPO_URL="https://github.com/linux4sam/linux-at91.git"
+BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION="03329ca4cf6b94acc5c65b59b2d1f90fdeee0887"
+BR2_LINUX_KERNEL_DEFCONFIG="at91_dt"
+BR2_LINUX_KERNEL_ZIMAGE=y
+BR2_LINUX_KERNEL_DTS_SUPPORT=y
+BR2_LINUX_KERNEL_INTREE_DTS_NAME="at91sam9g15ek at91sam9g25ek at91sam9g35ek at91sam9x25ek at91sam9x35ek"
+BR2_TARGET_ROOTFS_UBIFS=y
+BR2_TARGET_ROOTFS_UBIFS_LEBSIZE=0x1f000
+BR2_TARGET_ROOTFS_UBI=y
+BR2_TARGET_ROOTFS_UBI_SUBSIZE=2048
+BR2_TARGET_AT91BOOTSTRAP3=y
+BR2_TARGET_AT91BOOTSTRAP3_DEFCONFIG="at91sam9x5eknf_uboot"
+BR2_TARGET_UBOOT=y
+BR2_TARGET_UBOOT_BOARDNAME="at91sam9x5ek_nandflash"
+BR2_TARGET_UBOOT_CUSTOM_GIT=y
+BR2_TARGET_UBOOT_CUSTOM_REPO_URL="git://github.com/linux4sam/u-boot-at91.git"
+BR2_TARGET_UBOOT_CUSTOM_REPO_VERSION="677f3c2340b72131beebace8e96cac17b9569887"
+BR2_PACKAGE_HOST_SAM_BA=y
-- 
2.1.4

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

* [Buildroot] [PATCH v2 4/9] configs: add defconfig for Atmel sama5d3xek
  2015-05-13 19:22 [Buildroot] [PATCH v2 0/9] configs: defconfigs for Atmel boards Alexandre Belloni
                   ` (2 preceding siblings ...)
  2015-05-13 19:22 ` [Buildroot] [PATCH v2 3/9] configs: add defconfig for Atmel at91sam9x5ek Alexandre Belloni
@ 2015-05-13 19:22 ` Alexandre Belloni
  2015-05-18 21:09   ` Thomas Petazzoni
  2015-05-13 19:22 ` [Buildroot] [PATCH v2 5/9] configs: add defconfig for Atmel sama5d4ek Alexandre Belloni
                   ` (4 subsequent siblings)
  8 siblings, 1 reply; 15+ messages in thread
From: Alexandre Belloni @ 2015-05-13 19:22 UTC (permalink / raw)
  To: buildroot

This supports:
 - sama5d31ek
 - sama5d33ek
 - sama5d34ek
 - sama5d35ek
 - sama5d36ek

with or without the PDA4 or PDA7 screens.

Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
---
 configs/atmel_sama5d3xek_defconfig | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)
 create mode 100644 configs/atmel_sama5d3xek_defconfig

diff --git a/configs/atmel_sama5d3xek_defconfig b/configs/atmel_sama5d3xek_defconfig
new file mode 100644
index 000000000000..ff80851ebb12
--- /dev/null
+++ b/configs/atmel_sama5d3xek_defconfig
@@ -0,0 +1,26 @@
+BR2_arm=y
+BR2_cortex_a5=y
+BR2_ARM_EABIHF=y
+BR2_ARM_FPU_VFPV4D16=y
+BR2_ARM_INSTRUCTIONS_THUMB2=y
+BR2_LINUX_KERNEL=y
+BR2_LINUX_KERNEL_CUSTOM_GIT=y
+BR2_LINUX_KERNEL_CUSTOM_REPO_URL="https://github.com/linux4sam/linux-at91.git"
+BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION="03329ca4cf6b94acc5c65b59b2d1f90fdeee0887"
+BR2_LINUX_KERNEL_DEFCONFIG="sama5"
+BR2_LINUX_KERNEL_ZIMAGE=y
+BR2_LINUX_KERNEL_DTS_SUPPORT=y
+BR2_LINUX_KERNEL_INTREE_DTS_NAME="sama5d31ek sama5d31ek_pda4 sama5d31ek_pda7 sama5d31ek_revc sama5d31ek_revc_pda4 sama5d31ek_revc_pda7 sama5d33ek sama5d33ek_pda4 sama5d33ek_pda7 sama5d33ek_revc sama5d33ek_revc_pda4 sama5d33ek_revc_pda7 sama5d34ek sama5d34ek_pda4 sama5d34ek_pda7 sama5d34ek_revc sama5d34ek_revc_pda4 sama5d34ek_revc_pda7 sama5d35ek sama5d35ek_revc sama5d36ek sama5d36ek_pda4 sama5d36ek_pda7 sama5d36ek_revc sama5d36ek_revc_pda4 sama5d36ek_revc_pda7"
+BR2_TARGET_ROOTFS_UBIFS=y
+BR2_TARGET_ROOTFS_UBIFS_LEBSIZE=0x1f000
+BR2_TARGET_ROOTFS_UBI=y
+BR2_TARGET_ROOTFS_UBI_SUBSIZE=2048
+BR2_TARGET_AT91BOOTSTRAP3=y
+BR2_TARGET_AT91BOOTSTRAP3_DEFCONFIG="sama5d3xeknf_uboot"
+BR2_TARGET_UBOOT=y
+BR2_TARGET_UBOOT_BOARDNAME="sama5d3xek_nandflash"
+BR2_TARGET_UBOOT_CUSTOM_GIT=y
+BR2_TARGET_UBOOT_CUSTOM_REPO_URL="git://github.com/linux4sam/u-boot-at91.git"
+BR2_TARGET_UBOOT_CUSTOM_REPO_VERSION="677f3c2340b72131beebace8e96cac17b9569887"
+BR2_TARGET_UBOOT_SPL=y
+BR2_PACKAGE_HOST_SAM_BA=y
-- 
2.1.4

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

* [Buildroot] [PATCH v2 5/9] configs: add defconfig for Atmel sama5d4ek
  2015-05-13 19:22 [Buildroot] [PATCH v2 0/9] configs: defconfigs for Atmel boards Alexandre Belloni
                   ` (3 preceding siblings ...)
  2015-05-13 19:22 ` [Buildroot] [PATCH v2 4/9] configs: add defconfig for Atmel sama5d3xek Alexandre Belloni
@ 2015-05-13 19:22 ` Alexandre Belloni
  2015-05-13 19:22 ` [Buildroot] [PATCH v2 6/9] configs: add defconfig for Atmel sama5d4 Xplained Ultra Alexandre Belloni
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 15+ messages in thread
From: Alexandre Belloni @ 2015-05-13 19:22 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
---
 configs/atmel_sama5d4ek_defconfig | 30 ++++++++++++++++++++++++++++++
 1 file changed, 30 insertions(+)
 create mode 100644 configs/atmel_sama5d4ek_defconfig

diff --git a/configs/atmel_sama5d4ek_defconfig b/configs/atmel_sama5d4ek_defconfig
new file mode 100644
index 000000000000..4c45fb961704
--- /dev/null
+++ b/configs/atmel_sama5d4ek_defconfig
@@ -0,0 +1,30 @@
+BR2_arm=y
+BR2_cortex_a5=y
+BR2_ARM_EABIHF=y
+BR2_ARM_ENABLE_NEON=y
+BR2_ARM_FPU_VFPV4D16=y
+BR2_ARM_INSTRUCTIONS_THUMB2=y
+BR2_LINUX_KERNEL=y
+BR2_LINUX_KERNEL_CUSTOM_GIT=y
+BR2_LINUX_KERNEL_CUSTOM_REPO_URL="https://github.com/linux4sam/linux-at91.git"
+BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION="03329ca4cf6b94acc5c65b59b2d1f90fdeee0887"
+BR2_LINUX_KERNEL_DEFCONFIG="sama5"
+BR2_LINUX_KERNEL_ZIMAGE=y
+BR2_LINUX_KERNEL_DTS_SUPPORT=y
+BR2_LINUX_KERNEL_INTREE_DTS_NAME="at91-sama5d4ek"
+BR2_TARGET_ROOTFS_UBIFS=y
+BR2_TARGET_ROOTFS_UBIFS_LEBSIZE=0x3e000
+BR2_TARGET_ROOTFS_UBIFS_MINIOSIZE=0x1000
+BR2_TARGET_ROOTFS_UBIFS_MAXLEBCNT=2082
+BR2_TARGET_ROOTFS_UBI=y
+BR2_TARGET_ROOTFS_UBI_PEBSIZE=0x40000
+BR2_TARGET_ROOTFS_UBI_SUBSIZE=0
+BR2_TARGET_AT91BOOTSTRAP3=y
+BR2_TARGET_AT91BOOTSTRAP3_DEFCONFIG="sama5d4eknf_uboot_secure"
+BR2_TARGET_UBOOT=y
+BR2_TARGET_UBOOT_BOARDNAME="sama5d4ek_nandflash"
+BR2_TARGET_UBOOT_CUSTOM_GIT=y
+BR2_TARGET_UBOOT_CUSTOM_REPO_URL="git://github.com/linux4sam/u-boot-at91.git"
+BR2_TARGET_UBOOT_CUSTOM_REPO_VERSION="677f3c2340b72131beebace8e96cac17b9569887"
+BR2_TARGET_UBOOT_SPL=y
+BR2_PACKAGE_HOST_SAM_BA=y
-- 
2.1.4

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

* [Buildroot] [PATCH v2 6/9] configs: add defconfig for Atmel sama5d4 Xplained Ultra
  2015-05-13 19:22 [Buildroot] [PATCH v2 0/9] configs: defconfigs for Atmel boards Alexandre Belloni
                   ` (4 preceding siblings ...)
  2015-05-13 19:22 ` [Buildroot] [PATCH v2 5/9] configs: add defconfig for Atmel sama5d4ek Alexandre Belloni
@ 2015-05-13 19:22 ` Alexandre Belloni
  2015-05-13 19:22 ` [Buildroot] [PATCH v2 7/9] configs: add defconfig for Atmel sama5d3 Xplained Alexandre Belloni
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 15+ messages in thread
From: Alexandre Belloni @ 2015-05-13 19:22 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
---
 configs/atmel_sama5d4_xplained_defconfig | 30 ++++++++++++++++++++++++++++++
 1 file changed, 30 insertions(+)
 create mode 100644 configs/atmel_sama5d4_xplained_defconfig

diff --git a/configs/atmel_sama5d4_xplained_defconfig b/configs/atmel_sama5d4_xplained_defconfig
new file mode 100644
index 000000000000..f657a13480ff
--- /dev/null
+++ b/configs/atmel_sama5d4_xplained_defconfig
@@ -0,0 +1,30 @@
+BR2_arm=y
+BR2_cortex_a5=y
+BR2_ARM_EABIHF=y
+BR2_ARM_ENABLE_NEON=y
+BR2_ARM_FPU_VFPV4D16=y
+BR2_ARM_INSTRUCTIONS_THUMB2=y
+BR2_LINUX_KERNEL=y
+BR2_LINUX_KERNEL_CUSTOM_GIT=y
+BR2_LINUX_KERNEL_CUSTOM_REPO_URL="https://github.com/linux4sam/linux-at91.git"
+BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION="03329ca4cf6b94acc5c65b59b2d1f90fdeee0887"
+BR2_LINUX_KERNEL_DEFCONFIG="sama5"
+BR2_LINUX_KERNEL_ZIMAGE=y
+BR2_LINUX_KERNEL_DTS_SUPPORT=y
+BR2_LINUX_KERNEL_INTREE_DTS_NAME="at91-sama5d4_xplained"
+BR2_TARGET_ROOTFS_UBIFS=y
+BR2_TARGET_ROOTFS_UBIFS_LEBSIZE=0x3e000
+BR2_TARGET_ROOTFS_UBIFS_MINIOSIZE=0x1000
+BR2_TARGET_ROOTFS_UBIFS_MAXLEBCNT=2082
+BR2_TARGET_ROOTFS_UBI=y
+BR2_TARGET_ROOTFS_UBI_PEBSIZE=0x40000
+BR2_TARGET_ROOTFS_UBI_SUBSIZE=0
+BR2_TARGET_AT91BOOTSTRAP3=y
+BR2_TARGET_AT91BOOTSTRAP3_DEFCONFIG="sama5d4_xplainednf_uboot_secure"
+BR2_TARGET_UBOOT=y
+BR2_TARGET_UBOOT_BOARDNAME="sama5d4_xplained_nandflash"
+BR2_TARGET_UBOOT_CUSTOM_GIT=y
+BR2_TARGET_UBOOT_CUSTOM_REPO_URL="git://github.com/linux4sam/u-boot-at91.git"
+BR2_TARGET_UBOOT_CUSTOM_REPO_VERSION="677f3c2340b72131beebace8e96cac17b9569887"
+BR2_TARGET_UBOOT_SPL=y
+BR2_PACKAGE_HOST_SAM_BA=y
-- 
2.1.4

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

* [Buildroot] [PATCH v2 7/9] configs: add defconfig for Atmel sama5d3 Xplained
  2015-05-13 19:22 [Buildroot] [PATCH v2 0/9] configs: defconfigs for Atmel boards Alexandre Belloni
                   ` (5 preceding siblings ...)
  2015-05-13 19:22 ` [Buildroot] [PATCH v2 6/9] configs: add defconfig for Atmel sama5d4 Xplained Ultra Alexandre Belloni
@ 2015-05-13 19:22 ` Alexandre Belloni
  2015-05-13 19:22 ` [Buildroot] [PATCH v2 8/9] atmel: add a flashing helper and documentation Alexandre Belloni
  2015-05-13 19:22 ` [Buildroot] [PATCH v2 9/9] configs: rename atmel_xplained_defconfig Alexandre Belloni
  8 siblings, 0 replies; 15+ messages in thread
From: Alexandre Belloni @ 2015-05-13 19:22 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
---
 configs/atmel_sama5d3_xplained_defconfig | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)
 create mode 100644 configs/atmel_sama5d3_xplained_defconfig

diff --git a/configs/atmel_sama5d3_xplained_defconfig b/configs/atmel_sama5d3_xplained_defconfig
new file mode 100644
index 000000000000..a8b318796b4c
--- /dev/null
+++ b/configs/atmel_sama5d3_xplained_defconfig
@@ -0,0 +1,26 @@
+BR2_arm=y
+BR2_cortex_a5=y
+BR2_ARM_EABIHF=y
+BR2_ARM_FPU_VFPV4D16=y
+BR2_ARM_INSTRUCTIONS_THUMB2=y
+BR2_LINUX_KERNEL=y
+BR2_LINUX_KERNEL_CUSTOM_GIT=y
+BR2_LINUX_KERNEL_CUSTOM_REPO_URL="https://github.com/linux4sam/linux-at91.git"
+BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION="03329ca4cf6b94acc5c65b59b2d1f90fdeee0887"
+BR2_LINUX_KERNEL_DEFCONFIG="sama5"
+BR2_LINUX_KERNEL_ZIMAGE=y
+BR2_LINUX_KERNEL_DTS_SUPPORT=y
+BR2_LINUX_KERNEL_INTREE_DTS_NAME="at91-sama5d3_xplained at91-sama5d3_xplained_pda4 at91-sama5d3_xplained_pda7"
+BR2_TARGET_ROOTFS_UBIFS=y
+BR2_TARGET_ROOTFS_UBIFS_LEBSIZE=0x1f000
+BR2_TARGET_ROOTFS_UBI=y
+BR2_TARGET_ROOTFS_UBI_SUBSIZE=2048
+BR2_TARGET_AT91BOOTSTRAP3=y
+BR2_TARGET_AT91BOOTSTRAP3_DEFCONFIG="sama5d3_xplainednf_uboot"
+BR2_TARGET_UBOOT=y
+BR2_TARGET_UBOOT_BOARDNAME="sama5d3_xplained_nandflash"
+BR2_TARGET_UBOOT_CUSTOM_GIT=y
+BR2_TARGET_UBOOT_CUSTOM_REPO_URL="git://github.com/linux4sam/u-boot-at91.git"
+BR2_TARGET_UBOOT_CUSTOM_REPO_VERSION="677f3c2340b72131beebace8e96cac17b9569887"
+BR2_TARGET_UBOOT_SPL=y
+BR2_PACKAGE_HOST_SAM_BA=y
-- 
2.1.4

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

* [Buildroot] [PATCH v2 8/9] atmel: add a flashing helper and documentation
  2015-05-13 19:22 [Buildroot] [PATCH v2 0/9] configs: defconfigs for Atmel boards Alexandre Belloni
                   ` (6 preceding siblings ...)
  2015-05-13 19:22 ` [Buildroot] [PATCH v2 7/9] configs: add defconfig for Atmel sama5d3 Xplained Alexandre Belloni
@ 2015-05-13 19:22 ` Alexandre Belloni
  2015-05-14  3:37   ` Baruch Siach
  2015-05-18 21:13   ` Thomas Petazzoni
  2015-05-13 19:22 ` [Buildroot] [PATCH v2 9/9] configs: rename atmel_xplained_defconfig Alexandre Belloni
  8 siblings, 2 replies; 15+ messages in thread
From: Alexandre Belloni @ 2015-05-13 19:22 UTC (permalink / raw)
  To: buildroot

Provide a flashing helper to properly select the sam-ba configuration
and reuse the sam-ba tcl script provided by Atmel with minimal
modifications.

Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
---
 board/atmel/flasher.sh    |  74 ++++++++++
 board/atmel/nandflash.tcl | 346 ++++++++++++++++++++++++++++++++++++++++++++++
 board/atmel/nandflash.txt | 106 ++++++++++++++
 3 files changed, 526 insertions(+)
 create mode 100755 board/atmel/flasher.sh
 create mode 100644 board/atmel/nandflash.tcl
 create mode 100644 board/atmel/nandflash.txt

diff --git a/board/atmel/flasher.sh b/board/atmel/flasher.sh
new file mode 100755
index 000000000000..2382fba72cf0
--- /dev/null
+++ b/board/atmel/flasher.sh
@@ -0,0 +1,74 @@
+#!/bin/bash
+
+BUILDIR=$1
+TTY=$2
+BOARD=$3
+
+family_at91sam9g45m10ek="FAMILY=at91sam9g45 SUFFIX=ek"
+mach_at91sam9g45m10ek="at91sam9m10-g45-ek"
+
+family_at91sam9rlek="FAMILY=at91sam9rl SUFFIX=ek"
+mach_at91sam9rlek="at91sam9rl64-ek"
+
+family_at91sam9g15ek="FAMILY=at91sam9x5 SUFFIX=ek"
+mach_at91sam9g15ek="at91sam9g15-ek"
+
+family_at91sam9g25ek="FAMILY=at91sam9x5 SUFFIX=ek"
+mach_at91sam9g25ek="at91sam9g25-ek"
+
+family_at91sam9x25ek="FAMILY=at91sam9x5 SUFFIX=ek"
+mach_at91sam9x25ek="at91sam9x25-ek"
+
+family_at91sam9g35ek="FAMILY=at91sam9x5 SUFFIX=ek"
+mach_at91sam9g35ek="at91sam9g35-ek"
+
+family_at91sam9x35ek="FAMILY=at91sam9x5 SUFFIX=ek"
+mach_at91sam9x35ek="at91sam9x35-ek"
+
+family_sama5d3xek="FAMILY=sama5d3 SUFFIX=ek"
+mach_sama5d3xek="at91sama5d3x-ek"
+
+family_sama5d3_xplained="FAMILY=sama5d3 SUFFIX=_xplained"
+mach_sama5d3_xplained="at91sama5d3x-xplained"
+
+family_sama5d4ek="FAMILY=sama5d4 SUFFIX=ek"
+mach_sama5d4ek="at91sama5d4x-ek"
+
+family_sama5d4_xplained="FAMILY=sama5d4 SUFFIX=_xplained"
+mach_sama5d4_xplained="at91sama5d4x-ek"
+
+usage() {
+	cat << EOF
+Usage:
+  $0 <builddir_path> <interface> <board>
+
+Available boards:
+  at91sam9g45m10ek
+  at91sam9rlek
+  at91sam9g15ek
+  at91sam9g25ek
+  at91sam9x25ek
+  at91sam9g35ek
+  at91sam9x35ek
+  sama5d3xek
+  sama5d3_xplained
+  sama5d4ek
+  sama5d4_xplained
+
+Example:
+  $0 ./output /dev/ttyACM0 at91sam9g45m10ek
+EOF
+}
+
+F="family_$BOARD"
+M="mach_$BOARD"
+
+if [[ $# != 3 || -z ${!F} ]]; then
+	usage
+	exit 1
+fi
+
+echo "Executing: ${!F} O=$1/images $1/host/opt/sam-ba/sam-ba $TTY ${!M} $(dirname $0)/nandflash.tcl"
+export ${!F} O=$1/images
+$1/host/opt/sam-ba/sam-ba $TTY ${!M} $(dirname $0)/nandflash.tcl
+
diff --git a/board/atmel/nandflash.tcl b/board/atmel/nandflash.tcl
new file mode 100644
index 000000000000..49c363196de7
--- /dev/null
+++ b/board/atmel/nandflash.tcl
@@ -0,0 +1,346 @@
+# ----------------------------------------------------------------------------
+#         ATMEL Microcontroller
+# ----------------------------------------------------------------------------
+# Copyright (c) 2013, Atmel Corporation
+#
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are met:
+#
+# - Redistributions of source code must retain the above copyright notice,
+# this list of conditions and the disclaimer below.
+#
+# Atmel's name may not be used to endorse or promote products derived from
+# this software without specific prior written permission.
+#
+# DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
+# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+# DISCLAIMED. IN NO EVENT SHALL ATMEL 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.
+# ----------------------------------------------------------------------------
+
+################################################################################
+#  Script data
+################################################################################
+set bootstrapFile	"$env(O)/at91bootstrap.bin"
+set ubootFile		"$env(O)/u-boot.bin"
+set kernelFile		"$env(O)/zImage"
+set rootfsFile		"$env(O)/rootfs.ubi"
+
+set boardFamily		"$env(FAMILY)"
+set board_suffix	"$env(SUFFIX)"
+set use_dtb "yes"
+set build_uboot_env "yes"
+
+# DBGU address for rm9200, 9260/9g20, 9261/9g10, 9rl, 9x5
+set at91_base_dbgu0 0xfffff200
+# DBGU address for 9263, 9g45, sama5d3
+set at91_base_dbgu1 0xffffee00
+
+set arch_exid_offset 0x44
+
+# arch id
+set arch_id_at91sam9g20 0x019905a0
+set arch_id_at91sam9g45 0x819b05a0
+set arch_id_at91sam9x5  0x819a05a0
+set arch_id_at91sam9n12 0x819a07a0
+set arch_id_sama5d3     0x8a5c07c0
+
+## Find out at91sam9x5 variant to load the corresponding dtb file
+array set at91sam9x5_variant {
+   0x00000000 at91sam9g15
+   0x00000001 at91sam9g35
+   0x00000002 at91sam9x35
+   0x00000003 at91sam9g25
+   0x00000004 at91sam9x25
+}
+
+## Find out sama5d3 variant to load the corresponding dtb file
+array set sama5d3_variant {
+   0x00444300 sama5d31
+   0x00414300 sama5d33
+   0x00414301 sama5d34
+   0x00584300 sama5d35
+   0x00004301 sama5d36
+}
+
+################################################################################
+#  proc uboot_env: Convert u-boot variables in a string ready to be flashed
+#                  in the region reserved for environment variables
+################################################################################
+proc set_uboot_env {nameOfLstOfVar} {
+    upvar $nameOfLstOfVar lstOfVar
+
+    # sector size is the size defined in u-boot CFG_ENV_SIZE
+    set sectorSize [expr 0x20000 - 5]
+
+    set strEnv [join $lstOfVar "\0"]
+    while {[string length $strEnv] < $sectorSize} {
+        append strEnv "\0"
+    }
+    # \0 between crc and strEnv is the flag value for redundant environment
+    set strCrc [binary format i [::vfs::crc $strEnv]]
+    return "$strCrc\0$strEnv"
+}
+
+################################################################################
+proc find_variant_name {boardType} {
+   global at91_base_dbgu0
+   global at91_base_dbgu1
+   global arch_exid_offset
+   global at91sam9x5_variant
+   global sama5d3_variant
+   set socName "$boardType"
+
+   puts "-I- === name before switch $boardType ==="
+   switch $boardType {
+      at91sam9g45 {
+         set socName "at91sam9m10g45"
+      }
+      at91sam9x5 {
+         set exidAddr [expr {$at91_base_dbgu0 + $arch_exid_offset}]
+         set chip_variant [format "0x%08x" [read_int $exidAddr]]
+
+         foreach {key value} [array get at91sam9x5_variant] {
+            if {$key == $chip_variant} {
+               set socName "$value"
+               break;
+            }
+         }
+      }
+      sama5d3 {
+         set exidAddr [expr {$at91_base_dbgu1 + $arch_exid_offset}]
+         set chip_variant [format "0x%08x" [read_int $exidAddr]]
+
+         foreach {key value} [array get sama5d3_variant] {
+            puts "-I- === $chip_variant ? $key ($value) ==="
+            if {$key == $chip_variant} {
+               set socName "$value"
+               break;
+            }
+         }
+      }
+   }
+
+   puts "-I- === socName is $socName ==="
+   return "$socName"
+}
+
+proc find_variant_ecc {boardType} {
+   set eccType "none"
+
+   puts "-I- === ecc before switch $boardType ==="
+   switch $boardType {
+      at91sam9x5 {
+         set eccType 0xc0c00405
+      }
+      at91sam9n12 {
+         set eccType 0xc0c00405
+      }
+      sama5d3 {
+         set eccType 0xc0902405
+      }
+      sama5d4 {
+         set eccType 0xc1e04e07
+      }
+   }
+
+   puts "-I- === eccType is $eccType ==="
+   return $eccType
+}
+
+proc find_dtb_name {boardType} {
+   global board_suffix
+   global env
+   global variant_name
+   set dtbPrefix ""
+
+   switch $boardType {
+      sama5d3 {
+         set dtbPrefix "at91-"
+
+         if {[string match "_xplained" $board_suffix]} {
+            set variant_name "sama5d3"
+         }
+
+         if {[string match "ek*" $board_suffix]} {
+            set dtbPrefix ""
+         }
+      }
+      sama5d4 {
+         set dtbPrefix "at91-"
+      }
+   }
+
+   append dtbName $env(O) "/" $dtbPrefix $variant_name $board_suffix ".dtb"
+   puts "-I- === dtbName is $dtbName ==="
+   return $dtbName
+}
+
+proc get_kernel_load_addr {boardType} {
+   set kernel_load_addr 0x22000000
+
+   switch $boardType {
+      at91sam9g45 {
+         set kernel_load_addr 0x72000000
+      }
+   }
+
+   return $kernel_load_addr
+}
+
+proc get_dtb_load_addr {boardType} {
+   set dtb_load_addr 0x21000000
+
+   switch $boardType {
+      at91sam9g45 {
+         set dtb_load_addr 0x71000000
+      }
+   }
+
+   return $dtb_load_addr
+}
+
+################################################################################
+#  Main script: Load the linux demo in NandFlash,
+#               Update the environment variables
+################################################################################
+
+################################################################################
+
+# check for proper variable initialization
+if {! [info exists boardFamily]} {
+   puts "-E- === Board family not defined ==="
+   exit
+}
+
+set variant_name [find_variant_name $boardFamily]
+
+if {$variant_name == "none"} {
+   puts "-E- === Unknown SoC variant ==="
+   exit
+} else {
+   puts "-I- Chip variant is $variant_name"
+}
+if {$board_suffix == "none"} {
+   puts "-E- === Unknown $variant_name board ==="
+   exit
+} else {
+   puts "-I- Board variant is $board_suffix"
+}
+
+set pmeccConfig [find_variant_ecc $boardFamily]
+
+## Additional files to load
+set dtbFile [find_dtb_name $boardFamily]
+set ubootEnvFile	"ubootEnvtFileNandFlash.bin"
+
+## Now check for the needed files
+if {! [file exists $bootstrapFile]} {
+   puts "-E- === AT91Bootstrap file not found ==="
+   exit
+}
+
+if {! [file exists $ubootFile]} {
+   puts "-E- === U-Boot file not found ==="
+   exit
+}
+
+if {! [file exists $kernelFile]} {
+   puts "-E- === Linux kernel file not found ==="
+   exit
+}
+
+if {! [file exists $dtbFile]} {
+   puts "-E- === Unknown $variant_name + board $board_suffix combination ==="
+   exit
+}
+
+if {! [file exists $rootfsFile]} {
+   puts "-E- === Rootfs file not found ==="
+   exit
+}
+
+## NandFlash Mapping
+set bootStrapAddr	0x00000000
+set ubootAddr		0x00040000
+set ubootEnvAddr	0x000c0000
+set dtbAddr		0x00180000
+set kernelAddr		0x00200000
+set rootfsAddr		0x00800000
+
+## u-boot variable
+set kernelLoadAddr [get_kernel_load_addr $boardFamily]
+set dtbLoadAddr	[get_dtb_load_addr $boardFamily]
+
+## NandFlash Mapping
+set kernelSize	[format "0x%08X" [file size $kernelFile]]
+if {$use_dtb == "yes"} {
+   set dtbSize	[format "0x%08X" [file size $dtbFile]]
+   set bootCmd "bootcmd=nand read $dtbLoadAddr $dtbAddr $dtbSize; nand read $kernelLoadAddr $kernelAddr $kernelSize; bootz $kernelLoadAddr - $dtbLoadAddr"
+} else {
+   set bootCmd "bootcmd=nand read $kernelLoadAddr $kernelAddr $kernelSize; bootz $kernelLoadAddr"
+}
+
+lappend u_boot_variables \
+    "bootdelay=1" \
+    "baudrate=115200" \
+    "stdin=serial" \
+    "stdout=serial" \
+    "stderr=serial" \
+    "bootargs=console=ttyS0,115200 mtdparts=atmel_nand:256k(bootstrap)ro,512k(uboot)ro,256k(env),256k(env_redundant),256k(spare),512k(dtb),6M(kernel)ro,-(rootfs) rootfstype=ubifs ubi.mtd=7 root=ubi0:rootfs rw" \
+    "$bootCmd"
+
+puts "-I- === Initialize the NAND access ==="
+NANDFLASH::Init
+
+if {$pmeccConfig != "none"} {
+   puts "-I- === Enable PMECC OS Parameters ==="
+   NANDFLASH::NandHeaderValue HEADER $pmeccConfig
+}
+
+puts "-I- === Erase all the NAND flash blocs and test the erasing ==="
+NANDFLASH::EraseAllNandFlash
+
+puts "-I- === Load the bootstrap in the first sector ==="
+if {$pmeccConfig != "none"} {
+   NANDFLASH::SendBootFilePmeccCmd $bootstrapFile
+} else {
+   NANDFLASH::sendBootFile $bootstrapFile
+}
+
+puts "-I- === Load the u-boot in the next sectors ==="
+send_file {NandFlash} "$ubootFile" $ubootAddr 0 
+
+if {$build_uboot_env == "yes"} {
+   puts "-I- === Load the u-boot environment variables ==="
+   set fh [open "$ubootEnvFile" w]
+   fconfigure $fh -translation binary
+   puts -nonewline $fh [set_uboot_env u_boot_variables]
+   close $fh
+   send_file {NandFlash} "$ubootEnvFile" $ubootEnvAddr 0
+}
+
+puts "-I- === Load the Kernel image and device tree database ==="
+
+if {$use_dtb == "yes"} {
+   send_file {NandFlash} "$dtbFile" $dtbAddr 0
+}
+send_file {NandFlash} "$kernelFile" $kernelAddr 0
+
+if {$pmeccConfig != "none"} {
+   puts "-I- === Enable trimffs ==="
+   NANDFLASH::NandSetTrimffs 1
+}
+
+puts "-I- === Load the linux file system ==="
+send_file {NandFlash} "$rootfsFile" $rootfsAddr 0
+
+puts "-I- === DONE. ==="
diff --git a/board/atmel/nandflash.txt b/board/atmel/nandflash.txt
new file mode 100644
index 000000000000..d8bddfa0f819
--- /dev/null
+++ b/board/atmel/nandflash.txt
@@ -0,0 +1,106 @@
+Flashing the NAND using SAM-BA
+==============================
+
+This document explains how to flash a basic Buildroot system on various
+Atmel boards. Additional details can
+also be found on the Linux4SAM website, in particular here:
+http://www.at91.com/linux4sam/bin/view/Linux4SAM/GettingStarted
+
+This guide covers the following configurations:
+ - at91sam9g45m10ek_defconfig
+ - at91sam9rlek_defconfig
+ - at91sam9x5ek_defconfig (at91sam9g15, at91sam9g25, at91sam9x25,
+   at91sam9g35 and at91sam9x35)
+ - atmel_sama5d3xek_defconfig (sama5d31, sama5d33, sama5d34, sama5d35,
+   sama5d36)
+ - atmel_sama5d3_xplained_defconfig
+ - atmel_sama5d4ek_defconfig
+ - atmel_sama5d4_xplained_defconfig
+
+These configurations will use AT91Bootstrap, u-boot and a linux kernel from
+the git trees maintained by Atmel. They also build u-boot SPL when
+available, it can replace AT91Bootstrap.
+
+
+Configuring and building Buildroot
+----------------------------------
+
+  make <board>_defconfig
+  make
+
+
+Flashing the board
+------------------
+
+Connect the board:
+ o at91sam9g45m10ek: DBGU: J10, USB sam-ba: J14
+ o at91sam9rlek: DBGU: J19, USB sam-ba: J21
+ o at91sam9x5ek: DBGU: J11, USB sam-ba: J20
+ o sama5d3xek: DBGU: J14, USB sam-ba: J20
+ o sama5d3 Xplained: DBGU: J23, USB sam-ba: J6
+ o sama5d4ek: DBGU: J22 or J24, USB sam-ba: J1
+ o sama5d4 Xplained: DBGU: J1, USB sam-ba: J11
+
+Start the board in RomBOOT:
+ o at91sam9g45m10ek:
+    1. open JP8, JP10 and JP12
+    2. start the board
+    3. close JP8, JP10 and JP12
+
+ o at91sam9rlek:
+   1. J11 on 1-2 (BMS=1), open J12 and J13
+   2. start the board
+   3. close J12 and J13
+
+ o at91sam9x5ek:
+   1. open JP9 and:
+      - Cogent: open *NCS jumper
+      - Embest: open SW1
+      - Ronetix: open J1 and J2
+   2. start the board
+   3. close JP9 and:
+      - Cogent: close *NCS jumper
+      - Embest: close SW1 (ON position)
+      - Ronetix: close J1 and J2
+
+ o sama5d3xek:
+   1. start the board
+   2. push BP4 and BP1
+   3. release BP1
+   4. release BP4
+
+ o sama5d3 Xplained:
+   1. open JP5 (NANDCS) and JP6 (SPICS)
+   2. start the board
+   3. close JP5 ans JP6
+
+ o sama5d4ek:
+   1. start the board
+   2. push BP3 and BP4
+   3. release BP4
+   4. release BP3
+
+ o sama5d4 Xplained:
+   1. close JP7 (BOOT_DIS)
+   2. start the board
+   3. open JP7
+
+"RomBOOT" should appear on your console (this should be ttyUSBx or ttyACMx)
+
+Now locate the USB sam-ba interface it should be ttyACMx, usually ttyACM0
+dmesg on your machine should give:
+usb 1-2.1.4: New USB device found, idVendor=03eb, idProduct=6124
+usb 1-2.1.4: New USB device strings: Mfr=0, Product=0, SerialNumber=0
+cdc_acm 1-2.1.4:1.0: ttyACM0: USB ACM device
+
+Look for idVendor=03eb, idProduct=6124, this is the interface you want to use.
+
+You can then flash the board using the provided flasher.sh script in board/atmel:
+
+board/atmel/flasher.sh <builddir_path> <interface> <board>
+
+For example:
+board/atmel/flasher.sh /tmp/atmel_sama5d3_xplained/ /dev/ttyACM0 sama5d3_xplained
+
+Reboot, the system should boot up to the buildroot login invite.
+
-- 
2.1.4

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

* [Buildroot] [PATCH v2 9/9] configs: rename atmel_xplained_defconfig
  2015-05-13 19:22 [Buildroot] [PATCH v2 0/9] configs: defconfigs for Atmel boards Alexandre Belloni
                   ` (7 preceding siblings ...)
  2015-05-13 19:22 ` [Buildroot] [PATCH v2 8/9] atmel: add a flashing helper and documentation Alexandre Belloni
@ 2015-05-13 19:22 ` Alexandre Belloni
  8 siblings, 0 replies; 15+ messages in thread
From: Alexandre Belloni @ 2015-05-13 19:22 UTC (permalink / raw)
  To: buildroot

For consistency, rename atmel_xplained_defconfig to
atmel_sama5d3_xplained_mmc_defconfig as this configuration supports
booting the sama5d3 Xplained with an MMC card (as opposed to the NAND
flash).

Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
---
 board/atmel/xplained/readme.txt                                   | 8 ++++----
 ...el_xplained_defconfig => atmel_sama5d3_xplained_mmc_defconfig} | 0
 2 files changed, 4 insertions(+), 4 deletions(-)
 rename configs/{atmel_xplained_defconfig => atmel_sama5d3_xplained_mmc_defconfig} (100%)

diff --git a/board/atmel/xplained/readme.txt b/board/atmel/xplained/readme.txt
index 63744dde9c7d..7919c606e8af 100644
--- a/board/atmel/xplained/readme.txt
+++ b/board/atmel/xplained/readme.txt
@@ -10,19 +10,19 @@ web site.
 Note that the default Buildroot configuration is prepared to boot from
 an SD card: the first stage bootloader, second stage bootloader,
 kernel image and root filesystem are all located on the SD card. Some
-adjustements in the bootloader configuration will be needed to boot
-from NAND flash.
+adjustments in the bootloader configuration will be needed to boot
+from NAND flash, see board/atmel/nandflash.txt
 
 Configuring and building Buildroot
 ----------------------------------
 
-  make atmel_xplained_defconfig
+  make atmel_sama5d3_xplained_mmc_defconfig
   make
 
 Preparing the SD card
 ---------------------
 
-The SD card must be partitionned with at least two partitions: one
+The SD card must be partitioned with at least two partitions: one
 FAT16 partition for the bootloaders, kernel image and Device Tree
 blob, and one ext4 partition for the root filesystem. To partition the
 SD card:
diff --git a/configs/atmel_xplained_defconfig b/configs/atmel_sama5d3_xplained_mmc_defconfig
similarity index 100%
rename from configs/atmel_xplained_defconfig
rename to configs/atmel_sama5d3_xplained_mmc_defconfig
-- 
2.1.4

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

* [Buildroot] [PATCH v2 8/9] atmel: add a flashing helper and documentation
  2015-05-13 19:22 ` [Buildroot] [PATCH v2 8/9] atmel: add a flashing helper and documentation Alexandre Belloni
@ 2015-05-14  3:37   ` Baruch Siach
  2015-05-16 21:53     ` Alexandre Belloni
  2015-05-18 21:13   ` Thomas Petazzoni
  1 sibling, 1 reply; 15+ messages in thread
From: Baruch Siach @ 2015-05-14  3:37 UTC (permalink / raw)
  To: buildroot

Hi Alexandre,

On Wed, May 13, 2015 at 09:22:56PM +0200, Alexandre Belloni wrote:
> +You can then flash the board using the provided flasher.sh script in board/atmel:
> +
> +board/atmel/flasher.sh <builddir_path> <interface> <board>
> +
> +For example:
> +board/atmel/flasher.sh /tmp/atmel_sama5d3_xplained/ /dev/ttyACM0 sama5d3_xplained

Since you didn't mention out of tree build in this document, I think 
'./output/' would be better as first argument example. Adding a comment on out 
of tree build would be nice, though.

baruch

-- 
     http://baruch.siach.name/blog/                  ~. .~   Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
   - baruch at tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -

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

* [Buildroot] [PATCH v2 8/9] atmel: add a flashing helper and documentation
  2015-05-14  3:37   ` Baruch Siach
@ 2015-05-16 21:53     ` Alexandre Belloni
  0 siblings, 0 replies; 15+ messages in thread
From: Alexandre Belloni @ 2015-05-16 21:53 UTC (permalink / raw)
  To: buildroot

Hi,

On 14/05/2015 at 06:37:23 +0300, Baruch Siach wrote :
> On Wed, May 13, 2015 at 09:22:56PM +0200, Alexandre Belloni wrote:
> > +You can then flash the board using the provided flasher.sh script in board/atmel:
> > +
> > +board/atmel/flasher.sh <builddir_path> <interface> <board>
> > +
> > +For example:
> > +board/atmel/flasher.sh /tmp/atmel_sama5d3_xplained/ /dev/ttyACM0 sama5d3_xplained
> 
> Since you didn't mention out of tree build in this document, I think 
> './output/' would be better as first argument example. Adding a comment on out 
> of tree build would be nice, though.
> 

Yeah, I thought about that and that is why I used ./output in usage().

I'll switch to:

"
For example, for an out of tree build made in
/tmp/atmel_sama5d3_xplained/ for the sama5d3 Xplained, you would use:
board/atmel/flasher.sh /tmp/atmel_sama5d3_xplained/ /dev/ttyACM0 sama5d3_xplained
"

-- 
Alexandre Belloni, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

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

* [Buildroot] [PATCH v2 1/9] configs: update at91sam9g45m10ek defconfig
  2015-05-13 19:22 ` [Buildroot] [PATCH v2 1/9] configs: update at91sam9g45m10ek defconfig Alexandre Belloni
@ 2015-05-18 21:06   ` Thomas Petazzoni
  0 siblings, 0 replies; 15+ messages in thread
From: Thomas Petazzoni @ 2015-05-18 21:06 UTC (permalink / raw)
  To: buildroot

Hello Alex,

On Wed, 13 May 2015 21:22:49 +0200, Alexandre Belloni wrote:
> Use kernel (3.18) and u-boot (2015.01) from Atmel's repositories.
> 
> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
> ---
>  configs/at91sam9g45m10ek_defconfig | 22 +++++++++++++++++-----
>  1 file changed, 17 insertions(+), 5 deletions(-)
> 
> diff --git a/configs/at91sam9g45m10ek_defconfig b/configs/at91sam9g45m10ek_defconfig
> index c958859df1a3..147789d165df 100644
> --- a/configs/at91sam9g45m10ek_defconfig
> +++ b/configs/at91sam9g45m10ek_defconfig
> @@ -1,9 +1,21 @@
>  BR2_arm=y
>  BR2_arm926t=y
> -BR2_PACKAGE_HOST_SAM_BA=y
> -BR2_TARGET_AT91BOOTSTRAP=y
> -BR2_TARGET_AT91BOOTSTRAP_BOARD="at91sam9m10g45ek"
> +BR2_LINUX_KERNEL=y
> +BR2_LINUX_KERNEL_CUSTOM_GIT=y
> +BR2_LINUX_KERNEL_CUSTOM_REPO_URL="https://github.com/linux4sam/linux-at91.git"
> +BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION="03329ca4cf6b94acc5c65b59b2d1f90fdeee0887"

You also need to ensure that the kernel headers used for the toolchain
are of the same version or older than the kernel you're
building/running.

So, something like:

BR2_KERNEL_HEADERS_VERSION=y
BR2_DEFAULT_KERNEL_VERSION="3.18"
BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_3_18=y

And ditto for all your other defconfigs.

Thanks!

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

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

* [Buildroot] [PATCH v2 4/9] configs: add defconfig for Atmel sama5d3xek
  2015-05-13 19:22 ` [Buildroot] [PATCH v2 4/9] configs: add defconfig for Atmel sama5d3xek Alexandre Belloni
@ 2015-05-18 21:09   ` Thomas Petazzoni
  0 siblings, 0 replies; 15+ messages in thread
From: Thomas Petazzoni @ 2015-05-18 21:09 UTC (permalink / raw)
  To: buildroot

Dear Alexandre Belloni,

On Wed, 13 May 2015 21:22:52 +0200, Alexandre Belloni wrote:

> +BR2_LINUX_KERNEL_INTREE_DTS_NAME="sama5d31ek sama5d31ek_pda4 sama5d31ek_pda7 sama5d31ek_revc sama5d31ek_revc_pda4 sama5d31ek_revc_pda7 sama5d33ek sama5d33ek_pda4 sama5d33ek_pda7 sama5d33ek_revc sama5d33ek_revc_pda4 sama5d33ek_revc_pda7 sama5d34ek sama5d34ek_pda4 sama5d34ek_pda7 sama5d34ek_revc sama5d34ek_revc_pda4 sama5d34ek_revc_pda7 sama5d35ek sama5d35ek_revc sama5d36ek sama5d36ek_pda4 sama5d36ek_pda7 sama5d36ek_revc sama5d36ek_revc_pda4 sama5d36ek_revc_pda7"

Hum, at some point we'll have to think about using $(wildcard ...) or
something like that to allow wildcards in this option. But since
there's only one user for now, and it's not very common to have
gazillions of DTs for a given board, it's probably not worth the effort.

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

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

* [Buildroot] [PATCH v2 8/9] atmel: add a flashing helper and documentation
  2015-05-13 19:22 ` [Buildroot] [PATCH v2 8/9] atmel: add a flashing helper and documentation Alexandre Belloni
  2015-05-14  3:37   ` Baruch Siach
@ 2015-05-18 21:13   ` Thomas Petazzoni
  1 sibling, 0 replies; 15+ messages in thread
From: Thomas Petazzoni @ 2015-05-18 21:13 UTC (permalink / raw)
  To: buildroot

Dear Alexandre Belloni,

On Wed, 13 May 2015 21:22:56 +0200, Alexandre Belloni wrote:
> Provide a flashing helper to properly select the sam-ba configuration
> and reuse the sam-ba tcl script provided by Atmel with minimal
> modifications.
> 
> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
> ---
>  board/atmel/flasher.sh    |  74 ++++++++++
>  board/atmel/nandflash.tcl | 346 ++++++++++++++++++++++++++++++++++++++++++++++
>  board/atmel/nandflash.txt | 106 ++++++++++++++

This file should really be called readme.txt and not nandflash.txt. I
know it doesn't cover anything but NAND flash for the moment, but
readme.txt is really the convention we use for all platforms.

Otherwise, great job. I really like the tutorial covering all the
evaluation boards, with details on connecting the debug UART and the
USB device cable.

Thanks!

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

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

end of thread, other threads:[~2015-05-18 21:13 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-05-13 19:22 [Buildroot] [PATCH v2 0/9] configs: defconfigs for Atmel boards Alexandre Belloni
2015-05-13 19:22 ` [Buildroot] [PATCH v2 1/9] configs: update at91sam9g45m10ek defconfig Alexandre Belloni
2015-05-18 21:06   ` Thomas Petazzoni
2015-05-13 19:22 ` [Buildroot] [PATCH v2 2/9] configs: add defconfig for Atmel at91sam9rlek Alexandre Belloni
2015-05-13 19:22 ` [Buildroot] [PATCH v2 3/9] configs: add defconfig for Atmel at91sam9x5ek Alexandre Belloni
2015-05-13 19:22 ` [Buildroot] [PATCH v2 4/9] configs: add defconfig for Atmel sama5d3xek Alexandre Belloni
2015-05-18 21:09   ` Thomas Petazzoni
2015-05-13 19:22 ` [Buildroot] [PATCH v2 5/9] configs: add defconfig for Atmel sama5d4ek Alexandre Belloni
2015-05-13 19:22 ` [Buildroot] [PATCH v2 6/9] configs: add defconfig for Atmel sama5d4 Xplained Ultra Alexandre Belloni
2015-05-13 19:22 ` [Buildroot] [PATCH v2 7/9] configs: add defconfig for Atmel sama5d3 Xplained Alexandre Belloni
2015-05-13 19:22 ` [Buildroot] [PATCH v2 8/9] atmel: add a flashing helper and documentation Alexandre Belloni
2015-05-14  3:37   ` Baruch Siach
2015-05-16 21:53     ` Alexandre Belloni
2015-05-18 21:13   ` Thomas Petazzoni
2015-05-13 19:22 ` [Buildroot] [PATCH v2 9/9] configs: rename atmel_xplained_defconfig Alexandre Belloni

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.