DiskOnChip & Lilo

Post Reply
Message
Author
Andre

DiskOnChip & Lilo

#1 Post by Andre »

Hi,
ich habe auf meinem DiskOnChip (DOC2000) ein RootSystem erstellt. Der Kernel ist auch fertig unter /boot/bzImage. Jetzt möchte ich diesen DiskOnChip mit Lilo bootfähig machen.
Dazu muss zuerst ein Lilo-Patch eingespielt werde <img src="http://www.pl-forum.de/UltraBoard/Images/TooHappy.gif" border="0" align="middle">
Den Patch ("patch-lilo") habe ich schon gedownloadet. Die Lilo-Sourcen (lilo21.6) habe ich auch auf meinem PC. Jetzt wüsste ich gern noch, wie ich den Patch einspielen kann.... <img src="http://www.pl-forum.de/UltraBoard/Images/Wilk.gif" border="0" align="middle">

Andre

Jochen

Re: DiskOnChip & Lilo

#2 Post by Jochen »

Sollte eigentlich ganz einfach sein. Der Patch ist Klartext, Du darfst ihn also ruhig mal anschauen. Dort kann man erkennen, ob er mehrere Dateien oder nur eine patchen soll. Der einfachste Fall sollte ein

patch <patch-lilo

sein, wenn Du im Verzeichnis der lilo-Sourcen stehst und der patch dort auch gespeichert ist. Wenn was nicht funktioniert, poste einfach die Meldungen von patch.

Jochen

Andre

Re: DiskOnChip & Lilo

#3 Post by Andre »

Hi Jochen <img src="http://www.pl-forum.de/UltraBoard/Images/Wilk.gif" border="0" align="middle">

Der Patch heisst "lilo-patch" und is anschaubar....
Hier der Inhalt:

"
--- geometry.c Fri Jun 20 16:24:52 1997
+++ ../../geometry.c Sat Jul 11 18:08:19 1998
@@ -118,7 +118,7 @@
{
return MAJOR(dev) == MAJOR_HD || MAJOR(dev) == MAJOR_IDE2 ||
MAJOR(dev) == MAJOR_XT || MAJOR(dev) == MAJOR_SD ||
- MAJOR(dev) == MAJOR_ESDI;
+ MAJOR(dev) == MAJOR_ESDI || MAJOR(dev) == MAJOR_FL;
}


