[haiku-development] Re: Haiku booting up with floppy image on respi2 qemu

  • From: Adrien Destugues <pulkomandy@xxxxxxxxxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Thu, 9 Aug 2018 17:45:38 +0200

On Thu, Aug 09, 2018 at 11:09:03PM +0800, Han Pengfei wrote:

So, either the tar filesystem does not recognize the image (wrong address?
wrong verson of mkimage? file was not loaded in memory by u-boot as
expected?), or there is a bug in the code somewhere.


while after some tracing debug, I found this:

0x809941b8 Partition::_Mount check for file_system: TAR Filesystem
tarfs: open partition success
skip_gzip_header check magic failed buffer[0]=0xac, buffer[1]=0x8b
tarfs: inflating failed: bad data!
skip_gzip_header check magic failed buffer[0]=0xac, buffer[1]=0xd1
tarfs: inflating failed: bad data!
tarfs: _Inflate partition failed

it seems that the `skip_gzip_header()` checking the magic header failed,
the code as below:

    // check magic and skip method

    if (buffer[0] != 0x1f || buffer[1] != 0x8b) {

        TRACE(("%s check magic failed buffer[0]=0x%02x,
buffer[1]=0x%02x\n", __func__, buffer[0], buffer[1]));

              return false;

    }

So, the header does not match, we get ac 8b or ac d1 instead of 1f 8b.

Can you check your mkimage file? Does it indeed start with ac 8b? Are
you sure it is loaded to RAM at the right address? (IIRC the u-boot
script is suppsed to do this?)

-- 
Adrien.

Other related posts: