public inbox for gentoo-embedded@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-embedded] Bootloader for Embedded System
@ 2006-03-28  9:37 Lutz Schönemann
  2006-03-28 12:03 ` Ned Ludd
  2006-03-28 12:34 ` Natanael Copa
  0 siblings, 2 replies; 5+ messages in thread
From: Lutz Schönemann @ 2006-03-28  9:37 UTC (permalink / raw
  To: gentoo-embedded

Hi,
I'm trying to get Linux running on a x86 embedded-system (Panel PC 
"Atlas"). The os should be loaded from a CF-Card (CF-Card reader is 
onboard and bootable). My current problem with it is that I don't know 
how to get a bootloader installed on a CF-Card.
I have a Gentoo-Box (Toshiba Laptop) compiled for i386. The CF-Card is 
connected via USB. When ever I install a bootloader on the CF-Card a 
Dell laptop is able to boot from it but the embedded system doesn't do 
it. It seems to be the problem that the two BIOS differ to much from 
each other.
How can I install a bootloader that works on other hardware (with 
different BIOS)?

Someone told me to build a very small kernel and put that into the 
master boot record (must be smaller than 446 bytes). How can I do this? 
I have deactivated nearly all features, compiled everything as module 
that could be build as module but the kernel size is 627k !?!

For more information on the hardware:
http://www.kws-computer.de/ppcatlas.html

there is a link to the data sheet (Datenblatt)

Thanks for help

-- 
Lutz Schönemann

Addr:	Fraunhofer Institut für Sichere Informations Technologie SIT
	Rheinstrasse 75, 64295 Darmstadt, Germany
WWW:	http://www.sit.fraunhofer.de

Zertifizierungen in der FhG: http://pki.fraunhofer.de
-- 
gentoo-embedded@gentoo.org mailing list



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

* Re: [gentoo-embedded] Bootloader for Embedded System
  2006-03-28  9:37 [gentoo-embedded] Bootloader for Embedded System Lutz Schönemann
@ 2006-03-28 12:03 ` Ned Ludd
  2006-03-29 11:16   ` Lutz Schönemann
  2006-03-28 12:34 ` Natanael Copa
  1 sibling, 1 reply; 5+ messages in thread
From: Ned Ludd @ 2006-03-28 12:03 UTC (permalink / raw
  To: gentoo-embedded

I always used lilo for this task. I found grub to be way to problematic 
and BIG. On x86 I'd chroot into the CF and run lilo. It can be tricky 
and a tad confusing at times till you make that mental map of where the 
devices live. Note be careful or you could end up killing the wrong 
boot sector or device.

My CF was my /dev/sdb but CF is IDE so I needed a conf like this.
http://dev.gentoo.org/~solar/embedded/local/local/customize/etc/lilo.conf

The kernel got installed to sdb1->hda1 and sdb2->hda2 was used as the 
ROOT file system.

I also used these two scripts to speed up the task.

(Format the CF)
http://dev.gentoo.org/~solar/embedded/fdisk_cf_flash

(Copy the FS to flash and run the bootloader)
http://dev.gentoo.org/~solar/embedded/flash_cf_disk

.. good luck.



On Tue, 2006-03-28 at 11:37 +0200, Lutz Schönemann wrote:
> Hi,
> I'm trying to get Linux running on a x86 embedded-system (Panel PC 
> "Atlas"). The os should be loaded from a CF-Card (CF-Card reader is 
> onboard and bootable). My current problem with it is that I don't know 
> how to get a bootloader installed on a CF-Card.
> I have a Gentoo-Box (Toshiba Laptop) compiled for i386. The CF-Card is 
> connected via USB. When ever I install a bootloader on the CF-Card a 
> Dell laptop is able to boot from it but the embedded system doesn't do 
> it. It seems to be the problem that the two BIOS differ to much from 
> each other.
> How can I install a bootloader that works on other hardware (with 
> different BIOS)?
> 
> Someone told me to build a very small kernel and put that into the 
> master boot record (must be smaller than 446 bytes). How can I do this? 
> I have deactivated nearly all features, compiled everything as module 
> that could be build as module but the kernel size is 627k !?!
> 
> For more information on the hardware:
> http://www.kws-computer.de/ppcatlas.html
> 
> there is a link to the data sheet (Datenblatt)
> 
> Thanks for help
> 
> -- 
> Lutz Schönemann
> 
> Addr:	Fraunhofer Institut für Sichere Informations Technologie SIT
> 	Rheinstrasse 75, 64295 Darmstadt, Germany
> WWW:	http://www.sit.fraunhofer.de
> 
> Zertifizierungen in der FhG: http://pki.fraunhofer.de
-- 
Ned Ludd <solar@gentoo.org>
Gentoo Linux

-- 
gentoo-embedded@gentoo.org mailing list



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

* Re: [gentoo-embedded] Bootloader for Embedded System
  2006-03-28  9:37 [gentoo-embedded] Bootloader for Embedded System Lutz Schönemann
  2006-03-28 12:03 ` Ned Ludd
