linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* RE :how to do:root filesystem on flash?
@ 2003-06-12  9:33 Callebaut Benoit
  2003-06-12 11:46 ` VxWorks.c ?? Mark Schaefer
  2003-06-13  6:17 ` RE :how to do:root filesystem on flash? yong_guo
  0 siblings, 2 replies; 10+ messages in thread
From: Callebaut Benoit @ 2003-06-12  9:33 UTC (permalink / raw)
  To: linuxppc-embedded mailing list


I,
1 : Create a cramfs filesystem with the right endianess from your nfs
filesystem using mkcramfs.
Burn it into the flash( at the start of the flash).

2 : In your kernel config set the "root=" option to : "/dev/mtdblock0"
Enable Flash MTDBlock support and the right options like CFI,...
Set up the start of the flash and its length
Enable Cramfs in filesystem
Disable NFS as root filesystem.

Rebuild your kernel and flash it.
Reboot the board en enjoy.

PS : This question was already a 100 times answered. Search in the mailing
list before asking such a question.
Or maybe a better idea : One may build a FAQ or a list of Howtos on such
common questions.

Benoit Callebaut


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

^ permalink raw reply	[flat|nested] 10+ messages in thread

* RE: RE :how to do:root filesystem on flash?
@ 2003-06-12 10:31 Christophe.LINDHEIMER
  0 siblings, 0 replies; 10+ messages in thread
From: Christophe.LINDHEIMER @ 2003-06-12 10:31 UTC (permalink / raw)
  To: callebaut, linuxppc-embedded


Hi.

I am just working on the same issue ( with romfs ).

Using devfs I must set root equals "/dev/mtdblock/0" and not
"/dev/mtdblock0"...

Regards.

Chris



-----Message d'origine-----
De: Callebaut Benoit [mailto:callebaut@mailandnews.com]
Date: jeudi 12 juin 2003 11:33
À: linuxppc-embedded mailing list
Objet: RE :how to do:root filesystem on flash?



I,
1 : Create a cramfs filesystem with the right endianess from your nfs
filesystem using mkcramfs.
Burn it into the flash( at the start of the flash).

2 : In your kernel config set the "root=" option to : "/dev/mtdblock0"
Enable Flash MTDBlock support and the right options like CFI,...
Set up the start of the flash and its length
Enable Cramfs in filesystem
Disable NFS as root filesystem.

Rebuild your kernel and flash it.
Reboot the board en enjoy.

PS : This question was already a 100 times answered. Search in the mailing
list before asking such a question.
Or maybe a better idea : One may build a FAQ or a list of Howtos on such
common questions.

Benoit Callebaut


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

^ permalink raw reply	[flat|nested] 10+ messages in thread

* VxWorks.c ??
  2003-06-12  9:33 RE :how to do:root filesystem on flash? Callebaut Benoit
@ 2003-06-12 11:46 ` Mark Schaefer
  2003-06-12 12:19   ` Wolfgang Denk
  2003-06-13  6:17 ` RE :how to do:root filesystem on flash? yong_guo
  1 sibling, 1 reply; 10+ messages in thread
From: Mark Schaefer @ 2003-06-12 11:46 UTC (permalink / raw)
  To: 'linuxppc-embedded mailing list'


Hi,

	I'm trying to reverse-engineer a "home gateway" - used for a home
automation project I worked on.  It currently runs VxWorks, but I'd like to
see if I can port Linux to it.  From what I can tell, it's an XPC860 with
two serial ports, a USB port, a FEC and an Rs-485 port.  It has two FLASH
chips and two RAM chips - probably 32MB of each.

	First of all, I need to replace the VxWorks boot loader with U-Boot.
I have the VxWorks loader capable of loading files from my computer via ftp,
but the Linux kernel requires virtual memory support, which the boot loader
doesn't have.  I've looked everywhere for "vxhack.c" and all the ftp sites
are gone.

	After that, I need to set up a development environment.  I have the
ppc kernel source, but I'm not able to get libc and u-boot to compile.
Should I give up and just use the ELDK?  Also, what JTAG Emulators and
programmers do you use that are compatible with Linux and MPC8xx?

Thanks in advance,

Mark
P.S.  I did search the list and read the FAQ.
P.P.S.  If someone is willing to walk me through this reverse-engineering
process, I'd be willing to write it up as a "process" FAQ.  I've found some
pretty useful tools already for decompiling the kernel code.


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

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: VxWorks.c ??
  2003-06-12 11:46 ` VxWorks.c ?? Mark Schaefer
