- Debugger: Getting mixed signals
- 'Packaging Infrastructure' Contract Weekly Report #4
- Haiku monthly activity report - 06/2015
- 'Packaging Infrastructure' Contract Weekly Report #3
- 'Packaging Infrastructure' Contract Weekly Report #2
- GCI 2014 winners trip report (mentor side)
- TeX Live and LyX; Changes to the boot code
- 'Packaging Infrastructure' Contract Weekly Report #1
- Beginning of 'Packaging Infrastructure' Contract
- Haiku monthly activity report - 05/2015
[GSoC 2014 : ARM Port] Week #11
Hey everyone!
Here’s the update for week #11.
TL;DR - Haiku faults when trying to find the floppyboot archive present in stage2 loader. There seems to be a difference in few offsets/sizes, which causes different bytes to be read every time the loader tries to detect the archive.
Last week, the issues with MMU were fixed and boot progressed further. Over the weekend, the beaglebone black(sponsored by Haiku Inc. Thank you for that!) and the additional hardware I’d ordered arrived and I spent a good part of the week figuring out how to get the hardware connected and working(only to discover I still need to buy some more). It took a while to get OpenOCD and serial output working. This led to the next issue - the stage 2 loader faults almost immediately after u-boot passes control to it. The problem is that the memory mappings for devices being used is that of the OMAP3 processors(which is what powers a beagleboard-xM; the linaro qemu target being used), while the beaglebone black runs an AM335x processor and thus serial output is written to the wrong location(thanks to another GSoC student, Zhuowei, for helping discover this!). In order to fix this, a new board configuration should be created and the MMU mappings will need to be verified and corrected if required. Since these(and any other additional work) could take considerable time, PulkoMandy suggested continuing working with the qemu target and taking the boot process further.
Ithamar investigated briefly and found that there’s something wrong with the offset being used when reading the archive from memory. Since I was focused on getting the hardware to work, I did not investigate this and thus do not know where is the problem. My goal this week is to understand what is going wrong when trying to read the archive loaded along with the stage 2 loader so that possible solutions could be discussed.
Here’s the update for week #11.
TL;DR - Haiku faults when trying to find the floppyboot archive present in stage2 loader. There seems to be a difference in few offsets/sizes, which causes different bytes to be read every time the loader tries to detect the archive.
Last week, the issues with MMU were fixed and boot progressed further. Over the weekend, the beaglebone black(sponsored by Haiku Inc. Thank you for that!) and the additional hardware I’d ordered arrived and I spent a good part of the week figuring out how to get the hardware connected and working(only to discover I still need to buy some more). It took a while to get OpenOCD and serial output working. This led to the next issue - the stage 2 loader faults almost immediately after u-boot passes control to it. The problem is that the memory mappings for devices being used is that of the OMAP3 processors(which is what powers a beagleboard-xM; the linaro qemu target being used), while the beaglebone black runs an AM335x processor and thus serial output is written to the wrong location(thanks to another GSoC student, Zhuowei, for helping discover this!). In order to fix this, a new board configuration should be created and the MMU mappings will need to be verified and corrected if required. Since these(and any other additional work) could take considerable time, PulkoMandy suggested continuing working with the qemu target and taking the boot process further.
Ithamar investigated briefly and found that there’s something wrong with the offset being used when reading the archive from memory. Since I was focused on getting the hardware to work, I did not investigate this and thus do not know where is the problem. My goal this week is to understand what is going wrong when trying to read the archive loaded along with the stage 2 loader so that possible solutions could be discussed.
- dnivra's blog
- Login or register to post comments

Comments
Re: [GSoC 2014 : ARM Port] Week #11
Re: Wrong offset for reading the floppyboot archive. Do a little memcopy from that offset to the stack and see if you can match the copied bytes to any part of the archive. Could this be a little / big endian related problem?
Re: [GSoC 2014 : ARM Port] Week #11
Thanks for the comment! U-boot probably takes care of endianness and thus should load the archive properly without issues. I also believe that(even if u-boot messes up) this is not the issue.
The floppyboot.tgz archive is located correctly and I believe the gzip header isskipped correctly as required by zlib too(I didn't verify taking into account the significance of each bit of the flag in gzip header). The error are generated by zlib routines and thus it's time to investigate what's going wrong in the sequence of calls to zlib. I'm considering writing a sample program to understand how to decompress tgz files in memory using zlib unless I figure something else out.