Skip to contentSkip to conversation

need suggestions

DISCUSSION LiuTao 5 participants 8 messages Nov 23, 1999 – Nov 24, 1999

lore
Share & tools
lore

LiuTao

author
#0 lore raw

Hi All:

I just completed a board with MPC860, there are 16M SDRAM, 2M Flash, one ethernet port and two serial ports(SMC) on the board. The board is running well with vxWorks now.
I want to make a bootloader on the board. With the bootloader, I can download Linux image through TFTP to SDRAM and run it. I also can burn the downloaded image into flash, so next time I can boot Linux from flash.
I know that many people did this successfully on various boards. Can you give me some suggestions? Can you tell me how to do it? Thanks!

LiuTao

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

#1 lore raw
Quoted 3 lines · LiuTao

........ The board
is running well with vxWorks now.
I want to make a bootloader on the board.

How do you load vxWorks? I have worked on several vxWorks projects, and all of the systems had the vxWorks TFTP loader in the rom. Use the same thing (whatever that is) to load the Linux/PPC image.

The zImage is linked such that you can just treat it as a bag o' bits to dump into memory. Even with non-standard boot loaders, all you need to do is write a simple program to strip the 64K ELF header, place your own header on the top, make sure it gets loaded above 0x180000 and jump to the start of the image.

	-- Dan

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

author
#2 lore raw

Hi Dan:

Thanks for your advice.
The bootloader that I am using with vxWorks uses FTP but not TFTP. And I don't have the source code of that bootloader. I think there are maybe some problems to use it download and boot linux. So I hope to find a TFTP source code and program a bootloader by myself. Of course, if anybody has a presented bootloader source code, that's great.

LiuTao

Quoted 11 lines · Dan Malek
Quoted 3 lines · LiuTao

........ The board
is running well with vxWorks now.
I want to make a bootloader on the board.

How do you load vxWorks? I have worked on several vxWorks projects, and all of the systems had the vxWorks TFTP loader in the rom. Use the same thing (whatever that is) to load the Linux/PPC image.

Quoted 7 lines

The zImage is linked such that you can just treat it as a bag o' bits to dump into memory. Even with non-standard boot loaders, all you need to do is write a simple program to strip the 64K ELF header, place your own header on the top, make sure it gets loaded above 0x180000 and jump to the start of the image.

        -- Dan

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

#3 lore raw
Quoted 4 lines · LiuTao

.......... So I hope
to find a TFTP source code and program a bootloader by myself. Of course, if anybody has a presented bootloader source code, that's great.

A couple of people from Motorola have indicated, for the past year or so, an interest in providing a TFTP monitor for the FADS board. When they have asked what to do, I said make sure it is GPL and send it to me for posting on a server somewhere (like ppc.kernel.org). I have never heard a reply.

I am sure you could put something together from some of the netboot code that is around.

My approach is to actually port a Linux kernel to the 8xx board, which is pretty easy these days for just the minimal network support, then slightly "customize" it (so it doesn't use _all_ of memory) and flash is using S-record download or BDM tools. I then just use the Linux kernel with a TFTP application to do the job. Just mmap() the unused memory for loading a new image, and modify the reboot to call a specific address rather than return to rom.

	-- Dan

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

#4 lore raw
Quoted 6 lines · Dan Malek
Quoted 4 lines · LiuTao

.......... So I hope
to find a TFTP source code and program a bootloader by myself. Of course, if anybody has a presented bootloader source code, that's great.

Quoted 8 lines

A couple of people from Motorola have indicated, for the past year or so, an interest in providing a TFTP monitor for the FADS board. When they have asked what to do, I said make sure it is GPL and send it to me for posting on a server somewhere (like ppc.kernel.org). I have never heard a reply.

I am sure you could put something together from some of the netboot code that is around.

What about starting from PMON for the MIPS? It's real public domain.

Gr{oetje,eeting}s,
--
Geert Uytterhoeven -- Linux/{m68k~Amiga,PPC~CHRP} -- [email protected]

In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

author
#5 lore raw
In reply to Dan Malek

Hi:

Quoted 1 line · Dan Malek

My approach is to actually port a Linux kernel to the 8xx board, which

I have a ADS8xx board and I downloaded kernel source mpc8xx-2.2.13.tgz from ppc.kernel.org. Can you tell me how to port it to ADS8xx board and make a bootrom of Linux?
I am a newbie, so please tell something in detail.
Thanks!

LiuTao

Quoted 8 lines

is pretty easy these days for just the minimal network support, then slightly "customize" it (so it doesn't use _all_ of memory) and flash is using S-record download or BDM tools. I then just use the Linux kernel with a TFTP application to do the job. Just mmap() the unused memory for loading a new image, and modify the reboot to call a specific address rather than return to rom.

        -- Dan

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

#6 lore raw
Quoted 6 lines

I have a ADS8xx board and I downloaded kernel source mpc8xx-2.2.13.tgz from ppc.kernel.org. Can you tell me how to port it to ADS8xx board and make a bootrom of Linux?
I am a newbie, so please tell something in detail.

First of all: Check the revision of the board and the cpu. If you have a 860, find a cpu with revision C or later.
If you have a ADS with rev. ENG, PILOT or A you will have some trouble.

I have had linux up and running on a ADS board.
A good starting point is to read the manual and check what differs from the FADS.

I have bootcode that is based on fadsrom by Dan Malek.
It is kind of a mess right now, but it should support both the ADS and the FADS board using 860(t).
It loads a zImage or vmlinux from a ATA-FLASH or the onboard flash-simm. It understands ext2 and dos.
No network support, though.

I can mail the source to anyone who is interested. You will need a linux source tree and a (cross)compiler.

But I have no time for answers.

Good luck /

magnus damm

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

#7 lore raw
In reply to Dan Malek
Quoted 1 line · Dan Malek

How do you load vxWorks? I have worked on several vxWorks projects,

If you use vxWorks to load Linux, you would probably still have to pay WindRiver a royalty. Also, that would make the worlds largest bootloader; well ok, OF is larger.

Many years ago, I wrote a boot loader that does (amongst other things) BOOTP and TFTP. I plan to port it to PPC for a project I'm doing soon and I will publish it. It wont be ready for a few months though.

Signature · 3 lines
Neil Russell <[email protected]>

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/