@ 2003-06-12 12:19   ` Wolfgang Denk
  2003-06-12 14:52     ` Mark Schaefer
  0 siblings, 1 reply; 10+ messages in thread
From: Wolfgang Denk @ 2003-06-12 12:19 UTC (permalink / raw)
  To: Mark Schaefer; +Cc: 'linuxppc-embedded mailing list'


Dear Mark,

in message <009c01c330d8$425ee3d0$040110ac@junior> you wrote:
>
> 	I'm trying to reverse-engineer a "home gateway" - used for a home
> automation project I worked on.  It currently runs VxWorks, but I'd like to
> see if I can port Linux to it.  From what I can tell, it's an XPC860 with
> two serial ports, a USB port, a FEC and an Rs-485 port.  It has two FLASH
> chips and two RAM chips - probably 32MB of each.

860 with USB? So there is an external USB controller on the board?

> 	First of all, I need to replace the VxWorks boot loader with U-Boot.
> I have the VxWorks loader capable of loading files from my computer via ftp,
> but the Linux kernel requires virtual memory support, which the boot loader
> doesn't have.  I've looked everywhere for "vxhack.c" and all the ftp sites
> are gone.

I have no doubt that using U-Boot is a Good Thing (TM)  per  se,  but
there  is  no  real  requirement to use it - you can load and start a
Linux kernel using the VxWorks loader, too. You  have  to  tweak  the
Linux  kernel's  bootstrap  loader  code  a  bit, though. There is NO
requirement that the boot loader must support virtual memory - U-Boot
doesn't do this either.

> 	After that, I need to set up a development environment.  I have the
> ppc kernel source, but I'm not able to get libc and u-boot to compile.
> Should I give up and just use the ELDK?  Also, what JTAG Emulators and

It is an interesting experience to go through all steps necessary  to
build  your  own  toolchain and to debug all the funny little details
that can go wrong. But it's time consuming, too. If you just need the
toolchain now, feel free to use the ELDK.

If you want to build your own set  of  tools  please  go  on,  but  I
recommend to separate these two projects ;-)

> programmers do you use that are compatible with Linux and MPC8xx?

The BDI200 was already recommended. I agree with that statement 100%.
On the other hand, the price is a bit high if you need the tool  just
for  a  hobby  project.  For  the MPC8xx you can also use the BDM4GDB
parallel port adapter. Not that powerful, not that fast,  limited  to
8xx  CPUs, not as reliable, plus some other disadvantages if compared
against the BDI2000. But the, you can either build it for  negligible
cost, or buy the ready-to-use adapter for just 50 Euro.


Best regards,

Wolfgang Denk

