Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] How transfer what image(s) to target-CF?
@ 2014-04-23 13:42 Lennart Ramberg
  2014-04-23 15:33 ` Arnout Vandecappelle
  0 siblings, 1 reply; 14+ messages in thread
From: Lennart Ramberg @ 2014-04-23 13:42 UTC (permalink / raw)
  To: buildroot

Hello,

New and experimenting, I want my target Linux system to reside on a Compact
Flash,
such that I can pull it from the host (Buildroot) computer and
then insert it in my x86 target as an IDE-drive and boot.

What file(s) should I have in host .../output/images/  and how do I put
it(them) in the CF?
I have USB on my host and a USB-CF-adapter and a formatted CF.

Any pointers welcome.

Thank you
Lennart
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20140423/73e95927/attachment.html>

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

* [Buildroot] How transfer what image(s) to target-CF?
  2014-04-23 13:42 [Buildroot] How transfer what image(s) to target-CF? Lennart Ramberg
@ 2014-04-23 15:33 ` Arnout Vandecappelle
  2014-04-24 10:07   ` Lennart Ramberg
  0 siblings, 1 reply; 14+ messages in thread
From: Arnout Vandecappelle @ 2014-04-23 15:33 UTC (permalink / raw)
  To: buildroot

On 23/04/14 15:42, Lennart Ramberg wrote:
> Hello,
> 
> New and experimenting, I want my target Linux system to reside on a
> Compact Flash,
> such that I can pull it from the host (Buildroot) computer and
> then insert it in my x86 target as an IDE-drive and boot.
> 
> What file(s) should I have in host .../output/images/  and how do I put
> it(them) in the CF?
> I have USB on my host and a USB-CF-adapter and a formatted CF.

 The simplest is probably to use cpio as your rootfs, syslinux as the
bootloader, bzImage as the kernel, and put that on a FAT filesystem.


 Regards,
 Arnout

-- 
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F

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

* [Buildroot] How transfer what image(s) to target-CF?
  2014-04-23 15:33 ` Arnout Vandecappelle
@ 2014-04-24 10:07   ` Lennart Ramberg
  2014-04-24 21:44     ` Arnout Vandecappelle
  0 siblings, 1 reply; 14+ messages in thread
From: Lennart Ramberg @ 2014-04-24 10:07 UTC (permalink / raw)
  To: buildroot

Thanks Arnout,

Now, please, for the 'how'-part, that 'put':

How exactly would I here use commands like dd and/or cpio, and in what
order?
Assume the target CF is mounted as /dev/sdX on the host.

To complicate matters :-) I aim at ext3.

Regards
Lennart


On Wed, Apr 23, 2014 at 5:33 PM, Arnout Vandecappelle <arnout@mind.be>wrote:

> On 23/04/14 15:42, Lennart Ramberg wrote:
> > Hello,
> >
> > New and experimenting, I want my target Linux system to reside on a
> > Compact Flash,
> > such that I can pull it from the host (Buildroot) computer and
> > then insert it in my x86 target as an IDE-drive and boot.
> >
> > What file(s) should I have in host .../output/images/  and how do I put
> > it(them) in the CF?
> > I have USB on my host and a USB-CF-adapter and a formatted CF.
>
>  The simplest is probably to use cpio as your rootfs, syslinux as the
> bootloader, bzImage as the kernel, and put that on a FAT filesystem.
>
>
>  Regards,
>  Arnout
>
> --
> Arnout Vandecappelle                          arnout at mind be
> Senior Embedded Software Architect            +32-16-286500
> Essensium/Mind                                http://www.mind.be
> G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
> LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
> GPG fingerprint:  7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20140424/e1c285f4/attachment.html>

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

