Linux on Virtex board with ARCH=powerpc
Dear all,
I'm trying to boot a 2.6.26-rc6 kernel on a custom Virtex 4 board. I have used the Xilinx utility to generate a device tree and now want to generate an image for throwing onto CF for use with a SystemACE (just like on the the ML3/4xx boards). I don't want to use a bootloader (I don't really need one). I saw something on this list about simpleImage, "simple" sounded good to me so I thought I'd try that (or did I misinterpret what this is for?). I also don't want the image to be too big, I always used to use a zImage under ARCH=ppc. So, two questions, which hopefully are easy ones:
1. I did what Grant said in a post to this list about simpleImage, and dumped my dts into arch/powerpc/boot/dts and I called it system.dts (for now). I then tried to do make simpleImage.system which ran right through to final link then moaned about a missing simpleboot-system. Where is this supposed to come from? What am I doing wrong? I naively tried copying simpleboot.o to simpleboot-system.o and the error went away. Hmm.
2. I need an ELF to give to my SystemACE file generator. This used to pop up in arch/ppc/boot/images and be called zImage.elf, which made sense to me. What's the deal now with powerpc? What should I be using?
Finally, can anyone give me a heads-up on any gotchas with what I'm trying to do. As you can tell, I don't entirely know what I'm doing, so any pointers would be gratefully received.
Thanks,
-- Peter
The University of Dundee is a Scottish Registered Charity, No. SC015096.
Hi Peter,
I'm not up on what can be done with the simple image you refer to in 1. I'm sure I should be, but there's a lot to learn.
With regards to 2, the elf image, zImage (without the elf extension), is located in arch/powerpc/boot.
You can make a SystemACE file from that elf image just as you did in arch/ppc. We have a default device tree file, ml405.dts, in the arch/powerpc/boot/dts directory for our ml405 board. The kernel configuration has a config, DEVICE_TREE, that specifies the name of the device tree file. I normally compile the device tree into the kernel which is the default build, make ARCH=3Dpowerpc zImage. That image does not require a boot loader.
I inserted the text below from a document that I have about building the arch/ppc and arch/powerpc kernels.
Hope that helps,
John
Notation
The phrase "<ppc or powerpc>" is used throughput the text and means that one or the other, "ppc" or "powerpc" is to be typed depending on the architecture you are building.
Commands that are used in a bash shell are preceded by ">".
Getting Ready To Build the Kernel
This assumes you installed the ELDK tools and assumes you'll be using a bash shell.
Quoted 2 lines
bash
export CROSS_COMPILE=3Dppc_4xx-
Setting Up the Kernel Tree
If you have previously built this kernel for another architecture, ppc or powerpc, then the tree needs to be setup correctly for the new architecture. Assuming you have not previously built it, this does not need to be done.
Quoted 1 line
make ARCH=3D<ppc or powerpc> mrproper
Configuring the Kernel
The kernel should be configured to run on the ML405 or ML507 board from Xilinx. =
=
Quoted 1 line
make ARCH=3D<ppc or powerpc>
ml405_defconfig
or =
Quoted 1 line
make ARCH=3D<ppc or powerpc>
ml507_defconfig
Building the Kernel
The following command will build the Linux kernel assuming you are in the root directory of the kernel. The root directory of the kernel from the Xilinx Git tree is linux-2.6-xlnx. An elf file, zImage.elf, is created in the arch/ppc/boot/images directory for ppc architecture. An elf file, zImage, is created in the the arch/powerpc/boot directory for the powerpc architecture.
Quoted 1 line
make ARCH=3D<ppc or powerpc> zImage
=
Building the Kernel With Ramdisk
A ram disk image, a file named *.gz, must be placed into the arch/ppc/boot/images or arch/powerpc/boot directory, depending on the architecture, prior to building the kernel.
Quoted 1 line
make ARCH=3D<ppc or powerpc> zImage.initrd
An elf file, zImage.initrd.elf, is created in arch/ppc/boot/images directory for the ppc architecture. An elf file file, zImage.initrd, is created in arch/powerpc/boot directory for the powerpc architecture.
Generating An Ace File
The elf file generated for the kernel and the bit stream can be combined to create an ACE file for compact flash. The following assumes a bash shell where XMD is accessible and a xilinx probe attached to the board for which you are generating an ace file.
Quoted 1 line
xmd -tcl genace.tcl -jprog -target
ppc_hw-hw <bit file name> -elf <elf
file name> -board <ml405 or ml507> -ace <desired ace file name>
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Peter Mendham
Sent: Tuesday, June 24, 2008 3:02 AM
To: [email protected]
Subject: Linux on Virtex board with ARCH=3Dpowerpc
Dear all,
I'm trying to boot a 2.6.26-rc6 kernel on a custom Virtex 4 board. I =
have used the Xilinx utility to generate a device tree and now want to =
generate an image for throwing onto CF for use with a SystemACE (just =
like on the the ML3/4xx boards). I don't want to use a bootloader (I =
don't really need one). I saw something on this list about simpleImage,
"simple" sounded good to me so I thought I'd try that (or did I =
misinterpret what this is for?). I also don't want the image to be too =
big, I always used to use a zImage under ARCH=3Dppc. So, two questions, =
which hopefully are easy ones:
1. I did what Grant said in a post to this list about simpleImage, and =
dumped my dts into arch/powerpc/boot/dts and I called it system.dts (for
now). I then tried to do make simpleImage.system which ran right =
through to final link then moaned about a missing simpleboot-system. =
Where is this supposed to come from? What am I doing wrong? I naively =
tried copying simpleboot.o to simpleboot-system.o and the error went =
away. Hmm.
2. I need an ELF to give to my SystemACE file generator. This used to =
pop up in arch/ppc/boot/images and be called zImage.elf, which made =
sense to me. What's the deal now with powerpc? What should I be using? Finally, can anyone give me a heads-up on any gotchas with what I'm =
trying to do. As you can tell, I don't entirely know what I'm doing, so
any pointers would be gratefully received.
Thanks,
-- Peter
The University of Dundee is a Scottish Registered Charity, No. SC015096.
_______________________________________________
Linuxppc-embedded mailing list
[email protected]
https://ozlabs.org/mailman/listinfo/linuxppc-embedded
This email and any attachments are intended for the sole use of the named r= ecipient(s) and contain(s) confidential information that may be proprietary= , privileged or copyrighted under applicable law. If you are not the intend= ed recipient, do not read, copy, or forward this email message or any attac= hments. Delete this email message and any attachments immediately.
Hi John,
Thanks for your reply, that's really helpful. I'm actually using the mainline kernel, rather than the one from the xilinx git tree, but your information has really moved me on. My first problem was that the Xilinx utility (from the git tree) for device tree dts generation didn't insert a "linux,stdout-path" node under "chosen". I spotted that the ml403 example had this, so after adding it I got early console messages. Everything now grinds to a halt after I get the message "flat tree at 0x40ad60" which is just before it calls the kernel, so I assume it's that call that is killing it. I have "console=ttyUL0" for my uartlite, so I should be getting messages, shouldn't I? Do you know where the next execution point is? Maybe I could find out where it's getting stuck.
I haven't managed to generate an ACE file, I'm just loading the kernel image from xmd ATM, genace won't play ball for me, it complains about -board user not being valid, it won't even run on the examples copied directly from the user manual. Anyway, I think genace is a bit OT, and I can manage with xmd for now.
Thanks,
-- Peter
Quoted 134 lines · John Linn
Hi Peter,
I'm not up on what can be done with the simple image you refer to in 1. I'm sure I should be, but there's a lot to learn.
With regards to 2, the elf image, zImage (without the elf extension), is located in
arch/powerpc/boot.You can make a SystemACE file from that elf image just as you did in
arch/ppc. We have a default device tree file,ml405.dts, in thearch/powerpc/boot/dtsdirectory for our ml405 board. The kernel configuration has a config,DEVICE_TREE, that specifies the name of the device tree file. I normally compile the device tree into the kernel which is the default build, make ARCH=powerpc zImage. That image does not require a boot loader.I inserted the text below from a document that I have about building the
arch/ppcandarch/powerpckernels.Hope that helps,
JohnNotation
The phrase "<ppc or powerpc>" is used throughput the text and means that one or the other, "ppc" or "powerpc" is to be typed depending on the architecture you are building.
Commands that are used in a bash shell are preceded by ">".
Getting Ready To Build the Kernel
This assumes you installed the ELDK tools and assumes you'll be using a bash shell.
Quoted 3 lines
bash
export CROSS_COMPILE=ppc_4xx-Setting Up the Kernel Tree
If you have previously built this kernel for another architecture, ppc or powerpc, then the tree needs to be setup correctly for the new architecture. Assuming you have not previously built it, this does not need to be done.
Quoted 2 lines
make ARCH=<ppc or powerpc> mrproper
Configuring the Kernel
The kernel should be configured to run on the ML405 or ML507 board from Xilinx.
Quoted 2 lines
make ARCH=<ppc or powerpc>
ml405_defconfigor
Quoted 2 lines
make ARCH=<ppc or powerpc>
ml507_defconfigBuilding the Kernel
The following command will build the Linux kernel assuming you are in the root directory of the kernel. The root directory of the kernel from the Xilinx Git tree is linux-2.6-xlnx. An elf file, zImage.elf, is created in the
arch/ppc/boot/imagesdirectory for ppc architecture. An elf file, zImage, is created in the thearch/powerpc/bootdirectory for the powerpc architecture.Quoted 2 lines
make ARCH=<ppc or powerpc> zImage
Building the Kernel With Ramdisk
A ram disk image, a file named *.gz, must be placed into the
arch/ppc/boot/imagesorarch/powerpc/bootdirectory, depending on the architecture, prior to building the kernel.Quoted 2 lines
make ARCH=<ppc or powerpc> zImage.initrd
An elf file, zImage.initrd.elf, is created in
arch/ppc/boot/imagesdirectory for the ppc architecture. An elf file file, zImage.initrd, is created inarch/powerpc/bootdirectory for the powerpc architecture.Generating An Ace File
The elf file generated for the kernel and the bit stream can be combined to create an ACE file for compact flash. The following assumes a bash shell where XMD is accessible and a xilinx probe attached to the board for which you are generating an ace file.
Quoted 2 lines
xmd -tcl genace.tcl -jprog -target
ppc_hw-hw <bit file name> -elf <elffile name> -board <ml405 or ml507> -ace <desired ace file name>
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Peter Mendham
Sent: Tuesday, June 24, 2008 3:02 AM
To: [email protected]
Subject: Linux on Virtex board with ARCH=powerpcDear all,
I'm trying to boot a 2.6.26-rc6 kernel on a custom Virtex 4 board. I have used the Xilinx utility to generate a device tree and now want to generate an image for throwing onto CF for use with a SystemACE (just like on the the ML3/4xx boards). I don't want to use a bootloader (I don't really need one). I saw something on this list about simpleImage,
"simple" sounded good to me so I thought I'd try that (or did I misinterpret what this is for?). I also don't want the image to be too big, I always used to use a zImage under ARCH=ppc. So, two questions, which hopefully are easy ones:
1. I did what Grant said in a post to this list about simpleImage, and dumped my dts intoarch/powerpc/boot/dtsand I called itsystem.dts(fornow). I then tried to do make simpleImage.system which ran right through to final link then moaned about a missing simpleboot-system. Where is this supposed to come from? What am I doing wrong? I naively tried copying simpleboot.o to simpleboot-system.o and the error went away. Hmm.
2. I need an ELF to give to my SystemACE file generator. This used to pop up inarch/ppc/boot/imagesand be called zImage.elf, which made sense to me. What's the deal now with powerpc? What should I be using?
Finally, can anyone give me a heads-up on any gotchas with what I'm trying to do. As you can tell, I don't entirely know what I'm doing, soany pointers would be gratefully received.
Thanks,
-- PeterThe University of Dundee is a Scottish Registered Charity, No. SC015096.
Quoted 10 lines
_______________________________________________
Linuxppc-embedded mailing list
[email protected]
https://ozlabs.org/mailman/listinfo/linuxppc-embeddedThis email and any attachments are intended for the sole use of the named recipient(s) and contain(s) confidential information that may be proprietary, privileged or copyrighted under applicable law. If you are not the intended recipient, do not read, copy, or forward this email message or any attachments. Delete this email message and any attachments immediately.
The University of Dundee is a Scottish Registered Charity, No. SC015096.
Sounds like the bootstrap loader has loaded the kernel and passed off execution to it, but there's no console working on the kernel.
You can confirm that since you have a probe as you can dump the __log_buf by getting the address of it using objdump on the elf image. It's a pain to convert to readable form, but can help to see that things are indeed running. Stop the processor, then do the memory read command, mrd, in xmd. =
For the console to work with UART Lite, CONFIG_OF must be on in the kernel configuration, I would check that.
The file, arch/powerpc/boot/virtex.c, has the startup code for the virtex specific processing. It checks to make sure there is compatible hardware based on the device tree. If your device tree doesn't match that hardware you could have a problem. I have not found the powerup of the kernel to be very informative if the device tree is wrong.
I pasted in our ML405 device tree below to allow you to compare to it.
Hope that helps,
John
/*
* (C) Copyright 2007 Michal Simek
*
* Michal SIMEK <[email protected]>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of
* the License, or (at your option) any later version. *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*
* CAUTION: This file is automatically generated by libgen.
* Version: Xilinx EDK 10.1.1 EDK_K_SP1.1
*/
/ {
#address-cells =3D <1>;
#size-cells =3D <1>;
compatible =3D "xlnx,virtex";
model =3D "testing";
DDR_SDRAM: memory@0 {
device_type =3D "memory";
reg =3D < 0 8000000 >;
} ;
chosen {
bootargs =3D "console=3DttyS0 ip=3Don root=3D/dev/ram";
linux,stdout-path =3D "/plb@0/serial@83e00000";
} ;
cpus {
#address-cells =3D <1>;
#cpus =3D <1>;
#size-cells =3D <0>;
ppc405_0: cpu@0 {
clock-frequency =3D <11e1a300>;
compatible =3D "PowerPC,405", "ibm,ppc405";
d-cache-line-size =3D <20>;
d-cache-size =3D <4000>;
device_type =3D "cpu";
i-cache-line-size =3D <20>;
i-cache-size =3D <4000>;
model =3D "PowerPC,405";
reg =3D <0>;
timebase-frequency =3D <11e1a300>;
xlnx,apu-control =3D <de00>;
xlnx,apu-udi-1 =3D <a18983>;
xlnx,apu-udi-2 =3D <a38983>;
xlnx,apu-udi-3 =3D <a589c3>;
xlnx,apu-udi-4 =3D <a789c3>;
xlnx,apu-udi-5 =3D <a98c03>;
xlnx,apu-udi-6 =3D <ab8c03>;
xlnx,apu-udi-7 =3D <ad8c43>;
xlnx,apu-udi-8 =3D <af8c43>;
xlnx,deterministic-mult =3D <0>;
xlnx,disable-operand-forwarding =3D <1>;
xlnx,fastest-plb-clock =3D "DPLB0";
xlnx,generate-plb-timespecs =3D <1>;
xlnx,mmu-enable =3D <1>;
xlnx,pvr-high =3D <0>;
xlnx,pvr-low =3D <0>;
} ;
} ;
plb: plb@0 {
#address-cells =3D <1>;
#size-cells =3D <1>;
compatible =3D "xlnx,plb-v46-1.02.a";
ranges ;
IIC_EEPROM: i2c@81600000 {
compatible =3D "xlnx,xps-iic-2.00.a";
interrupt-parent =3D <&xps_intc_0>;
interrupts =3D < 4 2 >;
reg =3D < 81600000 10000 >;
xlnx,clk-freq =3D <5f5e100>;
xlnx,family =3D "virtex4";
xlnx,gpo-width =3D <1>;
xlnx,iic-freq =3D <186a0>;
xlnx,scl-inertial-delay =3D <0>;
xlnx,sda-inertial-delay =3D <0>;
xlnx,ten-bit-adr =3D <0>;
} ;
LEDs_4Bit: gpio@81400000 {
compatible =3D "xlnx,xps-gpio-1.00.a";
interrupt-parent =3D <&xps_intc_0>;
interrupts =3D < 5 2 >;
reg =3D < 81400000 10000 >;
xlnx,all-inputs =3D <0>;
xlnx,all-inputs-2 =3D <0>;
xlnx,dout-default =3D <0>;
xlnx,dout-default-2 =3D <0>;
xlnx,family =3D "virtex4";
xlnx,gpio-width =3D <4>;
xlnx,interrupt-present =3D <1>;
xlnx,is-bidir =3D <1>;
xlnx,is-bidir-2 =3D <1>;
xlnx,is-dual =3D <0>;
xlnx,tri-default =3D <ffffffff>;
xlnx,tri-default-2 =3D <ffffffff>;
} ;
RS232_Uart: serial@83e00000 {
compatible =3D "ns16550";
device_type =3D "serial";
interrupt-parent =3D <&xps_intc_0>;
interrupts =3D < 6 2 >;
reg =3D < 83e00000 10000 >;
reg-offset =3D <3>;
reg-shift =3D <2>; =
clock-frequency =3D <05f5e100>;
xlnx,family =3D "virtex4";
xlnx,has-external-rclk =3D <0>;
xlnx,has-external-xin =3D <0>;
xlnx,is-a-16550 =3D <1>;
} ;
SysACE_CompactFlash: sysace@83600000 {
compatible =3D "xlnx,xps-sysace-1.00.a";
interrupt-parent =3D <&xps_intc_0>;
interrupts =3D < 3 2 >;
reg =3D < 83600000 10000 >;
xlnx,family =3D "virtex4";
xlnx,mem-width =3D <10>;
} ;
TriMode_MAC_GMII: xps-ll-temac@81c00000 {
#address-cells =3D <1>;
#size-cells =3D <1>;
compatible =3D "xlnx,compound";
ethernet@81c00000 {
compatible =3D "xlnx,xps-ll-temac-1.01.a";
device_type =3D "network";
interrupt-parent =3D <&xps_intc_0>;
interrupts =3D < 2 2 >;
llink-connected =3D <&PIM2>;
local-mac-address =3D [ 02 00 00 00 00 01
];
reg =3D < 81c00000 40 >;
xlnx,bus2core-clk-ratio =3D <1>;
xlnx,phy-type =3D <1>;
xlnx,phyaddr =3D <1>;
xlnx,rxcsum =3D <0>;
xlnx,rxfifo =3D <1000>;
xlnx,temac-type =3D <1>;
xlnx,txcsum =3D <0>;
xlnx,txfifo =3D <1000>;
} ;
} ;
mpmc@0 {
#address-cells =3D <1>;
#size-cells =3D <1>;
compatible =3D "xlnx,mpmc-4.00.a";
PIM2: sdma@84600100 {
compatible =3D "xlnx,ll-dma-1.00.a";
interrupt-parent =3D <&xps_intc_0>;
interrupts =3D < 1 2 0 2 >;
reg =3D < 84600100 80 >;
} ;
} ;
xps_bram_if_cntlr_1: xps-bram-if-cntlr@ffffe000 {
compatible =3D "xlnx,xps-bram-if-cntlr-1.00.a";
reg =3D < ffffe000 2000 >;
xlnx,family =3D "virtex4";
} ;
xps_intc_0: interrupt-controller@81800000 {
#interrupt-cells =3D <2>;
compatible =3D "xlnx,xps-intc-1.00.a";
interrupt-controller ;
reg =3D < 81800000 10000 >;
xlnx,num-intr-inputs =3D <7>;
} ;
} ;
ppc405_0_dplb1: plb@1 {
#address-cells =3D <1>;
#size-cells =3D <1>;
compatible =3D "xlnx,plb-v46-1.02.a";
ranges ;
} ;
} ;-----Original Message-----
From: Peter Mendham [mailto:[email protected]]
Sent: Tuesday, June 24, 2008 1:21 PM
To: John Linn
Cc: [email protected]
Subject: Re: Linux on Virtex board with ARCH=3Dpowerpc
Hi John,
Thanks for your reply, that's really helpful. I'm actually using the =
mainline kernel, rather than the one from the xilinx git tree, but your =
information has really moved me on. My first problem was that the =
Xilinx utility (from the git tree) for device tree dts generation didn't
insert a "linux,stdout-path" node under "chosen". I spotted that the =
ml403 example had this, so after adding it I got early console =
messages. Everything now grinds to a halt after I get the message "flat
tree at 0x40ad60" which is just before it calls the kernel, so I assume =
it's that call that is killing it. I have "console=3DttyUL0" for my =
uartlite, so I should be getting messages, shouldn't I? Do you know =
where the next execution point is? Maybe I could find out where it's =
getting stuck.
I haven't managed to generate an ACE file, I'm just loading the kernel =
image from xmd ATM, genace won't play ball for me, it complains about =
-board user not being valid, it won't even run on the examples copied =
directly from the user manual. Anyway, I think genace is a bit OT, and =
I can manage with xmd for now.
Thanks,
-- Peter
Quoted 3 lines · John Linn
Hi Peter,
I'm not up on what can be done with the simple image you refer to in
1.
Quoted 3 lines
I'm sure I should be, but there's a lot to learn.
With regards to 2, the elf image, zImage (without the elf extension),
is
Quoted 6 lines
located in
arch/powerpc/boot.You can make a SystemACE file from that elf image just as you did in
arch/ppc. We have a default device tree file,ml405.dts, in thearch/powerpc/boot/dtsdirectory for our ml405 board. The kernel configuration has a config,DEVICE_TREE, that specifies the name of
the
Quoted 5 lines
device tree file. I normally compile the device tree into the kernel which is the default build, make ARCH=3Dpowerpc zImage. That image does not require a boot loader.
I inserted the text below from a document that I have about building
the
Quoted 9 lines
arch/ppcandarch/powerpckernels.Hope that helps,
JohnNotation
The phrase "<ppc or powerpc>" is used throughput the text and means
that
Quoted 8 lines
one or the other, "ppc" or "powerpc" is to be typed depending on the architecture you are building.
Commands that are used in a bash shell are preceded by ">".
Getting Ready To Build the Kernel
This assumes you installed the ELDK tools and assumes you'll be using
a
Quoted 9 lines
bash shell.
=
Quoted 3 lines
bash
export CROSS_COMPILE=3Dppc_4xx-=
Quoted 5 lines
Setting Up the Kernel Tree
If you have previously built this kernel for another architecture, ppc or powerpc, then the tree needs to be setup correctly for the new architecture. Assuming you have not previously built it, this does
not
Quoted 11 lines
need to be done.
=
Quoted 2 lines
make ARCH=3D<ppc or powerpc> mrproper
=Configuring the Kernel
The kernel should be configured to run on the ML405 or ML507 board
from
Quoted 15 lines
Xilinx. =
==
Quoted 2 lines
make ARCH=3D<ppc or powerpc>
ml405_defconfig=or =
=
Quoted 8 lines
Quoted 2 lines
make ARCH=3D<ppc or powerpc>
ml507_defconfig=Building the Kernel
The following command will build the Linux kernel assuming you are in the root directory of the kernel. The root directory of the kernel
from
Quoted 3 lines
the Xilinx Git tree is linux-2.6-xlnx. An elf file, zImage.elf, is created in the
arch/ppc/boot/imagesdirectory for ppc architecture. An elf file, zImage, is created in the thearch/powerpc/bootdirectory
for
Quoted 15 lines
the powerpc architecture.
=
Quoted 2 lines
make ARCH=3D<ppc or powerpc> zImage
==Building the Kernel With Ramdisk
A ram disk image, a file named *.gz, must be placed into the
arch/ppc/boot/imagesorarch/powerpc/bootdirectory, depending on the architecture, prior to building the kernel.
Quoted 8 lines
=
Quoted 2 lines
make ARCH=3D<ppc or powerpc> zImage.initrd
=An elf file, zImage.initrd.elf, is created in
arch/ppc/boot/imagesdirectory for the ppc architecture. An elf file file, zImage.initrd,
is
Quoted 5 lines
created in
arch/powerpc/bootdirectory for the powerpc architecture.Generating An Ace File
The elf file generated for the kernel and the bit stream can be
combined
Quoted 7 lines
to create an ACE file for compact flash. The following assumes a bash shell where XMD is accessible and a xilinx probe attached to the board for which you are generating an ace file.
=
Quoted 1 line
xmd -tcl genace.tcl -jprog -target
ppc_hw-hw <bit file name> -elf
<elf
Quoted 16 lines
Quoted 1 line
=file name> -board <ml405 or ml507> -ace <desired ace file name>
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Peter Mendham
Sent: Tuesday, June 24, 2008 3:02 AM
To: [email protected]
Subject: Linux on Virtex board with ARCH=3DpowerpcDear all,
I'm trying to boot a 2.6.26-rc6 kernel on a custom Virtex 4 board. I =
Quoted 7 lines
have used the Xilinx utility to generate a device tree and now want to
generate an image for throwing onto CF for use with a SystemACE (just =
like on the the ML3/4xx boards). I don't want to use a bootloader (I =
don't really need one). I saw something on this list about
simpleImage,
Quoted 4 lines
"simple" sounded good to me so I thought I'd try that (or did I =
misinterpret what this is for?). I also don't want the image to be
too =
Quoted 6 lines
big, I always used to use a zImage under ARCH=3Dppc. So, two questions, =
which hopefully are easy ones:
1. I did what Grant said in a post to this list about simpleImage, anddumped my dts into
arch/powerpc/boot/dtsand I called itsystem.dts
(for
Quoted 6 lines
now). I then tried to do make simpleImage.system which ran right =
through to final link then moaned about a missing simpleboot-system. =
Where is this supposed to come from? What am I doing wrong? I
naively =
Quoted 8 lines
tried copying simpleboot.o to simpleboot-system.o and the error went =
away. Hmm.
2. I need an ELF to give to my SystemACE file generator. This used topop up in
arch/ppc/boot/imagesand be called zImage.elf, which made =sense to me. What's the deal now with powerpc? What should I be
using?
Quoted 3 lines
Finally, can anyone give me a heads-up on any gotchas with what I'm =
trying to do. As you can tell, I don't entirely know what I'm doing,
so
Quoted 8 lines
any pointers would be gratefully received.
Thanks,
-- PeterThe University of Dundee is a Scottish Registered Charity, No.
SC015096.
Quoted 9 lines
_______________________________________________
Linuxppc-embedded mailing list
[email protected]
https://ozlabs.org/mailman/listinfo/linuxppc-embeddedThis email and any attachments are intended for the sole use of the
named recipient(s) and contain(s) confidential information that may be proprietary, privileged or copyrighted under applicable law. If you are not the intended recipient, do not read, copy, or forward this email message or any attachments. Delete this email message and any attachments immediately.
Quoted 3 lines
=
The University of Dundee is a Scottish Registered Charity, No. SC015096.
This email and any attachments are intended for the sole use of the named r= ecipient(s) and contain(s) confidential information that may be proprietary= , privileged or copyrighted under applicable law. If you are not the intend= ed recipient, do not read, copy, or forward this email message or any attac= hments. Delete this email message and any attachments immediately.
Quoted 4 lines
-----Original Message-----
From: [email protected]
[mailto:linuxppc-embedded-
Quoted 1 line
[email protected]] On Behalf Of Peter
Mendham
Quoted 11 lines
Sent: Tuesday, June 24, 2008 12:21 PM
To: John Linn
Cc: [email protected]
Subject: Re: Linux on Virtex board with ARCH=3Dpowerpc =Hi John,
=Thanks for your reply, that's really helpful. I'm actually using the mainline kernel, rather than the one from the xilinx git tree, but
your
Quoted 2 lines
information has really moved me on. My first problem was that the Xilinx utility (from the git tree) for device tree dts generation
didn't
Quoted 3 lines
insert a "linux,stdout-path" node under "chosen". I spotted that the ml403 example had this, so after adding it I got early console messages. Everything now grinds to a halt after I get the message
"flat
Quoted 1 line
tree at
0x40ad60" which is just before it calls the kernel, so I
assume
Quoted 4 lines
it's that call that is killing it. I have "console=3DttyUL0" for my uartlite, so I should be getting messages, shouldn't I? Do you know where the next execution point is? Maybe I could find out where it's getting stuck.
It's time to look at __log_buf, most likely.
=
Quoted 4 lines
I haven't managed to generate an ACE file, I'm just loading the kernel image from xmd ATM, genace won't play ball for me, it complains about -board user not being valid, it won't even run on the examples copied directly from the user manual. Anyway, I think genace is a bit OT,
and
Quoted 1 line
I can manage with xmd for now.
This is fixed in EDK 10.1 SP2, I believe.
Quoted 10 lines
=
Thanks,
-- Peter
=Quoted 3 lines · John Linn
Hi Peter,
I'm not up on what can be done with the simple image you refer to in
1.
Quoted 3 lines
Quoted 3 lines
I'm sure I should be, but there's a lot to learn.
With regards to 2, the elf image, zImage (without the elf
extension), is
Quoted 6 lines
Quoted 6 lines
located in
arch/powerpc/boot.You can make a SystemACE file from that elf image just as you did in
arch/ppc. We have a default device tree file,ml405.dts, in thearch/powerpc/boot/dtsdirectory for our ml405 board. The kernel configuration has a config,DEVICE_TREE, that specifies the name of
the
Quoted 2 lines
Quoted 2 lines
device tree file. I normally compile the device tree into the kernel which is the default build, make ARCH=3Dpowerpc zImage. That image
does
Quoted 3 lines
Quoted 3 lines
not require a boot loader.
I inserted the text below from a document that I have about building
the
Quoted 9 lines
Quoted 9 lines
arch/ppcandarch/powerpckernels.Hope that helps,
JohnNotation
The phrase "<ppc or powerpc>" is used throughput the text and means
that
Quoted 8 lines
Quoted 8 lines
one or the other, "ppc" or "powerpc" is to be typed depending on the architecture you are building.
Commands that are used in a bash shell are preceded by ">".
Getting Ready To Build the Kernel
This assumes you installed the ELDK tools and assumes you'll be
using a
Quoted 10 lines
Quoted 10 lines
bash shell.
Quoted 3 lines
bash
export CROSS_COMPILE=3Dppc_4xx-Setting Up the Kernel Tree
If you have previously built this kernel for another architecture,
ppc
Quoted 2 lines
Quoted 2 lines
or powerpc, then the tree needs to be setup correctly for the new architecture. Assuming you have not previously built it, this does
not
Quoted 9 lines
Quoted 9 lines
need to be done.
Quoted 2 lines
make ARCH=3D<ppc or powerpc> mrproper
Configuring the Kernel
The kernel should be configured to run on the ML405 or ML507 board
from
Quoted 9 lines
Quoted 9 lines
Xilinx.
Quoted 2 lines
make ARCH=3D<ppc or powerpc>
ml405_defconfigor
Quoted 6 lines
Quoted 6 lines
Quoted 2 lines
make ARCH=3D<ppc or powerpc>
ml507_defconfigBuilding the Kernel
The following command will build the Linux kernel assuming you are
in
Quoted 1 line
Quoted 1 line
the root directory of the kernel. The root directory of the kernel
from
Quoted 2 lines
Quoted 2 lines
the Xilinx Git tree is linux-2.6-xlnx. An elf file, zImage.elf, is created in the
arch/ppc/boot/imagesdirectory for ppc architecture.
An
Quoted 1 line
Quoted 1 line
elf file, zImage, is created in the the
arch/powerpc/bootdirectory
for
Quoted 10 lines
Quoted 10 lines
the powerpc architecture.
Quoted 2 lines
make ARCH=3D<ppc or powerpc> zImage
Building the Kernel With Ramdisk
A ram disk image, a file named *.gz, must be placed into the
arch/ppc/boot/imagesorarch/powerpc/bootdirectory, depending on
the
Quoted 8 lines
Quoted 8 lines
architecture, prior to building the kernel.
Quoted 2 lines
make ARCH=3D<ppc or powerpc> zImage.initrd
An elf file, zImage.initrd.elf, is created in
arch/ppc/boot/imagesdirectory for the ppc architecture. An elf file file, zImage.initrd,
is
Quoted 5 lines
Quoted 5 lines
created in
arch/powerpc/bootdirectory for the powerpc architecture.Generating An Ace File
The elf file generated for the kernel and the bit stream can be
combined
Quoted 1 line
Quoted 1 line
to create an ACE file for compact flash. The following assumes a
bash
Quoted 1 line
Quoted 1 line
shell where XMD is accessible and a xilinx probe attached to the
board
Quoted 4 lines
Quoted 4 lines
for which you are generating an ace file.
Quoted 1 line
xmd -tcl genace.tcl -jprog -target
ppc_hw-hw <bit file name> -elf
<elf
Quoted 6 lines
Quoted 6 lines
Quoted 1 line
file name> -board <ml405 or ml507> -ace <desired ace file name>
-----Original Message-----
From: [email protected] [mailto:[email protected]]
On
Quoted 8 lines
Quoted 8 lines
Behalf Of Peter Mendham
Sent: Tuesday, June 24, 2008 3:02 AM
To: [email protected]
Subject: Linux on Virtex board with ARCH=3DpowerpcDear all,
I'm trying to boot a 2.6.26-rc6 kernel on a custom Virtex 4 board.
I
Quoted 1 line
Quoted 1 line
have used the Xilinx utility to generate a device tree and now want
to
Quoted 1 line
Quoted 1 line
generate an image for throwing onto CF for use with a SystemACE
(just
Quoted 1 line
Quoted 1 line
like on the the ML3/4xx boards). I don't want to use a bootloader
(I
Quoted 1 line
Quoted 1 line
don't really need one). I saw something on this list about
simpleImage,
Quoted 3 lines
Quoted 3 lines
"simple" sounded good to me so I thought I'd try that (or did I misinterpret what this is for?). I also don't want the image to be
too
Quoted 1 line
Quoted 1 line
big, I always used to use a zImage under ARCH=3Dppc. So, two
questions,
Quoted 2 lines
Quoted 2 lines
which hopefully are easy ones:
1. I did what Grant said in a post to this list about simpleImage,
and
Quoted 1 line
Quoted 1 line
dumped my dts into
arch/powerpc/boot/dtsand I called itsystem.dts
(for
Quoted 4 lines
Quoted 4 lines
now). I then tried to do make simpleImage.system which ran right through to final link then moaned about a missing simpleboot-system. Where is this supposed to come from? What am I doing wrong? I
naively
Quoted 3 lines
Quoted 3 lines
tried copying simpleboot.o to simpleboot-system.o and the error went away. Hmm.
2. I need an ELF to give to my SystemACE file generator. This used
to
Quoted 2 lines
Quoted 2 lines
pop up in
arch/ppc/boot/imagesand be called zImage.elf, which made sense to me. What's the deal now with powerpc? What should I be
using?
Quoted 2 lines
Quoted 2 lines
Finally, can anyone give me a heads-up on any gotchas with what I'm trying to do. As you can tell, I don't entirely know what I'm
doing, so
Quoted 8 lines
Quoted 8 lines
any pointers would be gratefully received.
Thanks,
-- PeterThe University of Dundee is a Scottish Registered Charity, No.
SC015096.
Quoted 9 lines
Quoted 9 lines
_______________________________________________
Linuxppc-embedded mailing list
[email protected]
https://ozlabs.org/mailman/listinfo/linuxppc-embeddedThis email and any attachments are intended for the sole use of the
named recipient(s) and
Quoted 1 line
contain(s) confidential information that may be proprietary,
privileged or copyrighted under
Quoted 1 line
applicable law. If you are not the intended recipient, do not read,
copy, or forward this email
Quoted 1 line
message or any attachments. Delete this email message and any
attachments immediately.
Quoted 8 lines
Quoted 3 lines
=
=
The University of Dundee is a Scottish Registered Charity, No.
SC015096.
Quoted 8 lines
=
=
_______________________________________________
Linuxppc-embedded mailing list
[email protected]
https://ozlabs.org/mailman/listinfo/linuxppc-embedded
This email and any attachments are intended for the sole use of the named r= ecipient(s) and contain(s) confidential information that may be proprietary= , privileged or copyrighted under applicable law. If you are not the intend= ed recipient, do not read, copy, or forward this email message or any attac= hments. Delete this email message and any attachments immediately.
OK, this is all new to me, so please bear with me if I've made a major mistake. I ran the kernel until it didn't give me anymore output and then told xmd to "stop", mrd from any location gave me exactly the same 32-bit word of garbage. I then reset the processor and mrd would give me what looked like reasonable values. I found the __log_buf symbol in the System.map file (0xc024a108) and tried mrd on what I assume is the corresponding physical address of 0x0024a108. I get the following:
<6>Using Xilinx Virtex machine description
<5>Linux version 2.6.26-rc6 (peter@eris) (gcc version 4.2.4) #9 PREEMPT Wed Jun 25 16:27:33 BST 2008 <7>Entering add_active_range(0, 0, 131072) 0 entries of 256 used
<7>Top of RAM: 0x20000000, Total RAM: 0x20000000
<7>Memory hole size: 0MB
<4>Zone PFN ranges:
<4> DMA 0 -> 131072 <4> Normal 131072 -> 131072
<4>Movable zone start PFN for each node
<4>early_node_map[1] active PFN ranges
<4> 0: 0 -> 131072
<7>On node 0 totalpages: 131072
<7> DMA zone: 1024 pages used for memmap <7> DMA zone: 0 pages reserved <7> DMA zone: 130048 pages, LIFO batch:31 <7> Normal zone: 0 pages used for memmap <7> Movable zone: 0 pages used for memmap
<4>Built 1 zonelists in Zone order, mobility grouping on. Total pages: 130048 <5>Kernel command line: console=ttyUL0 root=/dev/xsa2 rw <6>Xilinx intc at 0xFDFFF000C025CFFC mapped to 0x0000025d
<4>PID hash table entries: 2048 (order: 11, 8192 bytes)
xmd tells me that the processor stopped at 0xc000fe50, and subsequent "con" and "stop" sequences do no move this on (it reports the same each time). Below is a choice excerpt of my System.map:
c000fdc4 t src_errorc000fddc t dst_errorc000fdf4 T __div64_32c000fe94 T cacheable_memzeroc000ff38 T memset
So I guess that means it's in __div64_32?
Any ideas?
Thanks in advance,
-- Peter
Quoted 469 lines · John Linn
Sounds like the bootstrap loader has loaded the kernel and passed off execution to it, but there's no console working on the kernel.
You can confirm that since you have a probe as you can dump the
__log_bufby getting the address of it using objdump on the elf image. It's a pain to convert to readable form, but can help to see that things are indeed running. Stop the processor, then do the memory read command, mrd, in xmd.For the console to work with UART Lite,
CONFIG_OFmust be on in the kernel configuration, I would check that.The file,
arch/powerpc/boot/virtex.c, has the startup code for the virtex specific processing. It checks to make sure there is compatible hardware based on the device tree. If your device tree doesn't match that hardware you could have a problem. I have not found the powerup of the kernel to be very informative if the device tree is wrong.I pasted in our ML405 device tree below to allow you to compare to it.
Hope that helps,
John/*
* (C) Copyright 2007 Michal Simek
*
* Michal SIMEK <[email protected]>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of
* the License, or (at your option) any later version. ** This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*
* CAUTION: This file is automatically generated by libgen.
* Version: Xilinx EDK 10.1.1 EDK_K_SP1.1
*// { #address-cells = <1>; #size-cells = <1>; compatible = "xlnx,virtex"; model = "testing"; DDR_SDRAM: memory@0 { device_type = "memory"; reg = < 0 8000000 >; } ; chosen { bootargs = "console=ttyS0 ip=on root=/dev/ram"; linux,stdout-path = "/plb@0/serial@83e00000"; } ; cpus { #address-cells = <1>; #cpus = <1>; #size-cells = <0>; ppc405_0: cpu@0 { clock-frequency = <11e1a300>; compatible = "PowerPC,405", "ibm,ppc405"; d-cache-line-size = <20>; d-cache-size = <4000>; device_type = "cpu"; i-cache-line-size = <20>; i-cache-size = <4000>; model = "PowerPC,405"; reg = <0>; timebase-frequency = <11e1a300>; xlnx,apu-control = <de00>; xlnx,apu-udi-1 = <a18983>; xlnx,apu-udi-2 = <a38983>; xlnx,apu-udi-3 = <a589c3>; xlnx,apu-udi-4 = <a789c3>; xlnx,apu-udi-5 = <a98c03>; xlnx,apu-udi-6 = <ab8c03>; xlnx,apu-udi-7 = <ad8c43>; xlnx,apu-udi-8 = <af8c43>; xlnx,deterministic-mult = <0>; xlnx,disable-operand-forwarding = <1>; xlnx,fastest-plb-clock = "DPLB0"; xlnx,generate-plb-timespecs = <1>; xlnx,mmu-enable = <1>; xlnx,pvr-high = <0>; xlnx,pvr-low = <0>; } ; } ; plb: plb@0 { #address-cells = <1>; #size-cells = <1>; compatible = "xlnx,plb-v46-1.02.a"; ranges ; IIC_EEPROM: i2c@81600000 { compatible = "xlnx,xps-iic-2.00.a"; interrupt-parent = <&xps_intc_0>; interrupts = < 4 2 >; reg = < 81600000 10000 >; xlnx,clk-freq = <5f5e100>; xlnx,family = "virtex4"; xlnx,gpo-width = <1>; xlnx,iic-freq = <186a0>; xlnx,scl-inertial-delay = <0>; xlnx,sda-inertial-delay = <0>; xlnx,ten-bit-adr = <0>; } ; LEDs_4Bit: gpio@81400000 { compatible = "xlnx,xps-gpio-1.00.a"; interrupt-parent = <&xps_intc_0>; interrupts = < 5 2 >; reg = < 81400000 10000 >; xlnx,all-inputs = <0>; xlnx,all-inputs-2 = <0>; xlnx,dout-default = <0>; xlnx,dout-default-2 = <0>; xlnx,family = "virtex4"; xlnx,gpio-width = <4>; xlnx,interrupt-present = <1>; xlnx,is-bidir = <1>; xlnx,is-bidir-2 = <1>; xlnx,is-dual = <0>; xlnx,tri-default = <ffffffff>; xlnx,tri-default-2 = <ffffffff>; } ; RS232_Uart: serial@83e00000 { compatible = "ns16550"; device_type = "serial"; interrupt-parent = <&xps_intc_0>; interrupts = < 6 2 >; reg = < 83e00000 10000 >; reg-offset = <3>; reg-shift = <2>; clock-frequency = <05f5e100>; xlnx,family = "virtex4"; xlnx,has-external-rclk = <0>; xlnx,has-external-xin = <0>; xlnx,is-a-16550 = <1>; } ; SysACE_CompactFlash: sysace@83600000 { compatible = "xlnx,xps-sysace-1.00.a"; interrupt-parent = <&xps_intc_0>; interrupts = < 3 2 >; reg = < 83600000 10000 >; xlnx,family = "virtex4"; xlnx,mem-width = <10>; } ; TriMode_MAC_GMII: xps-ll-temac@81c00000 { #address-cells = <1>; #size-cells = <1>; compatible = "xlnx,compound"; ethernet@81c00000 { compatible = "xlnx,xps-ll-temac-1.01.a"; device_type = "network"; interrupt-parent = <&xps_intc_0>; interrupts = < 2 2 >; llink-connected = <&PIM2>; local-mac-address = [ 02 00 00 00 00 01 ]; reg = < 81c00000 40 >; xlnx,bus2core-clk-ratio = <1>; xlnx,phy-type = <1>; xlnx,phyaddr = <1>; xlnx,rxcsum = <0>; xlnx,rxfifo = <1000>; xlnx,temac-type = <1>; xlnx,txcsum = <0>; xlnx,txfifo = <1000>; } ; } ; mpmc@0 { #address-cells = <1>; #size-cells = <1>; compatible = "xlnx,mpmc-4.00.a"; PIM2: sdma@84600100 { compatible = "xlnx,ll-dma-1.00.a"; interrupt-parent = <&xps_intc_0>; interrupts = < 1 2 0 2 >; reg = < 84600100 80 >; } ; } ; xps_bram_if_cntlr_1: xps-bram-if-cntlr@ffffe000 { compatible = "xlnx,xps-bram-if-cntlr-1.00.a"; reg = < ffffe000 2000 >; xlnx,family = "virtex4"; } ; xps_intc_0: interrupt-controller@81800000 { #interrupt-cells = <2>; compatible = "xlnx,xps-intc-1.00.a"; interrupt-controller ; reg = < 81800000 10000 >; xlnx,num-intr-inputs = <7>; } ; } ; ppc405_0_dplb1: plb@1 { #address-cells = <1>; #size-cells = <1>; compatible = "xlnx,plb-v46-1.02.a"; ranges ; } ; } ;-----Original Message-----
From: Peter Mendham [mailto:[email protected]] Sent: Tuesday, June 24, 2008 1:21 PM
To: John Linn
Cc: [email protected]
Subject: Re: Linux on Virtex board with ARCH=powerpcHi John,
Thanks for your reply, that's really helpful. I'm actually using the mainline kernel, rather than the one from the xilinx git tree, but your information has really moved me on. My first problem was that the Xilinx utility (from the git tree) for device tree dts generation didn't
insert a "linux,stdout-path" node under "chosen". I spotted that the ml403 example had this, so after adding it I got early console messages. Everything now grinds to a halt after I get the message "flat
tree at
0x40ad60" which is just before it calls the kernel, so I assume it's that call that is killing it. I have "console=ttyUL0" for my uartlite, so I should be getting messages, shouldn't I? Do you know where the next execution point is? Maybe I could find out where it's getting stuck.I haven't managed to generate an ACE file, I'm just loading the kernel image from xmd ATM, genace won't play ball for me, it complains about -board user not being valid, it won't even run on the examples copied
directly from the user manual. Anyway, I think genace is a bit OT, and I can manage with xmd for now.Thanks,
-- PeterQuoted 4 lines · John Linn
Hi Peter,
I'm not up on what can be done with the simple image you refer to in
1.
Quoted 4 lines
I'm sure I should be, but there's a lot to learn.
With regards to 2, the elf image, zImage (without the elf extension),
is
Quoted 7 lines
located in
arch/powerpc/boot.You can make a SystemACE file from that elf image just as you did in
arch/ppc. We have a default device tree file,ml405.dts, in thearch/powerpc/boot/dtsdirectory for our ml405 board. The kernel configuration has a config,DEVICE_TREE, that specifies the name ofthe
Quoted 6 lines
device tree file. I normally compile the device tree into the kernel which is the default build, make ARCH=powerpc zImage. That image does not require a boot loader.
I inserted the text below from a document that I have about building
the
Quoted 10 lines
arch/ppcandarch/powerpckernels.Hope that helps,
JohnNotation
The phrase "<ppc or powerpc>" is used throughput the text and means
that
Quoted 9 lines
one or the other, "ppc" or "powerpc" is to be typed depending on the architecture you are building.
Commands that are used in a bash shell are preceded by ">".
Getting Ready To Build the Kernel
This assumes you installed the ELDK tools and assumes you'll be using
a
Quoted 8 lines
bash shell.
Quoted 4 lines
bash
export CROSS_COMPILE=ppc_4xx-Quoted 6 lines
Setting Up the Kernel Tree
If you have previously built this kernel for another architecture, ppc or powerpc, then the tree needs to be setup correctly for the new architecture. Assuming you have not previously built it, this does
not
Quoted 11 lines
need to be done.
Quoted 3 lines
make ARCH=<ppc or powerpc> mrproper
Configuring the Kernel
The kernel should be configured to run on the ML405 or ML507 board
from
Quoted 11 lines
Xilinx.
Quoted 3 lines
make ARCH=<ppc or powerpc>
ml405_defconfigor
Quoted 8 lines
Quoted 3 lines
make ARCH=<ppc or powerpc>
ml507_defconfigBuilding the Kernel
The following command will build the Linux kernel assuming you are in the root directory of the kernel. The root directory of the kernel
from
Quoted 4 lines
the Xilinx Git tree is linux-2.6-xlnx. An elf file, zImage.elf, is created in the
arch/ppc/boot/imagesdirectory for ppc architecture. An elf file, zImage, is created in the thearch/powerpc/bootdirectoryfor
Quoted 16 lines
the powerpc architecture.
Quoted 3 lines
make ARCH=<ppc or powerpc> zImage
Building the Kernel With Ramdisk
A ram disk image, a file named *.gz, must be placed into the
arch/ppc/boot/imagesorarch/powerpc/bootdirectory, depending on the architecture, prior to building the kernel.Quoted 6 lines
Quoted 3 lines
make ARCH=<ppc or powerpc> zImage.initrd
An elf file, zImage.initrd.elf, is created in
arch/ppc/boot/imagesdirectory for the ppc architecture. An elf file file, zImage.initrd,is
Quoted 6 lines
created in
arch/powerpc/bootdirectory for the powerpc architecture.Generating An Ace File
The elf file generated for the kernel and the bit stream can be
combined
Quoted 8 lines
to create an ACE file for compact flash. The following assumes a bash shell where XMD is accessible and a xilinx probe attached to the board for which you are generating an ace file.
Quoted 2 lines
xmd -tcl genace.tcl -jprog -target
ppc_hw-hw <bit file name> -elf<elf
Quoted 12 lines
Quoted 2 lines
file name> -board <ml405 or ml507> -ace <desired ace file name>
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Peter Mendham
Sent: Tuesday, June 24, 2008 3:02 AM
To: [email protected]
Subject: Linux on Virtex board with ARCH=powerpcQuoted 8 lines
Dear all,
I'm trying to boot a 2.6.26-rc6 kernel on a custom Virtex 4 board. I have used the Xilinx utility to generate a device tree and now want to
generate an image for throwing onto CF for use with a SystemACE (just like on the the ML3/4xx boards). I don't want to use a bootloader (I don't really need one). I saw something on this list about
simpleImage,
Quoted 2 lines
"simple" sounded good to me so I thought I'd try that (or did I misinterpret what this is for?). I also don't want the image to be
too
Quoted 7 lines
big, I always used to use a zImage under ARCH=ppc. So, two questions, which hopefully are easy ones:
1. I did what Grant said in a post to this list about simpleImage, anddumped my dts into
arch/powerpc/boot/dtsand I called itsystem.dts(for
Quoted 2 lines
now). I then tried to do make simpleImage.system which ran right through to final link then moaned about a missing simpleboot-system. Where is this supposed to come from? What am I doing wrong? I
naively
Quoted 7 lines
tried copying simpleboot.o to simpleboot-system.o and the error went away. Hmm.
2. I need an ELF to give to my SystemACE file generator. This used topop up in
arch/ppc/boot/imagesand be called zImage.elf, which made sense to me. What's the deal now with powerpc? What should I beusing?
Quoted 2 lines
Finally, can anyone give me a heads-up on any gotchas with what I'm trying to do. As you can tell, I don't entirely know what I'm doing,
so
Quoted 8 lines
any pointers would be gratefully received.
Thanks,
-- PeterThe University of Dundee is a Scottish Registered Charity, No.
SC015096.
Quoted 8 lines
_______________________________________________
Linuxppc-embedded mailing list
[email protected]
https://ozlabs.org/mailman/listinfo/linuxppc-embeddedThis email and any attachments are intended for the sole use of the
named recipient(s) and contain(s) confidential information that may be proprietary, privileged or copyrighted under applicable law. If you are not the intended recipient, do not read, copy, or forward this email message or any attachments. Delete this email message and any attachments immediately.
Quoted 2 lines
Quoted 9 lines
The University of Dundee is a Scottish Registered Charity, No. SC015096.
This email and any attachments are intended for the sole use of the named recipient(s) and contain(s) confidential information that may be proprietary, privileged or copyrighted under applicable law. If you are not the intended recipient, do not read, copy, or forward this email message or any attachments. Delete this email message and any attachments immediately.
The University of Dundee is a Scottish Registered Charity, No. SC015096.
Hi Peter,
To some extent I think you're trying to re-invent the wheel here, but I understand why.
Ideally, you would be able to pull from the mainline kernel to build this, but Xilinx hasn't got our code into the mainline. We are working on it more proactively now.
So, in the meantime, it would be easier for you to pull from the Xilinx git tree as we have solved the problems you are solving I believe.
Git://git.xilinx.com/linux-2.6-xlnx or http://git.xilinx.com/... =
We supply the device tree files and kernel configurations for the ML405 and ML507 boards to help get started.
Thanks and sorry for the inconvenience,
John
-----Original Message-----
From: Peter Mendham [mailto:[email protected]] =
Sent: Wednesday, June 25, 2008 10:18 AM
To: John Linn
Cc: [email protected]
Subject: Re: Linux on Virtex board with ARCH=3Dpowerpc
OK, this is all new to me, so please bear with me if I've made a major =
mistake. I ran the kernel until it didn't give me anymore output and =
then told xmd to "stop", mrd from any location gave me exactly the same =
32-bit word of garbage. I then reset the processor and mrd would give =
me what looked like reasonable values. I found the __log_buf symbol in =
the System.map file (0xc024a108) and tried mrd on what I assume is the =
corresponding physical address of 0x0024a108. I get the following:
<6>Using Xilinx Virtex machine description
<5>Linux version 2.6.26-rc6 (peter@eris) (gcc version 4.2.4) #9 PREEMPT =
Wed Jun 25 16:27:33 BST 2008
<7>Entering add_active_range(0, 0, 131072) 0 entries of 256 used <7>Top of RAM: 0x20000000, Total RAM: 0x20000000 <7>Memory hole size: 0MB
<4>Zone PFN ranges:
<4> DMA 0 -> 131072 <4> Normal 131072 -> 131072
<4>Movable zone start PFN for each node
<4>early_node_map[1] active PFN ranges
<4> 0: 0 -> 131072
<7>On node 0 totalpages: 131072
<7> DMA zone: 1024 pages used for memmap <7> DMA zone: 0 pages reserved <7> DMA zone: 130048 pages, LIFO batch:31 <7> Normal zone: 0 pages used for memmap <7> Movable zone: 0 pages used for memmap
<4>Built 1 zonelists in Zone order, mobility grouping on. Total pages: =
130048
<5>Kernel command line: console=3DttyUL0 root=3D/dev/xsa2 rw <6>Xilinx intc at 0xFDFFF000C025CFFC mapped to 0x0000025d <4>PID hash table entries: 2048 (order: 11, 8192 bytes)
xmd tells me that the processor stopped at 0xc000fe50, and subsequent =
"con" and "stop" sequences do no move this on (it reports the same each =
time). Below is a choice excerpt of my System.map:
c000fdc4 t src_errorc000fddc t dst_errorc000fdf4 T __div64_32c000fe94 T cacheable_memzeroc000ff38 T memset
So I guess that means it's in __div64_32?
Any ideas?
Thanks in advance,
-- Peter
Quoted 6 lines · John Linn
Sounds like the bootstrap loader has loaded the kernel and passed off execution to it, but there's no console working on the kernel.
You can confirm that since you have a probe as you can dump the
__log_bufby getting the address of it using objdump on the elf image. It's a pain to convert to readable form, but can help to see that
things
Quoted 1 line
are indeed running. Stop the processor, then do the memory read
command,
Quoted 8 lines
mrd, in xmd. =
For the console to work with UART Lite,
CONFIG_OFmust be on in the kernel configuration, I would check that.The file,
arch/powerpc/boot/virtex.c, has the startup code for the virtex specific processing. It checks to make sure there is
compatible
Quoted 2 lines
hardware based on the device tree. If your device tree doesn't match that hardware you could have a problem. I have not found the powerup
of
Quoted 209 lines
the kernel to be very informative if the device tree is wrong.
I pasted in our ML405 device tree below to allow you to compare to it.
Hope that helps,
John/*
* (C) Copyright 2007 Michal Simek
*
* Michal SIMEK <[email protected]>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of
* the License, or (at your option) any later version. ** This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*
* CAUTION: This file is automatically generated by libgen.
* Version: Xilinx EDK 10.1.1 EDK_K_SP1.1
*// { #address-cells =3D <1>; #size-cells =3D <1>; compatible =3D "xlnx,virtex"; model =3D "testing"; DDR_SDRAM: memory@0 { device_type =3D "memory"; reg =3D < 0 8000000 >; } ; chosen { bootargs =3D "console=3DttyS0 ip=3Don root=3D/dev/ram"; linux,stdout-path =3D "/plb@0/serial@83e00000"; } ; cpus { #address-cells =3D <1>; #cpus =3D <1>; #size-cells =3D <0>; ppc405_0: cpu@0 { clock-frequency =3D <11e1a300>; compatible =3D "PowerPC,405", "ibm,ppc405"; d-cache-line-size =3D <20>; d-cache-size =3D <4000>; device_type =3D "cpu"; i-cache-line-size =3D <20>; i-cache-size =3D <4000>; model =3D "PowerPC,405"; reg =3D <0>; timebase-frequency =3D <11e1a300>; xlnx,apu-control =3D <de00>; xlnx,apu-udi-1 =3D <a18983>; xlnx,apu-udi-2 =3D <a38983>; xlnx,apu-udi-3 =3D <a589c3>; xlnx,apu-udi-4 =3D <a789c3>; xlnx,apu-udi-5 =3D <a98c03>; xlnx,apu-udi-6 =3D <ab8c03>; xlnx,apu-udi-7 =3D <ad8c43>; xlnx,apu-udi-8 =3D <af8c43>; xlnx,deterministic-mult =3D <0>; xlnx,disable-operand-forwarding =3D <1>; xlnx,fastest-plb-clock =3D "DPLB0"; xlnx,generate-plb-timespecs =3D <1>; xlnx,mmu-enable =3D <1>; xlnx,pvr-high =3D <0>; xlnx,pvr-low =3D <0>; } ; } ; plb: plb@0 { #address-cells =3D <1>; #size-cells =3D <1>; compatible =3D "xlnx,plb-v46-1.02.a"; ranges ; IIC_EEPROM: i2c@81600000 { compatible =3D "xlnx,xps-iic-2.00.a"; interrupt-parent =3D <&xps_intc_0>; interrupts =3D < 4 2 >; reg =3D < 81600000 10000 >; xlnx,clk-freq =3D <5f5e100>; xlnx,family =3D "virtex4"; xlnx,gpo-width =3D <1>; xlnx,iic-freq =3D <186a0>; xlnx,scl-inertial-delay =3D <0>; xlnx,sda-inertial-delay =3D <0>; xlnx,ten-bit-adr =3D <0>; } ; LEDs_4Bit: gpio@81400000 { compatible =3D "xlnx,xps-gpio-1.00.a"; interrupt-parent =3D <&xps_intc_0>; interrupts =3D < 5 2 >; reg =3D < 81400000 10000 >; xlnx,all-inputs =3D <0>; xlnx,all-inputs-2 =3D <0>; xlnx,dout-default =3D <0>; xlnx,dout-default-2 =3D <0>; xlnx,family =3D "virtex4"; xlnx,gpio-width =3D <4>; xlnx,interrupt-present =3D <1>; xlnx,is-bidir =3D <1>; xlnx,is-bidir-2 =3D <1>; xlnx,is-dual =3D <0>; xlnx,tri-default =3D <ffffffff>; xlnx,tri-default-2 =3D <ffffffff>; } ; RS232_Uart: serial@83e00000 { compatible =3D "ns16550"; device_type =3D "serial"; interrupt-parent =3D <&xps_intc_0>; interrupts =3D < 6 2 >; reg =3D < 83e00000 10000 >; reg-offset =3D <3>; reg-shift =3D <2>; = clock-frequency =3D <05f5e100>; xlnx,family =3D "virtex4"; xlnx,has-external-rclk =3D <0>; xlnx,has-external-xin =3D <0>; xlnx,is-a-16550 =3D <1>; } ; SysACE_CompactFlash: sysace@83600000 { compatible =3D "xlnx,xps-sysace-1.00.a"; interrupt-parent =3D <&xps_intc_0>; interrupts =3D < 3 2 >; reg =3D < 83600000 10000 >; xlnx,family =3D "virtex4"; xlnx,mem-width =3D <10>; } ; TriMode_MAC_GMII: xps-ll-temac@81c00000 { #address-cells =3D <1>; #size-cells =3D <1>; compatible =3D "xlnx,compound"; ethernet@81c00000 { compatible =3D "xlnx,xps-ll-temac-1.01.a"; device_type =3D "network"; interrupt-parent =3D <&xps_intc_0>; interrupts =3D < 2 2 >; llink-connected =3D <&PIM2>; local-mac-address =3D [ 02 00 00 00 00 01 ]; reg =3D < 81c00000 40 >; xlnx,bus2core-clk-ratio =3D <1>; xlnx,phy-type =3D <1>; xlnx,phyaddr =3D <1>; xlnx,rxcsum =3D <0>; xlnx,rxfifo =3D <1000>; xlnx,temac-type =3D <1>; xlnx,txcsum =3D <0>; xlnx,txfifo =3D <1000>; } ; } ; mpmc@0 { #address-cells =3D <1>; #size-cells =3D <1>; compatible =3D "xlnx,mpmc-4.00.a"; PIM2: sdma@84600100 { compatible =3D "xlnx,ll-dma-1.00.a"; interrupt-parent =3D <&xps_intc_0>; interrupts =3D < 1 2 0 2 >; reg =3D < 84600100 80 >; } ; } ; xps_bram_if_cntlr_1: xps-bram-if-cntlr@ffffe000 { compatible =3D "xlnx,xps-bram-if-cntlr-1.00.a"; reg =3D < ffffe000 2000 >; xlnx,family =3D "virtex4"; } ; xps_intc_0: interrupt-controller@81800000 { #interrupt-cells =3D <2>; compatible =3D "xlnx,xps-intc-1.00.a"; interrupt-controller ; reg =3D < 81800000 10000 >; xlnx,num-intr-inputs =3D <7>; } ; } ; ppc405_0_dplb1: plb@1 { #address-cells =3D <1>; #size-cells =3D <1>; compatible =3D "xlnx,plb-v46-1.02.a"; ranges ; } ; } ;-----Original Message-----
From: Peter Mendham [mailto:[email protected]] =Sent: Tuesday, June 24, 2008 1:21 PM
To: John Linn
Cc: [email protected]
Subject: Re: Linux on Virtex board with ARCH=3Dpowerpc
Quoted 5 lines
Hi John,
Thanks for your reply, that's really helpful. I'm actually using the =
mainline kernel, rather than the one from the xilinx git tree, but
your =
Quoted 3 lines
information has really moved me on. My first problem was that the =
Xilinx utility (from the git tree) for device tree dts generation
didn't
Quoted 6 lines
insert a "linux,stdout-path" node under "chosen". I spotted that the =
ml403 example had this, so after adding it I got early console =
messages. Everything now grinds to a halt after I get the message
"flat
Quoted 2 lines
tree at
0x40ad60" which is just before it calls the kernel, so I
assume =
Quoted 8 lines
it's that call that is killing it. I have "console=3DttyUL0" for my =
uartlite, so I should be getting messages, shouldn't I? Do you know =
where the next execution point is? Maybe I could find out where it's =
getting stuck.
Quoted 7 lines
I haven't managed to generate an ACE file, I'm just loading the kernel
image from xmd ATM, genace won't play ball for me, it complains about =
-board user not being valid, it won't even run on the examples copied =
directly from the user manual. Anyway, I think genace is a bit OT,
and =
Quoted 64 lines
I can manage with xmd for now.
Thanks,
-- PeterJohn Linn wrote:
=Quoted 4 lines
Hi Peter,
I'm not up on what can be done with the simple image you refer to in
=1.
=Quoted 4 lines
I'm sure I should be, but there's a lot to learn.
With regards to 2, the elf image, zImage (without the elf extension),
=is
=Quoted 7 lines
located in
arch/powerpc/boot.You can make a SystemACE file from that elf image just as you did in
arch/ppc. We have a default device tree file,ml405.dts, in thearch/powerpc/boot/dtsdirectory for our ml405 board. The kernel configuration has a config,DEVICE_TREE, that specifies the name of=the
=Quoted 6 lines
device tree file. I normally compile the device tree into the kernel which is the default build, make ARCH=3Dpowerpc zImage. That image does not require a boot loader.
I inserted the text below from a document that I have about building
=the
=Quoted 10 lines
arch/ppcandarch/powerpckernels.Hope that helps,
JohnNotation
The phrase "<ppc or powerpc>" is used throughput the text and means
=that
=Quoted 5 lines
one or the other, "ppc" or "powerpc" is to be typed depending on the architecture you are building.
Commands that are used in a bash shell are preceded by ">".
Quoted 23 lines
Quoted 4 lines
Getting Ready To Build the Kernel
This assumes you installed the ELDK tools and assumes you'll be using
=a
=Quoted 15 lines
bash shell.
=
=Quoted 5 lines
bash
export CROSS_COMPILE=3Dppc_4xx-= =Setting Up the Kernel Tree
If you have previously built this kernel for another architecture,
ppc
Quoted 51 lines
Quoted 3 lines
or powerpc, then the tree needs to be setup correctly for the new architecture. Assuming you have not previously built it, this does
=not
=Quoted 9 lines
need to be done.
=
=Quoted 2 lines
make ARCH=3D<ppc or powerpc> mrproper
=Quoted 6 lines
Quoted 1 line
=Configuring the Kernel
The kernel should be configured to run on the ML405 or ML507 board
=from
=Quoted 24 lines
Xilinx. =
==
=Quoted 4 lines
make ARCH=3D<ppc or powerpc>
ml405_defconfig= =or =
=
=Quoted 4 lines
make ARCH=3D<ppc or powerpc>
ml507_defconfig= =
Quoted 11 lines
Quoted 5 lines
Building the Kernel
The following command will build the Linux kernel assuming you are in the root directory of the kernel. The root directory of the kernel
=from
=Quoted 2 lines
the Xilinx Git tree is linux-2.6-xlnx. An elf file, zImage.elf, is created in the
arch/ppc/boot/imagesdirectory for ppc architecture.
An
Quoted 43 lines
Quoted 2 lines
elf file, zImage, is created in the the
arch/powerpc/bootdirectory=for
=Quoted 23 lines
the powerpc architecture.
=
=Quoted 4 lines
make ARCH=3D<ppc or powerpc> zImage
= ==Building the Kernel With Ramdisk
A ram disk image, a file named *.gz, must be placed into the
arch/ppc/boot/imagesorarch/powerpc/bootdirectory, depending on the architecture, prior to building the kernel.=
=Quoted 8 lines
Quoted 4 lines
make ARCH=3D<ppc or powerpc> zImage.initrd
= =An elf file, zImage.initrd.elf, is created in
arch/ppc/boot/imagesdirectory for the ppc architecture. An elf file file, zImage.initrd,=is
=Quoted 2 lines
created in
arch/powerpc/bootdirectory for the powerpc architecture.
Quoted 9 lines
Quoted 4 lines
Generating An Ace File
The elf file generated for the kernel and the bit stream can be
=combined
=Quoted 1 line
to create an ACE file for compact flash. The following assumes a
bash
Quoted 1 line
Quoted 1 line
shell where XMD is accessible and a xilinx probe attached to the
board
Quoted 4 lines
Quoted 3 lines
for which you are generating an ace file.
=
Quoted 27 lines
Quoted 4 lines
=Quoted 2 lines
xmd -tcl genace.tcl -jprog -target
ppc_hw-hw <bit file name> -elf=<elf
=Quoted 19 lines
Quoted 3 lines
= =file name> -board <ml405 or ml507> -ace <desired ace file name>
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Peter Mendham
Sent: Tuesday, June 24, 2008 3:02 AM
To: [email protected]
Subject: Linux on Virtex board with ARCH=3DpowerpcDear all,
I'm trying to boot a 2.6.26-rc6 kernel on a custom Virtex 4 board. I
have used the Xilinx utility to generate a device tree and now want
to
Quoted 15 lines
Quoted 1 line
==
Quoted 6 lines
generate an image for throwing onto CF for use with a SystemACE (just
like on the the ML3/4xx boards). I don't want to use a bootloader (I
don't really need one). I saw something on this list about
=simpleImage,
=
Quoted 13 lines
Quoted 4 lines
"simple" sounded good to me so I thought I'd try that (or did I =
misinterpret what this is for?). I also don't want the image to be
=too =
=
Quoted 4 lines
big, I always used to use a zImage under ARCH=3Dppc. So, two questions,
which hopefully are easy ones:
1. I did what Grant said in a post to this list about simpleImage,
and
Quoted 13 lines
Quoted 1 line
==
Quoted 2 lines
dumped my dts into
arch/powerpc/boot/dtsand I called itsystem.dts=(for
=Quoted 1 line
now). I then tried to do make simpleImage.system which ran right =
Quoted 13 lines
Quoted 4 lines
through to final link then moaned about a missing simpleboot-system.
Where is this supposed to come from? What am I doing wrong? I
=naively =
=
Quoted 4 lines
tried copying simpleboot.o to simpleboot-system.o and the error went =
away. Hmm.
2. I need an ELF to give to my SystemACE file generator. This used
to
Quoted 39 lines
Quoted 1 line
==
Quoted 4 lines
pop up in
arch/ppc/boot/imagesand be called zImage.elf, which made =sense to me. What's the deal now with powerpc? What should I be
=using?
=Quoted 4 lines
Finally, can anyone give me a heads-up on any gotchas with what I'm =
trying to do. As you can tell, I don't entirely know what I'm doing,
=so
=Quoted 8 lines
any pointers would be gratefully received.
Thanks,
-- PeterThe University of Dundee is a Scottish Registered Charity, No.
=SC015096.
=Quoted 6 lines
_______________________________________________
Linuxppc-embedded mailing list
[email protected]
https://ozlabs.org/mailman/listinfo/linuxppc-embedded
Quoted 5 lines
Quoted 2 lines
This email and any attachments are intended for the sole use of the
=named recipient(s) and contain(s) confidential information that may be proprietary, privileged or copyrighted under applicable law. If you
are
Quoted 5 lines
not the intended recipient, do not read, copy, or forward this email message or any attachments. Delete this email message and any attachments immediately.
=
Quoted 7 lines
Quoted 3 lines
=
=The University of Dundee is a Scottish Registered Charity, No.
SC015096.
Quoted 5 lines
This email and any attachments are intended for the sole use of the
named recipient(s) and contain(s) confidential information that may be proprietary, privileged or copyrighted under applicable law. If you are not the intended recipient, do not read, copy, or forward this email message or any attachments. Delete this email message and any attachments immediately.
Quoted 3 lines
=
The University of Dundee is a Scottish Registered Charity, No. SC015096.
This email and any attachments are intended for the sole use of the named r= ecipient(s) and contain(s) confidential information that may be proprietary= , privileged or copyrighted under applicable law. If you are not the intend= ed recipient, do not read, copy, or forward this email message or any attac= hments. Delete this email message and any attachments immediately.
Hi John,
OK, I've given in and I'm using the xilinx git code now :) It now shows some signs of life, thanks, but the sysace driver is not happy. My root fs is on cf and I'm not using initrd. The driver loads then gets stuck, repeatedly saying:
xsysace 80030000.sysace: kicking stalled fsm; state=2 task=0 iter=1 dc=0
I notice from the driver source that state 2 is the driver attempting to acquire the mpu lock. I have tried the standard xilinx sysace selftest code which just acquires and frees the lock (which is fine) so the hardware should be OK (I hope). I have the sysace hooked up to an irq (the only one), I have no idea whether the dts is correct but it seems to compare favourably with the ml405 one; mine says (the important bits):
intc: interrupt-controller@80010000 {
#interrupt-cells = <2>;
compatible = "xlnx,xps-intc-1.00.a";
interrupt-controller ;
reg = < 80010000 10000 >;
xlnx,num-intr-inputs = <1>;
} ;
sysace: sysace@80030000 {
compatible = "xlnx,xps-sysace-1.00.a";
interrupt-parent = <&intc>;
interrupts = < 0 2 >;
reg = < 80030000 10000 >;
xlnx,family = "virtex4";
xlnx,mem-width = <10>;
} ;Do you have any ideas?
Thanks,
-- Peter
Quoted 689 lines · John Linn
Hi Peter,
To some extent I think you're trying to re-invent the wheel here, but I understand why.
Ideally, you would be able to pull from the mainline kernel to build this, but Xilinx hasn't got our code into the mainline. We are working on it more proactively now.
So, in the meantime, it would be easier for you to pull from the Xilinx git tree as we have solved the problems you are solving I believe.
Git://git.xilinx.com/linux-2.6-xlnx or http://git.xilinx.com/...
We supply the device tree files and kernel configurations for the ML405 and ML507 boards to help get started.
Thanks and sorry for the inconvenience,
John-----Original Message-----
From: Peter Mendham [mailto:[email protected]] Sent: Wednesday, June 25, 2008 10:18 AM
To: John Linn
Cc: [email protected]
Subject: Re: Linux on Virtex board with ARCH=powerpcOK, this is all new to me, so please bear with me if I've made a major mistake. I ran the kernel until it didn't give me anymore output and then told xmd to "stop", mrd from any location gave me exactly the same 32-bit word of garbage. I then reset the processor and mrd would give me what looked like reasonable values. I found the
__log_bufsymbol in the System.map file (0xc024a108) and tried mrd on what I assume is the corresponding physical address of0x0024a108. I get the following:<6>Using Xilinx Virtex machine description
<5>Linux version 2.6.26-rc6 (peter@eris) (gcc version 4.2.4) #9 PREEMPT Wed Jun 25 16:27:33 BST 2008 <7>Enteringadd_active_range(0, 0, 131072)0 entries of 256 used
<7>Top of RAM:0x20000000, Total RAM:0x20000000
<7>Memory hole size: 0MB
<4>Zone PFN ranges:<4> DMA 0 -> 131072 <4> Normal 131072 -> 131072<4>Movable zone start PFN for each node
<4>early_node_map[1] active PFN ranges
<4> 0: 0 -> 131072
<7>On node 0 totalpages: 131072<7> DMA zone: 1024 pages used for memmap <7> DMA zone: 0 pages reserved <7> DMA zone: 130048 pages, LIFO batch:31 <7> Normal zone: 0 pages used for memmap <7> Movable zone: 0 pages used for memmap<4>Built 1 zonelists in Zone order, mobility grouping on. Total pages: 130048 <5>Kernel command line: console=ttyUL0 root=/dev/xsa2 rw <6>Xilinx intc at
0xFDFFF000C025CFFCmapped to0x0000025d
<4>PID hash table entries: 2048 (order: 11, 8192 bytes)xmd tells me that the processor stopped at
0xc000fe50, and subsequent "con" and "stop" sequences do no move this on (it reports the same each time). Below is a choice excerpt of my System.map:
c000fdc4tsrc_errorc000fddctdst_errorc000fdf4T__div64_32c000fe94Tcacheable_memzeroc000ff38T memsetSo I guess that means it's in
__div64_32?Any ideas?
Thanks in advance,
-- PeterQuoted 7 lines · John Linn
Sounds like the bootstrap loader has loaded the kernel and passed off execution to it, but there's no console working on the kernel.
You can confirm that since you have a probe as you can dump the
__log_bufby getting the address of it using objdump on the elf image. It's a pain to convert to readable form, but can help to see thatthings
Quoted 2 lines
are indeed running. Stop the processor, then do the memory read
command,
Quoted 8 lines
mrd, in xmd.
For the console to work with UART Lite,
CONFIG_OFmust be on in the kernel configuration, I would check that.The file,
arch/powerpc/boot/virtex.c, has the startup code for the virtex specific processing. It checks to make sure there iscompatible
Quoted 3 lines
hardware based on the device tree. If your device tree doesn't match that hardware you could have a problem. I have not found the powerup
of
Quoted 206 lines
the kernel to be very informative if the device tree is wrong.
I pasted in our ML405 device tree below to allow you to compare to it.
Hope that helps,
John/*
* (C) Copyright 2007 Michal Simek
*
* Michal SIMEK <[email protected]>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of
* the License, or (at your option) any later version. ** This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*
* CAUTION: This file is automatically generated by libgen.
* Version: Xilinx EDK 10.1.1 EDK_K_SP1.1
*// { #address-cells = <1>; #size-cells = <1>; compatible = "xlnx,virtex"; model = "testing"; DDR_SDRAM: memory@0 { device_type = "memory"; reg = < 0 8000000 >; } ; chosen { bootargs = "console=ttyS0 ip=on root=/dev/ram"; linux,stdout-path = "/plb@0/serial@83e00000"; } ; cpus { #address-cells = <1>; #cpus = <1>; #size-cells = <0>; ppc405_0: cpu@0 { clock-frequency = <11e1a300>; compatible = "PowerPC,405", "ibm,ppc405"; d-cache-line-size = <20>; d-cache-size = <4000>; device_type = "cpu"; i-cache-line-size = <20>; i-cache-size = <4000>; model = "PowerPC,405"; reg = <0>; timebase-frequency = <11e1a300>; xlnx,apu-control = <de00>; xlnx,apu-udi-1 = <a18983>; xlnx,apu-udi-2 = <a38983>; xlnx,apu-udi-3 = <a589c3>; xlnx,apu-udi-4 = <a789c3>; xlnx,apu-udi-5 = <a98c03>; xlnx,apu-udi-6 = <ab8c03>; xlnx,apu-udi-7 = <ad8c43>; xlnx,apu-udi-8 = <af8c43>; xlnx,deterministic-mult = <0>; xlnx,disable-operand-forwarding = <1>; xlnx,fastest-plb-clock = "DPLB0"; xlnx,generate-plb-timespecs = <1>; xlnx,mmu-enable = <1>; xlnx,pvr-high = <0>; xlnx,pvr-low = <0>; } ; } ; plb: plb@0 { #address-cells = <1>; #size-cells = <1>; compatible = "xlnx,plb-v46-1.02.a"; ranges ; IIC_EEPROM: i2c@81600000 { compatible = "xlnx,xps-iic-2.00.a"; interrupt-parent = <&xps_intc_0>; interrupts = < 4 2 >; reg = < 81600000 10000 >; xlnx,clk-freq = <5f5e100>; xlnx,family = "virtex4"; xlnx,gpo-width = <1>; xlnx,iic-freq = <186a0>; xlnx,scl-inertial-delay = <0>; xlnx,sda-inertial-delay = <0>; xlnx,ten-bit-adr = <0>; } ; LEDs_4Bit: gpio@81400000 { compatible = "xlnx,xps-gpio-1.00.a"; interrupt-parent = <&xps_intc_0>; interrupts = < 5 2 >; reg = < 81400000 10000 >; xlnx,all-inputs = <0>; xlnx,all-inputs-2 = <0>; xlnx,dout-default = <0>; xlnx,dout-default-2 = <0>; xlnx,family = "virtex4"; xlnx,gpio-width = <4>; xlnx,interrupt-present = <1>; xlnx,is-bidir = <1>; xlnx,is-bidir-2 = <1>; xlnx,is-dual = <0>; xlnx,tri-default = <ffffffff>; xlnx,tri-default-2 = <ffffffff>; } ; RS232_Uart: serial@83e00000 { compatible = "ns16550"; device_type = "serial"; interrupt-parent = <&xps_intc_0>; interrupts = < 6 2 >; reg = < 83e00000 10000 >; reg-offset = <3>; reg-shift = <2>; clock-frequency = <05f5e100>; xlnx,family = "virtex4"; xlnx,has-external-rclk = <0>; xlnx,has-external-xin = <0>; xlnx,is-a-16550 = <1>; } ; SysACE_CompactFlash: sysace@83600000 { compatible = "xlnx,xps-sysace-1.00.a"; interrupt-parent = <&xps_intc_0>; interrupts = < 3 2 >; reg = < 83600000 10000 >; xlnx,family = "virtex4"; xlnx,mem-width = <10>; } ; TriMode_MAC_GMII: xps-ll-temac@81c00000 { #address-cells = <1>; #size-cells = <1>; compatible = "xlnx,compound"; ethernet@81c00000 { compatible = "xlnx,xps-ll-temac-1.01.a"; device_type = "network"; interrupt-parent = <&xps_intc_0>; interrupts = < 2 2 >; llink-connected = <&PIM2>; local-mac-address = [ 02 00 00 00 00 01 ]; reg = < 81c00000 40 >; xlnx,bus2core-clk-ratio = <1>; xlnx,phy-type = <1>; xlnx,phyaddr = <1>; xlnx,rxcsum = <0>; xlnx,rxfifo = <1000>; xlnx,temac-type = <1>; xlnx,txcsum = <0>; xlnx,txfifo = <1000>; } ; } ; mpmc@0 { #address-cells = <1>; #size-cells = <1>; compatible = "xlnx,mpmc-4.00.a"; PIM2: sdma@84600100 { compatible = "xlnx,ll-dma-1.00.a"; interrupt-parent = <&xps_intc_0>; interrupts = < 1 2 0 2 >; reg = < 84600100 80 >; } ; } ; xps_bram_if_cntlr_1: xps-bram-if-cntlr@ffffe000 { compatible = "xlnx,xps-bram-if-cntlr-1.00.a"; reg = < ffffe000 2000 >; xlnx,family = "virtex4"; } ; xps_intc_0: interrupt-controller@81800000 { #interrupt-cells = <2>; compatible = "xlnx,xps-intc-1.00.a"; interrupt-controller ; reg = < 81800000 10000 >; xlnx,num-intr-inputs = <7>; } ; } ; ppc405_0_dplb1: plb@1 { #address-cells = <1>; #size-cells = <1>; compatible = "xlnx,plb-v46-1.02.a"; ranges ; } ; } ;-----Original Message-----
From: Peter Mendham [mailto:[email protected]] Sent: Tuesday, June 24, 2008 1:21 PM
To: John Linn
Cc: [email protected]
Subject: Re: Linux on Virtex board with ARCH=powerpcQuoted 4 lines
Hi John,
Thanks for your reply, that's really helpful. I'm actually using the mainline kernel, rather than the one from the xilinx git tree, but
your
Quoted 2 lines
information has really moved me on. My first problem was that the Xilinx utility (from the git tree) for device tree dts generation
didn't
Quoted 2 lines
insert a "linux,stdout-path" node under "chosen". I spotted that the ml403 example had this, so after adding it I got early console messages. Everything now grinds to a halt after I get the message
"flat
Quoted 2 lines
tree at
0x40ad60" which is just before it calls the kernel, so Iassume
Quoted 10 lines
it's that call that is killing it. I have "console=ttyUL0" for my uartlite, so I should be getting messages, shouldn't I? Do you know where the next execution point is? Maybe I could find out where it's getting stuck.
I haven't managed to generate an ACE file, I'm just loading the kernel
image from xmd ATM, genace won't play ball for me, it complains about -board user not being valid, it won't even run on the examples copied directly from the user manual. Anyway, I think genace is a bit OT,
and
Quoted 62 lines
I can manage with xmd for now.
Thanks,
-- PeterQuoted 5 lines · John Linn
Hi Peter,
I'm not up on what can be done with the simple image you refer to in
1.
Quoted 5 lines
I'm sure I should be, but there's a lot to learn.
With regards to 2, the elf image, zImage (without the elf extension),
is
Quoted 8 lines
located in
arch/powerpc/boot.You can make a SystemACE file from that elf image just as you did in
arch/ppc. We have a default device tree file,ml405.dts, in thearch/powerpc/boot/dtsdirectory for our ml405 board. The kernel configuration has a config,DEVICE_TREE, that specifies the name ofthe
Quoted 7 lines
device tree file. I normally compile the device tree into the kernel which is the default build, make ARCH=powerpc zImage. That image does not require a boot loader.
I inserted the text below from a document that I have about building
the
Quoted 11 lines
arch/ppcandarch/powerpckernels.Hope that helps,
JohnNotation
The phrase "<ppc or powerpc>" is used throughput the text and means
that
Quoted 3 lines
one or the other, "ppc" or "powerpc" is to be typed depending on the architecture you are building.
Quoted 24 lines
Quoted 7 lines
Commands that are used in a bash shell are preceded by ">".
Getting Ready To Build the Kernel
This assumes you installed the ELDK tools and assumes you'll be using
a
Quoted 14 lines
bash shell.
Quoted 5 lines
bash
export CROSS_COMPILE=ppc_4xx-Setting Up the Kernel Tree
If you have previously built this kernel for another architecture,
ppc
Quoted 42 lines
Quoted 4 lines
or powerpc, then the tree needs to be setup correctly for the new architecture. Assuming you have not previously built it, this does
not
Quoted 5 lines
need to be done.
Quoted 9 lines
Quoted 4 lines
make ARCH=<ppc or powerpc> mrproper
Configuring the Kernel
The kernel should be configured to run on the ML405 or ML507 board
from
Quoted 18 lines
Xilinx.
Quoted 4 lines
make ARCH=<ppc or powerpc>
ml405_defconfigor
Quoted 4 lines
make ARCH=<ppc or powerpc>
ml507_defconfigQuoted 12 lines
Quoted 6 lines
Building the Kernel
The following command will build the Linux kernel assuming you are in the root directory of the kernel. The root directory of the kernel
from
Quoted 3 lines
the Xilinx Git tree is linux-2.6-xlnx. An elf file, zImage.elf, is created in the
arch/ppc/boot/imagesdirectory for ppc architecture.An
Quoted 36 lines
Quoted 3 lines
elf file, zImage, is created in the the
arch/powerpc/bootdirectoryfor
Quoted 19 lines
the powerpc architecture.
Quoted 4 lines
make ARCH=<ppc or powerpc> zImage
Building the Kernel With Ramdisk
A ram disk image, a file named *.gz, must be placed into the
arch/ppc/boot/imagesorarch/powerpc/bootdirectory, depending on the architecture, prior to building the kernel.Quoted 8 lines
Quoted 4 lines
make ARCH=<ppc or powerpc> zImage.initrd
An elf file, zImage.initrd.elf, is created in
arch/ppc/boot/imagesdirectory for the ppc architecture. An elf file file, zImage.initrd,is
Quoted 12 lines
Quoted 7 lines
created in
arch/powerpc/bootdirectory for the powerpc architecture.Generating An Ace File
The elf file generated for the kernel and the bit stream can be
combined
Quoted 2 lines
to create an ACE file for compact flash. The following assumes a
bash
Quoted 2 lines
Quoted 2 lines
shell where XMD is accessible and a xilinx probe attached to the
board
Quoted 5 lines
Quoted 5 lines
for which you are generating an ace file.
Quoted 27 lines
Quoted 3 lines
Quoted 3 lines
xmd -tcl genace.tcl -jprog -target
ppc_hw-hw <bit file name> -elf<elf
Quoted 21 lines
Quoted 3 lines
file name> -board <ml405 or ml507> -ace <desired ace file name>
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Peter Mendham
Sent: Tuesday, June 24, 2008 3:02 AM
To: [email protected]
Subject: Linux on Virtex board with ARCH=powerpcDear all,
I'm trying to boot a 2.6.26-rc6 kernel on a custom Virtex 4 board. I
have used the Xilinx utility to generate a device tree and now want
to
Quoted 15 lines
Quoted 8 lines
generate an image for throwing onto CF for use with a SystemACE (just
Quoted 7 lines
like on the the ML3/4xx boards). I don't want to use a bootloader (I
don't really need one). I saw something on this list about
Quoted 16 lines
simpleImage,
Quoted 3 lines
"simple" sounded good to me so I thought I'd try that (or did I misinterpret what this is for?). I also don't want the image to be
too
Quoted 7 lines
big, I always used to use a zImage under ARCH=ppc. So, two questions,
which hopefully are easy ones:
1. I did what Grant said in a post to this list about simpleImage,and
Quoted 10 lines
Quoted 7 lines
dumped my dts into
arch/powerpc/boot/dtsand I called itsystem.dts(for
Quoted 13 lines
Quoted 7 lines
now). I then tried to do make simpleImage.system which ran right through to final link then moaned about a missing simpleboot-system.
Where is this supposed to come from? What am I doing wrong? I
naively
Quoted 3 lines
tried copying simpleboot.o to simpleboot-system.o and the error went away. Hmm.
2. I need an ELF to give to my SystemACE file generator. This usedto
Quoted 34 lines
Quoted 7 lines
pop up in
arch/ppc/boot/imagesand be called zImage.elf, which made sense to me. What's the deal now with powerpc? What should I beusing?
Quoted 3 lines
Finally, can anyone give me a heads-up on any gotchas with what I'm trying to do. As you can tell, I don't entirely know what I'm doing,
so
Quoted 9 lines
any pointers would be gratefully received.
Thanks,
-- PeterThe University of Dundee is a Scottish Registered Charity, No.
SC015096.
Quoted 6 lines
_______________________________________________
Linuxppc-embedded mailing list
[email protected]
https://ozlabs.org/mailman/listinfo/linuxppc-embeddedQuoted 6 lines
Quoted 3 lines
This email and any attachments are intended for the sole use of the
named recipient(s) and contain(s) confidential information that may be proprietary, privileged or copyrighted under applicable law. If you
are
Quoted 10 lines
not the intended recipient, do not read, copy, or forward this email message or any attachments. Delete this email message and any attachments immediately.
Quoted 3 lines
The University of Dundee is a Scottish Registered Charity, No.
SC015096.
Quoted 4 lines
This email and any attachments are intended for the sole use of the
named recipient(s) and contain(s) confidential information that may be proprietary, privileged or copyrighted under applicable law. If you are not the intended recipient, do not read, copy, or forward this email message or any attachments. Delete this email message and any attachments immediately.
Quoted 2 lines
Quoted 9 lines
The University of Dundee is a Scottish Registered Charity, No. SC015096.
This email and any attachments are intended for the sole use of the named recipient(s) and contain(s) confidential information that may be proprietary, privileged or copyrighted under applicable law. If you are not the intended recipient, do not read, copy, or forward this email message or any attachments. Delete this email message and any attachments immediately.
The University of Dundee is a Scottish Registered Charity, No. SC015096.
Hi Peter,
I think you'll get a baseline quicker this way and then you can go on other less known paths after that.
In my experience, this message happens when there is no compact flash in the slot of the board.
I have the system ace device as /dev/xsa2 in my notes, but I have only used it much. Sorry it's not one of my primary test cases at this point in time.
Thanks,
John
-----Original Message-----
From: Peter Mendham [mailto:[email protected]] =
Sent: Thursday, June 26, 2008 7:24 AM
To: John Linn
Cc: [email protected]
Subject: Re: Linux on Virtex board with ARCH=3Dpowerpc
Hi John,
OK, I've given in and I'm using the xilinx git code now :) It now shows
some signs of life, thanks, but the sysace driver is not happy. My root
fs is on cf and I'm not using initrd. The driver loads then gets stuck,
repeatedly saying:
xsysace 80030000.sysace: kicking stalled fsm; state=3D2 task=3D0 iter=3D1 d= c=3D0
I notice from the driver source that state 2 is the driver attempting to
acquire the mpu lock. I have tried the standard xilinx sysace selftest =
code which just acquires and frees the lock (which is fine) so the =
hardware should be OK (I hope). I have the sysace hooked up to an irq =
(the only one), I have no idea whether the dts is correct but it seems =
to compare favourably with the ml405 one; mine says (the important bits):
intc: interrupt-controller@80010000 {
#interrupt-cells =3D <2>;
compatible =3D "xlnx,xps-intc-1.00.a";
interrupt-controller ;
reg =3D < 80010000 10000 >;
xlnx,num-intr-inputs =3D <1>;
} ;
sysace: sysace@80030000 {
compatible =3D "xlnx,xps-sysace-1.00.a";
interrupt-parent =3D <&intc>;
interrupts =3D < 0 2 >;
reg =3D < 80030000 10000 >;
xlnx,family =3D "virtex4";
xlnx,mem-width =3D <10>;
} ;Do you have any ideas?
Thanks,
-- Peter
Quoted 3 lines · John Linn
Hi Peter,
To some extent I think you're trying to re-invent the wheel here, but
I
Quoted 4 lines
understand why.
Ideally, you would be able to pull from the mainline kernel to build this, but Xilinx hasn't got our code into the mainline. We are
working
Quoted 3 lines
on it more proactively now.
So, in the meantime, it would be easier for you to pull from the
Xilinx
Quoted 6 lines
git tree as we have solved the problems you are solving I believe.
Git://git.xilinx.com/linux-2.6-xlnx or http://git.xilinx.com/... =
We supply the device tree files and kernel configurations for the
ML405
Quoted 13 lines
and ML507 boards to help get started.
Thanks and sorry for the inconvenience,
John-----Original Message-----
From: Peter Mendham [mailto:[email protected]] =Sent: Wednesday, June 25, 2008 10:18 AM
To: John Linn
Cc: [email protected]
Subject: Re: Linux on Virtex board with ARCH=3Dpowerpc
Quoted 5 lines
OK, this is all new to me, so please bear with me if I've made a major
mistake. I ran the kernel until it didn't give me anymore output and =
then told xmd to "stop", mrd from any location gave me exactly the
same =
Quoted 3 lines
32-bit word of garbage. I then reset the processor and mrd would give
me what looked like reasonable values. I found the
__log_bufsymbol
in =
Quoted 6 lines
the System.map file (
0xc024a108) and tried mrd on what I assume is thecorresponding physical address of
0x0024a108. I get the following:<6>Using Xilinx Virtex machine description
<5>Linux version 2.6.26-rc6 (peter@eris) (gcc version 4.2.4) #9
PREEMPT =
Quoted 11 lines
Wed Jun 25 16:27:33 BST 2008
<7>Enteringadd_active_range(0, 0, 131072)0 entries of 256 used <7>Top of RAM:0x20000000, Total RAM:0x20000000<7>Memory hole size: 0MB
<4>Zone PFN ranges:<4> DMA 0 -> 131072 <4> Normal 131072 -> 131072<4>Movable zone start PFN for each node
<4>early_node_map[1] active PFN ranges
<4> 0: 0 -> 131072
<7>On node 0 totalpages: 131072
Quoted 6 lines
<7> DMA zone: 1024 pages used for memmap <7> DMA zone: 0 pages reserved <7> DMA zone: 130048 pages, LIFO batch:31 <7> Normal zone: 0 pages used for memmap <7> Movable zone: 0 pages used for memmap<4>Built 1 zonelists in Zone order, mobility grouping on. Total
pages: =
Quoted 8 lines
130048
<5>Kernel command line: console=3DttyUL0 root=3D/dev/xsa2 rw <6>Xilinx intc at0xFDFFF000C025CFFCmapped to0x0000025d<4>PID hash table entries: 2048 (order: 11, 8192 bytes)xmd tells me that the processor stopped at
0xc000fe50, and subsequent ="con" and "stop" sequences do no move this on (it reports the same
each =
Quoted 10 lines
time). Below is a choice excerpt of my System.map:
c000fdc4tsrc_errorc000fddctdst_errorc000fdf4T__div64_32c000fe94Tcacheable_memzeroc000ff38T memsetSo I guess that means it's in
__div64_32?
Quoted 13 lines
Any ideas?
Thanks in advance,
-- PeterJohn Linn wrote:
=Quoted 5 lines
Sounds like the bootstrap loader has loaded the kernel and passed off execution to it, but there's no console working on the kernel.
You can confirm that since you have a probe as you can dump the
__log_bufby getting the address of it using objdump on the elf
image.
Quoted 25 lines
Quoted 2 lines
It's a pain to convert to readable form, but can help to see that
=things
=Quoted 2 lines
are indeed running. Stop the processor, then do the memory read
=command,
=Quoted 9 lines
mrd, in xmd. =
For the console to work with UART Lite,
CONFIG_OFmust be on in the kernel configuration, I would check that.The file,
arch/powerpc/boot/virtex.c, has the startup code for the virtex specific processing. It checks to make sure there is=compatible
=
Quoted 10 lines
Quoted 3 lines
hardware based on the device tree. If your device tree doesn't match that hardware you could have a problem. I have not found the powerup
=of
=Quoted 3 lines
the kernel to be very informative if the device tree is wrong.
I pasted in our ML405 device tree below to allow you to compare to
it.
Quoted 235 lines
Quoted 206 lines
Hope that helps,
John/*
* (C) Copyright 2007 Michal Simek
*
* Michal SIMEK <[email protected]>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of
* the License, or (at your option) any later version. ** This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*
* CAUTION: This file is automatically generated by libgen.
* Version: Xilinx EDK 10.1.1 EDK_K_SP1.1
*// { #address-cells =3D <1>; #size-cells =3D <1>; compatible =3D "xlnx,virtex"; model =3D "testing"; DDR_SDRAM: memory@0 { device_type =3D "memory"; reg =3D < 0 8000000 >; } ; chosen { bootargs =3D "console=3DttyS0 ip=3Don root=3D/dev/ram"; linux,stdout-path =3D "/plb@0/serial@83e00000"; } ; cpus { #address-cells =3D <1>; #cpus =3D <1>; #size-cells =3D <0>; ppc405_0: cpu@0 { clock-frequency =3D <11e1a300>; compatible =3D "PowerPC,405", "ibm,ppc405"; d-cache-line-size =3D <20>; d-cache-size =3D <4000>; device_type =3D "cpu"; i-cache-line-size =3D <20>; i-cache-size =3D <4000>; model =3D "PowerPC,405"; reg =3D <0>; timebase-frequency =3D <11e1a300>; xlnx,apu-control =3D <de00>; xlnx,apu-udi-1 =3D <a18983>; xlnx,apu-udi-2 =3D <a38983>; xlnx,apu-udi-3 =3D <a589c3>; xlnx,apu-udi-4 =3D <a789c3>; xlnx,apu-udi-5 =3D <a98c03>; xlnx,apu-udi-6 =3D <ab8c03>; xlnx,apu-udi-7 =3D <ad8c43>; xlnx,apu-udi-8 =3D <af8c43>; xlnx,deterministic-mult =3D <0>; xlnx,disable-operand-forwarding =3D <1>; xlnx,fastest-plb-clock =3D "DPLB0"; xlnx,generate-plb-timespecs =3D <1>; xlnx,mmu-enable =3D <1>; xlnx,pvr-high =3D <0>; xlnx,pvr-low =3D <0>; } ; } ; plb: plb@0 { #address-cells =3D <1>; #size-cells =3D <1>; compatible =3D "xlnx,plb-v46-1.02.a"; ranges ; IIC_EEPROM: i2c@81600000 { compatible =3D "xlnx,xps-iic-2.00.a"; interrupt-parent =3D <&xps_intc_0>; interrupts =3D < 4 2 >; reg =3D < 81600000 10000 >; xlnx,clk-freq =3D <5f5e100>; xlnx,family =3D "virtex4"; xlnx,gpo-width =3D <1>; xlnx,iic-freq =3D <186a0>; xlnx,scl-inertial-delay =3D <0>; xlnx,sda-inertial-delay =3D <0>; xlnx,ten-bit-adr =3D <0>; } ; LEDs_4Bit: gpio@81400000 { compatible =3D "xlnx,xps-gpio-1.00.a"; interrupt-parent =3D <&xps_intc_0>; interrupts =3D < 5 2 >; reg =3D < 81400000 10000 >; xlnx,all-inputs =3D <0>; xlnx,all-inputs-2 =3D <0>; xlnx,dout-default =3D <0>; xlnx,dout-default-2 =3D <0>; xlnx,family =3D "virtex4"; xlnx,gpio-width =3D <4>; xlnx,interrupt-present =3D <1>; xlnx,is-bidir =3D <1>; xlnx,is-bidir-2 =3D <1>; xlnx,is-dual =3D <0>; xlnx,tri-default =3D <ffffffff>; xlnx,tri-default-2 =3D <ffffffff>; } ; RS232_Uart: serial@83e00000 { compatible =3D "ns16550"; device_type =3D "serial"; interrupt-parent =3D <&xps_intc_0>; interrupts =3D < 6 2 >; reg =3D < 83e00000 10000 >; reg-offset =3D <3>; reg-shift =3D <2>; = clock-frequency =3D <05f5e100>; xlnx,family =3D "virtex4"; xlnx,has-external-rclk =3D <0>; xlnx,has-external-xin =3D <0>; xlnx,is-a-16550 =3D <1>; } ; SysACE_CompactFlash: sysace@83600000 { compatible =3D "xlnx,xps-sysace-1.00.a"; interrupt-parent =3D <&xps_intc_0>; interrupts =3D < 3 2 >; reg =3D < 83600000 10000 >; xlnx,family =3D "virtex4"; xlnx,mem-width =3D <10>; } ; TriMode_MAC_GMII: xps-ll-temac@81c00000 { #address-cells =3D <1>; #size-cells =3D <1>; compatible =3D "xlnx,compound"; ethernet@81c00000 { compatible =3D "xlnx,xps-ll-temac-1.01.a"; device_type =3D "network"; interrupt-parent =3D <&xps_intc_0>; interrupts =3D < 2 2 >; llink-connected =3D <&PIM2>; local-mac-address =3D [ 02 00 00 00 00 01 ]; reg =3D < 81c00000 40 >; xlnx,bus2core-clk-ratio =3D <1>; xlnx,phy-type =3D <1>; xlnx,phyaddr =3D <1>; xlnx,rxcsum =3D <0>; xlnx,rxfifo =3D <1000>; xlnx,temac-type =3D <1>; xlnx,txcsum =3D <0>; xlnx,txfifo =3D <1000>; } ; } ; mpmc@0 { #address-cells =3D <1>; #size-cells =3D <1>; compatible =3D "xlnx,mpmc-4.00.a"; PIM2: sdma@84600100 { compatible =3D "xlnx,ll-dma-1.00.a"; interrupt-parent =3D <&xps_intc_0>; interrupts =3D < 1 2 0 2 >; reg =3D < 84600100 80 >; } ; } ; xps_bram_if_cntlr_1: xps-bram-if-cntlr@ffffe000 { compatible =3D "xlnx,xps-bram-if-cntlr-1.00.a"; reg =3D < ffffe000 2000 >; xlnx,family =3D "virtex4"; } ; xps_intc_0: interrupt-controller@81800000 { #interrupt-cells =3D <2>; compatible =3D "xlnx,xps-intc-1.00.a"; interrupt-controller ; reg =3D < 81800000 10000 >; xlnx,num-intr-inputs =3D <7>; } ; } ; ppc405_0_dplb1: plb@1 { #address-cells =3D <1>; #size-cells =3D <1>; compatible =3D "xlnx,plb-v46-1.02.a"; ranges ; } ; } ;-----Original Message-----
From: Peter Mendham [mailto:[email protected]] =Sent: Tuesday, June 24, 2008 1:21 PM
To: John Linn
Cc: [email protected]
Subject: Re: Linux on Virtex board with ARCH=3DpowerpcQuoted 6 lines
Hi John,
Thanks for your reply, that's really helpful. I'm actually using the
mainline kernel, rather than the one from the xilinx git tree, but
=your =
=
Quoted 4 lines
information has really moved me on. My first problem was that the =
Xilinx utility (from the git tree) for device tree dts generation
=didn't
=Quoted 6 lines
insert a "linux,stdout-path" node under "chosen". I spotted that the
ml403 example had this, so after adding it I got early console =
messages. Everything now grinds to a halt after I get the message
="flat
=
Quoted 16 lines
Quoted 2 lines
tree at
0x40ad60" which is just before it calls the kernel, so I=assume =
=
Quoted 9 lines
it's that call that is killing it. I have "console=3DttyUL0" for my =
uartlite, so I should be getting messages, shouldn't I? Do you know =
where the next execution point is? Maybe I could find out where it's
getting stuck.
I haven't managed to generate an ACE file, I'm just loading the
kernel
Quoted 7 lines
Quoted 1 line
==
Quoted 1 line
image from xmd ATM, genace won't play ball for me, it complains about
Quoted 34 lines
Quoted 4 lines
-board user not being valid, it won't even run on the examples copied
directly from the user manual. Anyway, I think genace is a bit OT,
=and =
=
Quoted 25 lines
I can manage with xmd for now.
Thanks,
-- PeterJohn Linn wrote:
==Quoted 6 lines
Hi Peter,
I'm not up on what can be done with the simple image you refer to in
= =1.
==Quoted 3 lines
I'm sure I should be, but there's a lot to learn.
With regards to 2, the elf image, zImage (without the elf
extension),
Quoted 19 lines
Quoted 18 lines
Quoted 3 lines
= =is
==Quoted 9 lines
located in
arch/powerpc/boot.You can make a SystemACE file from that elf image just as you did in
arch/ppc. We have a default device tree file,ml405.dts, in thearch/powerpc/boot/dtsdirectory for our ml405 board. The kernel configuration has a config,DEVICE_TREE, that specifies the name of= =
Quoted 7 lines
Quoted 7 lines
the
==Quoted 2 lines
device tree file. I normally compile the device tree into the kernel which is the default build, make ARCH=3Dpowerpc zImage. That image
does
Quoted 30 lines
Quoted 29 lines
Quoted 6 lines
not require a boot loader.
I inserted the text below from a document that I have about building
= =the
==Quoted 6 lines
arch/ppcandarch/powerpckernels.Hope that helps,
JohnQuoted 6 lines
Notation
The phrase "<ppc or powerpc>" is used throughput the text and means
= =that
==
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
one or the other, "ppc" or "powerpc" is to be typed depending on the architecture you are building.
Commands that are used in a bash shell are preceded by ">".
Getting Ready To Build the Kernel
This assumes you installed the ELDK tools and assumes you'll be
using
Quoted 25 lines
Quoted 24 lines
Quoted 3 lines
= =a
==Quoted 15 lines
bash shell.
=
= =Quoted 7 lines
bash
export CROSS_COMPILE=3Dppc_4xx-= = =
Quoted 82 lines
Quoted 4 lines
Quoted 4 lines
Setting Up the Kernel Tree
If you have previously built this kernel for another architecture,
=ppc
=Quoted 74 lines
Quoted 5 lines
or powerpc, then the tree needs to be setup correctly for the new architecture. Assuming you have not previously built it, this does
= =not
==Quoted 13 lines
need to be done.
=
= =Quoted 4 lines
make ARCH=3D<ppc or powerpc> mrproper
= =Quoted 8 lines
Quoted 1 line
=Configuring the Kernel
The kernel should be configured to run on the ML405 or ML507 board
= =from
==Quoted 36 lines
Xilinx. =
==
= =Quoted 6 lines
make ARCH=3D<ppc or powerpc>
ml405_defconfig= = =or =
=
= =Quoted 6 lines
make ARCH=3D<ppc or powerpc>
ml507_defconfig= = =Building the Kernel
The following command will build the Linux kernel assuming you are
in
Quoted 8 lines
Quoted 7 lines
Quoted 4 lines
the root directory of the kernel. The root directory of the kernel
= =from
=
Quoted 40 lines
Quoted 5 lines
=Quoted 3 lines
the Xilinx Git tree is linux-2.6-xlnx. An elf file, zImage.elf, is created in the
arch/ppc/boot/imagesdirectory for ppc architecture.=An
=Quoted 31 lines
Quoted 4 lines
elf file, zImage, is created in the the
arch/powerpc/bootdirectory= =for
==Quoted 21 lines
the powerpc architecture.
=
= =Quoted 6 lines
make ARCH=3D<ppc or powerpc> zImage
= = ==Building the Kernel With Ramdisk
A ram disk image, a file named *.gz, must be placed into the
arch/ppc/boot/imagesorarch/powerpc/bootdirectory, depending on
the
Quoted 43 lines
Quoted 33 lines
Quoted 13 lines
architecture, prior to building the kernel.
=
= =Quoted 4 lines
make ARCH=3D<ppc or powerpc> zImage.initrd
= =Quoted 7 lines
Quoted 1 line
=An elf file, zImage.initrd.elf, is created in
arch/ppc/boot/imagesdirectory for the ppc architecture. An elf file file, zImage.initrd,= =is
==Quoted 6 lines
created in
arch/powerpc/bootdirectory for the powerpc architecture.Generating An Ace File
The elf file generated for the kernel and the bit stream can be
=Quoted 9 lines
Quoted 1 line
=combined
==Quoted 2 lines
to create an ACE file for compact flash. The following assumes a
=
Quoted 38 lines
bash
=Quoted 2 lines
Quoted 2 lines
shell where XMD is accessible and a xilinx probe attached to the
=board
=Quoted 29 lines
Quoted 12 lines
for which you are generating an ace file.
=
= =Quoted 4 lines
xmd -tcl genace.tcl -jprog -target
ppc_hw-hw <bit file name> -elf= =<elf
==Quoted 11 lines
Quoted 5 lines
= = =file name> -board <ml405 or ml507> -ace <desired ace file name>
-----Original Message-----
From: [email protected] [mailto:[email protected]]
On
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Behalf Of Peter Mendham
Sent: Tuesday, June 24, 2008 3:02 AM
To: [email protected]
Subject: Linux on Virtex board with ARCH=3DpowerpcDear all,
I'm trying to boot a 2.6.26-rc6 kernel on a custom Virtex 4 board.
I
Quoted 20 lines
Quoted 1 line
Quoted 1 line
==
Quoted 2 lines
Quoted 2 lines
have used the Xilinx utility to generate a device tree and now want
=to
=Quoted 9 lines
Quoted 3 lines
= ==
=Quoted 1 line
generate an image for throwing onto CF for use with a SystemACE
(just
Quoted 6 lines
Quoted 1 line
Quoted 1 line
==
Quoted 1 line
Quoted 1 line
like on the the ML3/4xx boards). I don't want to use a bootloader
(I
Quoted 29 lines
Quoted 1 line
Quoted 1 line
==
Quoted 24 lines
Quoted 4 lines
don't really need one). I saw something on this list about
= =simpleImage,
==Quoted 6 lines
"simple" sounded good to me so I thought I'd try that (or did I =
misinterpret what this is for?). I also don't want the image to be
= =too =
=
=Quoted 1 line
big, I always used to use a zImage under ARCH=3Dppc. So, two
questions,
Quoted 49 lines
Quoted 1 line
Quoted 1 line
==
Quoted 3 lines
Quoted 3 lines
which hopefully are easy ones:
1. I did what Grant said in a post to this list about simpleImage,=and
=Quoted 11 lines
Quoted 3 lines
= ==
=Quoted 2 lines
dumped my dts into
arch/powerpc/boot/dtsand I called itsystem.dts=Quoted 11 lines
Quoted 1 line
=(for
==Quoted 4 lines
now). I then tried to do make simpleImage.system which ran right =
through to final link then moaned about a missing simpleboot-system.
==
Quoted 10 lines
Quoted 4 lines
Where is this supposed to come from? What am I doing wrong? I
= =naively =
=
=
Quoted 32 lines
Quoted 5 lines
Quoted 5 lines
tried copying simpleboot.o to simpleboot-system.o and the error went
away. Hmm.
2. I need an ELF to give to my SystemACE file generator. This used=to
=Quoted 23 lines
Quoted 3 lines
= ==
=Quoted 6 lines
pop up in
arch/ppc/boot/imagesand be called zImage.elf, which made =sense to me. What's the deal now with powerpc? What should I be
= =using?
==Quoted 3 lines
Finally, can anyone give me a heads-up on any gotchas with what I'm =
trying to do. As you can tell, I don't entirely know what I'm
doing,
Quoted 31 lines
Quoted 31 lines
Quoted 3 lines
= =so
==Quoted 10 lines
any pointers would be gratefully received.
Thanks,
-- PeterThe University of Dundee is a Scottish Registered Charity, No.
= =SC015096.
==Quoted 6 lines
_______________________________________________
Linuxppc-embedded mailing list
[email protected]
https://ozlabs.org/mailman/listinfo/linuxppc-embedded
Quoted 6 lines
Quoted 6 lines
Quoted 4 lines
This email and any attachments are intended for the sole use of the
= =named recipient(s) and contain(s) confidential information that may
be
Quoted 27 lines
Quoted 2 lines
proprietary, privileged or copyrighted under applicable law. If you
=are
=Quoted 7 lines
not the intended recipient, do not read, copy, or forward this email message or any attachments. Delete this email message and any attachments immediately.
==Quoted 8 lines
Quoted 5 lines
=
= =The University of Dundee is a Scottish Registered Charity, No.
=SC015096.
=Quoted 2 lines
Quoted 5 lines
Quoted 2 lines
This email and any attachments are intended for the sole use of the
=named recipient(s) and contain(s) confidential information that may be proprietary, privileged or copyrighted under applicable law. If you
are
Quoted 5 lines
not the intended recipient, do not read, copy, or forward this email message or any attachments. Delete this email message and any attachments immediately.
=
Quoted 7 lines
Quoted 3 lines
=
=The University of Dundee is a Scottish Registered Charity, No.
SC015096.
Quoted 5 lines
This email and any attachments are intended for the sole use of the
named recipient(s) and contain(s) confidential information that may be proprietary, privileged or copyrighted under applicable law. If you are not the intended recipient, do not read, copy, or forward this email message or any attachments. Delete this email message and any attachments immediately.
Quoted 3 lines
=
The University of Dundee is a Scottish Registered Charity, No. SC015096.
This email and any attachments are intended for the sole use of the named r= ecipient(s) and contain(s) confidential information that may be proprietary= , privileged or copyrighted under applicable law. If you are not the intend= ed recipient, do not read, copy, or forward this email message or any attac= hments. Delete this email message and any attachments immediately.
Hi Peter, =
With regard to CONFIG_PPC_UDBG... we have a patch ready that I need to apply to the Git tree and I'll expedite that.
With the console and UART Lite, the only thing I could think of is making sure you have a dev entry for the UART Lite.
I'm assuming all the boot messages about the console, "enabled", look the same as the 550 as I have seen that give hints to problems sometimes.
Thanks,
John
-----Original Message-----
From: Peter Mendham [mailto:[email protected]] =
Sent: Friday, June 27, 2008 6:31 AM
To: John Linn
Cc: [email protected]
Subject: Re: Linux on Virtex board with ARCH=3Dpowerpc
Hi John,
Yes, with regard to the non-functional sysace, I was being an idiot: I =
had a small hw problem which now that I have fixed it, the kernel now =
reports that my drive is mounted.
I now have a new and rather bizarre problem, which maybe you or someone =
else has met before. I have a simple FPGA design with memory, a sysace =
and a uart16550 on an ML405 (I've put my hardware to one side for the =
moment). It works just fine. If I swap the uart16550 for a uartlite =
(remaking the kernel with the correct device tree) I see all the boot =
messages and the kernel seems to start OK, the root partition is mounted
but then I see nothing from /sbin/init. This is the same root fs that I
was using with the uart16550 example I just mentioned. So it's a known =
good root fs, but it doesn't appear to be able to output to /dev/console
when I have a uartlite instead of a uart16550. I have selected console =
support for uartlite. Any ideas?
Incidentally, the uart16550 solution did not work until I removed =
CONFIG_PPC_UDBG_16550 - the kernel was getting stuck in udbg_550_putc =
indefinitely.
Thanks,
-- Peter
Quoted 6 lines · John Linn
Hi Peter,
I think you'll get a baseline quicker this way and then you can go on other less known paths after that.
In my experience, this message happens when there is no compact flash
in
Quoted 4 lines
the slot of the board.
I have the system ace device as
/dev/xsa2in my notes, but I have only used it much. Sorry it's not one of my primary test cases at this
point
Quoted 8 lines
in time.
Thanks,
John-----Original Message-----
From: Peter Mendham [mailto:[email protected]] =
Quoted 8 lines
Sent: Thursday, June 26, 2008 7:24 AM
To: John Linn
Cc: [email protected]
Subject: Re: Linux on Virtex board with ARCH=3DpowerpcHi John,
OK, I've given in and I'm using the xilinx git code now :) It now
shows
Quoted 2 lines
some signs of life, thanks, but the sysace driver is not happy. My
root
Quoted 2 lines
fs is on cf and I'm not using initrd. The driver loads then gets
stuck,
Quoted 4 lines
repeatedly saying:
xsysace 80030000.sysace: kicking stalled fsm; state=3D2 task=3D0 iter=3D1=
dc=3D0
Quoted 2 lines
I notice from the driver source that state 2 is the driver attempting
to
Quoted 2 lines
acquire the mpu lock. I have tried the standard xilinx sysace
selftest =
Quoted 60 lines
code which just acquires and frees the lock (which is fine) so the =
hardware should be OK (I hope). I have the sysace hooked up to an irq
(the only one), I have no idea whether the dts is correct but it seems
to compare favourably with the ml405 one; mine says (the important bits):
intc: interrupt-controller@80010000 { #interrupt-cells =3D <2>; compatible =3D "xlnx,xps-intc-1.00.a"; interrupt-controller ; reg =3D < 80010000 10000 >; xlnx,num-intr-inputs =3D <1>; } ; sysace: sysace@80030000 { compatible =3D "xlnx,xps-sysace-1.00.a"; interrupt-parent =3D <&intc>; interrupts =3D < 0 2 >; reg =3D < 80030000 10000 >; xlnx,family =3D "virtex4"; xlnx,mem-width =3D <10>; } ;Do you have any ideas?
Thanks,
-- PeterJohn Linn wrote:
=Quoted 4 lines
Hi Peter,
To some extent I think you're trying to re-invent the wheel here, but
=I
=Quoted 5 lines
understand why.
Ideally, you would be able to pull from the mainline kernel to build this, but Xilinx hasn't got our code into the mainline. We are
=working
=Quoted 4 lines
on it more proactively now.
So, in the meantime, it would be easier for you to pull from the
=Xilinx
=Quoted 2 lines
git tree as we have solved the problems you are solving I believe.
Quoted 23 lines
Quoted 5 lines
Git://git.xilinx.com/linux-2.6-xlnx or http://git.xilinx.com/... =
We supply the device tree files and kernel configurations for the
=ML405
=Quoted 14 lines
and ML507 boards to help get started.
Thanks and sorry for the inconvenience,
John-----Original Message-----
From: Peter Mendham [mailto:[email protected]] =Sent: Wednesday, June 25, 2008 10:18 AM
To: John Linn
Cc: [email protected]
Subject: Re: Linux on Virtex board with ARCH=3DpowerpcOK, this is all new to me, so please bear with me if I've made a
major
Quoted 5 lines
Quoted 1 line
==
Quoted 10 lines
Quoted 4 lines
mistake. I ran the kernel until it didn't give me anymore output and
then told xmd to "stop", mrd from any location gave me exactly the
=same =
=
Quoted 1 line
32-bit word of garbage. I then reset the processor and mrd would
give
Quoted 13 lines
Quoted 1 line
==
Quoted 2 lines
me what looked like reasonable values. I found the
__log_bufsymbol=in =
=
Quoted 1 line
the System.map file (
0xc024a108) and tried mrd on what I assume is
the
Quoted 43 lines
Quoted 1 line
==
Quoted 5 lines
corresponding physical address of
0x0024a108. I get the following:<6>Using Xilinx Virtex machine description
<5>Linux version 2.6.26-rc6 (peter@eris) (gcc version 4.2.4) #9=PREEMPT =
=
Quoted 11 lines
Wed Jun 25 16:27:33 BST 2008
<7>Enteringadd_active_range(0, 0, 131072)0 entries of 256 used <7>Top of RAM:0x20000000, Total RAM:0x20000000<7>Memory hole size: 0MB
<4>Zone PFN ranges:<4> DMA 0 -> 131072 <4> Normal 131072 -> 131072<4>Movable zone start PFN for each node
<4>early_node_map[1] active PFN ranges
<4> 0: 0 -> 131072
<7>On node 0 totalpages: 131072Quoted 7 lines
<7> DMA zone: 1024 pages used for memmap <7> DMA zone: 0 pages reserved <7> DMA zone: 130048 pages, LIFO batch:31 <7> Normal zone: 0 pages used for memmap <7> Movable zone: 0 pages used for memmap <4>Built 1 zonelists in Zone order, mobility grouping on. Total =pages: =
=
Quoted 5 lines
130048
<5>Kernel command line: console=3DttyUL0 root=3D/dev/xsa2 rw <6>Xilinx intc at0xFDFFF000C025CFFCmapped to0x0000025d<4>PID hash table entries: 2048 (order: 11, 8192 bytes)
Quoted 30 lines
Quoted 4 lines
xmd tells me that the processor stopped at
0xc000fe50, and subsequent"con" and "stop" sequences do no move this on (it reports the same
=each =
=
Quoted 21 lines
time). Below is a choice excerpt of my System.map:
c000fdc4tsrc_errorc000fddctdst_errorc000fdf4T__div64_32c000fe94Tcacheable_memzeroc000ff38T memsetSo I guess that means it's in
__div64_32?Any ideas?
Thanks in advance,
-- PeterJohn Linn wrote:
==Quoted 1 line
Sounds like the bootstrap loader has loaded the kernel and passed
off
Quoted 47 lines
Quoted 5 lines
Quoted 5 lines
execution to it, but there's no console working on the kernel.
You can confirm that since you have a probe as you can dump the
__log_bufby getting the address of it using objdump on the elf=image.
=Quoted 38 lines
Quoted 4 lines
It's a pain to convert to readable form, but can help to see that
= =things
==Quoted 4 lines
are indeed running. Stop the processor, then do the memory read
= =command,
==Quoted 11 lines
mrd, in xmd. =
For the console to work with UART Lite,
CONFIG_OFmust be on in the kernel configuration, I would check that.The file,
arch/powerpc/boot/virtex.c, has the startup code for the virtex specific processing. It checks to make sure there is= =compatible
==Quoted 1 line
hardware based on the device tree. If your device tree doesn't
match
Quoted 1 line
Quoted 1 line
Quoted 1 line
that hardware you could have a problem. I have not found the
powerup
Quoted 9 lines
Quoted 8 lines
Quoted 3 lines
= =of
==
Quoted 216 lines
Quoted 4 lines
Quoted 4 lines
the kernel to be very informative if the device tree is wrong.
I pasted in our ML405 device tree below to allow you to compare to
=it.
=Quoted 208 lines
Quoted 208 lines
Hope that helps,
John/*
* (C) Copyright 2007 Michal Simek
*
* Michal SIMEK <[email protected]>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of
* the License, or (at your option) any later version. ** This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*
* CAUTION: This file is automatically generated by libgen.
* Version: Xilinx EDK 10.1.1 EDK_K_SP1.1
*// { #address-cells =3D <1>; #size-cells =3D <1>; compatible =3D "xlnx,virtex"; model =3D "testing"; DDR_SDRAM: memory@0 { device_type =3D "memory"; reg =3D < 0 8000000 >; } ; chosen { bootargs =3D "console=3DttyS0 ip=3Don root=3D/dev/ram"; linux,stdout-path =3D "/plb@0/serial@83e00000"; } ; cpus { #address-cells =3D <1>; #cpus =3D <1>; #size-cells =3D <0>; ppc405_0: cpu@0 { clock-frequency =3D <11e1a300>; compatible =3D "PowerPC,405", "ibm,ppc405"; d-cache-line-size =3D <20>; d-cache-size =3D <4000>; device_type =3D "cpu"; i-cache-line-size =3D <20>; i-cache-size =3D <4000>; model =3D "PowerPC,405"; reg =3D <0>; timebase-frequency =3D <11e1a300>; xlnx,apu-control =3D <de00>; xlnx,apu-udi-1 =3D <a18983>; xlnx,apu-udi-2 =3D <a38983>; xlnx,apu-udi-3 =3D <a589c3>; xlnx,apu-udi-4 =3D <a789c3>; xlnx,apu-udi-5 =3D <a98c03>; xlnx,apu-udi-6 =3D <ab8c03>; xlnx,apu-udi-7 =3D <ad8c43>; xlnx,apu-udi-8 =3D <af8c43>; xlnx,deterministic-mult =3D <0>; xlnx,disable-operand-forwarding =3D <1>; xlnx,fastest-plb-clock =3D "DPLB0"; xlnx,generate-plb-timespecs =3D <1>; xlnx,mmu-enable =3D <1>; xlnx,pvr-high =3D <0>; xlnx,pvr-low =3D <0>; } ; } ; plb: plb@0 { #address-cells =3D <1>; #size-cells =3D <1>; compatible =3D "xlnx,plb-v46-1.02.a"; ranges ; IIC_EEPROM: i2c@81600000 { compatible =3D "xlnx,xps-iic-2.00.a"; interrupt-parent =3D <&xps_intc_0>; interrupts =3D < 4 2 >; reg =3D < 81600000 10000 >; xlnx,clk-freq =3D <5f5e100>; xlnx,family =3D "virtex4"; xlnx,gpo-width =3D <1>; xlnx,iic-freq =3D <186a0>; xlnx,scl-inertial-delay =3D <0>; xlnx,sda-inertial-delay =3D <0>; xlnx,ten-bit-adr =3D <0>; } ; LEDs_4Bit: gpio@81400000 { compatible =3D "xlnx,xps-gpio-1.00.a"; interrupt-parent =3D <&xps_intc_0>; interrupts =3D < 5 2 >; reg =3D < 81400000 10000 >; xlnx,all-inputs =3D <0>; xlnx,all-inputs-2 =3D <0>; xlnx,dout-default =3D <0>; xlnx,dout-default-2 =3D <0>; xlnx,family =3D "virtex4"; xlnx,gpio-width =3D <4>; xlnx,interrupt-present =3D <1>; xlnx,is-bidir =3D <1>; xlnx,is-bidir-2 =3D <1>; xlnx,is-dual =3D <0>; xlnx,tri-default =3D <ffffffff>; xlnx,tri-default-2 =3D <ffffffff>; } ; RS232_Uart: serial@83e00000 { compatible =3D "ns16550"; device_type =3D "serial"; interrupt-parent =3D <&xps_intc_0>; interrupts =3D < 6 2 >; reg =3D < 83e00000 10000 >; reg-offset =3D <3>; reg-shift =3D <2>; = clock-frequency =3D <05f5e100>; xlnx,family =3D "virtex4"; xlnx,has-external-rclk =3D <0>; xlnx,has-external-xin =3D <0>; xlnx,is-a-16550 =3D <1>; } ; SysACE_CompactFlash: sysace@83600000 { compatible =3D "xlnx,xps-sysace-1.00.a"; interrupt-parent =3D <&xps_intc_0>; interrupts =3D < 3 2 >; reg =3D < 83600000 10000 >; xlnx,family =3D "virtex4"; xlnx,mem-width =3D <10>; } ; TriMode_MAC_GMII: xps-ll-temac@81c00000 { #address-cells =3D <1>; #size-cells =3D <1>; compatible =3D "xlnx,compound"; ethernet@81c00000 { compatible =3D "xlnx,xps-ll-temac-1.01.a"; device_type =3D "network"; interrupt-parent =3D <&xps_intc_0>; interrupts =3D < 2 2 >; llink-connected =3D <&PIM2>; local-mac-address =3D [ 02 00 00 00 00 01 ]; reg =3D < 81c00000 40 >; xlnx,bus2core-clk-ratio =3D <1>; xlnx,phy-type =3D <1>; xlnx,phyaddr =3D <1>; xlnx,rxcsum =3D <0>; xlnx,rxfifo =3D <1000>; xlnx,temac-type =3D <1>; xlnx,txcsum =3D <0>; xlnx,txfifo =3D <1000>; } ; } ; mpmc@0 { #address-cells =3D <1>; #size-cells =3D <1>; compatible =3D "xlnx,mpmc-4.00.a"; PIM2: sdma@84600100 { compatible =3D "xlnx,ll-dma-1.00.a"; interrupt-parent =3D <&xps_intc_0>; interrupts =3D < 1 2 0 2 >; reg =3D < 84600100 80 >; } ; } ; xps_bram_if_cntlr_1: xps-bram-if-cntlr@ffffe000 { compatible =3D "xlnx,xps-bram-if-cntlr-1.00.a"; reg =3D < ffffe000 2000 >; xlnx,family =3D "virtex4"; } ; xps_intc_0: interrupt-controller@81800000 { #interrupt-cells =3D <2>; compatible =3D "xlnx,xps-intc-1.00.a"; interrupt-controller ; reg =3D < 81800000 10000 >; xlnx,num-intr-inputs =3D <7>; } ; } ; ppc405_0_dplb1: plb@1 { #address-cells =3D <1>; #size-cells =3D <1>; compatible =3D "xlnx,plb-v46-1.02.a"; ranges ; } ; } ;-----Original Message-----
From: Peter Mendham [mailto:[email protected]] =Sent: Tuesday, June 24, 2008 1:21 PM
To: John Linn
Cc: [email protected]
Subject: Re: Linux on Virtex board with ARCH=3DpowerpcHi John,
Thanks for your reply, that's really helpful. I'm actually using
the
Quoted 29 lines
Quoted 1 line
Quoted 1 line
==
Quoted 24 lines
Quoted 4 lines
mainline kernel, rather than the one from the xilinx git tree, but
= =your =
=
=Quoted 6 lines
information has really moved me on. My first problem was that the =
Xilinx utility (from the git tree) for device tree dts generation
= =didn't
==Quoted 1 line
insert a "linux,stdout-path" node under "chosen". I spotted that
the
Quoted 33 lines
Quoted 1 line
Quoted 1 line
==
Quoted 28 lines
Quoted 6 lines
ml403 example had this, so after adding it I got early console =
messages. Everything now grinds to a halt after I get the message
= ="flat
==Quoted 4 lines
tree at
0x40ad60" which is just before it calls the kernel, so I= =assume =
=
=Quoted 5 lines
it's that call that is killing it. I have "console=3DttyUL0" for my =
uartlite, so I should be getting messages, shouldn't I? Do you know
where the next execution point is? Maybe I could find out where
it's
Quoted 5 lines
Quoted 1 line
Quoted 1 line
==
Quoted 17 lines
Quoted 4 lines
Quoted 4 lines
getting stuck.
I haven't managed to generate an ACE file, I'm just loading the
=kernel
=Quoted 9 lines
Quoted 3 lines
= ==
=Quoted 1 line
image from xmd ATM, genace won't play ball for me, it complains
about
Quoted 6 lines
Quoted 1 line
Quoted 1 line
==
Quoted 1 line
Quoted 1 line
-board user not being valid, it won't even run on the examples
copied
Quoted 31 lines
Quoted 1 line
Quoted 1 line
==
Quoted 26 lines
Quoted 4 lines
directly from the user manual. Anyway, I think genace is a bit OT,
= =and =
=
=Quoted 15 lines
I can manage with xmd for now.
Thanks,
-- PeterJohn Linn wrote:
== =Quoted 3 lines
Hi Peter,
I'm not up on what can be done with the simple image you refer to
in
Quoted 12 lines
Quoted 11 lines
Quoted 11 lines
Quoted 4 lines
= =1.
== =
Quoted 24 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
I'm sure I should be, but there's a lot to learn.
With regards to 2, the elf image, zImage (without the elf
=extension),
=Quoted 16 lines
Quoted 16 lines
Quoted 5 lines
= = =is
== =Quoted 3 lines
located in
arch/powerpc/boot.You can make a SystemACE file from that elf image just as you did
in
Quoted 9 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
arch/ppc. We have a default device tree file,ml405.dts, in thearch/powerpc/boot/dtsdirectory for our ml405 board. The kernel configuration has a config,DEVICE_TREE, that specifies the name of= = =
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
the
== =Quoted 1 line
device tree file. I normally compile the device tree into the
kernel
Quoted 9 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
which is the default build, make ARCH=3Dpowerpc zImage. That image
=does
=Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
not require a boot loader.
I inserted the text below from a document that I have about
building
Quoted 28 lines
Quoted 27 lines
Quoted 27 lines
Quoted 5 lines
= = =the
== =Quoted 14 lines
arch/ppcandarch/powerpckernels.Hope that helps,
JohnNotation
The phrase "<ppc or powerpc>" is used throughput the text and means
= = =
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
that
== =Quoted 1 line
one or the other, "ppc" or "powerpc" is to be typed depending on
the
Quoted 216 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
architecture you are building.
Commands that are used in a bash shell are preceded by ">".
Getting Ready To Build the Kernel
This assumes you installed the ELDK tools and assumes you'll be
=using
=Quoted 38 lines
Quoted 37 lines
Quoted 5 lines
= = =a
== =Quoted 24 lines
bash shell.
=
= = =Quoted 9 lines
bash
export CROSS_COMPILE=3Dppc_4xx-= = = =Setting Up the Kernel Tree
If you have previously built this kernel for another architecture,
=Quoted 102 lines
Quoted 1 line
Quoted 1 line
=ppc
==Quoted 95 lines
Quoted 7 lines
or powerpc, then the tree needs to be setup correctly for the new architecture. Assuming you have not previously built it, this does
= = =not
== =Quoted 19 lines
need to be done.
=
= = =Quoted 8 lines
make ARCH=3D<ppc or powerpc> mrproper
= = = =Quoted 8 lines
Configuring the Kernel
The kernel should be configured to run on the ML405 or ML507 board
= = =from
== =Quoted 45 lines
Xilinx. =
==
= = =Quoted 8 lines
make ARCH=3D<ppc or powerpc>
ml405_defconfig= = = =or =
=
= = =Quoted 8 lines
make ARCH=3D<ppc or powerpc>
ml507_defconfig= = = =Building the Kernel
The following command will build the Linux kernel assuming you are
=in
=Quoted 59 lines
Quoted 5 lines
Quoted 4 lines
the root directory of the kernel. The root directory of the kernel
= =Quoted 14 lines
Quoted 1 line
=from
== =Quoted 5 lines
the Xilinx Git tree is linux-2.6-xlnx. An elf file, zImage.elf, is created in the
arch/ppc/boot/imagesdirectory for ppc architecture.= =An
==Quoted 34 lines
Quoted 6 lines
elf file, zImage, is created in the the
arch/powerpc/bootdirectory= = =for
== =Quoted 20 lines
the powerpc architecture.
=
= = =Quoted 8 lines
make ARCH=3D<ppc or powerpc> zImage
= = = ==
Quoted 30 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Building the Kernel With Ramdisk
A ram disk image, a file named *.gz, must be placed into the
arch/ppc/boot/imagesorarch/powerpc/bootdirectory, depending on=the
=Quoted 21 lines
Quoted 21 lines
Quoted 21 lines
architecture, prior to building the kernel.
=
= = =Quoted 8 lines
make ARCH=3D<ppc or powerpc> zImage.initrd
= = = =An elf file, zImage.initrd.elf, is created in
arch/ppc/boot/imagesdirectory for the ppc architecture. An elf file file,
zImage.initrd,
Quoted 6 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
= = =
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
is
== =Quoted 1 line
created in
arch/powerpc/bootdirectory for the powerpc
architecture.
Quoted 178 lines
Quoted 29 lines
Quoted 8 lines
Quoted 7 lines
Generating An Ace File
The elf file generated for the kernel and the bit stream can be
= =Quoted 13 lines
Quoted 1 line
=combined
== =Quoted 4 lines
to create an ACE file for compact flash. The following assumes a
= =bash
=Quoted 2 lines
Quoted 2 lines
shell where XMD is accessible and a xilinx probe attached to the
=Quoted 45 lines
Quoted 1 line
Quoted 1 line
=board
==Quoted 38 lines
Quoted 16 lines
for which you are generating an ace file.
=
= = =Quoted 6 lines
xmd -tcl genace.tcl -jprog -target
ppc_hw-hw <bit file name> -elf= = =<elf
== =Quoted 14 lines
Quoted 7 lines
= = = =file name> -board <ml405 or ml507> -ace <desired ace file name>
-----Original Message-----
From: [email protected] [mailto:[email protected]]=On
=Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Behalf Of Peter Mendham
Sent: Tuesday, June 24, 2008 3:02 AM
To: [email protected]
Subject: Linux on Virtex board with ARCH=3DpowerpcDear all,
I'm trying to boot a 2.6.26-rc6 kernel on a custom Virtex 4 board.
=I
=Quoted 11 lines
Quoted 3 lines
Quoted 3 lines
= ==
=Quoted 2 lines
Quoted 2 lines
have used the Xilinx utility to generate a device tree and now want
=Quoted 21 lines
Quoted 1 line
Quoted 1 line
=to
==Quoted 14 lines
Quoted 5 lines
= = ==
= =Quoted 2 lines
generate an image for throwing onto CF for use with a SystemACE
=(just
=Quoted 10 lines
Quoted 3 lines
Quoted 3 lines
= ==
=Quoted 2 lines
Quoted 2 lines
like on the the ML3/4xx boards). I don't want to use a bootloader
=(I
=Quoted 36 lines
Quoted 3 lines
Quoted 3 lines
= ==
=Quoted 28 lines
Quoted 6 lines
don't really need one). I saw something on this list about
= = =simpleImage,
== =Quoted 8 lines
"simple" sounded good to me so I thought I'd try that (or did I =
misinterpret what this is for?). I also don't want the image to be
= = =too =
=
=
Quoted 56 lines
Quoted 4 lines
Quoted 4 lines
=Quoted 2 lines
big, I always used to use a zImage under ARCH=3Dppc. So, two
=questions,
=Quoted 48 lines
Quoted 3 lines
Quoted 3 lines
= ==
=Quoted 5 lines
Quoted 5 lines
which hopefully are easy ones:
1. I did what Grant said in a post to this list about simpleImage,= =and
==Quoted 29 lines
Quoted 5 lines
= = ==
= =Quoted 6 lines
dumped my dts into
arch/powerpc/boot/dtsand I called itsystem.dts= = =(for
== =Quoted 3 lines
now). I then tried to do make simpleImage.system which ran right =
through to final link then moaned about a missing
simpleboot-system.
Quoted 17 lines
Quoted 16 lines
Quoted 3 lines
Quoted 3 lines
= ==
=Quoted 8 lines
Quoted 6 lines
Where is this supposed to come from? What am I doing wrong? I
= = =naively =
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
=
= =Quoted 1 line
tried copying simpleboot.o to simpleboot-system.o and the error
went
Quoted 96 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
==
Quoted 4 lines
Quoted 3 lines
Quoted 3 lines
away. Hmm.
2. I need an ELF to give to my SystemACE file generator. This used=Quoted 39 lines
Quoted 1 line
Quoted 1 line
=to
==Quoted 32 lines
Quoted 5 lines
= = ==
= =Quoted 8 lines
pop up in
arch/ppc/boot/imagesand be called zImage.elf, which madesense to me. What's the deal now with powerpc? What should I be
= = =using?
== =Quoted 4 lines
Finally, can anyone give me a heads-up on any gotchas with what I'm
trying to do. As you can tell, I don't entirely know what I'm
=doing,
=Quoted 43 lines
Quoted 43 lines
Quoted 5 lines
= = =so
== =Quoted 6 lines
any pointers would be gratefully received.
Thanks,
-- PeterQuoted 6 lines
The University of Dundee is a Scottish Registered Charity, No.
= = =SC015096.
== =Quoted 10 lines
_______________________________________________
Linuxppc-embedded mailing list
[email protected]
https://ozlabs.org/mailman/listinfo/linuxppc-embeddedThis email and any attachments are intended for the sole use of the
= =
Quoted 51 lines
Quoted 4 lines
Quoted 4 lines
Quoted 1 line
=named recipient(s) and contain(s) confidential information that may
=be
=Quoted 43 lines
Quoted 4 lines
proprietary, privileged or copyrighted under applicable law. If you
= =are
==Quoted 13 lines
not the intended recipient, do not read, copy, or forward this email message or any attachments. Delete this email message and any attachments immediately.
== =Quoted 3 lines
=
=Quoted 8 lines
Quoted 3 lines
= =The University of Dundee is a Scottish Registered Charity, No.
= =SC015096.
==Quoted 4 lines
This email and any attachments are intended for the sole use of the
= =named recipient(s) and contain(s) confidential information that may
be
Quoted 27 lines
Quoted 2 lines
proprietary, privileged or copyrighted under applicable law. If you
=are
=Quoted 7 lines
not the intended recipient, do not read, copy, or forward this email message or any attachments. Delete this email message and any attachments immediately.
==Quoted 8 lines
Quoted 5 lines
=
= =The University of Dundee is a Scottish Registered Charity, No.
=SC015096.
=Quoted 2 lines
Quoted 5 lines
Quoted 2 lines
This email and any attachments are intended for the sole use of the
=named recipient(s) and contain(s) confidential information that may be proprietary, privileged or copyrighted under applicable law. If you
are
Quoted 5 lines
not the intended recipient, do not read, copy, or forward this email message or any attachments. Delete this email message and any attachments immediately.
=
Quoted 7 lines
Quoted 3 lines
=
=The University of Dundee is a Scottish Registered Charity, No.
SC015096.
Quoted 5 lines
This email and any attachments are intended for the sole use of the
named recipient(s) and contain(s) confidential information that may be proprietary, privileged or copyrighted under applicable law. If you are not the intended recipient, do not read, copy, or forward this email message or any attachments. Delete this email message and any attachments immediately.
Quoted 3 lines
=
The University of Dundee is a Scottish Registered Charity, No. SC015096.
This email and any attachments are intended for the sole use of the named r= ecipient(s) and contain(s) confidential information that may be proprietary= , privileged or copyrighted under applicable law. If you are not the intend= ed recipient, do not read, copy, or forward this email message or any attac= hments. Delete this email message and any attachments immediately.
Hi John,
Yes, with regard to the non-functional sysace, I was being an idiot: I had a small hw problem which now that I have fixed it, the kernel now reports that my drive is mounted.
I now have a new and rather bizarre problem, which maybe you or someone else has met before. I have a simple FPGA design with memory, a sysace and a uart16550 on an ML405 (I've put my hardware to one side for the moment). It works just fine. If I swap the uart16550 for a uartlite (remaking the kernel with the correct device tree) I see all the boot messages and the kernel seems to start OK, the root partition is mounted but then I see nothing from /sbin/init. This is the same root fs that I was using with the uart16550 example I just mentioned. So it's a known good root fs, but it doesn't appear to be able to output to /dev/console when I have a uartlite instead of a uart16550. I have selected console support for uartlite. Any ideas?
Incidentally, the uart16550 solution did not work until I removed CONFIG_PPC_UDBG_16550 - the kernel was getting stuck in udbg_550_putc indefinitely.
Thanks,
-- Peter
Quoted 987 lines · John Linn
Hi Peter,
I think you'll get a baseline quicker this way and then you can go on other less known paths after that.
In my experience, this message happens when there is no compact flash in the slot of the board.
I have the system ace device as
/dev/xsa2in my notes, but I have only used it much. Sorry it's not one of my primary test cases at this point in time.Thanks,
John-----Original Message-----
From: Peter Mendham [mailto:[email protected]] Sent: Thursday, June 26, 2008 7:24 AM
To: John Linn
Cc: [email protected]
Subject: Re: Linux on Virtex board with ARCH=powerpcHi John,
OK, I've given in and I'm using the xilinx git code now :) It now shows
some signs of life, thanks, but the sysace driver is not happy. My root
fs is on cf and I'm not using initrd. The driver loads then gets stuck,
repeatedly saying:
xsysace 80030000.sysace: kicking stalled fsm; state=2 task=0 iter=1 dc=0
I notice from the driver source that state 2 is the driver attempting to
acquire the mpu lock. I have tried the standard xilinx sysace selftest code which just acquires and frees the lock (which is fine) so the hardware should be OK (I hope). I have the sysace hooked up to an irq (the only one), I have no idea whether the dts is correct but it seems to compare favourably with the ml405 one; mine says (the important bits):
intc: interrupt-controller@80010000 { #interrupt-cells = <2>; compatible = "xlnx,xps-intc-1.00.a"; interrupt-controller ; reg = < 80010000 10000 >; xlnx,num-intr-inputs = <1>; } ; sysace: sysace@80030000 { compatible = "xlnx,xps-sysace-1.00.a"; interrupt-parent = <&intc>; interrupts = < 0 2 >; reg = < 80030000 10000 >; xlnx,family = "virtex4"; xlnx,mem-width = <10>; } ;Do you have any ideas?
Thanks,
-- PeterQuoted 4 lines · John Linn
Hi Peter,
To some extent I think you're trying to re-invent the wheel here, but
I
Quoted 5 lines
understand why.
Ideally, you would be able to pull from the mainline kernel to build this, but Xilinx hasn't got our code into the mainline. We are
working
Quoted 4 lines
on it more proactively now.
So, in the meantime, it would be easier for you to pull from the
Xilinx
Quoted 6 lines
git tree as we have solved the problems you are solving I believe.
Git://git.xilinx.com/linux-2.6-xlnx or http://git.xilinx.com/...
We supply the device tree files and kernel configurations for the
ML405
Quoted 11 lines
and ML507 boards to help get started.
Thanks and sorry for the inconvenience,
John-----Original Message-----
From: Peter Mendham [mailto:[email protected]] Sent: Wednesday, June 25, 2008 10:18 AM
To: John Linn
Cc: [email protected]
Subject: Re: Linux on Virtex board with ARCH=powerpcQuoted 6 lines
OK, this is all new to me, so please bear with me if I've made a major
mistake. I ran the kernel until it didn't give me anymore output and then told xmd to "stop", mrd from any location gave me exactly the
same
Quoted 6 lines
32-bit word of garbage. I then reset the processor and mrd would give
me what looked like reasonable values. I found the
__log_bufsymbolin
Quoted 9 lines
the System.map file (
0xc024a108) and tried mrd on what I assume is thecorresponding physical address of
0x0024a108. I get the following:<6>Using Xilinx Virtex machine description
<5>Linux version 2.6.26-rc6 (peter@eris) (gcc version 4.2.4) #9PREEMPT
Quoted 11 lines
Wed Jun 25 16:27:33 BST 2008
<7>Enteringadd_active_range(0, 0, 131072)0 entries of 256 used <7>Top of RAM:0x20000000, Total RAM:0x20000000<7>Memory hole size: 0MB
<4>Zone PFN ranges:<4> DMA 0 -> 131072 <4> Normal 131072 -> 131072<4>Movable zone start PFN for each node
<4>early_node_map[1] active PFN ranges
<4> 0: 0 -> 131072
<7>On node 0 totalpages: 131072Quoted 7 lines
<7> DMA zone: 1024 pages used for memmap <7> DMA zone: 0 pages reserved <7> DMA zone: 130048 pages, LIFO batch:31 <7> Normal zone: 0 pages used for memmap <7> Movable zone: 0 pages used for memmap<4>Built 1 zonelists in Zone order, mobility grouping on. Total
pages:
Quoted 7 lines
130048
<5>Kernel command line: console=ttyUL0 root=/dev/xsa2 rw <6>Xilinx intc at0xFDFFF000C025CFFCmapped to0x0000025d<4>PID hash table entries: 2048 (order: 11, 8192 bytes)xmd tells me that the processor stopped at
0xc000fe50, and subsequent "con" and "stop" sequences do no move this on (it reports the sameeach
Quoted 8 lines
time). Below is a choice excerpt of my System.map:
c000fdc4tsrc_errorc000fddctdst_errorc000fdf4T__div64_32c000fe94Tcacheable_memzeroc000ff38T memsetQuoted 16 lines
So I guess that means it's in
__div64_32?Any ideas?
Thanks in advance,
-- PeterQuoted 6 lines · John Linn
Sounds like the bootstrap loader has loaded the kernel and passed off execution to it, but there's no console working on the kernel.
You can confirm that since you have a probe as you can dump the
__log_bufby getting the address of it using objdump on the elfimage.
Quoted 21 lines
Quoted 3 lines
It's a pain to convert to readable form, but can help to see that
things
Quoted 3 lines
are indeed running. Stop the processor, then do the memory read
command,
Quoted 9 lines
mrd, in xmd.
For the console to work with UART Lite,
CONFIG_OFmust be on in the kernel configuration, I would check that.The file,
arch/powerpc/boot/virtex.c, has the startup code for the virtex specific processing. It checks to make sure there isQuoted 14 lines
compatible
Quoted 4 lines
hardware based on the device tree. If your device tree doesn't match that hardware you could have a problem. I have not found the powerup
of
Quoted 4 lines
the kernel to be very informative if the device tree is wrong.
I pasted in our ML405 device tree below to allow you to compare to
it.
Quoted 227 lines
Quoted 202 lines
Hope that helps,
John/*
* (C) Copyright 2007 Michal Simek
*
* Michal SIMEK <[email protected]>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of
* the License, or (at your option) any later version. ** This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*
* CAUTION: This file is automatically generated by libgen.
* Version: Xilinx EDK 10.1.1 EDK_K_SP1.1
*// { #address-cells = <1>; #size-cells = <1>; compatible = "xlnx,virtex"; model = "testing"; DDR_SDRAM: memory@0 { device_type = "memory"; reg = < 0 8000000 >; } ; chosen { bootargs = "console=ttyS0 ip=on root=/dev/ram"; linux,stdout-path = "/plb@0/serial@83e00000"; } ; cpus { #address-cells = <1>; #cpus = <1>; #size-cells = <0>; ppc405_0: cpu@0 { clock-frequency = <11e1a300>; compatible = "PowerPC,405", "ibm,ppc405"; d-cache-line-size = <20>; d-cache-size = <4000>; device_type = "cpu"; i-cache-line-size = <20>; i-cache-size = <4000>; model = "PowerPC,405"; reg = <0>; timebase-frequency = <11e1a300>; xlnx,apu-control = <de00>; xlnx,apu-udi-1 = <a18983>; xlnx,apu-udi-2 = <a38983>; xlnx,apu-udi-3 = <a589c3>; xlnx,apu-udi-4 = <a789c3>; xlnx,apu-udi-5 = <a98c03>; xlnx,apu-udi-6 = <ab8c03>; xlnx,apu-udi-7 = <ad8c43>; xlnx,apu-udi-8 = <af8c43>; xlnx,deterministic-mult = <0>; xlnx,disable-operand-forwarding = <1>; xlnx,fastest-plb-clock = "DPLB0"; xlnx,generate-plb-timespecs = <1>; xlnx,mmu-enable = <1>; xlnx,pvr-high = <0>; xlnx,pvr-low = <0>; } ; } ; plb: plb@0 { #address-cells = <1>; #size-cells = <1>; compatible = "xlnx,plb-v46-1.02.a"; ranges ; IIC_EEPROM: i2c@81600000 { compatible = "xlnx,xps-iic-2.00.a"; interrupt-parent = <&xps_intc_0>; interrupts = < 4 2 >; reg = < 81600000 10000 >; xlnx,clk-freq = <5f5e100>; xlnx,family = "virtex4"; xlnx,gpo-width = <1>; xlnx,iic-freq = <186a0>; xlnx,scl-inertial-delay = <0>; xlnx,sda-inertial-delay = <0>; xlnx,ten-bit-adr = <0>; } ; LEDs_4Bit: gpio@81400000 { compatible = "xlnx,xps-gpio-1.00.a"; interrupt-parent = <&xps_intc_0>; interrupts = < 5 2 >; reg = < 81400000 10000 >; xlnx,all-inputs = <0>; xlnx,all-inputs-2 = <0>; xlnx,dout-default = <0>; xlnx,dout-default-2 = <0>; xlnx,family = "virtex4"; xlnx,gpio-width = <4>; xlnx,interrupt-present = <1>; xlnx,is-bidir = <1>; xlnx,is-bidir-2 = <1>; xlnx,is-dual = <0>; xlnx,tri-default = <ffffffff>; xlnx,tri-default-2 = <ffffffff>; } ; RS232_Uart: serial@83e00000 { compatible = "ns16550"; device_type = "serial"; interrupt-parent = <&xps_intc_0>; interrupts = < 6 2 >; reg = < 83e00000 10000 >; reg-offset = <3>; reg-shift = <2>; clock-frequency = <05f5e100>; xlnx,family = "virtex4"; xlnx,has-external-rclk = <0>; xlnx,has-external-xin = <0>; xlnx,is-a-16550 = <1>; } ; SysACE_CompactFlash: sysace@83600000 { compatible = "xlnx,xps-sysace-1.00.a"; interrupt-parent = <&xps_intc_0>; interrupts = < 3 2 >; reg = < 83600000 10000 >; xlnx,family = "virtex4"; xlnx,mem-width = <10>; } ; TriMode_MAC_GMII: xps-ll-temac@81c00000 { #address-cells = <1>; #size-cells = <1>; compatible = "xlnx,compound"; ethernet@81c00000 { compatible = "xlnx,xps-ll-temac-1.01.a"; device_type = "network"; interrupt-parent = <&xps_intc_0>; interrupts = < 2 2 >; llink-connected = <&PIM2>; local-mac-address = [ 02 00 00 00 00 01 ]; reg = < 81c00000 40 >; xlnx,bus2core-clk-ratio = <1>; xlnx,phy-type = <1>; xlnx,phyaddr = <1>; xlnx,rxcsum = <0>; xlnx,rxfifo = <1000>; xlnx,temac-type = <1>; xlnx,txcsum = <0>; xlnx,txfifo = <1000>; } ; } ; mpmc@0 { #address-cells = <1>; #size-cells = <1>; compatible = "xlnx,mpmc-4.00.a"; PIM2: sdma@84600100 { compatible = "xlnx,ll-dma-1.00.a"; interrupt-parent = <&xps_intc_0>; interrupts = < 1 2 0 2 >; reg = < 84600100 80 >; } ; } ; xps_bram_if_cntlr_1: xps-bram-if-cntlr@ffffe000 { compatible = "xlnx,xps-bram-if-cntlr-1.00.a"; reg = < ffffe000 2000 >; xlnx,family = "virtex4"; } ; xps_intc_0: interrupt-controller@81800000 { #interrupt-cells = <2>; compatible = "xlnx,xps-intc-1.00.a"; interrupt-controller ; reg = < 81800000 10000 >; xlnx,num-intr-inputs = <7>; } ; } ; ppc405_0_dplb1: plb@1 { #address-cells = <1>; #size-cells = <1>; compatible = "xlnx,plb-v46-1.02.a"; ranges ; } ; } ;-----Original Message-----
From: Peter Mendham [mailto:[email protected]] Sent: Tuesday, June 24, 2008 1:21 PM
To: John Linn
Cc: [email protected]
Subject: Re: Linux on Virtex board with ARCH=powerpcQuoted 9 lines
Hi John,
Thanks for your reply, that's really helpful. I'm actually using the
mainline kernel, rather than the one from the xilinx git tree, but
your
Quoted 3 lines
information has really moved me on. My first problem was that the Xilinx utility (from the git tree) for device tree dts generation
didn't
Quoted 7 lines
insert a "linux,stdout-path" node under "chosen". I spotted that the
ml403 example had this, so after adding it I got early console messages. Everything now grinds to a halt after I get the message
Quoted 17 lines
"flat
Quoted 3 lines
tree at
0x40ad60" which is just before it calls the kernel, so Iassume
Quoted 8 lines
it's that call that is killing it. I have "console=ttyUL0" for my uartlite, so I should be getting messages, shouldn't I? Do you know where the next execution point is? Maybe I could find out where it's
getting stuck.
I haven't managed to generate an ACE file, I'm just loading the
kernel
Quoted 8 lines
Quoted 6 lines
image from xmd ATM, genace won't play ball for me, it complains about
Quoted 33 lines
Quoted 7 lines
-board user not being valid, it won't even run on the examples copied
directly from the user manual. Anyway, I think genace is a bit OT,
and
Quoted 23 lines
I can manage with xmd for now.
Thanks,
-- PeterQuoted 6 lines · John Linn
Hi Peter,
I'm not up on what can be done with the simple image you refer to in
1.
Quoted 4 lines
I'm sure I should be, but there's a lot to learn.
With regards to 2, the elf image, zImage (without the elf
extension),
Quoted 16 lines
Quoted 16 lines
Quoted 3 lines
is
Quoted 9 lines
located in
arch/powerpc/boot.You can make a SystemACE file from that elf image just as you did in
arch/ppc. We have a default device tree file,ml405.dts, in thearch/powerpc/boot/dtsdirectory for our ml405 board. The kernel configuration has a config,DEVICE_TREE, that specifies the name ofQuoted 7 lines
Quoted 7 lines
the
Quoted 3 lines
device tree file. I normally compile the device tree into the kernel which is the default build, make ARCH=powerpc zImage. That image
does
Quoted 29 lines
Quoted 29 lines
Quoted 6 lines
not require a boot loader.
I inserted the text below from a document that I have about building
the
Quoted 12 lines
arch/ppcandarch/powerpckernels.Hope that helps,
JohnNotation
The phrase "<ppc or powerpc>" is used throughput the text and means
that
Quoted 3 lines
one or the other, "ppc" or "powerpc" is to be typed depending on the architecture you are building.
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Commands that are used in a bash shell are preceded by ">".
Getting Ready To Build the Kernel
This assumes you installed the ELDK tools and assumes you'll be
using
Quoted 19 lines
Quoted 19 lines
Quoted 3 lines
a
Quoted 12 lines
bash shell.
Quoted 6 lines
bash
export CROSS_COMPILE=ppc_4xx-Quoted 64 lines
Quoted 5 lines
Quoted 5 lines
Setting Up the Kernel Tree
If you have previously built this kernel for another architecture,
ppc
Quoted 56 lines
Quoted 5 lines
or powerpc, then the tree needs to be setup correctly for the new architecture. Assuming you have not previously built it, this does
not
Quoted 6 lines
need to be done.
Quoted 11 lines
Quoted 5 lines
make ARCH=<ppc or powerpc> mrproper
Configuring the Kernel
The kernel should be configured to run on the ML405 or ML507 board
from
Quoted 26 lines
Xilinx.
Quoted 5 lines
make ARCH=<ppc or powerpc>
ml405_defconfigor
Quoted 5 lines
make ARCH=<ppc or powerpc>
ml507_defconfigBuilding the Kernel
The following command will build the Linux kernel assuming you are
in
Quoted 8 lines
Quoted 8 lines
Quoted 4 lines
the root directory of the kernel. The root directory of the kernel
from
Quoted 32 lines
Quoted 4 lines
Quoted 4 lines
the Xilinx Git tree is linux-2.6-xlnx. An elf file, zImage.elf, is created in the
arch/ppc/boot/imagesdirectory for ppc architecture.An
Quoted 25 lines
Quoted 4 lines
elf file, zImage, is created in the the
arch/powerpc/bootdirectoryfor
Quoted 17 lines
the powerpc architecture.
Quoted 5 lines
make ARCH=<ppc or powerpc> zImage
Building the Kernel With Ramdisk
A ram disk image, a file named *.gz, must be placed into the
arch/ppc/boot/imagesorarch/powerpc/bootdirectory, depending onthe
Quoted 35 lines
Quoted 22 lines
Quoted 6 lines
architecture, prior to building the kernel.
Quoted 10 lines
Quoted 5 lines
make ARCH=<ppc or powerpc> zImage.initrd
An elf file, zImage.initrd.elf, is created in
arch/ppc/boot/imagesdirectory for the ppc architecture. An elf file file, zImage.initrd,is
Quoted 2 lines
created in
arch/powerpc/bootdirectory for the powerpc architecture.Quoted 13 lines
Quoted 6 lines
Generating An Ace File
The elf file generated for the kernel and the bit stream can be
combined
Quoted 3 lines
to create an ACE file for compact flash. The following assumes a
Quoted 33 lines
bash
Quoted 3 lines
Quoted 3 lines
shell where XMD is accessible and a xilinx probe attached to the
board
Quoted 24 lines
Quoted 10 lines
for which you are generating an ace file.
Quoted 4 lines
xmd -tcl genace.tcl -jprog -target
ppc_hw-hw <bit file name> -elf<elf
Quoted 10 lines
Quoted 4 lines
file name> -board <ml405 or ml507> -ace <desired ace file name>
-----Original Message-----
From: [email protected] [mailto:[email protected]]On
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Behalf Of Peter Mendham
Sent: Tuesday, June 24, 2008 3:02 AM
To: [email protected]
Subject: Linux on Virtex board with ARCH=powerpcDear all,
I'm trying to boot a 2.6.26-rc6 kernel on a custom Virtex 4 board.
I
Quoted 4 lines
Quoted 2 lines
Quoted 2 lines
Quoted 14 lines
Quoted 3 lines
Quoted 3 lines
have used the Xilinx utility to generate a device tree and now want
to
Quoted 8 lines
Quoted 8 lines
generate an image for throwing onto CF for use with a SystemACE
(just
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
like on the the ML3/4xx boards). I don't want to use a bootloader
(I
Quoted 16 lines
Quoted 16 lines
Quoted 8 lines
don't really need one). I saw something on this list about
simpleImage,
Quoted 4 lines
"simple" sounded good to me so I thought I'd try that (or did I misinterpret what this is for?). I also don't want the image to be
Quoted 6 lines
Quoted 6 lines
too
Quoted 2 lines
big, I always used to use a zImage under ARCH=ppc. So, two
questions,
Quoted 42 lines
Quoted 8 lines
Quoted 8 lines
which hopefully are easy ones:
1. I did what Grant said in a post to this list about simpleImage,and
Quoted 29 lines
Quoted 10 lines
dumped my dts into
arch/powerpc/boot/dtsand I called itsystem.dts(for
Quoted 9 lines
now). I then tried to do make simpleImage.system which ran right through to final link then moaned about a missing simpleboot-system.
Where is this supposed to come from? What am I doing wrong? I
naively
Quoted 2 lines
tried copying simpleboot.o to simpleboot-system.o and the error went
Quoted 23 lines
Quoted 4 lines
Quoted 4 lines
away. Hmm.
2. I need an ELF to give to my SystemACE file generator. This usedto
Quoted 16 lines
Quoted 10 lines
pop up in
arch/ppc/boot/imagesand be called zImage.elf, which made sense to me. What's the deal now with powerpc? What should I beusing?
Quoted 2 lines
Finally, can anyone give me a heads-up on any gotchas with what I'm trying to do. As you can tell, I don't entirely know what I'm
doing,
Quoted 27 lines
Quoted 27 lines
Quoted 3 lines
so
Quoted 10 lines
any pointers would be gratefully received.
Thanks,
-- PeterThe University of Dundee is a Scottish Registered Charity, No.
SC015096.
Quoted 6 lines
_______________________________________________
Linuxppc-embedded mailing list
[email protected]
https://ozlabs.org/mailman/listinfo/linuxppc-embeddedQuoted 6 lines
Quoted 6 lines
Quoted 4 lines
This email and any attachments are intended for the sole use of the
named recipient(s) and contain(s) confidential information that may
be
Quoted 19 lines
Quoted 3 lines
proprietary, privileged or copyrighted under applicable law. If you
are
Quoted 10 lines
not the intended recipient, do not read, copy, or forward this email message or any attachments. Delete this email message and any attachments immediately.
Quoted 4 lines
Quoted 3 lines
The University of Dundee is a Scottish Registered Charity, No.
Quoted 9 lines
SC015096.
Quoted 3 lines
This email and any attachments are intended for the sole use of the
named recipient(s) and contain(s) confidential information that may be proprietary, privileged or copyrighted under applicable law. If you
are
Quoted 10 lines
not the intended recipient, do not read, copy, or forward this email message or any attachments. Delete this email message and any attachments immediately.
Quoted 3 lines
The University of Dundee is a Scottish Registered Charity, No.
SC015096.
Quoted 4 lines
This email and any attachments are intended for the sole use of the
named recipient(s) and contain(s) confidential information that may be proprietary, privileged or copyrighted under applicable law. If you are not the intended recipient, do not read, copy, or forward this email message or any attachments. Delete this email message and any attachments immediately.
Quoted 2 lines
Quoted 9 lines
The University of Dundee is a Scottish Registered Charity, No. SC015096.
This email and any attachments are intended for the sole use of the named recipient(s) and contain(s) confidential information that may be proprietary, privileged or copyrighted under applicable law. If you are not the intended recipient, do not read, copy, or forward this email message or any attachments. Delete this email message and any attachments immediately.
The University of Dundee is a Scottish Registered Charity, No. SC015096.
Hi John,
Quoted 3 lines
With regard to
CONFIG_PPC_UDBG... we have a patch ready that I need to apply to the Git tree and I'll expedite that.
Great, thanks.
Quoted 3 lines
With the console and UART Lite, the only thing I could think of is making sure you have a dev entry for the UART Lite.
I do. I used the major and minor numbers from the driver source.
Quoted 4 lines
I'm assuming all the boot messages about the console, "enabled", look the same as the 550 as I have seen that give hints to problems sometimes.
I'm not really getting anything illuminating. I turned debugging messages on and I see the following:
Console: colour dummy device 80x25 console [ttyUL0] enabled <snip>
Serial: 8250/16550 driver $Revision: 1.90 $ 4 ports, IRQ sharing disabled uartlite: calling uart_register_driver() uartlite: calling of_register_platform_driver() uartlite 800f0000.serial: ulite_of_probe(c7846800, c019713c) ulite console: port=c01aef38; port->mapbase=800f0003 800f0000.serial: ttyUL0 at MMIO 0x800f0003 (irq = 0) is a uartlite uartlite: calling platform_driver_register()
The only thing that I notice is that the "console [x] enabled" line comes way before the uartlite driver registers, whereas on the 16550 version it's straight afterwards. Does that matter?
Thanks,
-- Peter
Quoted 1,324 lines
Thanks,
John-----Original Message-----
From: Peter Mendham [mailto:[email protected]] Sent: Friday, June 27, 2008 6:31 AM
To: John Linn
Cc: [email protected]
Subject: Re: Linux on Virtex board with ARCH=powerpcHi John,
Yes, with regard to the non-functional sysace, I was being an idiot: I had a small hw problem which now that I have fixed it, the kernel now reports that my drive is mounted.
I now have a new and rather bizarre problem, which maybe you or someone else has met before. I have a simple FPGA design with memory, a sysace and a uart16550 on an ML405 (I've put my hardware to one side for the moment). It works just fine. If I swap the uart16550 for a uartlite (remaking the kernel with the correct device tree) I see all the boot messages and the kernel seems to start OK, the root partition is mounted
but then I see nothing from
/sbin/init. This is the same root fs that Iwas using with the uart16550 example I just mentioned. So it's a known good root fs, but it doesn't appear to be able to output to
/dev/consolewhen I have a uartlite instead of a uart16550. I have selected console support for uartlite. Any ideas?
Incidentally, the uart16550 solution did not work until I removed
CONFIG_PPC_UDBG_16550- the kernel was getting stuck inudbg_550_putcindefinitely.Thanks,
-- PeterQuoted 7 lines · John Linn
Hi Peter,
I think you'll get a baseline quicker this way and then you can go on other less known paths after that.
In my experience, this message happens when there is no compact flash
in
Quoted 5 lines
the slot of the board.
I have the system ace device as
/dev/xsa2in my notes, but I have only used it much. Sorry it's not one of my primary test cases at thispoint
Quoted 11 lines
in time.
Thanks,
John-----Original Message-----
From: Peter Mendham [mailto:[email protected]] Sent: Thursday, June 26, 2008 7:24 AM
To: John Linn
Cc: [email protected]
Subject: Re: Linux on Virtex board with ARCH=powerpcQuoted 4 lines
Hi John,
OK, I've given in and I'm using the xilinx git code now :) It now
shows
Quoted 2 lines
some signs of life, thanks, but the sysace driver is not happy. My
root
Quoted 2 lines
fs is on cf and I'm not using initrd. The driver loads then gets
stuck,
Quoted 4 lines
repeatedly saying:
xsysace 80030000.sysace: kicking stalled fsm; state=2 task=0 iter=1
dc=0
Quoted 2 lines
I notice from the driver source that state 2 is the driver attempting
to
Quoted 2 lines
acquire the mpu lock. I have tried the standard xilinx sysace
selftest
Quoted 60 lines
code which just acquires and frees the lock (which is fine) so the hardware should be OK (I hope). I have the sysace hooked up to an irq
(the only one), I have no idea whether the dts is correct but it seems
to compare favourably with the ml405 one; mine says (the important bits):
intc: interrupt-controller@80010000 { #interrupt-cells = <2>; compatible = "xlnx,xps-intc-1.00.a"; interrupt-controller ; reg = < 80010000 10000 >; xlnx,num-intr-inputs = <1>; } ; sysace: sysace@80030000 { compatible = "xlnx,xps-sysace-1.00.a"; interrupt-parent = <&intc>; interrupts = < 0 2 >; reg = < 80030000 10000 >; xlnx,family = "virtex4"; xlnx,mem-width = <10>; } ;Do you have any ideas?
Thanks,
-- PeterQuoted 5 lines · John Linn
Hi Peter,
To some extent I think you're trying to re-invent the wheel here, but
I
Quoted 6 lines
understand why.
Ideally, you would be able to pull from the mainline kernel to build this, but Xilinx hasn't got our code into the mainline. We are
working
Quoted 5 lines
on it more proactively now.
So, in the meantime, it would be easier for you to pull from the
Xilinx
Quoted 23 lines
Quoted 7 lines
git tree as we have solved the problems you are solving I believe.
Git://git.xilinx.com/linux-2.6-xlnx or http://git.xilinx.com/...
We supply the device tree files and kernel configurations for the
ML405
Quoted 13 lines
and ML507 boards to help get started.
Thanks and sorry for the inconvenience,
John-----Original Message-----
From: Peter Mendham [mailto:[email protected]] Sent: Wednesday, June 25, 2008 10:18 AM
To: John Linn
Cc: [email protected]
Subject: Re: Linux on Virtex board with ARCH=powerpcOK, this is all new to me, so please bear with me if I've made a
major
Quoted 4 lines
Quoted 2 lines
Quoted 12 lines
Quoted 7 lines
mistake. I ran the kernel until it didn't give me anymore output and
then told xmd to "stop", mrd from any location gave me exactly the
same
Quoted 2 lines
32-bit word of garbage. I then reset the processor and mrd would
give
Quoted 4 lines
Quoted 2 lines
Quoted 8 lines
Quoted 3 lines
me what looked like reasonable values. I found the
__log_bufsymbolin
Quoted 2 lines
the System.map file (
0xc024a108) and tried mrd on what I assume isthe
Quoted 40 lines
Quoted 10 lines
corresponding physical address of
0x0024a108. I get the following:<6>Using Xilinx Virtex machine description
<5>Linux version 2.6.26-rc6 (peter@eris) (gcc version 4.2.4) #9PREEMPT
Quoted 11 lines
Wed Jun 25 16:27:33 BST 2008
<7>Enteringadd_active_range(0, 0, 131072)0 entries of 256 used <7>Top of RAM:0x20000000, Total RAM:0x20000000<7>Memory hole size: 0MB
<4>Zone PFN ranges:<4> DMA 0 -> 131072 <4> Normal 131072 -> 131072<4>Movable zone start PFN for each node
<4>early_node_map[1] active PFN ranges
<4> 0: 0 -> 131072
<7>On node 0 totalpages: 131072Quoted 8 lines
<7> DMA zone: 1024 pages used for memmap <7> DMA zone: 0 pages reserved <7> DMA zone: 130048 pages, LIFO batch:31 <7> Normal zone: 0 pages used for memmap <7> Movable zone: 0 pages used for memmap<4>Built 1 zonelists in Zone order, mobility grouping on. Total
pages:
Quoted 5 lines
130048
<5>Kernel command line: console=ttyUL0 root=/dev/xsa2 rw <6>Xilinx intc at0xFDFFF000C025CFFCmapped to0x0000025d<4>PID hash table entries: 2048 (order: 11, 8192 bytes)Quoted 31 lines
Quoted 7 lines
xmd tells me that the processor stopped at
0xc000fe50, and subsequent"con" and "stop" sequences do no move this on (it reports the same
each
Quoted 21 lines
time). Below is a choice excerpt of my System.map:
c000fdc4tsrc_errorc000fddctdst_errorc000fdf4T__div64_32c000fe94Tcacheable_memzeroc000ff38T memsetSo I guess that means it's in
__div64_32?Any ideas?
Thanks in advance,
-- PeterQuoted 2 lines · John Linn
Sounds like the bootstrap loader has loaded the kernel and passed
off
Quoted 41 lines
Quoted 6 lines
Quoted 6 lines
execution to it, but there's no console working on the kernel.
You can confirm that since you have a probe as you can dump the
__log_bufby getting the address of it using objdump on the elfimage.
Quoted 32 lines
Quoted 4 lines
It's a pain to convert to readable form, but can help to see that
things
Quoted 4 lines
are indeed running. Stop the processor, then do the memory read
command,
Quoted 10 lines
mrd, in xmd.
For the console to work with UART Lite,
CONFIG_OFmust be on in the kernel configuration, I would check that.The file,
arch/powerpc/boot/virtex.c, has the startup code for the virtex specific processing. It checks to make sure there iscompatible
Quoted 2 lines
hardware based on the device tree. If your device tree doesn't
match
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
that hardware you could have a problem. I have not found the
powerup
Quoted 7 lines
Quoted 7 lines
Quoted 3 lines
of
Quoted 214 lines
Quoted 5 lines
Quoted 5 lines
the kernel to be very informative if the device tree is wrong.
I pasted in our ML405 device tree below to allow you to compare to
it.
Quoted 206 lines
Quoted 206 lines
Hope that helps,
John/*
* (C) Copyright 2007 Michal Simek
*
* Michal SIMEK <[email protected]>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of
* the License, or (at your option) any later version. ** This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*
* CAUTION: This file is automatically generated by libgen.
* Version: Xilinx EDK 10.1.1 EDK_K_SP1.1
*// { #address-cells = <1>; #size-cells = <1>; compatible = "xlnx,virtex"; model = "testing"; DDR_SDRAM: memory@0 { device_type = "memory"; reg = < 0 8000000 >; } ; chosen { bootargs = "console=ttyS0 ip=on root=/dev/ram"; linux,stdout-path = "/plb@0/serial@83e00000"; } ; cpus { #address-cells = <1>; #cpus = <1>; #size-cells = <0>; ppc405_0: cpu@0 { clock-frequency = <11e1a300>; compatible = "PowerPC,405", "ibm,ppc405"; d-cache-line-size = <20>; d-cache-size = <4000>; device_type = "cpu"; i-cache-line-size = <20>; i-cache-size = <4000>; model = "PowerPC,405"; reg = <0>; timebase-frequency = <11e1a300>; xlnx,apu-control = <de00>; xlnx,apu-udi-1 = <a18983>; xlnx,apu-udi-2 = <a38983>; xlnx,apu-udi-3 = <a589c3>; xlnx,apu-udi-4 = <a789c3>; xlnx,apu-udi-5 = <a98c03>; xlnx,apu-udi-6 = <ab8c03>; xlnx,apu-udi-7 = <ad8c43>; xlnx,apu-udi-8 = <af8c43>; xlnx,deterministic-mult = <0>; xlnx,disable-operand-forwarding = <1>; xlnx,fastest-plb-clock = "DPLB0"; xlnx,generate-plb-timespecs = <1>; xlnx,mmu-enable = <1>; xlnx,pvr-high = <0>; xlnx,pvr-low = <0>; } ; } ; plb: plb@0 { #address-cells = <1>; #size-cells = <1>; compatible = "xlnx,plb-v46-1.02.a"; ranges ; IIC_EEPROM: i2c@81600000 { compatible = "xlnx,xps-iic-2.00.a"; interrupt-parent = <&xps_intc_0>; interrupts = < 4 2 >; reg = < 81600000 10000 >; xlnx,clk-freq = <5f5e100>; xlnx,family = "virtex4"; xlnx,gpo-width = <1>; xlnx,iic-freq = <186a0>; xlnx,scl-inertial-delay = <0>; xlnx,sda-inertial-delay = <0>; xlnx,ten-bit-adr = <0>; } ; LEDs_4Bit: gpio@81400000 { compatible = "xlnx,xps-gpio-1.00.a"; interrupt-parent = <&xps_intc_0>; interrupts = < 5 2 >; reg = < 81400000 10000 >; xlnx,all-inputs = <0>; xlnx,all-inputs-2 = <0>; xlnx,dout-default = <0>; xlnx,dout-default-2 = <0>; xlnx,family = "virtex4"; xlnx,gpio-width = <4>; xlnx,interrupt-present = <1>; xlnx,is-bidir = <1>; xlnx,is-bidir-2 = <1>; xlnx,is-dual = <0>; xlnx,tri-default = <ffffffff>; xlnx,tri-default-2 = <ffffffff>; } ; RS232_Uart: serial@83e00000 { compatible = "ns16550"; device_type = "serial"; interrupt-parent = <&xps_intc_0>; interrupts = < 6 2 >; reg = < 83e00000 10000 >; reg-offset = <3>; reg-shift = <2>; clock-frequency = <05f5e100>; xlnx,family = "virtex4"; xlnx,has-external-rclk = <0>; xlnx,has-external-xin = <0>; xlnx,is-a-16550 = <1>; } ; SysACE_CompactFlash: sysace@83600000 { compatible = "xlnx,xps-sysace-1.00.a"; interrupt-parent = <&xps_intc_0>; interrupts = < 3 2 >; reg = < 83600000 10000 >; xlnx,family = "virtex4"; xlnx,mem-width = <10>; } ; TriMode_MAC_GMII: xps-ll-temac@81c00000 { #address-cells = <1>; #size-cells = <1>; compatible = "xlnx,compound"; ethernet@81c00000 { compatible = "xlnx,xps-ll-temac-1.01.a"; device_type = "network"; interrupt-parent = <&xps_intc_0>; interrupts = < 2 2 >; llink-connected = <&PIM2>; local-mac-address = [ 02 00 00 00 00 01 ]; reg = < 81c00000 40 >; xlnx,bus2core-clk-ratio = <1>; xlnx,phy-type = <1>; xlnx,phyaddr = <1>; xlnx,rxcsum = <0>; xlnx,rxfifo = <1000>; xlnx,temac-type = <1>; xlnx,txcsum = <0>; xlnx,txfifo = <1000>; } ; } ; mpmc@0 { #address-cells = <1>; #size-cells = <1>; compatible = "xlnx,mpmc-4.00.a"; PIM2: sdma@84600100 { compatible = "xlnx,ll-dma-1.00.a"; interrupt-parent = <&xps_intc_0>; interrupts = < 1 2 0 2 >; reg = < 84600100 80 >; } ; } ; xps_bram_if_cntlr_1: xps-bram-if-cntlr@ffffe000 { compatible = "xlnx,xps-bram-if-cntlr-1.00.a"; reg = < ffffe000 2000 >; xlnx,family = "virtex4"; } ; xps_intc_0: interrupt-controller@81800000 { #interrupt-cells = <2>; compatible = "xlnx,xps-intc-1.00.a"; interrupt-controller ; reg = < 81800000 10000 >; xlnx,num-intr-inputs = <7>; } ; } ; ppc405_0_dplb1: plb@1 { #address-cells = <1>; #size-cells = <1>; compatible = "xlnx,plb-v46-1.02.a"; ranges ; } ; } ;-----Original Message-----
From: Peter Mendham [mailto:[email protected]] Sent: Tuesday, June 24, 2008 1:21 PM
To: John Linn
Cc: [email protected]
Subject: Re: Linux on Virtex board with ARCH=powerpcHi John,
Thanks for your reply, that's really helpful. I'm actually using
the
Quoted 16 lines
Quoted 16 lines
Quoted 8 lines
mainline kernel, rather than the one from the xilinx git tree, but
your
Quoted 4 lines
information has really moved me on. My first problem was that the Xilinx utility (from the git tree) for device tree dts generation
Quoted 6 lines
Quoted 6 lines
didn't
Quoted 2 lines
insert a "linux,stdout-path" node under "chosen". I spotted that
the
Quoted 20 lines
Quoted 20 lines
Quoted 8 lines
ml403 example had this, so after adding it I got early console messages. Everything now grinds to a halt after I get the message
"flat
Quoted 4 lines
tree at
0x40ad60" which is just before it calls the kernel, so Iassume
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
it's that call that is killing it. I have "console=ttyUL0" for my uartlite, so I should be getting messages, shouldn't I? Do you know
where the next execution point is? Maybe I could find out where
it's
Quoted 4 lines
Quoted 2 lines
Quoted 2 lines
Quoted 16 lines
Quoted 5 lines
Quoted 5 lines
getting stuck.
I haven't managed to generate an ACE file, I'm just loading the
kernel
Quoted 8 lines
Quoted 8 lines
image from xmd ATM, genace won't play ball for me, it complains
about
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
-board user not being valid, it won't even run on the examples
copied
Quoted 22 lines
Quoted 22 lines
Quoted 8 lines
directly from the user manual. Anyway, I think genace is a bit OT,
and
Quoted 10 lines
I can manage with xmd for now.
Thanks,
-- PeterJohn Linn wrote:
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Hi Peter,
I'm not up on what can be done with the simple image you refer to
in
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 4 lines
1.
Quoted 21 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
I'm sure I should be, but there's a lot to learn.
With regards to 2, the elf image, zImage (without the elf
extension),
Quoted 13 lines
Quoted 13 lines
Quoted 4 lines
is
Quoted 4 lines
located in
arch/powerpc/boot.You can make a SystemACE file from that elf image just as you did
in
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
arch/ppc. We have a default device tree file,ml405.dts, in thearch/powerpc/boot/dtsdirectory for our ml405 board. The kernel configuration has a config,DEVICE_TREE, that specifies the name ofQuoted 7 lines
Quoted 7 lines
Quoted 7 lines
the
Quoted 2 lines
device tree file. I normally compile the device tree into the
kernel
Quoted 10 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
which is the default build, make ARCH=powerpc zImage. That image
does
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
not require a boot loader.
I inserted the text below from a document that I have about
building
Quoted 22 lines
Quoted 22 lines
Quoted 22 lines
Quoted 4 lines
the
Quoted 13 lines
arch/ppcandarch/powerpckernels.Hope that helps,
JohnNotation
The phrase "<ppc or powerpc>" is used throughput the text and means
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
that
Quoted 2 lines
one or the other, "ppc" or "powerpc" is to be typed depending on
the
Quoted 158 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
architecture you are building.
Commands that are used in a bash shell are preceded by ">".
Getting Ready To Build the Kernel
This assumes you installed the ELDK tools and assumes you'll be
using
Quoted 23 lines
Quoted 23 lines
Quoted 4 lines
a
Quoted 14 lines
bash shell.
Quoted 7 lines
bash
export CROSS_COMPILE=ppc_4xx-Quoted 77 lines
Quoted 6 lines
Quoted 6 lines
Setting Up the Kernel Tree
If you have previously built this kernel for another architecture,
ppc
Quoted 67 lines
Quoted 6 lines
or powerpc, then the tree needs to be setup correctly for the new architecture. Assuming you have not previously built it, this does
not
Quoted 13 lines
need to be done.
Quoted 6 lines
make ARCH=<ppc or powerpc> mrproper
Quoted 7 lines
Configuring the Kernel
The kernel should be configured to run on the ML405 or ML507 board
from
Quoted 31 lines
Xilinx.
Quoted 6 lines
make ARCH=<ppc or powerpc>
ml405_defconfigor
Quoted 6 lines
make ARCH=<ppc or powerpc>
ml507_defconfigBuilding the Kernel
The following command will build the Linux kernel assuming you are
in
Quoted 43 lines
Quoted 5 lines
Quoted 5 lines
the root directory of the kernel. The root directory of the kernel
Quoted 10 lines
from
Quoted 5 lines
the Xilinx Git tree is linux-2.6-xlnx. An elf file, zImage.elf, is created in the
arch/ppc/boot/imagesdirectory for ppc architecture.An
Quoted 24 lines
Quoted 5 lines
elf file, zImage, is created in the the
arch/powerpc/bootdirectoryfor
Quoted 14 lines
the powerpc architecture.
Quoted 6 lines
make ARCH=<ppc or powerpc> zImage
Quoted 25 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Building the Kernel With Ramdisk
A ram disk image, a file named *.gz, must be placed into the
arch/ppc/boot/imagesorarch/powerpc/bootdirectory, depending onthe
Quoted 16 lines
Quoted 16 lines
Quoted 16 lines
architecture, prior to building the kernel.
Quoted 6 lines
make ARCH=<ppc or powerpc> zImage.initrd
An elf file, zImage.initrd.elf, is created in
arch/ppc/boot/imagesdirectory for the ppc architecture. An elf file file,zImage.initrd,
Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
Quoted 4 lines
is
Quoted 2 lines
created in
arch/powerpc/bootdirectory for the powerpcarchitecture.
Quoted 139 lines
Quoted 20 lines
Quoted 16 lines
Quoted 7 lines
Generating An Ace File
The elf file generated for the kernel and the bit stream can be
combined
Quoted 4 lines
to create an ACE file for compact flash. The following assumes a
bash
Quoted 37 lines
Quoted 4 lines
Quoted 4 lines
shell where XMD is accessible and a xilinx probe attached to the
board
Quoted 29 lines
Quoted 12 lines
for which you are generating an ace file.
Quoted 5 lines
xmd -tcl genace.tcl -jprog -target
ppc_hw-hw <bit file name> -elf<elf
Quoted 12 lines
Quoted 5 lines
file name> -board <ml405 or ml507> -ace <desired ace file name>
-----Original Message-----
From: [email protected] [mailto:[email protected]]On
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
Behalf Of Peter Mendham
Sent: Tuesday, June 24, 2008 3:02 AM
To: [email protected]
Subject: Linux on Virtex board with ARCH=powerpcDear all,
I'm trying to boot a 2.6.26-rc6 kernel on a custom Virtex 4 board.
I
Quoted 6 lines
Quoted 3 lines
Quoted 3 lines
Quoted 19 lines
Quoted 4 lines
Quoted 4 lines
have used the Xilinx utility to generate a device tree and now want
to
Quoted 11 lines
Quoted 11 lines
generate an image for throwing onto CF for use with a SystemACE
(just
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
like on the the ML3/4xx boards). I don't want to use a bootloader
(I
Quoted 26 lines
Quoted 26 lines
Quoted 11 lines
don't really need one). I saw something on this list about
simpleImage,
Quoted 5 lines
"simple" sounded good to me so I thought I'd try that (or did I misinterpret what this is for?). I also don't want the image to be
too
Quoted 41 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
big, I always used to use a zImage under ARCH=ppc. So, two
questions,
Quoted 35 lines
Quoted 11 lines
Quoted 11 lines
which hopefully are easy ones:
1. I did what Grant said in a post to this list about simpleImage,and
Quoted 20 lines
Quoted 8 lines
Quoted 5 lines
dumped my dts into
arch/powerpc/boot/dtsand I called itsystem.dts(for
Quoted 2 lines
now). I then tried to do make simpleImage.system which ran right through to final link then moaned about a missing
simpleboot-system.
Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
Where is this supposed to come from? What am I doing wrong? I
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
naively
Quoted 2 lines
tried copying simpleboot.o to simpleboot-system.o and the error
went
Quoted 81 lines
Quoted 4 lines
Quoted 2 lines
Quoted 2 lines
Quoted 38 lines
Quoted 5 lines
Quoted 5 lines
away. Hmm.
2. I need an ELF to give to my SystemACE file generator. This usedto
Quoted 29 lines
Quoted 8 lines
Quoted 9 lines
pop up in
arch/ppc/boot/imagesand be called zImage.elf, which madesense to me. What's the deal now with powerpc? What should I be
using?
Quoted 7 lines
Finally, can anyone give me a heads-up on any gotchas with what I'm
trying to do. As you can tell, I don't entirely know what I'm
doing,
Quoted 36 lines
Quoted 36 lines
Quoted 4 lines
so
Quoted 11 lines
any pointers would be gratefully received.
Thanks,
-- PeterThe University of Dundee is a Scottish Registered Charity, No.
SC015096.
Quoted 11 lines
_______________________________________________
Linuxppc-embedded mailing list
[email protected]
https://ozlabs.org/mailman/listinfo/linuxppc-embeddedThis email and any attachments are intended for the sole use of the
Quoted 40 lines
Quoted 3 lines
Quoted 3 lines
named recipient(s) and contain(s) confidential information that may
be
Quoted 34 lines
Quoted 4 lines
proprietary, privileged or copyrighted under applicable law. If you
are
Quoted 12 lines
not the intended recipient, do not read, copy, or forward this email message or any attachments. Delete this email message and any attachments immediately.
Quoted 5 lines
Quoted 4 lines
The University of Dundee is a Scottish Registered Charity, No.
SC015096.
Quoted 4 lines
This email and any attachments are intended for the sole use of the
named recipient(s) and contain(s) confidential information that may
be
Quoted 19 lines
Quoted 3 lines
proprietary, privileged or copyrighted under applicable law. If you
are
Quoted 10 lines
not the intended recipient, do not read, copy, or forward this email message or any attachments. Delete this email message and any attachments immediately.
Quoted 4 lines
Quoted 3 lines
The University of Dundee is a Scottish Registered Charity, No.
Quoted 9 lines
SC015096.
Quoted 3 lines
This email and any attachments are intended for the sole use of the
named recipient(s) and contain(s) confidential information that may be proprietary, privileged or copyrighted under applicable law. If you
are
Quoted 10 lines
not the intended recipient, do not read, copy, or forward this email message or any attachments. Delete this email message and any attachments immediately.
Quoted 3 lines
The University of Dundee is a Scottish Registered Charity, No.
SC015096.
Quoted 4 lines
This email and any attachments are intended for the sole use of the
named recipient(s) and contain(s) confidential information that may be proprietary, privileged or copyrighted under applicable law. If you are not the intended recipient, do not read, copy, or forward this email message or any attachments. Delete this email message and any attachments immediately.
Quoted 2 lines
Quoted 9 lines
The University of Dundee is a Scottish Registered Charity, No. SC015096.
This email and any attachments are intended for the sole use of the named recipient(s) and contain(s) confidential information that may be proprietary, privileged or copyrighted under applicable law. If you are not the intended recipient, do not read, copy, or forward this email message or any attachments. Delete this email message and any attachments immediately.
The University of Dundee is a Scottish Registered Charity, No. SC015096.
Hi Aaron,
Thanks - you spotted my mistake when I said "the same root fs" - I was indeed changing inittab to use ttyUL0. For a while I mistakenly had ttyUL0 on the 16550 system and that showed me init messages (like "mounting file systems") and then when it was done with the rc scripts it complained about ttyUL0. With my uartlite system I see none of that. The early messages go to /dev/console AFAIK, which suggests there's something a bit more fundamental going on?
Thanks,
-- Peter
Quoted 6 lines · Aaron Sells
Peter,
Quoted 2 lines · Peter Mendham
I now have a new and rather bizarre problem, which maybe you or someone else has met before. I have a simple FPGA design with memory, a sysace and a uart16550 on an ML405 (I've put my hardware to one side for the moment). It works just fine. If I swap the uart16550 for a uartlite (remaking the kernel with the correct device tree) I see all the boot messages and the kernel seems to start OK, the root partition is mounted but then I see nothing from
/sbin/init. This is the same root fs that I was using with the uart16550 example I just mentioned. So it's a known good root fs, but it doesn't appear to be able to output to/dev/consolewhen I have a uartlite instead of a uart16550. I have selected console support for uartlite. Any ideas?
Quoted 9 lines
I had to modify
/etc/inittabon my OpenEmbedded rootfs and replace ttyS0 with ttyUL0 to get the console working with uartlite on my ML403.Quoted 3 lines
Thanks,
-- PeterRegards,
Aaron
The University of Dundee is a Scottish Registered Charity, No. SC015096.
Peter,
Quoted 2 lines · Peter Mendham
I now have a new and rather bizarre problem, which maybe you or someone else has met before. I have a simple FPGA design with memory, a sysace and a uart16550 on an ML405 (I've put my hardware to one side for the moment). It works just fine. If I swap the uart16550 for a uartlite (remaking the kernel with the correct device tree) I see all the boot messages and the kernel seems to start OK, the root partition is mounted but then I see nothing from
/sbin/init. This is the same root fs that I was using with the uart16550 example I just mentioned. So it's a known good root fs, but it doesn't appear to be able to output to/dev/consolewhen I have a uartlite instead of a uart16550. I have selected console support for uartlite. Any ideas?
I had to modify /etc/inittab on my OpenEmbedded rootfs and replace ttyS0 with ttyUL0 to get the console working with uartlite on my ML403.
Quoted 3 lines
Thanks,
-- Peter
Regards,
Aaron
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Peter" == Peter Mendham <[email protected]> writes:
Hi,
Peter> I now have a new and rather bizarre problem, which maybe you Peter> or someone else has met before. I have a simple FPGA design Peter> with memory, a sysace and a uart16550 on an ML405 (I've put my Peter> hardware to one side for the moment). It works just fine. If Peter> I swap the uart16550 for a uartlite (remaking the kernel with Peter> the correct device tree) I see all the boot messages and the Peter> kernel seems to start OK, the root partition is mounted but Peter> then I see nothing from /sbin/init. This is the same root fs Peter> that I was using with the uart16550 example I just mentioned.
Did you remember to change your inittab to use /dev/ttyUL0?
Signature · 1 line
Bye, Peter Korsgaard
Hi,
Quoted 12 lines · Peter Korsgaard
Hi,
Peter> I now have a new and rather bizarre problem, which maybe you Peter> or someone else has met before. I have a simple FPGA design Peter> with memory, a sysace and a uart16550 on an ML405 (I've put my Peter> hardware to one side for the moment). It works just fine. If Peter> I swap the uart16550 for a uartlite (remaking the kernel with Peter> the correct device tree) I see all the boot messages and the Peter> kernel seems to start OK, the root partition is mounted but Peter> then I see nothing from
/sbin/init. This is the same root fs Peter> that I was using with the uart16550 example I just mentioned.
Quoted 2 lines
Did you remember to change your inittab to use
/dev/ttyUL0?
Yes, I'm using a buildroot/busybox system and have changed inittab and securetty for ttyUL0. From what I understand, initialisation lines in a busybox inittab that do not specify a tty at the beginning go out on /dev/console. To collaborate this, if I set my hardware up for a uart16550 and leave the inittab specifying ttyUL0, I see the messages from the init scripts (which must be going to console) but then I messages (again on console I guess) saying that ttyUL0 doesn't exist. When I try things the other way round, I don't see anything at all (none of the stuff that I think is going to console) and it doesn't moan at me. Which I guess means something is wrong with /dev/console?
-- Peter
The University of Dundee is a Scottish Registered Charity, No. SC015096.