--
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-4596-87  Fax: (+49)-8142-4596-88  Email: wd@denx.de
Conceptual integrity in turn dictates that the  design  must  proceed
from  one  mind,  or  from  a  very small number of agreeing resonant
minds.               - Frederick Brooks Jr., "The Mythical Man Month"

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

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: VxWorks.c ??
  2003-06-12 12:19   ` Wolfgang Denk
@ 2003-06-12 14:52     ` Mark Schaefer
  2003-06-12 21:48       ` Wolfgang Denk
  0 siblings, 1 reply; 10+ messages in thread
From: Mark Schaefer @ 2003-06-12 14:52 UTC (permalink / raw)
  To: Wolfgang Denk; +Cc: 'linuxppc-embedded mailing list'


Wolfgang,

    I can't find any chip that looks like it drives the USB interface.
There are a few buffers, I believe.  I know the USB wasn't used for the
pilot.  Only the two RS232's (one console), RS485 and ethernet were used.
It was in a plastic box that hid the JTAG port and LED's.  I'm not really
concerned about getting the USB working right now.

    Thanks for the BDM4GDB link.  It looks like that's my best option.  I
don't want to put more $$$ than I have to in it.  Since I'm trying to save
$150 (the cost of an RS-485 programmable thermostat), and learn some things
about embedded Linux, it doesn't make sense to spend $1600 on a programmer
:).

Thanks!

Mark
----- Original Message -----
From: "Wolfgang Denk" <wd@denx.de>
Sent: Thursday, June 12, 2003 8:19 AM
Subject: Re: VxWorks.c ??

> in message <009c01c330d8$425ee3d0$040110ac@junior> you wrote:
> >
> > I'm trying to reverse-engineer a "home gateway" - used for a home
> > automation project I worked on. It currently runs VxWorks, but I'd
> > like to see if I can port Linux to it. From what I can tell, it's an
> > XPC860 with two serial ports, a USB port, a FEC and an Rs-485 port.
> > It has two FLASH chips and two RAM chips - probably 32MB of each.
>
> 860 with USB? So there is an external USB controller on the board?
>
> > First of all, I need to replace the VxWorks boot loader with U-Boot.
> > I have the VxWorks loader capable of loading files from my computer
> > via ftp, but the Linux kernel requires virtual memory support, which
> > the boot loader doesn't have. I've looked everywhere for "vxhack.c"
> > and all the ftp sites are gone.
>
> I have no doubt that using U-Boot is a Good Thing (TM) per se, but
> there is no real requirement to use it - you can load and start a
> Linux kernel using the VxWorks loader, too. You have to tweak the
> Linux kernel's bootstrap loader code a bit, though. There is NO
> requirement that the boot loader must support virtual memory - U-Boot
> doesn't do this either.
>
> > After that, I need to set up a development environment. I have
> > the ppc kernel source, but I'm not able to get libc and u-boot to
> > compile. Should I give up and just use the ELDK? Also, what JTAG
> > Emulators and
>
> It is an interesting experience to go through all steps necessary to
> build your own toolchain and to debug all the funny little details
> that can go wrong. But it's time consuming, too. If you just need the
> toolchain now, feel free to use the ELDK.
>
> If you want to build your own set of tools please go on, but I
> recommend to separate these two projects ;-)
>
> > programmers do you use that are compatible with Linux and MPC8xx?
>
> The BDI200 was already recommended. I agree with that statement 100%.
> On the other hand, the price is a bit high if you need the tool just
> for a hobby project. For the MPC8xx you can also use the BDM4GDB
> parallel port adapter. Not that powerful, not that fast, limited to
> 8xx CPUs, not as reliable, plus some other disadvantages if compared
> against the BDI2000. But the, you can either build it for negligible
> cost, or buy the ready-to-use adapter for just 50 Euro.

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

^ permalink raw reply	[flat|nested] 10+ messages in thread

* RE: RE :how to do:root filesystem on flash?
@ 2003-06-12 17:40 Darin.Johnson
  0 siblings, 0 replies; 10+ messages in thread
From: Darin.Johnson @ 2003-06-12 17:40 UTC (permalink / raw)
  To: linuxppc-embedded


> Or maybe a better idea : One may build a FAQ or a list of
> Howtos on such
> common questions.

An FAQ would be great!  Searching the list is very difficult to do
effectively.  The existing "Linux for PowerPC Embedded Systems"
HOWTO is out of date.

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

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: VxWorks.c ??
  2003-06-12 14:52     ` Mark Schaefer
