Skip to contentSkip to conversation

decstation boot loader

DISCUSSION Florian Lohoff 2 participants 3 messages Aug 26, 2000 – Aug 27, 2000 MIPS

lore
Share & tools
lore
#0 lore raw

Hi,
i sat down a couple of hours and had a look at current possibilities of booting the decstations from HD. I am not much further than i was was before - And now i got a couple of questions probably one of the more specialised mips hackers might answer.

- The bootblock of the decstation might contain up to 51 extents to load from the disks.

1. Do these extents refer to the start of the disk or the start of the probably first partition.

2. Do i have to set a checksum in the bootblock or does the checksom only apply to the disklabel

3. What binarys is the bootloader able to load. From the BSD sources i guess its only raw instructions.

4. Does the MS-DOS disklabel and the DEC bootblock interfer in any kind that its impossible to have a diskloader with MS-DOS Disklabels

I rewrote the bootprep.c today to play around with loading different binarys. I added the honor of partition information meaning - The new (i call it writeboot) looks at the start of the partition and calculates the extents relativ to the start of the disk. But still i dont get any results. When trying to boot those partitions with any kind of combination the prompt only returns to the prom command line.

I thought of a bootloader much like the silo - Capable of reading an ext2 filesystem via libext2 etc.

Flo

Signature · 2 lines
Florian Lohoff		[email protected]		      	+49-5201-669912
      "Write only memory - Oops. Time for my medication again ..."
#1 lore raw

Hi Flo,

Quoted 10 lines · On 26-Aug-00 Florian Lohoff wrote:

i sat down a couple of hours and had a look at current possibilities of booting the decstations from HD. I am not much further than i was was before - And now i got a couple of questions probably one of the more specialised mips hackers might answer.

- The bootblock of the decstation might contain up to 51 extents to load from the disks.

1. Do these extents refer to the start of the disk or the start of the probably first partition.

The PROM knows nothing about partitions or such so these extends refer obviously to the start of the disk.

Quoted 2 lines

2. Do i have to set a checksum in the bootblock or does the checksom only apply to the disklabel

The PROM doesn't even know anything about a checksum.

Quoted 2 lines

3. What binarys is the bootloader able to load. From the BSD sources i guess its only raw instructions.

Yes. "mipsel-linux-objcopy --output-target=binary" is your friend.

Quoted 2 lines

4. Does the MS-DOS disklabel and the DEC bootblock interfer in any kind that its impossible to have a diskloader with MS-DOS Disklabels

No, that should work as long as the the the boot map is short enough not to overwrite the partition information.

Quoted 6 lines

I rewrote the bootprep.c today to play around with loading different binarys. I added the honor of partition information meaning - The new (i call it writeboot) looks at the start of the partition and calculates the extents relativ to the start of the disk. But still i dont get any results. When trying to boot those partitions with any kind of combination the prompt only returns to the prom command line.

I have successfully booted Linux kernels with bootprep. Depending on the code you want to load, for example a second stage bootloader, you may need to adjust "boot_block->loadAddr" and "boot_block->execAddr".

Quoted 2 lines

I thought of a bootloader much like the silo - Capable of reading an ext2 filesystem via libext2 etc.

That's what I always wanted to do but I never found the time...

Signature · 2 lines
Regards,
Harald
#2 lore raw
Quoted 4 lines · Harald Koerfgen

The PROM knows nothing about partitions or such so these extends refer obviously to the start of the disk.

Good

Quoted 3 lines

Yes. "mipsel-linux-objcopy --output-target=binary" is your friend.

Even worse ...

Compilation - Relocation - Stripping -

start.b: start.r

        objcopy --remove-section=.bss \
                --remove-section=.data \
                --remove-section=.reginfo \
                --remove-section=.mdebug \
                --output-target=binary start.r start.b 

start.r: start.o
ld -Ttext=0x80020000 -Tdata=0x80020000 -Tbss=0x80020000 \
start.o -o start.r

start.o: start.S
gcc -fomit-frame-pointer -G 0 -mno-abicalls -fno-pic -c start.S

Quoted 6 lines
Quoted 2 lines

4. Does the MS-DOS disklabel and the DEC bootblock interfer in any kind that its impossible to have a diskloader with MS-DOS Disklabels

No, that should work as long as the the the boot map is short enough not to overwrite the partition information.

Does that mean that the limit of the boot_map in the bootprep is arbitrary and the DEC firmware bootloader would continue read/process boot_maps in the whole first block ?

Quoted 3 lines

I have successfully booted Linux kernels with bootprep. Depending on the code you want to load, for example a second stage bootloader, you may need to adjust "boot_block->loadAddr" and "boot_block->execAddr".

Yep - I guessed so - loadAddr hasnt changed but i guess execAddr needs to point to kernel_entry ...

Quoted 4 lines
Quoted 2 lines

I thought of a bootloader much like the silo - Capable of reading an ext2 filesystem via libext2 etc.

That's what I always wanted to do but I never found the time...

:) - Well see - I got someone else i donated a Decstation to whom i gave the first goal of writing a boot loader for the donation :)

The problem right now which i have is that i cant seem to load ANYTHING - Not raw instructions not elf not ecoff - Even simplest instruction like a tight loop (Wouldnt go back into prom) dont seem to get executed.

Flo

Signature · 2 lines
Florian Lohoff		[email protected]		      	+49-5201-669912
      "Write only memory - Oops. Time for my medication again ..."