Bug#743879: debian-cd: Fixes for hppa architecture (patch attached)
On 04/07/2014 10:03 PM, Thomas Schmitt wrote:
> in january we had a conversation about xorriso and PALO.
Yes, I did not forgot it :-)
> I implemented the boot sector as learned from genisoimage:
> version number 4 and the short command line at byte 24 to 151.
> Further there is the proposed version 5 with long command line at
> byte 1024 to 2047, and the yet unexplained "ipl_entry" at byte
> 248 to 251.
> Because our discussion stalled, i did not publish the enhancements
> of libisofs API and xorriso CLI with the recent release 1.3.6.
That's really sad!
It would have been easier for me, if you would have added them, even
if they were not perfect.
> They are still available in the last 1.3.5 development snapshot:
> It has header version 5 as default. Version 4 can be achieved by
> -as mkisofs option
> -hppa-hdrversion 4
> The five traditional -hppa-* options of genisoimage are supported
> by the -as mkisofs emulation.
> The disabled code gets back into effect by defining the macro
> (in CFLAGS or in libisofs.h).
> For exporting the API from libisofs.so, it is further necessary to
> add in libisofs/libisofs.ver the lines
> So if i get a definition of "ipl_entry" at byte 248 to 251,
I just looked into the code of palo again.
Full code is here:
or alternatively you can just download the palo debian source package.
(BTW, that's what I have been working on during the last few weeks,
to get palo back into debian unstable. It now compiles on all debian arches, see:
It seems, that ipl_entry can be calculated like this:
(see lib/elf32.c or lib/elf64:)
load the elf-header of the Linux kernel (vmlinux or vmlinux64),
ipl_entry_temp = __be32_to_cpu(eh.e_entry);
ipl_entry = __cpu_to_be32(ipl_entry_temp - first);
"first" is the first address where the binary is loaded.
For all PT_LOAD sections of the ELF file, search the lowest address.
This address becomes "first". Here is a simplification, better look at the code!
eh.e_phnum = __be16_to_cpu(eh.e_phnum);
for (i = 0; i < eh.e_phnum; i++)
if (__be32_to_cpu(ep.p_type) != PT_LOAD)
start = __be32_to_cpu(ep.p_vaddr);
if (loadable->first == 0 || start < loadable->first)
loadable->first = start;
So, ipl_entry is the relative address where to jump into the loaded executable address range.
> some testing is made by owners of HP-PA machines, then -hppa-*
> options could be in xorriso-1.3.8.
I will test.
> Together with my new boot sector analyzer which will tell e.g.:
> Volume id : 'Debian 5.0.8 hppa Bin-1'
> PALO header version: 4
> HP-PA cmdline : 0/vmlinux initrd=0/ramdisk
> HP-PA boot files : ByteAddr ByteSize Path
> HP-PA 32-bit kernel: 13346816 4187315 /install/vmlinux-2.6.26-2-parisc
> HP-PA 64-bit kernel: 7557120 5789547 /install/vmlinux-2.6.26-2-parisc64
> HP-PA ramdisk : 2324480 5193978 /install/initrd.gz
> HP-PA bootloader : 7520256 36864 /install/iplboot
> (The output with debian-7.4.0-amd64-netinst.iso is a bit longer :))
You want to test some other hppa installer images which I currently built?
They are at: http://mkhppa3.esiee.fr/