diff mbox

[4/4] board/atmel/xplained/readme.txt: update documentation

Message ID 1458808152-15778-4-git-send-email-ludovic.desroches@atmel.com
State Superseded
Headers show

Commit Message

ludovic.desroches@atmel.com March 24, 2016, 8:29 a.m. UTC
This documentation is not only dedicated to SAMA5D3 Xplained boards. The
procedure is the same for SAMA5D4 and SAMA5D2.
sfdisk, -u (--unit) option is obsolete on latest versions.

Signed-off-by: Ludovic Desroches <ludovic.desroches@atmel.com>
---
 board/atmel/xplained/readme.txt | 23 ++++++++++++-----------
 1 file changed, 12 insertions(+), 11 deletions(-)

Comments

Thomas Petazzoni March 24, 2016, 8:44 a.m. UTC | #1
Hello,

On Thu, 24 Mar 2016 09:29:12 +0100, Ludovic Desroches wrote:
> This documentation is not only dedicated to SAMA5D3 Xplained boards. The
> procedure is the same for SAMA5D4 and SAMA5D2.
> sfdisk, -u (--unit) option is obsolete on latest versions.
> 
> Signed-off-by: Ludovic Desroches <ludovic.desroches@atmel.com>
> ---
>  board/atmel/xplained/readme.txt | 23 ++++++++++++-----------
>  1 file changed, 12 insertions(+), 11 deletions(-)

There is some duplication of information between board/atmel/readme.txt
(which also covers SAMA5 Xplained platforms) and
board/atmel/xplained/readme.txt.

Perhaps board/atmel/xplained/readme.txt should be removed entirely, and
board/atmel/readme.txt contain all the information?

Seems like board/atmel/readme.txt covers how to flash on NAND, while
board/atmel/xplained/readme.txt covers how to use a SD card based
booting. Definitely not very clear when looking at the readme.txt
location.

Another possible (but future, and unrelated) improvement is to use
genimage to generate a ready-to-use SD card image, which automatically
contains the VFAT and ext4 partitions.

Thanks!

Thomas
ludovic.desroches@atmel.com March 24, 2016, 9:40 a.m. UTC | #2
Hi,

On Thu, Mar 24, 2016 at 09:44:36AM +0100, Thomas Petazzoni wrote:
> Hello,
> 
> On Thu, 24 Mar 2016 09:29:12 +0100, Ludovic Desroches wrote:
> > This documentation is not only dedicated to SAMA5D3 Xplained boards. The
> > procedure is the same for SAMA5D4 and SAMA5D2.
> > sfdisk, -u (--unit) option is obsolete on latest versions.
> > 
> > Signed-off-by: Ludovic Desroches <ludovic.desroches@atmel.com>
> > ---
> >  board/atmel/xplained/readme.txt | 23 ++++++++++++-----------
> >  1 file changed, 12 insertions(+), 11 deletions(-)
> 
> There is some duplication of information between board/atmel/readme.txt
> (which also covers SAMA5 Xplained platforms) and
> board/atmel/xplained/readme.txt.
> 

I agree.

> Perhaps board/atmel/xplained/readme.txt should be removed entirely, and
> board/atmel/readme.txt contain all the information?
> 
> Seems like board/atmel/readme.txt covers how to flash on NAND, while
> board/atmel/xplained/readme.txt covers how to use a SD card based
> booting. Definitely not very clear when looking at the readme.txt
> location.
> 

I will try to do a quick merge.

> Another possible (but future, and unrelated) improvement is to use
> genimage to generate a ready-to-use SD card image, which automatically
> contains the VFAT and ext4 partitions.
> 

We have some scripts which do this but at the moment I am not sure they
can handle all possible errors. For sure, it will be great if we can
achieve it in the future.

Regards

Ludovic
Thomas Petazzoni March 24, 2016, 9:52 a.m. UTC | #3
Hello,

On Thu, 24 Mar 2016 10:40:06 +0100, Ludovic Desroches wrote:

