Subject: RE: CATS & Debian Linux

From: Jesus Eugenio Sanchez <[email-masked]>
Date: Fri, 6 Nov 1998 10:05:08 -0600

I didn't have 'objcopy' in my system (NetBSD), but
even after compiling it and doing the steps below,
I can't boot Linux. Does anybody on the list have 
a Linux bootable image for the CATS?

(Or if I can't do it myself without bothering
anyone, I'd be grateful to know how to build it.)

Thanks.

----
Jesús Eugenio Sánchez Peña ([email-masked])
Avantel, S.A. x5868, v273-5868, (8) 153-5868
Bíper: Cve. 8303075 
(Call 01-800-112-1313 for a local access number)
Visit the OrderPro home page! http://it-eons/orderpro

-----Original Message-----
From: Philip Blundell [mailto:[email-masked]]
Sent: Wednesday, November 04, 1998 2:42 AM
To: Jesus Eugenio Sanchez
Cc: Hwa-Jin Bae; [email-masked]'
Subject: Re: CATS & Debian Linux 

>Do you have the sequence of steps needed to load=20
>the Linux kernel in one of these machines? AFAIK, the

I've just had another mail about this as well.  The standard Cyclone
firmware 
doesn't know about Linux kernels so you need to attach a bit of extra
code to 
the front of the zImage file.  You can then load it as binary ("load
<device>")
and just run it in place ("call 10000000").

I've attached the assembler source to generate this magic header.  You
need to 
do something along the lines of:

$ gcc -nostdlib -nostartfiles -o bootstrap.o bootstrap.S
$ objcopy bootstrap.o bootstrap.bin

and this should leave you with a binary file exactly 32k long that you
can 
just tack onto the front of the zImage with `cat' or something.

Also you probably need to take out the definitions of PARAMS_OFFSET and 
PARAMS_BASE in include/asm/arch/hardware.h - just wrap them in #if 0 or 
something similar.

Let me know how you get on.

p.

/* Minimal header for machines with no real bootloader */
	
	.text

	.globl	_start
_start:
	mov	r0, #0			@ set up args
	mov	r1, #6
	mov	r4, #0x00000000
	orr	r4, r4, #0x8000
	mov	r5, #0x130		@ turn MMU off
	mcr	p15, 0, r5, c1, c0
	mov	r0, r0			@ wait for pipeline
	mov	pc, r4			@ jump to kernel

	.align	8
	.space	0x7f00

unsubscribe: body of `unsubscribe linux-arm' to
[email-masked]
unsubscribe: body of `unsubscribe linux-arm' to [email-masked]