public inbox for gentoo-embedded@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-embedded] x86 Howto
@ 2005-06-28  9:05 Pierre Cassimans
  2005-06-28  9:36 ` Ow Mun Heng
  0 siblings, 1 reply; 8+ messages in thread
From: Pierre Cassimans @ 2005-06-28  9:05 UTC (permalink / raw
  To: gentoo-embedded

Hi,

i tried out the x86 howto, and i have to say it is a great document. But i 
still have problems booting my device.

The device boots, but once it have to init, it stays there right after 
Freeing unused memory. The device doesn't generate a kernel panic, and i can 
reboot it with ctrl-alt-delete, so i guess there was some king of init done.

I tried putting init=linuxrc as kernel option in my grub conf but that gave 
me the same status.

Any clues?

In the howto is a little error. Here are the 2 fact that are not correct i 
think

    ROOT=/embedded_rootfs make modules_install
    cp /usr/src/linux/arch/i386/boot/bzImage 
/embedded_rootfs/boot/vmlinuz-2.6.x

and

   nano -w /embedded_rootfs/boot/grub/grub.conf
   /*
   default 0
   timeout 10
   splashimage=(hd0,0)/boot/grub/splash.xpm.gz

   title=Linux 2.6.x
   root (hd0,0)
   kernel /vmlinuz-2.6.x root=/dev/hda1 vga=792
   */

the latter should be
   kernel /boot/vmlinuz-2.6.x root=/dev/hda1 vga=792

Another tip i can give is for grub. If you want to make a cf bootable with 
grub and want to install grub on your cf from you develop station, you could 
do it this way:
In grub shell:

device (hd0) /dev/hdg /*where /dev/hdg is your cf card. This could be 
/dev/sdb */
root (hd0,0)
setup (hd0)

This will install grub on your cf card.

What also would be nice is to give some examples of booting the embedded 
device, like working from ram or with initrd, cramfs, squashfs, root pivots, 
using unionfs, overlays, etc. I know this is not easy, but it would help the 
noobs (like me) alot.

I've read the oreilly book about linux embedded. It was a very interesting 
guide, but i was missing a few examples in it to completely understand what 
was explained. Hope i will see them in this howto some day ;)


-- 
gentoo-embedded@gentoo.org mailing list



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

* Re: [gentoo-embedded] x86 Howto
  2005-06-28  9:05 [gentoo-embedded] x86 Howto Pierre Cassimans
@ 2005-06-28  9:36 ` Ow Mun Heng
  2005-06-29  2:09   ` Ned Ludd
  0 siblings, 1 reply; 8+ messages in thread
From: Ow Mun Heng @ 2005-06-28  9:36 UTC (permalink / raw
  To: gentoo-embedded

On Tue, 2005-06-28 at 09:05 +0000, Pierre Cassimans wrote:
> Hi,
> 
> i tried out the x86 howto, and i have to say it is a great document. But i 
> still have problems booting my device.
> 
> The device boots, but once it have to init, it stays there right after 
> Freeing unused memory. The device doesn't generate a kernel panic, and i can 
> reboot it with ctrl-alt-delete, so i guess there was some king of init done.

So.. you mean you don't get a login prompt?? Funny. I can get a
login-prompt using that howto


> I tried putting init=linuxrc as kernel option in my grub conf but that gave 
> me the same status.

 kernel /boot/vmlinuz  root=/dev/hda1 video=vesafb:ywrap,mtrr,800x600-16@60


> Any clues?
> 
> In the howto is a little error. Here are the 2 fact that are not correct i 
> think
> 
>     ROOT=/embedded_rootfs make modules_install
>     cp /usr/src/linux/arch/i386/boot/bzImage 
> /embedded_rootfs/boot/vmlinuz-2.6.x
> 

For me, the above command didn't work. I had to do the module copies on
my own.


> Another tip i can give is for grub. If you want to make a cf bootable with 
> grub and want to install grub on your cf from you develop station, you could 
> do it this way:
> In grub shell:
> 
> device (hd0) /dev/hdg /*where /dev/hdg is your cf card. This could be 
> /dev/sdb */
> root (hd0,0)
> setup (hd0)

Yeah.. Grub was a little hard to get into the MBR. I had to re-emerge
grub a few times before I could Grub my HD. (i installed into vmware)
and that also using grub and noto grub-install.

> What also would be nice is to give some examples of booting the embedded 
> device, like working from ram or with initrd, cramfs, squashfs, root pivots, 
> using unionfs, overlays, etc. I know this is not easy, but it would help the 
> noobs (like me) alot.

Currently I'm booting it from a simulated HD and yet to explore anything
further than that. I've still not worked on it since I last reported
success with it. Dropbear still has not worked due to no /dev/ptys
(IIRC)



-- 
Ow Mun Heng
Gentoo/Linux on DELL D600 1.4Ghz 1.5GB RAM
98% Microsoft(tm) Free!! 
Neuromancer 17:19:44 up 4:06, 5 users, load average: 0.70, 0.92, 0.72 


-- 
gentoo-embedded@gentoo.org mailing list



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

* Re: [gentoo-embedded] x86 Howto
  2005-06-28  9:36 ` Ow Mun Heng