@ 2006-03-28 12:34 ` Natanael Copa
  1 sibling, 0 replies; 5+ messages in thread
From: Natanael Copa @ 2006-03-28 12:34 UTC (permalink / raw
  To: gentoo-embedded

Lutz Schönemann wrote:
> Hi,
> I'm trying to get Linux running on a x86 embedded-system (Panel PC
> "Atlas"). The os should be loaded from a CF-Card (CF-Card reader is
> onboard and bootable). My current problem with it is that I don't know
> how to get a bootloader installed on a CF-Card.
> I have a Gentoo-Box (Toshiba Laptop) compiled for i386. The CF-Card is
> connected via USB. When ever I install a bootloader on the CF-Card a
> Dell laptop is able to boot from it but the embedded system doesn't do
> it. It seems to be the problem that the two BIOS differ to much from
> each other.
> How can I install a bootloader that works on other hardware (with
> different BIOS)?

I use syslinux.

> Someone told me to build a very small kernel and put that into the
> master boot record (must be smaller than 446 bytes). How can I do this?
> I have deactivated nearly all features, compiled everything as module
> that could be build as module but the kernel size is 627k !?!

No. You dont need to install the kernel on the MBR. the MBR is the data
that lies before the first partition. Normally (in dos times) the mra
contained code that found the first partition that is marked bootable
and the boot that partition (something like that).

You need to:
1. mark the boot partition as bootable. (fdisk /dev/sdX -> 'a')
2. install lilo/syslinux on the the boot partition (syslinux /dev/sdX1)
3. install the mbr, in case you have overwritten it with grub or
seomthing like that. (dd if=/usr/lib/syslinux/mbr.bin of=/dev/sdX)

The example is  how I would do it here, using syslinux. It will be
different with lilo.

replace sdX with your device.


> 
> For more information on the hardware:
> http://www.kws-computer.de/ppcatlas.html
> 
> there is a link to the data sheet (Datenblatt)
> 
> Thanks for help
> 

-- 
gentoo-embedded@gentoo.org mailing list



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

* Re: [gentoo-embedded] Bootloader for Embedded System
  2006-03-28 12:03 ` Ned Ludd
@ 2006-03-29 11:16   ` Lutz Schönemann
  2006-04-02 12:28     ` Sergi Castaño Elias
  0 siblings, 1 reply; 5+ messages in thread