* [Buildroot] How transfer what image(s) to target-CF?
  2014-04-24 10:07   ` Lennart Ramberg
@ 2014-04-24 21:44     ` Arnout Vandecappelle
  2014-04-25 18:37       ` Lennart Ramberg
  0 siblings, 1 reply; 14+ messages in thread
From: Arnout Vandecappelle @ 2014-04-24 21:44 UTC (permalink / raw)
  To: buildroot

 Hi Lennart,

 [Please don't top-post, instead reply below the relevant quoted paragraph.]

On 24/04/14 12:07, Lennart Ramberg wrote:
> Thanks Arnout,
> 
> Now, please, for the 'how'-part, that 'put':
> 
> How exactly would I here use commands like dd and/or cpio, and in what order?

 With "put", I just meant copying onto the existing FAT filesystem. But
it seems that is not what you want.


> Assume the target CF is mounted as /dev/sdX on the host.
> 
> To complicate matters :-) I aim at ext3.

 Then you have two options: either create an ext3 image, or create a
tarball and format the CF card from a separate script.

1. Set the following options:

BR2_TARGET_ROOTFS_EXT2=y
BR2_TARGET_ROOTFS_EXT2_3=y
BR2_TARGET_ROOTFS_EXT2_BLOCKS=1000000
(the latter is assuming you have a 1GB CF card).

This will create a rootfs.ext3 image.
You can write this to your CF card with
cat output/images/rootfs.ext3 > /dev/sdX1
(assuming you've partitioned it already, and your rootfs is partition 1).

2. Select the tarball as the target rootfs.

Now in a separate script, use mkfs.ext3 to create the rootfs directly on
the CF card. Then mount it and untar output/images/rootfs.tar to the rootfs.


 In both cases, you'll probably want to use grub2 as the bootloader and
select the BR2_LINUX_KERNEL_INSTALL_TARGET option.


 Regards,
 Arnout

> 
> Regards
> Lennart
> 
> 
> On Wed, Apr 23, 2014 at 5:33 PM, Arnout Vandecappelle <arnout@mind.be
> <mailto:arnout@mind.be>> wrote:
> 
>     On 23/04/14 15:42, Lennart Ramberg wrote:
>     > Hello,
>     >
>     > New and experimenting, I want my target Linux system to reside on a
>     > Compact Flash,
>     > such that I can pull it from the host (Buildroot) computer and
>     > then insert it in my x86 target as an IDE-drive and boot.
>     >
>     > What file(s) should I have in host .../output/images/  and how do I put
>     > it(them) in the CF?
>     > I have USB on my host and a USB-CF-adapter and a formatted CF.
> 
>      The simplest is probably to use cpio as your rootfs, syslinux as the
>     bootloader, bzImage as the kernel, and put that on a FAT filesystem.
> 
> 
>      Regards,
>      Arnout
> 
>     --
>     Arnout Vandecappelle                          arnout at mind be
>     Senior Embedded Software Architect            +32-16-286500
>     <tel:%2B32-16-286500>
>     Essensium/Mind                                http://www.mind.be
>     G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
>     LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
>     GPG fingerprint:  7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F
> 
> 
> 
> 
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot
> 


-- 
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F

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

* [Buildroot] How transfer what image(s) to target-CF?
  2014-04-24 21:44     ` Arnout Vandecappelle
@ 2014-04-25 18:37       ` Lennart Ramberg
  2014-04-25 18:53         ` Arnout Vandecappelle
  0 siblings, 1 reply; 14+ messages in thread
From: Lennart Ramberg @ 2014-04-25 18:37 UTC (permalink / raw)
  To: buildroot

