[haiku-development] zlib & bootloader on m68k

  • From: "François Revol" <revol@xxxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Wed, 29 Apr 2009 02:24:18 +0200 CEST

I've been having trouble with zlib on the m68k floppy...
it's giving an error on some data, first it was on the 1st 2k block,
then I noticed libz.a was included in the loader + inflate.c was again
included in tarfs/Jamfile... any reason to include the userland zlib
this way ??? (+ it was giving an error but leaving the msg to NULL...)

spent of time trying to debug the cryptic zlib code...
removing it and adding the needed files to the tarfs Jamfile makes it
go further, I even recall seeing it dump the tgz files once (oh or
maybe that was just the x86 one and I was asleep), but never managed to
do it again ;-(
The tgz is definitely in the image, dd-ing it out of it and putting it
in the x86 image makes it list the file before the menu, so the zlib
code itself isn't the problem.
Though I recall someone telling about issues with zlib on atari, but
that was because they develop TOS code with -mshort to keep it
compatible with PureC, which the cross-gcc doesn't do by default.

it ends up on bad data error...
Any idea ?

I can't help but think the fact it stops at 1440th block is not a
coincidence.

François.


Welcome to the Haiku boot loader!
boot drive ID: 0
BlockHandle::BlockHandle(): drive ID 0
FloppyDrive::FloppyDrive(0)
get_drive_parameters: get_bpb: 0x00000000
get_drive_parameters: bpb: 0200 0002 0400 0000 0005 0006 000b 02ca 0000
FloppyDrive::FillIdentifier: (0)
XDrvMap() 0x00000000
Drvmap(): 0x00000001
number of drives: 0
boot drive size: 1474560 bytes
add_partitions_for(0x0100f028, mountFS = no)
add_partitions_for(fd = 0, mountFS = no)
0x0100f188 Partition::Partition
0x0100f188 Partition::Scan()
boot partition offset: 0
partition offset = 0, size = 1474560
0x0100f188 Partition::_Mount check for file_system: TAR Filesystem
BlockHandle::ReadAt: (0) 0, 2048
BlockHandle::ReadAt: (0) 300, 2048
BlockHandle::ReadAt: (0) 304, 2048
BlockHandle::ReadAt: (0) 308, 2048
BlockHandle::ReadAt: (0) 312, 2048
BlockHandle::ReadAt: (0) 316, 2048

...

BlockHandle::ReadAt: (0) 1428, 2048
BlockHandle::ReadAt: (0) 1432, 2048
BlockHandle::ReadAt: (0) 1436, 2048
BlockHandle::ReadAt: (0) 1440, 2048
tarfs: didn't read whole block!
tarfs: msg:invalid block type
tarfs: inflating failed: -3, msg: invalid block type!


Other related posts: