uCLinux for PPC: Bug in autoconf.h creation

2006-09-07 Thread Aidan Williams

I would suspect CRLF issues..

Try running dos2unix on your
  arch/ppc/platforms/xilinx_auto/auto-config.in
and then defaulting all your settings with make menuconfig to regenerate your 
kernel .config and config headers.

- aidan


Simon Jung wrote:
 I am trying to build a uCLinux Distribution for PowerPC following the 
 instructions on
 
 http://www.itee.uq.edu.au/~jwilliams/mblaze-uclinux/uclinux_powerpc/ 
 http://www.itee.uq.edu.au/%7Ejwilliams/mblaze-uclinux/uclinux_powerpc/
 
 make menuconfig works well  but the created file 
 /linuxppx-2.4.x/include/linux/autoconf.h has errors:
 
 The created #defines for integer and string types are mistyped the 
 closing bracket / quote is written into a newline.
 Example:
 
 #define CONFIG_XILINX_PPC405_0_DISABLE_OPERAND_FORWARDING (1
 )
 #define CONFIG_XILINX_PPC405_0_DETERMINISTIMULT (0
 )
 #define CONFIG_XILINX_PPC405_0_MMU_ENABLE (1
 )
 #define CONFIG_XILINX_PPC405_0_DCR_RESYNC (0
 )
 #define CONFIG_XILINX_PPC405_0_INSTANCE ppc405_0
 
 #define CONFIG_XILINX_PPC405_0_HW_VER 2.00.c
 
 #define CONFIG_XILINX_ON1_DMA_MASTER_0_INSTANCE on1_dma_master_PPC
 
 
 How can I correct the generation of  autoconf.h ?
 
 Greetings,
 Simon Jung
 ___
 Linuxppc-embedded mailing list
 Linuxppc-embedded at ozlabs.org
 https://ozlabs.org/mailman/listinfo/linuxppc-embedded




Linux on Virtex4

2006-06-21 Thread Aidan Williams
Rick Moleres wrote:
 There's also a Linux 2.4 patch provided with the ML403 PPC reference
 design on the Xilinx website
 (http://www.xilinx.com/products/boards/ml403/reference_designs.htm) that
 takes care of a Virtex-4 PPC cache issue (CCR0 register).  Have you
 applied this?
 

Rick, which cache issue are you referring to?

I tried setting the CCR0 bits in accordance with:

   Solution 10: CPU_213: Incorrect data might be
flushed from the data cache

but that didn't fix things in my case for the Avnet FX12 MiniModule.


I'm pretty sure that the FX12-MM strikes:

   Solution 13: The return of a cacheline transaction that
is not target word first (non-target word first) can
cause data corruption in the PPC405 Core data cache in
Virtex-4 FX devices.

For which the only solutions mentioned are to run without caches or get 
a fixed chip.


As I understand it, the memory controller for this board must be on the 
OPB because the memory is 16-bit.  Is there any way to move the memory 
controller to the PLB thus avoiding the cache problem (for RAM at least)?

- aidan



Linux on Virtex4

2006-06-20 Thread Aidan Williams

It's a cute little board isn't it!

In getting this board going we had to work around a silicon bug which 
caused data corruption and forced us to run with caches off.

See Solution 13:
http://www.xilinx.com/xlnx/xil_ans_display.jsp?iLanguageID=1iCountryID=1getPagePath=20658
Check your PVR ..

I found that exercising the memory with a small C program reliably 
caused the board to crash.

My previous post including a patch for this board:
http://ozlabs.org/pipermail/linuxppc-embedded/2006-April/022583.html

.. and we're using the UartLite.

- aidan


Martin, Tim wrote:
 I have been working with a small module made by Memec/Avnet
 (FX12MM1-BASE) that has a Virtex-4 FX12 with some DDR SDRAM, a Gigabit
 Ethernet PHY, some FLASH, etc.  I am using EDK 8.1 and generated the BSP
 for MontaVista 3.1 preview kit (which is based on the 2.4.20 kernel).
 This works, but occasionally panics while booting (doesn't panic all the
 time, maybe 1/3 the time).  Examples of good boot and 2 crash boots
 below.  We are using a root filesystem over NFS, and the panics seem to
 always be after the file system is mounted.  I'm not sure if it is NFS
 related or not.
 
 I have also been working with the paulus 2.6 kernel tree (and I have
 tried the MVL linux-xilinx-26 tree), but have not been able to get the
 kernel to boot.  The primary problem there is that we are using the
 uartlite instead of the full uart, and the patches I have found for
 uartlite support don't work.  I can get the early serial messages to
 work, but I don't know enough about the console and serial core to get
 everything else working.  I am also getting panics that seem to be
 non-serial related, but I haven't tracked it down yet.
 
 So two questions:
 
 1) Is there anything obvious from the kernel panics below that I should
 be looking for?  Just the answer linux 2.4.20 is really fricken old,
 upgrade is probably the right answer.
 
 2) Does anyone have working UartLite support on a Virtex-4 FX12 design?
 
 
  Examples of 2.4.20 good:
 
 id mach(): done
 MMU:enter
 MMU:hw init
 MMU:mapin
 MMU:mapin_ram done
 MMU:setio
 MMU:exit
 Linux version 2.4.20_mvl31-v4fx12 (ahamel at uhflinux) (gcc version 3.3.1
 (MontaVista 3.3.1-3.0.10.6
 setup_arch: enter
 setup_arch: bootmem
 Xilinx Virtex-II Pro port (C) 2002 MontaVista Software, Inc.
 (source at mvista.com)
 arch: exit
 On node 0 totalpages: 16384
 zone(0): 16384 pages.
 zone(1): 0 pages.
 zone(2): 0 pages.
 Kernel command line: root=/dev/nfs
 nfsroot=192.168.1.1:/opt/montavista/previewkit/ppc/405/target4
 Xilinx INTC #0 at 0x4120 mapped to 0xFDFFF000
 Calibrating delay loop... 197.01 BogoMIPS
 Memory: 63268k available (1092k kernel code, 340k data, 60k init, 0k
 highmem)
 Dentry cache hash table entries: 8192 (order: 4, 65536 bytes)
 Inode cache hash table entries: 4096 (order: 3, 32768 bytes)
 Mount-cache hash table entries: 1024 (order: 1, 8192 bytes)
 Buffer-cache hash table entries: 4096 (order: 2, 16384 bytes)
 Page-cache hash table entries: 16384 (order: 4, 65536 bytes)
 POSIX conformance testing by UNIFIX
 
 Linux NET4.0 for Linux 2.4
 Based upon Swansea University Computer Society NET3.039
 Initializing RT netlink socket
 LSP Revision 42
 ikconfig 0.5 with /proc/ikconfig
 Starting kswapd
 Disabling the Out Of Memory Killer
 devfs: v1.12c (20020818) Richard Gooch (rgooch at atnf.csiro.au)
 devfs: boot_options: 0x1
 pty: 256 Unix98 ptys configured
 xgpio #0 at 0x4002 mapped to 0xC500
 xgpio #1 at 0x4004 mapped to 0xC5011000
 xgpio #2 at 0x4006 mapped to 0xC5022000
 xilinx_spi: got major number 254
 xilinx_spi0 at 0x4080 mapped to 0xC5033000, irq=29
 RAMDISK driver initialized: 16 RAM disks of 8192K size 1024 blocksize
 loop: loaded (max 8 devices)
 XTemac: Device instance #0 found
 eth0: XTemac: using fifo direct interrupt driven mode.
 eth0: XTemac: PHY detected at address 4.
 eth0: Xilinx TEMAC #0 at 0x8040 mapped to 0xC5044000, irq=28
 eth0: XTemac: id 1.0f, block id 5, type 8
 NET4: Linux TCP/IP 1.0 for NET4.0
 IP Protocols: ICMP, UDP, TCP, IGMP
 IP: routing cache hash table of 512 buckets, 4Kbytes
 TCP: Hash tables configured (established 4096 bind 8192)
 eth0: XTemac: Options: 0xb8f0
 eth0: XTemac: We renegotiated the speed to: 1000
 eth0: XTemac: speed set to 1000Mb/s
 Sending DHCP requests ., OK
 IP-Config: Got DHCP answer from 192.168.1.1, my address is 192.168.1.75
 IP-Config: Complete:
   device=eth0, addr=192.168.1.75, mask=255.255.255.0,
 gw=192.168.1.1,
  host=192.168.1.75, domain=, nis-domain=(none),
  bootserver=192.168.1.1, rootserver=192.168.1.1, rootpath=
 NET4: Unix domain sockets 1.0/SMP for Linux NET4.0.
 Looking up port of RPC 13/2 on 192.168.1.1
 Looking up port of RPC 15/1 on 192.168.1.1
 VFS: Mounted root (nfs filesystem).
 Mounted devfs on /dev
 Freeing unused kernel memory: 60k init
 serial console detected.  Disabling virtual terminals.
 init started:  BusyBox v0.60.2 (2004.04.30-17:49+) multi-call binary
 
 

Linux 2.4 Kernel on Xilinx Virtex4 FX100's PPC

2006-06-01 Thread Aidan Williams
Anantharaman Chetan-W16155 wrote:
 Has anyone successfully ported a Linux 2.4 Kernel on a Xilinx Virtex-4 
 FX series FPGA?s, PPC405 processor?
 

Yes, see 
http://ozlabs.org/pipermail/linuxppc-embedded/2006-April/022583.html

Note that there are silicon bugs that prevent caches being used in some 
chips.

 More specifically, the FX100 FPGA?

I don't have one of those, sorry.

- aidan




Xilinx Virtex-2 PRO FPGA ppc 405 on ML310 board

2006-04-27 Thread Aidan Williams
Vincent Winstead wrote:
   But I still have nothing working with the ML310 board.  I did a dow 
 image.elf at the XMD command prompt, then con and it showed up with a 
 RUNNING prompt, but nothing showed up on the hyperterminal window.  I 
 compiled using 115200 baud and I changed my hyperterminal to match this, 
 but nothing shows up ...at all.  Where do you think I would need to 
 start looking to resolve this issue?

Ensure that your hardware is working by running one of
the xilinx-supplied demo programs on your design
that outputs stuff from the serial port (e.g. the memory
tester).  If nothing comes out, check your hardware
design carefully, check your serial port settings
(e.g. flow control), etc.

I would also read up on serial port block you are using
and its linux driver.  For example, if you're using the
uartlite, it could be that your hardware and software
don't agree on the baudrate.

e.g. See drivers/char/xilinx_uartlite/xuartlite.h :-

* @file xuartlite.h
*
* This component contains the implementation of the XUartLite component which is
* the driver for the Xilinx UART Lite device. This UART is a minimal hardware
* implementation with minimal features.  Most of the features, including baud
* rate, parity, and number of data bits are only configurable when the hardware
* device is built, rather than at run time by software.


- aidan




Xilinx Virtex-2 PRO FPGA ppc 405 on ML310 board

2006-04-25 Thread Aidan Williams

After generating a new auto-config.in using the BSP,
you'll need to:

   0. put new auto-config.in into kernel directory
  linux-2.4.x/arch/ppc/platforms/xilinx_auto

   1. change to the top uClinux-dist directory
  (*NOT* the kernel directory)

   2. In Vendor/Product Selection  ---
  Choose Xilinx
  Choose powerpc-auto

   3. In Kernel/Library/Defaults Selection  ---
  Choose linux-2.4.x as your kernel, making sure that
  this is a symlink to or copy of the linuxppc-2.4
  tarball from UQ.

   4. In Kernel/Library/Defaults Selection  ---
  Choose [*] Default all settings (lose changes)

   5. Save and quit..

This process will pull in default Xilinx/powerpc config
files from vendors/Xilinx/powerpc-auto/config.*
for the kernel and for other uClinux components.

It will also generate a new linux-2.4.x/.config
based on your auto-config.in and the defaults
in vendors/Xilinx/powerpc-auto/config.linux-2.4.x.

btw, I don't have an ML310 board.  I have however gotten
the UQ kernel + uclinux to work on a v2pro FF1152 board
and a virtex-4 FX-12 minimodule.

another btw, the linuxppc-2.4 code has an auto-config.in
inside it which, if you follow the above steps (without
doing step 0), should compile.  The supplied auto-config.in
won't match your board, but it should at least compile.

- aidan


Vincent Winstead wrote:
 guess what - I got the BSP to work!  But now I have a problem with the 
 make command.  I put the auto-config.in where it needs to be then I did 
 a make menuconfig to configure it, then I did a make dep, but when I did 
 a make is when  an error came up that I can't seem to figure out:
 
 In file included from 
 /home/ml310_linux/uClinux-dist/linuxppc-2.4/include/linux/pagemap.h:16,
  from 
 /home/ml310_linux/uClinux-dist/linuxppc-2.4/include/linux/locks.h:8,
  from 
 /home/ml310_linux/uClinux-dist/linuxppc-2.4/include/linux/blk.h:5,
  from init/main.c:25:
 /home/ml310_linux/uClinux-dist/linuxppc-2.4/include/linux/highmem.h: In 
 function `kmap':
 /home/ml310_linux/uClinux-dist/linuxppc-2.4/include/linux/highmem.h:68: 
 error: `CONFIG_KERNEL_START' undeclared (first use in this function)
 init/main.c: In function `start_kernel':
 init/main.c:393: error: `CONFIG_KERNEL_START' undeclared (first use in 
 this function)
 make[1]: *** [init/main.o] Error 1
 make[1]: Leaving directory `/home/ml310_linux/uClinux-dist/linuxppc-2.4'
 make: *** [linux] Error 1
 
 This CONFIG_KERNEL_START is the problem.  It doesn't seem to be defined 
 anywhere and I guess it needs to be.  Is this something I need to get 
 from somewhere?  Or is it maybe generated along with the BSP so I would 
 have to put a start number into the platform Studio configuration?
 
 -Vincent
 
 
 */Aidan Williams /* wrote:
 
 
 Vincent Winstead wrote:
   Now, as far as step 5, am I supposed to have a symbolic link that is
   named linux-2.4.x placed into the uClinux-dist directory? Because
   there's already a folder named linux-2.4.x which was in there
 already
   when I untarred everything. At the command prompt in the
 uClinux-dist
   directory I entered the following line:
  
   ln -s ../linuxppc-2.4 linux-2.4.x
  
   and the result of this operation was to put a symbolic link into my
   linuxppc-2.4 directory with the name of linux-2.4.x - is this
 correct?
  
 
 First, you'll need to move the existing directory aside using
 a command like:
 
 mv linux-2.4.x linux-2.4.x-dist
 
 and then re-run the ln -s command above.
 
   Now on to Step 6 problem.
   How am I supposed to make use uClinux EDK Board Support Package 1.0
   files? I'm not sure how to go about using them in the Xilinx
 Platform
   Studio in order to generate the necessary auto-config.in file.
  
 
 See the document below for the general approach:
 
   Even though it is about the microblaze rather than
   the PPC, a helpful getting started document is:
  
 
 http://www.itee.uq.edu.au/~wu/downloads/uClinux_ready_Microblaze_design.pdf
  
 
 Look particularly at the section Software Platform Settings
 on page 29, steps 67,68.
 
 If you are not overly familiar with the EDK, it would
 be best to find someone locally who can help walk you
 through the process of generating a system.
 
 - aidan
 
 
 --
 This email and any attachments may be confidential. They may contain
 legally
 privileged information or copyright material. You should not read, copy,
 use or disclose them without authorisation. If you are not an intended
 recipient, please contact us at once by return email and then delete
 both
 messages. We do not accept liability in connection with computer virus,
 data corruption, delay, interruption, unauthorised access or
 unauthorised

Xilinx Virtex-2 PRO FPGA ppc 405 on ML310 board

2006-04-18 Thread Aidan Williams

Vincent Winstead wrote:
 Now, as far as step 5, am I supposed to have a symbolic link that is 
 named linux-2.4.x placed into the uClinux-dist directory?  Because 
 there's already a folder named linux-2.4.x which was in there already 
 when I untarred everything.  At the command prompt in the uClinux-dist 
 directory I entered the following line:
  
 ln -s ../linuxppc-2.4 linux-2.4.x
  
 and the result of this operation was to put a symbolic link into my 
 linuxppc-2.4 directory with the name of linux-2.4.x  - is this correct?
  

First, you'll need to move the existing directory aside using
a command like:

mv linux-2.4.x linux-2.4.x-dist

and then re-run the ln -s command above.

 Now on to Step 6 problem. 
   How am I supposed to make use uClinux EDK Board Support Package 1.0 
 files?  I'm not sure how to go about using them in the Xilinx Platform 
 Studio in order to generate the necessary auto-config.in file. 
  

See the document below for the general approach:

 Even though it is about the microblaze rather than
 the PPC, a helpful getting started document is:
 
 http://www.itee.uq.edu.au/~wu/downloads/uClinux_ready_Microblaze_design.pdf
 

Look particularly at the section Software Platform Settings
on page 29, steps 67,68.

If you are not overly familiar with the EDK, it would
be best to find someone locally who can help walk you
through the process of generating a system.

- aidan


--
This email and any attachments may be confidential. They may contain legally
privileged information or copyright material. You should not read, copy,
use or disclose them without authorisation. If you are not an intended
recipient, please contact us at once by return email and then delete both
messages. We do not accept liability in connection with computer virus,
data corruption, delay, interruption, unauthorised access or unauthorised
amendment. This notice should not be removed.



Xilinx Virtex-2 PRO FPGA ppc 405 on ML310 board

2006-04-13 Thread Aidan Williams
Grant Likely wrote:
 If you use 2.4: You need to use rsync to get the linuxppc-2.4 tree
 because I don't think anyone is maintaining .tar.gz of the rsync
 snapshot.  Email Tom Rini and ask him.  The linuxppc-2.4 tree is
 special because it's one of the trees that actually has the ML300
 patches integrated.  Mainline does not.
 

For 2.4, I've had good success on two different boards
using the v2pro and virtex4 parts with:

   http://www.itee.uq.edu.au/~pml/uclinux_powerpc/

The kernel tarball there has support for various xilinx
supplied peripheral cores..

The neat thing about this approach is that there is a
uclinux BSP for the EDK that is used to generate an
auto-config.in file which you then drop directly
into the linux kernel tree.

Even though it is about the microblaze rather than
the PPC, a helpful getting started document is:
http://www.itee.uq.edu.au/~wu/downloads/uClinux_ready_Microblaze_design.pdf

- aidan