> Then you have two options: either create an ext3 image, or create a
>tarball and format the CF card from a separate script.
>
>1. Set the following options:
 >
 >BR2_TARGET_ROOTFS_EXT2=y
 >BR2_TARGET_ROOTFS_EXT2_3=y
 >BR2_TARGET_ROOTFS_EXT2_BLOCKS=1000000
 >(the latter is assuming you have a 1GB CF card).
 >
 >This will create a rootfs.ext3 image.
 >You can write this to your CF card with
 >cat output/images/rootfs.ext3 > /dev/sdX1
 >(assuming you've partitioned it already, and your rootfs is partition 1).
>
 >2. Select the tarball as the target rootfs.
>
 >Now in a separate script, use mkfs.ext3 to create the rootfs directly on
 >the CF card. Then mount it and untar output/images/rootfs.tar to the
rootfs.
>
>
 >In both cases, you'll probably want to use grub2 as the bootloader and
 >select the BR2_LINUX_KERNEL_INSTALL_TARGET option.

Thanks Arnout!
As for grub2, I understand that I can only chose grub(-legacy) in make
menuconfig.
Any tip on that, please?
/Lennart
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20140425/32bf88ca/attachment.html>

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

* [Buildroot] How transfer what image(s) to target-CF?
  2014-04-25 18:37       ` Lennart Ramberg
@ 2014-04-25 18:53         ` Arnout Vandecappelle
  2014-04-25 21:42           ` Lennart Ramberg
  0 siblings, 1 reply; 14+ messages in thread
From: Arnout Vandecappelle @ 2014-04-25 18:53 UTC (permalink / raw)
  To: buildroot

On 25/04/14 20:37, Lennart Ramberg wrote:
[snip]
> As for grub2, I understand that I can only chose grub(-legacy) in make
> menuconfig.
> Any tip on that, please?

 Ah sorry, grub2 has only been added a couple of weeks ago. But
grub-legacy should work fine as well.

 Regards,
 Arnout

-- 
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F

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

* [Buildroot] How transfer what image(s) to target-CF?
  2014-04-25 18:53         ` Arnout Vandecappelle
@ 2014-04-25 21:42           ` Lennart Ramberg
  2014-04-26  7:23             ` Björn Kirchner
  0 siblings, 1 reply; 14+ messages in thread
From: Lennart Ramberg @ 2014-04-25 21:42 UTC (permalink / raw)
  To: buildroot

>  Ah sorry, grub2 has only been added a couple of weeks ago. But
> grub-legacy should work fine as well.
>
>
>
Hm... my mbr on the target CF mentions LILO. Should I for grub-legacy do as
follows?
Use dd to copy (part of?) the 512 bytes
from /media/lennart/5fcblablblabla620/boot/grub/stage1
to /dev/sdX

And then copy the e2fs_stage1_5 with destination beginning at 512?

Or is there a safer trick to install grub here?

Thanks and regards.
Lennart
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20140425/615dfb91/attachment.html>

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

* [Buildroot] How transfer what image(s) to target-CF?
  2014-04-25 21:42           ` Lennart Ramberg
@ 2014-04-26  7:23             ` Björn Kirchner
  2014-04-27 16:37               ` Lennart Ramberg
  0 siblings, 1 reply; 14+ messages in thread
From: Björn Kirchner @ 2014-04-26  7:23 UTC (permalink / raw)
  To: buildroot

Am Fri, 25 Apr 2014 23:42:44 +0200
schrieb Lennart Ramberg <ramberg.lennart@gmail.com>:

> >  Ah sorry, grub2 has only been added a couple of weeks ago. But
> > grub-legacy should work fine as well.
> >
> >
> >
> Hm... my mbr on the target CF mentions LILO. Should I for grub-legacy
> do as follows?
> Use dd to copy (part of?) the 512 bytes
> from /media/lennart/5fcblablblabla620/boot/grub/stage1
> to /dev/sdX
> 
> And then copy the e2fs_stage1_5 with destination beginning at 512?
> 
> Or is there a safer trick to install grub here?
> 

I don't know if that is safer, but I used the target grub
build by buildroot to install itself to the CF card.
- Become root on your host system
- Execute </full/path/to/your/cfcard>/sbin/grub
At the grub prompt type:
grub> root (hdx,y)
grub> setup (hdx)
grub> quit
(where x is the "hard disk" and y is the partition in grub notation.
With <TAB> you can get a list of possible values for x and y.
You can search for possible disks with
grub> find /boot/grub/stage1
That lists all partitions which contain the named file. If your host
system does not use grub1, it should only be one partition.

When I build my buildroot system for an x86 based board I ran
into a problem. If grub1 was built with a gcc version newer than,
if I remember correctly, 4.5, the stage2 file was built corrupted.
I don't know if that was fixed in the meantime. I just copied the
stage2 file from a build made with a gcc 4.5 compiler. That worked
fine.


> Thanks and regards.
> Lennart

Hope this helps.

Bj?rn

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

* [Buildroot] How transfer what image(s) to target-CF?
  2014-04-26  7:23             ` Björn Kirchner
@ 2014-04-27 16:37               ` Lennart Ramberg
  2014-04-27 19:39                 ` Björn Kirchner
  0 siblings, 1 reply; 14+ messages in thread
From: Lennart Ramberg @ 2014-04-27 16:37 UTC (permalink / raw)
  To: buildroot

On Sat, Apr 26, 2014 at 9:23 AM, Bj?rn Kirchner <bjoern@am-soft.de> wrote:

> ...
> I don't know if that is safer, but I used the target grub
> build by buildroot to install itself to the CF card.
> - Become root on your host system
> - Execute </full/path/to/your/cfcard>/sbin/grub
>
>

Thanks Bj?rn,
However, there is no grub in that sbin in the CF
and listing the files in output/images/rootfs.tar shows no grub in ./sbin/

In .config, the only 'GRUB' that are set are:
BR2_TARGET_GRUB
BR2_TARGET_GRUB_FS_EXT2

I'm using Buildroot-2014.02

Regards
Lennart
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20140427/732af58d/attachment.html>

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

* [Buildroot] How transfer what image(s) to target-CF?
  2014-04-27 16:37               ` Lennart Ramberg
@ 2014-04-27 19:39                 ` Björn Kirchner
  2014-04-28 12:33                   ` Lennart Ramberg
  0 siblings, 1 reply; 14+ messages in thread
From: Björn Kirchner @ 2014-04-27 19:39 UTC (permalink / raw)
  To: buildroot

Am Sun, 27 Apr 2014 18:37:57 +0200
schrieb Lennart Ramberg <ramberg.lennart@gmail.com>:

> On Sat, Apr 26, 2014 at 9:23 AM, Bj?rn Kirchner <bjoern@am-soft.de>
> wrote:
> 
> > ...
> > I don't know if that is safer, but I used the target grub
> > build by buildroot to install itself to the CF card.
> > - Become root on your host system
> > - Execute </full/path/to/your/cfcard>/sbin/grub
> >
> >
> 
> Thanks Bj?rn,
> However, there is no grub in that sbin in the CF
> and listing the files in output/images/rootfs.tar shows no grub
> in ./sbin/

The instructions refered to grub-legacy. I thougt you would use
grub-legacy because you wrote you could not select grub2.
In buildroot 2013.08 there is a /sbin/grub in the rootfs image, 
if in the .config "BR2_TARGET_GRUB=y" is set. But there is no
"BR2_TARGET_GRUB_FS_EXT2" in my .config.

> 
> In .config, the only 'GRUB' that are set are:
> BR2_TARGET_GRUB
> BR2_TARGET_GRUB_FS_EXT2
> 
> I'm using Buildroot-2014.02
> 
> Regards
> Lennart

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

* [Buildroot] How transfer what image(s) to target-CF?
  2014-04-27 19:39                 ` Björn Kirchner
@ 2014-04-28 12:33                   ` Lennart Ramberg
  2014-04-28 14:25                     ` Jérôme Pouiller
       [not found]                     ` <25917145.tTrImWgKe2@sagittea>
  0 siblings, 2 replies; 14+ messages in thread
From: Lennart Ramberg @ 2014-04-28 12:33 UTC (permalink / raw)
  To: buildroot

On Sun, Apr 27, 2014 at 9:39 PM, Bj?rn Kirchner <bjoern@am-soft.de> wrote:

>
> The instructions refered to grub-legacy. I thougt you would use
> grub-legacy because you wrote you could not select grub2.
> In buildroot 2013.08 there is a /sbin/grub in the rootfs image,
> if in the .config "BR2_TARGET_GRUB=y" is set. But there is no
> "BR2_TARGET_GRUB_FS_EXT2" in my .config.
>
>
>
Hi Bj?rn,
Yes, I am talking about grub-legacy only.

Maybe I should wait for grub2. Is that to be expected in the next stable
release, anyone?

Regards
Lennart
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20140428/4f30af22/attachment.html>

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

* [Buildroot] How transfer what image(s) to target-CF?
  2014-04-28 12:33                   ` Lennart Ramberg
@ 2014-04-28 14:25                     ` Jérôme Pouiller
       [not found]                     ` <25917145.tTrImWgKe2@sagittea>
  1 sibling, 0 replies; 14+ messages in thread
From: Jérôme Pouiller @ 2014-04-28 14:25 UTC (permalink / raw)
  To: buildroot

On Monday 28 April 2014 14:33:19 Lennart Ramberg wrote:
> On Sun, Apr 27, 2014 at 9:39 PM, Bj?rn Kirchner <bjoern@am-soft.de> wrote:
> > The instructions refered to grub-legacy. I thougt you would use
> > grub-legacy because you wrote you could not select grub2.
> > In buildroot 2013.08 there is a /sbin/grub in the rootfs image,
> > if in the .config "BR2_TARGET_GRUB=y" is set. But there is no
> > "BR2_TARGET_GRUB_FS_EXT2" in my .config.
> 
> Hi Bj?rn,
> Yes, I am talking about grub-legacy only.
> 
> Maybe I should wait for grub2. Is that to be expected in the next stable
> release, anyone?

I did not check how it work exactly with grub-legacy. However, I can 
give you my recipe to get full disk image using grub2:

 * First cherry-pick c24fdb3 to get support of grub2 (I also work in 
   2014.02 and I had no problem to backport this commit)

 * Select BR2_PACKAGE_HOST_GENIMAGE, BR2_TARGET_GRUB2 and 
   BR2_TARGET_ROOTFS_EXT2 in your configuration

 * Add a boot/grub/grub.cfg to your overlay (you may also embed it in 
   grub, but i have some issues with that)

 * Add a configuration file for host-genimage:

genimage.cfg:
-----------8<--------------------------------8<------------------------
image hdimg.img {
        hdimage {
                align = 1M
        }
        partition boot {
                in-partition-table = "no"
                image = "boot.img"
                offset = 0
                size = 512
        }
        partition grub {
                 in-partition-table = "no"
                 image = "grub.img"
                 offset = 512
        }
        partition root {
                # size = 1G
                partition-type = 0x83
                image = "rootfs.ext2"
        }
}

config {
        outputpath = images
        inputpath = images
        #rootpath = target
        rootpath = empty
        tmppath = tmp
}
---------->8------------------------------->8--------------------------

  * Add a BR2_ROOTFS_POST_IMAGE_SCRIPT to create boot.img, grub.img[1] 
and final image:

postimage.sh:
-----------8<--------------------------------8<------------------------
#!/bin/bash

BOARD_DIR=$(dirname $(readlink -f $0))
IMAGE_DIR=$(readlink -f $1)
HOST_DIR=$(readlink -f $2)
PATH=$HOST_DIR/usr/bin:$HOST_DIR/host/usr/sbin:$PATH

cp $HOST_DIR/usr/lib/grub/i386-pc/boot.img $IMAGE_DIR
grub-mkimage -d $HOST_DIR/usr/lib/grub/i386-pc -O i386-pc -o 
$IMAGE_DIR/grub.img -p "(hd0,msdos1)/boot/grub" boot linux ext2 fat part_msdos 
normal biosdisk help ls minicmd serial

pushd $IMAGE_DIR/..
  mkdir -p empty
  genimage --config $BOARD_DIR/genimage.cfg || exit 1
popd
---------->8------------------------------->8--------------------------

 * In order to pass path of boot.img to this script, you also have to 
    set BR2_ROOTFS_POST_SCRIPT_ARGS="$(HOST_DIR)"


[1] Buildroot automatically generate grub.img. However, it looks like 
it is necessary to force a specific prefix (-p option) in order to have 
a bootable image.

-- 
J?r?me Pouiller, Sysmic
Embedded Linux specialist
http://www.sysmic.fr

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

* [Buildroot] How transfer what image(s) to target-CF?
       [not found]                     ` <25917145.tTrImWgKe2@sagittea>
@ 2014-04-28 14:27                       ` Jérôme Pouiller
  2014-05-05  9:01                         ` Lennart Ramberg
  0 siblings, 1 reply; 14+ messages in thread
From: Jérôme Pouiller @ 2014-04-28 14:27 UTC (permalink / raw)
  To: buildroot

On Monday 28 April 2014 16:21:20 J?r?me Pouiller wrote:
[...]
> I did not check how it work exactly with grub-legacy. However, I can
> give you my recipe to get full disk image using grub2:
[...]
Oops... I send it sent twice. Sorry.

-- 
J?r?me Pouiller, Sysmic
Embedded Linux specialist
http://www.sysmic.fr

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

* [Buildroot] How transfer what image(s) to target-CF?
  2014-04-28 14:27                       ` Jérôme Pouiller
@ 2014-05-05  9:01                         ` Lennart Ramberg
  0 siblings, 0 replies; 14+ messages in thread
From: Lennart Ramberg @ 2014-05-05  9:01 UTC (permalink / raw)
  To: buildroot

On Mon, Apr 28, 2014 at 4:27 PM, J?r?me Pouiller <jezz@sysmic.org> wrote:

> On Monday 28 April 2014 16:21:20 J?r?me Pouiller wrote:
> > I did not check how it work exactly with grub-legacy. However, I can
> > give you my recipe to get full disk image using grub2:
>
>  Thank you J?r?me,
But I'm afraid your recepie is still a bit over my head.
Now,
what I did do, though, was to download a recent Daily Snapshot, which has
support for GRUB2.
However, booting brings me to
grub rescue>
but not much further, for example:
grub rescue> insmod normal.mod
error: unknown filesystem.
---
To recap, what I have done is: (Target CF sdX=sdc in my case.)
sudo fdisk /dev/sdX    and created one primary partition 1GB.
sudo mke2fs -j -m 0 /dev/sdX1
sudo tune2fs -c0 -i0 /dev/sdX1

~/buildroot $ make menuconfig    with the only changes from default being:
----------
Target options:
   i686
Build options:
   Enable compiler cache
Toolchain:
   C library:
      glibc
System configuration:
   de-selected: Run a getty (logon prompt) after boot
Kernel:
   Linux kernel
   (i386) Defconfig name
   Install  kernel image to /boot in target
Target packages:
   Graphic libraries and applications (graphic/text):
      X.org X Window System
   Libraries:
      Graphics:
         cairo
   Network applications:
      ntp
   Text editors and viewers:
      nano
Filesystem images:
   ext2/3/4 root filesystem
      ext3
   1000000 size in blocks
Bootloaders:
   grub2
Host utilities:
   (no change)
Legacy config options:
   (no change)
----------
~/buildroot $ make
That produced in output/images/ the files:
  bzImage
  grub.img
  rootfs.ext2
  rootfs.ext3
  rootfs.tar
---

~/buildroot $ sudo tar -xvf output/images/rootfs.tar -C
/media/lennart/30bdb69e-d518-4a8c-8b12-70fe8481dae7/

~buildroot $ sudo grub-install /dev/sdX
Installation finished. No error reported.

I unmounted and put the CF as the only IDE-drive in my target system and
power on:
After bios follows 15 seconds black screen, then:
error: no such device: ad7c5498-2ffc-44b0-80dd-01c5dcd23dc2.
Entering rescue mode...
grub rescue>

Hm... that UUID ad7c....c2 comes from my host (/dev/sda6  TYPE="ext4").
Anyway;

grub rescue> set
prefix=(hd0)/boot/grub
root=hd0
grub rescue> insmod normal
error: unknown filesystem.
grub rescue> ls
(hd0) (hd0,msdos1)

My target /boot/ contains only /boot/grub/grub.cfg and /boot/bzImage
Shouldn't there be a /boot/grub/linux.mod and a /boot/grub/normal.mod?
Should I have done anything with buildroot/output/images/grub.img?

grub.cfg looks like below:
--
set default="0"
set timeout="5"
 menuentry "Buildroot" {
         linux /bzImage root=/dev/sda1 console=tty1
}
--
Shouldn't it be /boot/bzImage? Or does the above imply a separate boot
partition, which I don't have?

Please, someone, what gives?

Regards
Lennart
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20140505/8dab5134/attachment.html>

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

end of thread, other threads:[~2014-05-05  9:01 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-04-23 13:42 [Buildroot] How transfer what image(s) to target-CF? Lennart Ramberg
2014-04-23 15:33 ` Arnout Vandecappelle
2014-04-24 10:07   ` Lennart Ramberg
2014-04-24 21:44     ` Arnout Vandecappelle
2014-04-25 18:37       ` Lennart Ramberg
2014-04-25 18:53         ` Arnout Vandecappelle
2014-04-25 21:42           ` Lennart Ramberg
2014-04-26  7:23             ` Björn Kirchner
2014-04-27 16:37               ` Lennart Ramberg
2014-04-27 19:39                 ` Björn Kirchner
2014-04-28 12:33                   ` Lennart Ramberg
2014-04-28 14:25                     ` Jérôme Pouiller
     [not found]                     ` <25917145.tTrImWgKe2@sagittea>
2014-04-28 14:27                       ` Jérôme Pouiller
2014-05-05  9:01                         ` Lennart Ramberg

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