@ 2003-06-12 21:48       ` Wolfgang Denk
  0 siblings, 0 replies; 10+ messages in thread
From: Wolfgang Denk @ 2003-06-12 21:48 UTC (permalink / raw)
  To: Mark Schaefer; +Cc: 'linuxppc-embedded mailing list'


Dear Mark,

in message <00d601c330f2$489159d0$0320a8c0@onstardevserv> you wrote:
>
>     I can't find any chip that looks like it drives the USB interface.
> There are a few buffers, I believe.  I know the USB wasn't used for the
> pilot.  Only the two RS232's (one console), RS485 and ethernet were used.
> It was in a plastic box that hid the JTAG port and LED's.  I'm not really
> concerned about getting the USB working right now.

Then it either is no MPC860 CPU, or there is no USB support. Only the
MPC823 and MPC850 CPUs have a USB controller on-chip.

>     Thanks for the BDM4GDB link.  It looks like that's my best option.  I

:-)


Best regards,

Wolfgang Denk

--
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-4596-87  Fax: (+49)-8142-4596-88  Email: wd@denx.de
All a hacker needs is a tight PUSHJ, a loose pair of UUOs, and a warm
place to shift.

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

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: RE :how to do:root filesystem on flash?
  2003-06-12  9:33 RE :how to do:root filesystem on flash? Callebaut Benoit
  2003-06-12 11:46 ` VxWorks.c ?? Mark Schaefer
