All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/1] added comments on how to install the system
@ 2016-08-21 10:13 Guillaume W. Bres
  2016-08-21 12:46 ` Baruch Siach
  0 siblings, 1 reply; 4+ messages in thread
From: Guillaume W. Bres @ 2016-08-21 10:13 UTC (permalink / raw)
  To: buildroot

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
+sudo dd if=output/images/rootfs.ext4 of=/dev/sdb2
-- 
2.1.4

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

* [Buildroot] [PATCH 1/1] added comments on how to install the system
  2016-08-21 10:13 [Buildroot] [PATCH 1/1] added comments on how to install the system Guillaume W. Bres
@ 2016-08-21 12:46 ` Baruch Siach
  2016-08-22  9:57   ` Jeroen Roovers
  0 siblings, 1 reply; 4+ messages in thread
From: Baruch Siach @ 2016-08-21 12:46 UTC (permalink / raw)
  To: buildroot

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

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

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

* [Buildroot] [PATCH 1/1] added comments on how to install the system
  2016-08-21 12:46 ` Baruch Siach
@ 2016-08-22  9:57   ` Jeroen Roovers
  2016-08-23  4:03     ` Baruch Siach
  0 siblings, 1 reply; 4+ messages in thread
From: Jeroen Roovers @ 2016-08-22  9:57 UTC (permalink / raw)
  To: buildroot

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

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

* [Buildroot] [PATCH 1/1] added comments on how to install the system
  2016-08-22  9:57   ` Jeroen Roovers
@ 2016-08-23  4:03     ` Baruch Siach
  0 siblings, 0 replies; 4+ messages in thread
From: Baruch Siach @ 2016-08-23  4:03 UTC (permalink / raw)
  To: buildroot

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

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

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

end of thread, other threads:[~2016-08-23  4:03 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-08-21 10:13 [Buildroot] [PATCH 1/1] added comments on how to install the system Guillaume W. Bres
2016-08-21 12:46 ` Baruch Siach
2016-08-22  9:57   ` Jeroen Roovers
2016-08-23  4:03     ` Baruch Siach

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.