> > Another possible (but future, and unrelated) improvement is to use
> > genimage to generate a ready-to-use SD card image, which automatically
> > contains the VFAT and ext4 partitions.
> 
> We have some scripts which do this but at the moment I am not sure they
> can handle all possible errors. For sure, it will be great if we can
> achieve it in the future.

There's no real need for a script, genimage does most of the work. Look
at board/acmesystems/arietta-g25/genimage.cfg and
board/acmesystems/arietta-g25/post-image.sh, which are doing this for
an Atmel based platform.

Thomas
ludovic.desroches@atmel.com March 24, 2016, 10:03 a.m. UTC | #4
On Thu, Mar 24, 2016 at 10:52:36AM +0100, Thomas Petazzoni wrote:
> Hello,
> 
> On Thu, 24 Mar 2016 10:40:06 +0100, Ludovic Desroches wrote:
> 
> > > Another possible (but future, and unrelated) improvement is to use
> > > genimage to generate a ready-to-use SD card image, which automatically
> > > contains the VFAT and ext4 partitions.
> > 
> > We have some scripts which do this but at the moment I am not sure they
> > can handle all possible errors. For sure, it will be great if we can
> > achieve it in the future.
> 
> There's no real need for a script, genimage does most of the work. Look
> at board/acmesystems/arietta-g25/genimage.cfg and
> board/acmesystems/arietta-g25/post-image.sh, which are doing this for
> an Atmel based platform.
> 

Interesting, thank for the tip.

Regards

Ludovic
diff mbox

Patch

diff --git a/board/atmel/xplained/readme.txt b/board/atmel/xplained/readme.txt
index ba45122..4833e72 100644
--- a/board/atmel/xplained/readme.txt
+++ b/board/atmel/xplained/readme.txt
@@ -1,9 +1,8 @@ 
-Atmel SAMA5D3 Xplained board
-============================
+Atmel SAMA5Dx Xplained boards
+=============================
 
 This document explains how to set up a basic Buildroot system on the
-Atmel SAMA5D3 Xplained board, whose main site is
-http://www.atmel.com/tools/ATSAMA5D3-XPLD.aspx. Additional details can
+Atmel SAMA5D2/SAMA5D3/SAMA5D4 Xplained boards. Additional details can
 also be found on the http://www.at91.com/linux4sam/bin/view/Linux4SAM/
 web site.
 
@@ -16,7 +15,9 @@  from NAND flash, see board/atmel/readme.txt
 Configuring and building Buildroot
 ----------------------------------
 
-  make atmel_sama5d3_xplained_mmc_defconfig
+Use the alternative mmc defconfig for you board. For instance:
+
+  make atmel_sama5d2_xplained_mmc_defconfig
   make
 
 Preparing the SD card
@@ -27,8 +28,8 @@  FAT16 partition for the bootloaders, kernel image and Device Tree
 blob, and one ext4 partition for the root filesystem. To partition the
 SD card:
 
-sudo sfdisk -uM /dev/mmcblk0 <<EOF
-,64,6
+sudo sfdisk /dev/mmcblk0 <<EOF
+,64MiB,6
 ;
 EOF
 
@@ -52,10 +53,10 @@  sudo mount /dev/mmcblk0p2 /media/rootfs
 Copy the bootloaders, kernel image and Device Tree blob to the first
 partition:
 
-cp output/images/u-boot-spl.bin /media/boot/boot.bin
-cp output/images/u-boot.img /media/boot/u-boot.img
-cp output/images/zImage /media/boot/zImage
-cp output/images/at91-sama5d3_xplained.dtb /media/boot/at91-sama5d3_xplained.dtb
+cp output/images/boot.bin /media/boot/
+cp output/images/u-boot.bin /media/boot/
+cp output/images/zImage /media/boot/
+cp output/images/at91-sama5d2_xplained.dtb /media/boot/
 
 Extract the root filesystem to the second partition: