diff mbox

[1/1] added comments on how to install the system

Message ID 1471774436-18803-1-git-send-email-guillaume.bressaix@gmail.com
State Superseded
Headers show

Commit Message

Guillaume Bres Aug. 21, 2016, 10:13 a.m. UTC
The sudo dd part was not that trivial to me, as I was expecting
the usual ramdisk image or a rootfs.tar file. I think
board/readme.txt should mention it.

Signed-off-by: Guillaume W. Bres <guillaume.bressaix@gmail.com>
---
 board/beaglebone/readme.txt | 11 +++++++++++
 1 file changed, 11 insertions(+)

Comments

Baruch Siach Aug. 21, 2016, 12:46 p.m. UTC | #1
Hi Guillaume W. Bres,

On Sun, Aug 21, 2016 at 12:13:56PM +0200, Guillaume W. Bres wrote:
> The sudo dd part was not that trivial to me, as I was expecting
> the usual ramdisk image or a rootfs.tar file. I think
> board/readme.txt should mention it.
> 
> Signed-off-by: Guillaume W. Bres <guillaume.bressaix@gmail.com>
> ---
>  board/beaglebone/readme.txt | 11 +++++++++++
>  1 file changed, 11 insertions(+)
> 
> diff --git a/board/beaglebone/readme.txt b/board/beaglebone/readme.txt
> index 43ebe53..7d73e93 100644
> --- a/board/beaglebone/readme.txt
> +++ b/board/beaglebone/readme.txt
> @@ -32,3 +32,14 @@ After building, you should get a tree like this:
>    ├── u-boot.img
>    ├── uEnv.txt
>    └── zImage
> +
> +Prepare SD card
> +===============
> +
> +The first partition, /dev/sdb1 in this example, should be a bootable FAT16 partition.
> +The second partition, /dev/sdb2 in this example, should be an EXT4 partition.
> +
> +sudo cp output/images/{MLO,u-boot.img,zImage} /dev/sdb1
> +sudo cp output/images/am335x-bone.dtb /dev/sdb1 -- for the beaglebone
> +sudo cp output/images/am335x-boneblack.dtb /dev/sdb1 -- for the beaglebone black

Have you tested these commands? They overwrite the raw /dev/sdb1 block device, 
instead of copying files into the FAT filesystem.

An easier approach might be to document the use of the generated sdcard.img 
file. sdcard.img support for BeagleBone is now in the buildroot master branch; 
soon to be 2016.08. See board/acmesystems/arietta-g25/readme.txt as an 
example.

> +sudo dd if=output/images/rootfs.ext4 of=/dev/sdb2

The readme.txt file does not mention rootfs.ext4, even though 
beaglebone_defconfig contains BR2_TARGET_ROOTFS_EXT2_4=y. This is unrelated to 
this patch, but worth fixing anyway.

baruch
Jeroen Roovers Aug. 22, 2016, 9:57 a.m. UTC | #2
On 21 August 2016 at 14:46, Baruch Siach <baruch@tkos.co.il> wrote:
>
> Hi Guillaume W. Bres,
>
> On Sun, Aug 21, 2016 at 12:13:56PM +0200, Guillaume W. Bres wrote:
> > +The first partition, /dev/sdb1 in this example, should be a bootable FAT16 partition.
> > +The second partition, /dev/sdb2 in this example, should be an EXT4 partition.

See below.

>
> > +sudo cp output/images/{MLO,u-boot.img,zImage} /dev/sdb1
> > +sudo cp output/images/am335x-bone.dtb /dev/sdb1 -- for the beaglebone
> > +sudo cp output/images/am335x-boneblack.dtb /dev/sdb1 -- for the beaglebone black
>
> Have you tested these commands? They overwrite the raw /dev/sdb1 block device,
> instead of copying files into the FAT filesystem.

Indeed, that is not the way. It's more complicated than that. We would
need to create a separate FAT16 image besides the rootfs image,
loop-mount the former and then copy those files to the mounted image
file.

An additional useful step to describe would be to copy the rootfs to
the FAT16 image as well, which is needed if you want to forego the
second partition and use the rootfs as an initramfs.


>
> An easier approach might be to document the use of the generated sdcard.img
> file. sdcard.img support for BeagleBone is now in the buildroot master branch;
> soon to be 2016.08. See board/acmesystems/arietta-g25/readme.txt as an
> example.
>
> > +sudo dd if=output/images/rootfs.ext4 of=/dev/sdb2

But that wouldn't describe the required FAT16 image as intended.


Regards,
     jer
Baruch Siach Aug. 23, 2016, 4:03 a.m. UTC | #3
Hi Jeroen,

On Mon, Aug 22, 2016 at 11:57:00AM +0200, Jeroen Roovers wrote:
> On 21 August 2016 at 14:46, Baruch Siach <baruch@tkos.co.il> wrote:
> > > +sudo cp output/images/{MLO,u-boot.img,zImage} /dev/sdb1
> > > +sudo cp output/images/am335x-bone.dtb /dev/sdb1 -- for the beaglebone
> > > +sudo cp output/images/am335x-boneblack.dtb /dev/sdb1 -- for the beaglebone black
> >
> > Have you tested these commands? They overwrite the raw /dev/sdb1 block device,
> > instead of copying files into the FAT filesystem.
> 
> Indeed, that is not the way. It's more complicated than that. We would
> need to create a separate FAT16 image besides the rootfs image,
> loop-mount the former and then copy those files to the mounted image
> file.
> 
> An additional useful step to describe would be to copy the rootfs to
> the FAT16 image as well, which is needed if you want to forego the
> second partition and use the rootfs as an initramfs.

Direct sdcard.img write to SD card obviates all these details. We generally 
want these readme.txt files to provide instructions for the shortest path to a 
minimal working setup.

baruch
diff mbox

Patch

diff --git a/board/beaglebone/readme.txt b/board/beaglebone/readme.txt
index 43ebe53..7d73e93 100644
--- a/board/beaglebone/readme.txt
+++ b/board/beaglebone/readme.txt
@@ -32,3 +32,14 @@  After building, you should get a tree like this:
   ├── u-boot.img
   ├── uEnv.txt
   └── zImage
+
+Prepare SD card
+===============
+
+The first partition, /dev/sdb1 in this example, should be a bootable FAT16 partition.
+The second partition, /dev/sdb2 in this example, should be an EXT4 partition.
+
+sudo cp output/images/{MLO,u-boot.img,zImage} /dev/sdb1
+sudo cp output/images/am335x-bone.dtb /dev/sdb1 -- for the beaglebone
+sudo cp output/images/am335x-boneblack.dtb /dev/sdb1 -- for the beaglebone black
+sudo dd if=output/images/rootfs.ext4 of=/dev/sdb2