Port-bebox archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: Cannot boot from floppy disk
On Mon, 21 Apr 2014 17:31:32 +0100
David Brownlee <abs%absd.org@localhost> wrote:
> > Now I'm trying to find out how the images are made. An nbmake-bebox in
> > src/sys/arch/bebox/stand only creates "boot.elf" and the stripped
> > "boot", which is also in ELF format. Who converts that into PEF format
> > and puts it into the image?
>
> I suspect you want distrib/bebox... good hunting :)
Right. I guess we have a problem with compiling on 64-bit architectures
(I compiled on NetBSD/amd64).
The BeOS PEF file header is in mkbootimage/pef.h defined as:
---8<---
struct FileHeader
{
unsigned long magic;
unsigned long fileTypeID;
unsigned long archID;
unsigned long versionNumber;
unsigned long dateTimeStamp;
unsigned long definVersion;
unsigned long implVersion;
unsigned long currentVersion;
unsigned short numSections;
unsigned short loadableSections;
unsigned long memoryAddress;
};
#define PEF_MAGIC 0x4A6F7921 /* Joy! */
#define PEF_FILE 0x70656666 /* peff */
#define PEF_PPC 0x70777063 /* pwpc */
---8<---
I guess the types should be replaced by uint32_t and uint16_t to make it
work, as the file header in my boot.fs image looks like that:
00006400 4a 6f 79 21 00 00 00 00 70 65 66 66 00 00 00 00 |Joy!....peff....|
00006410 70 77 70 63 00 00 00 00 00 00 00 01 00 00 00 00 |pwpc............|
Note the empty 32-bit words between magic, fileTypeID and archID.
That cannot work...
--
Frank Wille
Home |
Main Index |
Thread Index |
Old Index