From: Lutz Schönemann @ 2006-03-29 11:16 UTC (permalink / raw
  To: gentoo-embedded

Okay, now Lilo loads the first stage and returns the error-code 99. The 
man-page contains a paragraph containing the error codes:
	99  invalid second stage index sector
and a detailed description:
"... Errors 99 and 9A usually mean the map file (-m or map=) is not 
readable, likely because LILO was not re-run after some system change, 
or there is   a geometry mis-match between what LILO used (lilo -v3 to 
display) and what is actually being used by the BIOS (one of the lilo 
diagnostic disks, available in the source distribution, may be needed to 
diagnose this problem). ..."

But how can I get the right device-map needed for my embedded system? I 
tried to create a CF card with the diagnostic disks data (writing on CF 
instead of wirting to /dev/sd0) but the system doesn't even boot with 
this CF-Card.

Lutz

Ned Ludd wrote:
> I always used lilo for this task. I found grub to be way to problematic 
> and BIG. On x86 I'd chroot into the CF and run lilo. It can be tricky 
> and a tad confusing at times till you make that mental map of where the 
> devices live. Note be careful or you could end up killing the wrong 
> boot sector or device.
> 
> My CF was my /dev/sdb but CF is IDE so I needed a conf like this.
> http://dev.gentoo.org/~solar/embedded/local/local/customize/etc/lilo.conf
> 
> The kernel got installed to sdb1->hda1 and sdb2->hda2 was used as the 
> ROOT file system.
> 
> I also used these two scripts to speed up the task.
> 
> (Format the CF)
> http://dev.gentoo.org/~solar/embedded/fdisk_cf_flash
> 
> (Copy the FS to flash and run the bootloader)
> http://dev.gentoo.org/~solar/embedded/flash_cf_disk
> 
> .. good luck.
> 
> 
> 
> On Tue, 2006-03-28 at 11:37 +0200, Lutz Schönemann wrote:
> 
>>Hi,
>>I'm trying to get Linux running on a x86 embedded-system (Panel PC 
>>"Atlas"). The os should be loaded from a CF-Card (CF-Card reader is 
>>onboard and bootable). My current problem with it is that I don't know 
>>how to get a bootloader installed on a CF-Card.
>>I have a Gentoo-Box (Toshiba Laptop) compiled for i386. The CF-Card is 
>>connected via USB. When ever I install a bootloader on the CF-Card a 
>>Dell laptop is able to boot from it but the embedded system doesn't do 
>>it. It seems to be the problem that the two BIOS differ to much from 
>>each other.
>>How can I install a bootloader that works on other hardware (with 
>>different BIOS)?
>>
>>Someone told me to build a very small kernel and put that into the 
>>master boot record (must be smaller than 446 bytes). How can I do this? 
>>I have deactivated nearly all features, compiled everything as module 
>>that could be build as module but the kernel size is 627k !?!
>>
>>For more information on the hardware:
>>http://www.kws-computer.de/ppcatlas.html
>>
>>there is a link to the data sheet (Datenblatt)
>>
>>Thanks for help
>>
>>-- 
>>Lutz Schönemann
>>
>>Addr:	Fraunhofer Institut für Sichere Informations Technologie SIT
>>	Rheinstrasse 75, 64295 Darmstadt, Germany
>>WWW:	http://www.sit.fraunhofer.de
>>
>>Zertifizierungen in der FhG: http://pki.fraunhofer.de


-- 
Lutz Schönemann

Addr:	Fraunhofer Institut für Sichere Informations Technologie SIT
	Rheinstrasse 75, 64295 Darmstadt, Germany
WWW:	http://www.sit.fraunhofer.de

Zertifizierungen in der FhG: http://pki.fraunhofer.de
-- 
gentoo-embedded@gentoo.org mailing list



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

* Re: [gentoo-embedded] Bootloader for Embedded System
  2006-03-29 11:16   ` Lutz Schönemann
@ 2006-04-02 12:28     ` Sergi Castaño Elias
  0 siblings, 0 replies; 5+ messages in thread
From: Sergi Castaño Elias @ 2006-04-02 12:28 UTC (permalink / raw
  To: gentoo-embedded

Hi,

2006/3/29, Lutz Schönemann <lutz.schoenemann@sit.fraunhofer.de>:
> Okay, now Lilo loads the first stage and returns the error-code 99. The
> man-page contains a paragraph containing the error codes:
>         99  invalid second stage index sector
> and a detailed description:
> "... Errors 99 and 9A usually mean the map file (-m or map=) is not
> readable, likely because LILO was not re-run after some system change,
> or there is   a geometry mis-match between what LILO used (lilo -v3 to
> display) and what is actually being used by the BIOS (one of the lilo
> diagnostic disks, available in the source distribution, may be needed to
> diagnose this problem). ..."
>
> But how can I get the right device-map needed for my embedded system? I
> tried to create a CF card with the diagnostic disks data (writing on CF
> instead of wirting to /dev/sd0) but the system doesn't even boot with
> this CF-Card.
>
> Lutz
>
> Ned Ludd wrote:
> > I always used lilo for this task. I found grub to be way to problematic
> > and BIG. On x86 I'd chroot into the CF and run lilo. It can be tricky
> > and a tad confusing at times till you make that mental map of where the
> > devices live. Note be careful or you could end up killing the wrong
> > boot sector or device.
> >
> > My CF was my /dev/sdb but CF is IDE so I needed a conf like this.
> > http://dev.gentoo.org/~solar/embedded/local/local/customize/etc/lilo.conf
> >
> > The kernel got installed to sdb1->hda1 and sdb2->hda2 was used as the
> > ROOT file system.
> >
> > I also used these two scripts to speed up the task.
> >
> > (Format the CF)
> > http://dev.gentoo.org/~solar/embedded/fdisk_cf_flash
> >
> > (Copy the FS to flash and run the bootloader)
> > http://dev.gentoo.org/~solar/embedded/flash_cf_disk
> >
> > .. good luck.
> >
> >
> >
> > On Tue, 2006-03-28 at 11:37 +0200, Lutz Schönemann wrote:
> >
> >>Hi,
> >>I'm trying to get Linux running on a x86 embedded-system (Panel PC
> >>"Atlas"). The os should be loaded from a CF-Card (CF-Card reader is
> >>onboard and bootable). My current problem with it is that I don't know
> >>how to get a bootloader installed on a CF-Card.
> >>I have a Gentoo-Box (Toshiba Laptop) compiled for i386. The CF-Card is
> >>connected via USB. When ever I install a bootloader on the CF-Card a
> >>Dell laptop is able to boot from it but the embedded system doesn't do
> >>it. It seems to be the problem that the two BIOS differ to much from
> >>each other.
> >>How can I install a bootloader that works on other hardware (with
> >>different BIOS)?
> >>
> >>Someone told me to build a very small kernel and put that into the
> >>master boot record (must be smaller than 446 bytes). How can I do this?
> >>I have deactivated nearly all features, compiled everything as module
> >>that could be build as module but the kernel size is 627k !?!
> >>
> >>For more information on the hardware:
> >>http://www.kws-computer.de/ppcatlas.html
> >>
> >>there is a link to the data sheet (Datenblatt)
> >>
> >>Thanks for help
> >>
> >>--
> >>Lutz Schönemann
> >>
> >>Addr: Fraunhofer Institut für Sichere Informations Technologie SIT
> >>      Rheinstrasse 75, 64295 Darmstadt, Germany
> >>WWW:  http://www.sit.fraunhofer.de
> >>
> >>Zertifizierungen in der FhG: http://pki.fraunhofer.de
>
>
> --
> Lutz Schönemann
>
> Addr:   Fraunhofer Institut für Sichere Informations Technologie SIT
>         Rheinstrasse 75, 64295 Darmstadt, Germany
> WWW:    http://www.sit.fraunhofer.de
>
> Zertifizierungen in der FhG: http://pki.fraunhofer.de
> --
> gentoo-embedded@gentoo.org mailing list
>
>

I would install or run lilo (or any other bootloader) from the
embedded system directly.

I mean, connect only one ide cd reader put CF in the ide reader at
embedded mainboard. No other device to damage its boot.
Then boot from an any live distro or a gentoo install boot cd itself
and chroot to embedded system.
Then, re-run lilo or install grub or any other boot manager.

Sorry my bad english.

-- 
gentoo-embedded@gentoo.org mailing list



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

end of thread, other threads:[~2006-04-02 12:28 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-03-28  9:37 [gentoo-embedded] Bootloader for Embedded System Lutz Schönemann
2006-03-28 12:03 ` Ned Ludd
2006-03-29 11:16   ` Lutz Schönemann
2006-04-02 12:28     ` Sergi Castaño Elias
2006-03-28 12:34 ` Natanael Copa

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