@@ -296,14 +296,17 @@
case MAJOR_ESDI:
/* fall through */
case MAJOR_XT:
- geo->device = 0x80+(MINOR(device) >> 6)+(MAJOR(device) == MAJOR_HD ?
+ /* fall through */
+ case MAJOR_FL: /* FLash disk, tom@igel 25.5.98 */
+ geo->device = 0x80+(MINOR(device) >> 6) + (
+ ((MAJOR(device) == MAJOR_HD) || (MAJOR(device) == MAJOR_FL)) ?
0 : last_dev(MAJOR_HD,64));
- if (ioctl(fd,HDIO_GETGEO,&hdprm) < 0)
+ /* if (ioctl(fd,HDIO_GETGEO,&hdprm) < 0)
die("geo_query_dev HDIO_GETGEO (dev 0x%04x): %s",device,
- strerror(errno));
- geo->heads = hdprm.heads;
- geo->cylinders = hdprm.cylinders;
- geo->sectors = hdprm.sectors;
+ strerror(errno)); */
+ geo->heads = 16; /*hdprm.heads;*/
+ geo->cylinders = 509;/*hdprm.cylinders;*/
+ geo->sectors = 3;/* hdprm.sectors;*/
geo->start = hdprm.start;
break;
case MAJOR_SD:
--- lilo.h Fri Jun 20 09:42:33 1997
+++ ../../lilo.h Sat Jul 11 14:26:50 1998
@@ -34,6 +34,7 @@
#define MAJOR_XT 13 /* XT-type hard disks */
#define MAJOR_IDE2 22 /* IDE on second interface */
#define MAJOR_ESDI 36 /* PS/2 ESDI drives */
+#define MAJOR_FL 62 /* Flash disk, tom@igel 25.5.98 */

#define MAX_IMAGES ((SECTOR_SIZE*2-2)/sizeof(IMAGE_DESCR))
/* maximum number of images */
@@ -84,7 +85,7 @@
#define SETUPSECS 4 /* nr of setup sectors */
#define VSS_NUM 497 /* address where variable setup size is
stored */
-#define MAX_KERNEL_SECS 1024 /* absolute maximum kernel size */
+#define MAX_KERNEL_SECS 896 /* absolute maximum kernel size (tom@igel) */

#define SPECIAL_SECTORS 2 /* special sectors (don't compact) at beginning
of map sections */
@@ -132,11 +133,11 @@
PARTS_LOAD= 0x0600 ! partition sector load address
PARTS_SCR = 0x0800 ! ditto, for non-boot partitions
PART_TABLE= 0x07BE ! partition table
-FIRSTSEG = 0x9A00
+FIRSTSEG = 0x8A00 ! tom@igel: instead of 0x9A00
INITSEG = DEF_INITSEG ! we move boot here - out of the way
SETUPSEG = DEF_SETUPSEG ! setup starts here
SYSSEG = DEF_SYSSEG ! system loaded at 0x10000 (65536).
-STACKSEG = 0x9000
+STACKSEG = 0x8000 ! tom@igel: instead of 0x9000
SSDIFF = 0xA000
STACK = 0xB000 ! top of stack
DESCR = 0x2200 ! descriptor load area offset
@@ -146,7 +147,7 @@
PARMLINE = 0x2a00 ! parameter line construction area off.
SECOND = 0x1000 ! second stage loader load address
SECOND_SS = 0xB000 ! second as seen from SS:0000
-SECONDSEG = 0x9B00 ! second stage loader segment
+SECONDSEG = 0x8B00 ! second stage loader segment (tom@igel)
SLA_SIZE = 0x9E00 ! setup load area size
KBBEG = 0x41A ! beginning of keyboard buffer
KBEND = 0x41C ! end of keyboard buffer
"

Ich habe diesen Patch nach "/usr/src/packages/SOURCES/lilo-21.6" kopiert, wo sich auch der Sourcecode vom "lilo" befindet. In dem verzeichnis habe ich dann ein:
"patch < lilo-patch" ausgeführt.

Leider erhalte ich fehlermeldungen :

"patching file geometry.c
Hunk #1 FAILED at 118.
Hunk #2 FAILED at 296.
2 out of 2 hunks FAILED -- saving rejects to file geometry.c.rej
patching file lilo.h
Hunk #1 FAILED at 34.
Hunk #2 FAILED at 85.
Hunk #3 FAILED at 133.
Hunk #4 FAILED at 147.
4 out of 4 hunks FAILED -- saving rejects to file lilo.h.rej"

Andre

PS.: Es wäre vielleicht einfacher wenn du mich anmailst <img src="http://www.pl-forum.de/UltraBoard/Images/Wilk.gif" border="0" align="middle"> (Homberg@fourmart.de)

Jochen

Re: DiskOnChip & Lilo

#4 Post by Jochen »

Hm, weisst Du, für welche Version des lilo der Patch ist? Ich habe mir einfach mal den lilo-21.7.5 gezogen, da ist keine Unterstützung für DiskOnChip dabei, aber die Source-Zeilen sind schon anders als das Patch-File erwartet.

Andre

Re: DiskOnChip & Lilo

#5 Post by Andre »

Leider nicht <img src="http://www.pl-forum.de/UltraBoard/Images/TooHappy.gif" border="0" align="middle">
auf meinem System habe ich den LILO 21.6.

Ich habe einen patch für LILO 21.7, aber bei mir gibt der LiLO bei kompilieren errors raus (ohne patch schon) <img src="http://www.pl-forum.de/UltraBoard/Images/TooHappy.gif" border="0" align="middle">
warum kann nicht einfach mal was funzen <img src="http://www.pl-forum.de/UltraBoard/Images/TooHappy.gif" border="0" align="middle">

Andre

Andre

Re: DiskOnChip & Lilo

#6 Post by Andre »

Hi,

ich habe einen gepachten LiLO gefunden <img src="http://www.pl-forum.de/UltraBoard/Images/Wilk.gif" border="0" align="middle">

Ich habe meine Lilo.conf nachdem gegebenen Beispiel wie folgt angepasst:

"boot= /dev/doc
disk= /dev/doc
bios= 0x80
map= /mnt/doc/boot/map
install= /mnt/doc/boot/doc.b
compact
read-write
backup= /dev/nul

image= /mnt/doc/boot/bzImage
root= /dev/doc1
label= fourmart"

Dann habe ich "doc-lilo -v -C Lilo.conf" eingegeben, un erhalte folgenden Meldung:

"Warning: Lilo.conff should be owned by root
Reading boot sector from /dev/doc
Merging with /mnt/doc/boot/doc.b
Sorry, don't know how to handle device 0x5d01"

Andre

PS.: Ich spüre tief in meinem Inneren ich komme vorwärtz... <img src="http://www.pl-forum.de/UltraBoard/Images/Wilk.gif" border="0" align="middle">

Post Reply