[Buildroot] How transfer what image(s) to target-CF?

Björn Kirchner bjoern at am-soft.de
Sat Apr 26 07:23:14 UTC 2014


Am Fri, 25 Apr 2014 23:42:44 +0200
schrieb Lennart Ramberg <ramberg.lennart at 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




More information about the buildroot mailing list