Jump to content


Photo

Can Xromwell Be Used To Boot Regular Elf32 Binaries?


  • Please log in to reply
2 replies to this topic

#1 halofreak1990

halofreak1990

    X-S Young Member

  • Members
  • Pip
  • 57 posts
  • Location:The Netherlands
  • Xbox Version:v1.6
  • 360 version:v1 (xenon)

Posted 24 September 2012 - 02:57 PM

I'm trying to load a multiboot-compatible ELF32 binary with xromwell on the XBOX as part of an attempt to create a hobby OS that runs on both the PC and the XBOX.
I can boot the file with GRUB Legacy on any PC I've got so the file is valid and bootable, but xromwell won't fire it up.

This is the linuxboot.cfg I use on my XBOX
CODE
title XDSL
kernel KNOPPIX/linux24
initrd KNOPPIX/linux24.gz
append root=/dev/ram0 init=/etc/init rw video=xbox:640x480 frugal quiet kbd-reset
title XDSL Loopback install
kernel KNOPPIX/linux24
initrd KNOPPIX/ird-loop.gz
append root=/dev/ram0 init=/etc/init rw video=xbox:640x480 rootfs_name=xdslfs quiet kbd-reset

title My OS
kernel System/kernel


xromwell loads the file just fine. It's the execution of it that fails.

The output is
CODE
(ELF)...
Image checksum: 0 != computed checksum 630c

There's two more lines of text on the screen, but due to overscan, they are not really readable, but I guess they say
CODE
done
parsing cmdline:


I can see there is some kind of checksum mismatch, but I don't know what checksum xromwell is talking about.

Since the bootloader component of xromwell is based on GRUB, it should be able to load my binary, right?

#2 ldotsfan

ldotsfan

    X-S Messiah

  • Dev/Contributor
  • PipPipPipPipPipPipPip
  • 3,100 posts
  • Xbox Version:v1.1
  • 360 version:unknown

Posted 26 September 2012 - 04:37 AM

I'm not familiar with this section of cromwell code but here's the relevant section: http://xbox-linux.cv.....pe=text/plain

CODE

if (estate.ip_checksum != sum) {
                printf("\nImage checksum: %hx != computed checksum: %hx\n",
                    estate.ip_checksum, sum);
#if 0
                /* This seems to fail sometimes for certain ELF
                 * files. Unsure why, so just bluntly disable
                 * the restart for now ... Should be fixed
                 * better ...
                 */
                longjmp(restart_etherboot, -2);
#endif
            }


It's part of etherboot. Maybe with that info, you have better luck hunting down the problem?

#3 halofreak1990

halofreak1990

    X-S Young Member

  • Members
  • Pip
  • 57 posts
  • Location:The Netherlands
  • Xbox Version:v1.6
  • 360 version:v1 (xenon)

Posted 30 September 2012 - 01:31 PM

Forget what I said. I just realized I was writing my screen output to the wrong address.

I used OpenXDK's FB address, but that becomes invalid once Xromwell boots an OS.
Looking up the new address in Xromwell's source code fixed my issues.

IOW, I can build an ELF kernel that, just like XBOX-Linux, runs unmodified on both PC and XBOX, as long as you add the necessary code to bridge the gap.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users