@ 2003-06-13  6:17 ` yong_guo
  1 sibling, 0 replies; 10+ messages in thread
From: yong_guo @ 2003-06-13  6:17 UTC (permalink / raw)
  To: Callebaut Benoit; +Cc: linuxppc-embedded


----- Original Message -----
From: "Callebaut Benoit" <callebaut@mailandnews.com>
To: "linuxppc-embedded mailing list" <linuxppc-embedded@lists.linuxppc.org>
Sent: Thursday, June 12, 2003 5:33 PM
Subject: RE :how to do:root filesystem on flash?


>
> I,
> 1 : Create a cramfs filesystem with the right endianess from your nfs
> filesystem using mkcramfs.
> Burn it into the flash( at the start of the flash).
Is it must be burned from the start of the flash?  My u-boot bin code is
burned at the start of the flash.

>
> 2 : In your kernel config set the "root=" option to : "/dev/mtdblock0"
In my system, the flash is registered as /dev/flasha, should i pass the
parameter "root=/dev/flasha" to kernel?

> Enable Flash MTDBlock support and the right options like CFI,...
> Set up the start of the flash and its length
> Enable Cramfs in filesystem
> Disable NFS as root filesystem.
>
> Rebuild your kernel and flash it.
> Reboot the board en enjoy.
>
> PS : This question was already a 100 times answered. Search in the mailing
> list before asking such a question.
> Or maybe a better idea : One may build a FAQ or a list of Howtos on such
> common questions.
>
> Benoit Callebaut
>
>


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

^ permalink raw reply	[flat|nested] 10+ messages in thread

* RE: RE :how to do:root filesystem on flash?
@ 2003-06-13  8:19 Christophe.LINDHEIMER
  0 siblings, 0 replies; 10+ messages in thread
From: Christophe.LINDHEIMER @ 2003-06-13  8:19 UTC (permalink / raw)
  To: yong_guo, callebaut; +Cc: linuxppc-embedded


> >
> > I,
> > 1 : Create a cramfs filesystem with the right endianess
> from your nfs
> > filesystem using mkcramfs.
> > Burn it into the flash( at the start of the flash).
> Is it must be burned from the start of the flash?  My u-boot
> bin code is
> burned at the start of the flash.
>

No it is not necessary to burn your fs at the beginning of the flash.
But if you don't, you must use partitions.
First select the option to use partitions in the kernel.
Then give a look in sources of /drivers/mtd/... to see how to declare your
own partition for your custom board. ( there are somes files for custom
boards that you will give you ideas...)
I had to change the config.in to add my own board.
Then you will have
/dev/mtdblock/0 mapping UBoot.
&
/dev/mtdblock/1 mapping your fs.

So you will have to use
root=/dev/mtdblock/1

> >
> > 2 : In your kernel config set the "root=" option to :
> "/dev/mtdblock0"
> In my system, the flash is registered as /dev/flasha, should
> i pass the
> parameter "root=/dev/flasha" to kernel?
>

?
I don't know.
Selecting MTD in the kernel config gave me /dev/mtdblock/x...

> > Enable Flash MTDBlock support and the right options like CFI,...
> > Set up the start of the flash and its length
> > Enable Cramfs in filesystem
> > Disable NFS as root filesystem.
> >
> > Rebuild your kernel and flash it.
> > Reboot the board en enjoy.
> >
> > PS : This question was already a 100 times answered. Search
> in the mailing
> > list before asking such a question.
> > Or maybe a better idea : One may build a FAQ or a list of
> Howtos on such
> > common questions.
> >
> > Benoit Callebaut
> >
> >
>
>

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

^ permalink raw reply	[flat|nested] 10+ messages in thread

* RE: RE :how to do:root filesystem on flash?
@ 2003-06-13  8:20 Callebaut Benoit
  0 siblings, 0 replies; 10+ messages in thread
From: Callebaut Benoit @ 2003-06-13  8:20 UTC (permalink / raw)
  To: yong_guo; +Cc: linuxppc-embedded


I don't know the internals of the 860 for addressing but a generic answer can
be the following.
Linux doesn't care of the real start address of the flash.
So a good idea, if you don't need to update the kernel using Linux is to make
the flash appears smaller to Linux by changing the langth and eventually the
start address in the kernel.
Using the default block driver (found in /drivers/mtd/mtdblock.c) the root
filesystem must be burn at the start of the flash as defined for Linux.
If your registered name is /dev/flasha try with this name but take in account
that at boot time all the Linux system is not yet loaded. DevFS is not yet
loaded and Linux use at this moment a minimal device support code with fixed
names. So there is a lot of chance that your flash is still recognizd as
/dev/mtdblock0. To be sure of this take a look in init/main.c.
There is a table of known devices and the flash is defined at he last line as
{"mtdblock", 0X1F00}


>===== Original Message From "yong_guo" <yong_guo@scomcenter.com> =====
>----- Original Message -----
>From: "Callebaut Benoit" <callebaut@mailandnews.com>
>To: "linuxppc-embedded mailing list" <linuxppc-embedded@lists.linuxppc.org>
>Sent: Thursday, June 12, 2003 5:33 PM
>Subject: RE :how to do:root filesystem on flash?
>
>
>>
>> I,
>> 1 : Create a cramfs filesystem with the right endianess from your nfs
>> filesystem using mkcramfs.
>> Burn it into the flash( at the start of the flash).
>Is it must be burned from the start of the flash?  My u-boot bin code is
>burned at the start of the flash.
>
>>
>> 2 : In your kernel config set the "root=" option to : "/dev/mtdblock0"
>In my system, the flash is registered as /dev/flasha, should i pass the
>parameter "root=/dev/flasha" to kernel?
>
>> Enable Flash MTDBlock support and the right options like CFI,...
>> Set up the start of the flash and its length
>> Enable Cramfs in filesystem
>> Disable NFS as root filesystem.
>>
>> Rebuild your kernel and flash it.
>> Reboot the board en enjoy.
>>
>> PS : This question was already a 100 times answered. Search in the mailing
>> list before asking such a question.
>> Or maybe a better idea : One may build a FAQ or a list of Howtos on such
>> common questions.
>>
>> Benoit Callebaut
>>
>>


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

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2003-06-13  8:20 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-06-12  9:33 RE :how to do:root filesystem on flash? Callebaut Benoit
2003-06-12 11:46 ` VxWorks.c ?? Mark Schaefer
2003-06-12 12:19   ` Wolfgang Denk
2003-06-12 14:52     ` Mark Schaefer
2003-06-12 21:48       ` Wolfgang Denk
2003-06-13  6:17 ` RE :how to do:root filesystem on flash? yong_guo
  -- strict thread matches above, loose matches on Subject: below --
2003-06-12 10:31 Christophe.LINDHEIMER
2003-06-12 17:40 Darin.Johnson
2003-06-13  8:19 Christophe.LINDHEIMER
2003-06-13  8:20 Callebaut Benoit

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).