@ 2005-06-29  2:09   ` Ned Ludd
  2005-06-29  2:27     ` Ow Mun Heng
  0 siblings, 1 reply; 8+ messages in thread
From: Ned Ludd @ 2005-06-29  2:09 UTC (permalink / raw
  To: gentoo-embedded

On Tue, 2005-06-28 at 17:36 +0800, Ow Mun Heng wrote:

[...]

>  Dropbear still has not worked due to no /dev/ptys
> (IIRC)


Make sure your kernel has support for Unix98 PTY's

CONFIG_UNIX98_PTYS=y
CONFIG_UNIX98_PTY_COUNT=512

...

-- 
Ned Ludd <solar@gentoo.org>

-- 
gentoo-embedded@gentoo.org mailing list



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

* Re: [gentoo-embedded] x86 Howto
  2005-06-29  2:09   ` Ned Ludd
@ 2005-06-29  2:27     ` Ow Mun Heng
  2005-06-29  4:15       ` Ned Ludd
  0 siblings, 1 reply; 8+ messages in thread
From: Ow Mun Heng @ 2005-06-29  2:27 UTC (permalink / raw
  To: gentoo-embedded

On Tue, 2005-06-28 at 22:09 -0400, Ned Ludd wrote:
> On Tue, 2005-06-28 at 17:36 +0800, Ow Mun Heng wrote:
> 
> [...]
> 
> >  Dropbear still has not worked due to no /dev/ptys
> > (IIRC)
> 
> 
> Make sure your kernel has support for Unix98 PTY's
> 
> CONFIG_UNIX98_PTYS=y
> CONFIG_UNIX98_PTY_COUNT=512

grep -i pty .config
CONFIG_UNIX98_PTYS=y
# CONFIG_LEGACY_PTYS is not set

Is the PTY_COUNT needed? Also I've not tried mounting /dev/pts like you
did in your fstab.

[snip from solar's fstab]
devpts          /dev/pts        devpts  defaults,gid=5,mode=620  0 0

will try it and report back.

-- 
Ow Mun Heng
Gentoo/Linux on DELL D600 1.4Ghz 1.5GB RAM
98% Microsoft(tm) Free!! 
Neuromancer 10:26:18 up 21:13, 7 users, load average: 3.31, 2.75, 2.68 


-- 
gentoo-embedded@gentoo.org mailing list



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

* Re: [gentoo-embedded] x86 Howto
@ 2005-06-29  3:57 Kurt Kiefer
  2005-06-29  4:07 ` Ow Mun Heng
  0 siblings, 1 reply; 8+ messages in thread
From: Kurt Kiefer @ 2005-06-29  3:57 UTC (permalink / raw
  To: gentoo-embedded

>> nano -w /embedded_rootfs/boot/grub/grub.conf
>>   /*
>>   default 0
>>   timeout 10
>>   splashimage=(hd0,0)/boot/grub/splash.xpm.gz
>>
>>   title=Linux 2.6.x
>>   root (hd0,0)
>>   kernel /vmlinuz-2.6.x root=/dev/hda1 vga=792
>>   */
> the latter should be
>   kernel /boot/vmlinuz-2.6.x root=/dev/hda1 vga=792

I didn't follow Heath's HowTo exactly, and my setup is probably a bit  
different, but I just want to get this out in the open to make sure  
everything is clear.
- If you mount /dev/hda1 at /boot (as in the big Gentoo manual) and  
then put your kernel here, root (hd0,0) and kernel /vmlinuz-2.6.x are  
correct, but it should have been root=/dev/hda3.
- It seems in the howto, /boot is on /dev/hda2 of the flash  
installation, so (hd0,1) and /vmlinuz would be correct (the first  
drive's second partition). Root=/dev/hda1 is ok that that case if  
that's where your filesystem is.
- Now, if the kernel is in the directory /boot of /dev/hda1 and the  
root file system is also /dev/hda1, Pierre's above solution is correct.
Basically, though, a bootloader knows nothing of your local mount  
points.

As for your problem, Pierre, check that you're getting your paths to  
your init right and don't forget to think about what grub sees. In  
this grub conf, the kernel is on /dev/hda1 and the root filesystem is  
on /dev/hda3. This also runs pre-init (part of the filesystem on /dev/ 
hda3) instead of init:

title=Linux 2.6.x
root (hd0,0)
kernel /vmlinuz-2.6.x root=/dev/hda3 init=/sbin/pre-init


Kurt


PS: I apologize if I broke threads in your mailreaders, but I just  
signed up for the list after reading some archives online and had to  
copy and paste into my reply.
-- 
gentoo-embedded@gentoo.org mailing list



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

* Re: [gentoo-embedded] x86 Howto
  2005-06-29  3:57 Kurt Kiefer
@ 2005-06-29  4:07 ` Ow Mun Heng
  2005-06-29  7:03   ` Kurt Kiefer
  0 siblings, 1 reply; 8+ messages in thread
From: Ow Mun Heng @ 2005-06-29  4:07 UTC (permalink / raw
  To: gentoo-embedded

On Tue, 2005-06-28 at 20:57 -0700, Kurt Kiefer wrote:
> As for your problem, Pierre, check that you're getting your paths to  
> your init right and don't forget to think about what grub sees. In  
> this grub conf, the kernel is on /dev/hda1 and the root filesystem is  
> on /dev/hda3. This also runs pre-init (part of the filesystem on /dev/ 
> hda3) instead of init:
> 
> title=Linux 2.6.x
> root (hd0,0)
> kernel /vmlinuz-2.6.x root=/dev/hda3 init=/sbin/pre-init

I don't get the part about the init=/sbin/pre-init



-- 
Ow Mun Heng
Gentoo/Linux on DELL D600 1.4Ghz 1.5GB RAM
98% Microsoft(tm) Free!! 
Neuromancer 12:07:06 up 22:54, 6 users, load average: 1.77, 2.14, 2.21 


-- 
gentoo-embedded@gentoo.org mailing list



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

* Re: [gentoo-embedded] x86 Howto
  2005-06-29  2:27     ` Ow Mun Heng
@ 2005-06-29  4:15       ` Ned Ludd
  0 siblings, 0 replies; 8+ messages in thread
From: Ned Ludd @ 2005-06-29  4:15 UTC (permalink / raw
  To: gentoo-embedded

On Wed, 2005-06-29 at 10:27 +0800, Ow Mun Heng wrote:
> On Tue, 2005-06-28 at 22:09 -0400, Ned Ludd wrote:
> > On Tue, 2005-06-28 at 17:36 +0800, Ow Mun Heng wrote:
> > 
> > [...]
> > 
> > >  Dropbear still has not worked due to no /dev/ptys
> > > (IIRC)
> > 
> > 
> > Make sure your kernel has support for Unix98 PTY's
> > 
> > CONFIG_UNIX98_PTYS=y
> > CONFIG_UNIX98_PTY_COUNT=512
> 
> grep -i pty .config
> CONFIG_UNIX98_PTYS=y
> # CONFIG_LEGACY_PTYS is not set

That was actually a grep from my linux-2.4.31 .config

Only 2.6 would call it legacy.

-- 
Ned Ludd <solar@gentoo.org>

-- 
gentoo-embedded@gentoo.org mailing list



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

* Re: [gentoo-embedded] x86 Howto
  2005-06-29  4:07 ` Ow Mun Heng
@ 2005-06-29  7:03   ` Kurt Kiefer
  0 siblings, 0 replies; 8+ messages in thread
From: Kurt Kiefer @ 2005-06-29  7:03 UTC (permalink / raw
  To: gentoo-embedded

>> As for your problem, Pierre, check that you're getting your paths to
>> your init right and don't forget to think about what grub sees. In
>> this grub conf, the kernel is on /dev/hda1 and the root filesystem is
>> on /dev/hda3. This also runs pre-init (part of the filesystem on / 
>> dev/
>> hda3) instead of init:
>>
>> title=Linux 2.6.x
>> root (hd0,0)
>> kernel /vmlinuz-2.6.x root=/dev/hda3 init=/sbin/pre-init
>>
>
> I don't get the part about the init=/sbin/pre-init

Actually, I just threw that in there to confuse you ;)
My develoment and embedded roots are on the same partition: http:// 
lfs.osuosl.org/hints/downloads/files/lfs_next_to_existing_systems.txt
-- 
gentoo-embedded@gentoo.org mailing list



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

end of thread, other threads:[~2005-06-29  7:04 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-06-28  9:05 [gentoo-embedded] x86 Howto Pierre Cassimans
2005-06-28  9:36 ` Ow Mun Heng
2005-06-29  2:09   ` Ned Ludd
2005-06-29  2:27     ` Ow Mun Heng
2005-06-29  4:15       ` Ned Ludd
  -- strict thread matches above, loose matches on Subject: below --
2005-06-29  3:57 Kurt Kiefer
2005-06-29  4:07 ` Ow Mun Heng
2005-06-29  7:03   ` Kurt Kiefer

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