[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: APUS Debian Boot-Floppies Images and bugs



On Fri, May 11, 2001 at 10:38:07PM +0200, Giorgio Terzi wrote:
> Hello Sven,
> 
> In first i wish to thank you for your help and for your last 
> e-mail. :)))
> 
> But let's speak about job.
> 
> The second goal is reached!
> 
> Now is possible to load & install Rescue & Driver images from 
> floppies, CD-ROMS,HD-Partitions.
> But to do this we must correct some bugs :
> 
> Bug 1: dbootstrap
> 
> The APUS rescue image is MSDOS formatted but in file
> choose_medium.c from line 34 the code is so:
>    #if cpu(sparc) || #cpu(powerpc)
>    const char *fs_type_tab[] = {  "ext2", NULL };
>    #else
>    const char *fs_type_tab[] = { "msdos", "ext2", NULL };
>    #endif
> as you can understand is impossible for a powerpc machine
> to load a msdos partition, so i have modified it so:
>    #if cpu(sparc) || #cpu(powerpc)
>    const char *fs_type_tab[] = { "msdos", "ext2", NULL };
>    #else
>    const char *fs_type_tab[] = { "msdos", "ext2", NULL };
>    #endif

I changed this to :

 #if cpu(sparc)
 const char *fs_type_tab[] = { "msdos", "ext2", NULL };
 #else
 const char *fs_type_tab[] = { "msdos", "ext2", NULL };
 #endif

Should work, i think. Does one of the powerpc boot floppies people have
anything to say about it before i commit ?

> After this, rescue.bin was loaded and kernel extracted & configured.
> I think this #if is obsolete because, as you will see some lines 
> after in the source file , mount loops between the various filesystems
> (msdos & ext2 now, but may will be more ?) attempting 
> to load the image files.
> 
> For CD-ROM & for HD partition loading system the drivers was also
> successfully loaded & configured. 
> For CD-ROM i used my Potato CD-ROM N.1.For hard disk i have
> built a debian tree in an Amiga partition.
> 
> Bug 2: floppy images build & configuration
> 
> After the kernel configuration, it was renamed as vmlinuz-2.2.19,
> and this comes from the install.sh script. 
> For APUS this name is wrong as it is really a 2.2.10 kernel.
> Maybe it is possible to use the $subarch variable to distinguish the 
> various powerpc kernel architecture's versions during the install.sh 
> configuration ?

mmm, you can use the apuskver variable defined at line 30 of the config file :

ifeq "$(architecture)" "powerpc"
    kver        := 2.2.19
    pcmcia_kver := 2.2.19-pmac
    apuskver    := 2.2.10
endif

So i guess what is used is kver, not apuskver.

Notice that the install.sh script is generated at line 12 of the rescue.sh
script, from the install.sh.txt file, but passing only the kver and arch
variables, not the subarch and apuskver one. There may be need for more
extensive modification here, i don't know m4 enough to really help out here.

Also it seems to me the write_powerpc routine only knows about quick, don't
think this will be working on apus, we may be more near what the
write_m68kinfo does, ity would need testing though.

lines 396-401 of rescue.sh should be generating the right thing for apus,
altough i don't really see a reason why we shall not go the ext2 way.

It would be also be interresting to see if we need lines 450+ of rescue.sh,
about broken loop device, this sound like the loop bug of the original boot
floppies.

Line 552 of rescue.sh also has some $kver related things we shall look into.

mmm, line 573 of rescue.sh calls write_m86kinfo, so we don't have to worry
about quick as feared above, we still would need to make sure that subarch and
apuskver is passed to m4 when generating install.sh.

That's all i see in rescue.sh.

mmm, maybe this would be enough (try the attached patch) ?

write_installsh () {
    if [ "x$noinstall" = x ]; then
	if [ "$subarch" != apus ]; then
	    m4 -D__ERROR_MESS__=$scripts/messages/$language/install.sh.txt \
		-D__version__=$kver -D__arch__=$arch \
		<$scripts/install.sh >$mnt/install.sh
	    chmod 755 $mnt/install.sh
	else
	    m4 -D__ERROR_MESS__=$scripts/messages/$language/install.sh.txt \
		-D__version__=$apuskver -D__arch__=$arch \
		<$scripts/install.sh >$mnt/install.sh
	    chmod 755 $mnt/install.sh
	fi
    fi

Could you try it out ?

> I have tested also the floppy disk use:
> 
> Bug 3: fd0 device problems
> 
> For APUS /dev/fd0 is unable to load the rescue floppy disk. 
> I think it defaults to the Amiga floppy formats.
> I must erase it and recreate it with 'mknod fd0 b 2 28'
> that is the same of /dev/fd0u1440 in a "standard" installation.
>  
> After this change the rescue floppy was successfully loaded.

Ok, but like said most amiga have only the 720/880Ko floppy variety.

> Bug 4: dboostrap problem.
> 
> dbootsrap was not able to recognize the driver's floppy disk
> because the drivers' default names was treated as complete
> names but they are really "root names" for example:
> drv14           is a "root name"
> drv14apus.bin   is a driver's complete name.
> In file floppy_merge.c i have modified the line 197 :
> 
>    if (!strcmp (basenames[i], block.header.name))
> as follows:
>    if (!strncmp (basenames[i], block.header.name,strlen(basenames[i])))
>             
> after this i have also loaded the drivers!

Ok, i read this was already by stephen Marenka, but maybe not as you say here.
I didn't found any mention to it in the cvs log file, but then i may have
missed it.

Friendly,

Sven Luther
Index: rescue.sh
===================================================================
RCS file: /cvs/debian-boot/boot-floppies/rescue.sh,v
retrieving revision 1.103
diff -u -u -r1.103 rescue.sh
--- rescue.sh	2001/05/12 19:52:04	1.103
+++ rescue.sh	2001/05/14 12:16:56
@@ -11,10 +11,17 @@
 #
 write_installsh () {
     if [ "x$noinstall" = x ]; then
-	m4 -D__ERROR_MESS__=$scripts/messages/$language/install.sh.txt \
-	   -D__version__=$kver -D__arch__=$arch \
-	   <$scripts/install.sh >$mnt/install.sh
-	chmod 755 $mnt/install.sh
+	if [ "$subarch" != apus ]; then
+	    m4 -D__ERROR_MESS__=$scripts/messages/$language/install.sh.txt \
+		-D__version__=$kver -D__arch__=$arch \
+		<$scripts/install.sh >$mnt/install.sh
+	    chmod 755 $mnt/install.sh
+	else
+	    m4 -D__ERROR_MESS__=$scripts/messages/$language/install.sh.txt \
+		-D__version__=$apuskver -D__arch__=$arch \
+		<$scripts/install.sh >$mnt/install.sh
+	    chmod 755 $mnt/install.sh
+	fi
     fi
 }
 

Reply to: