Skip to contentSkip to conversation

Xilinx BSP for linux 2.6

DISCUSSION Ming Liu 2 participants 5 messages Jul 6, 2006 – Jul 7, 2006 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

Ming Liu

author
#1 lore raw

Dear Ameet,

Quoted 3 lines

I DONOT have a ML403 with me. But does Xilinx EDK generate
xparameters_ml300.h in the BSP instead of xparameters_ml403.h for the ML403 board?

Yes. EKD only generates ml300.h instead of ml403.h, although you specify the platform is ML403.

Quoted 3 lines

You need to just copy the xparameters_ml300.h file (if that is what xilinx EDK generates) as xparameters_ml403.h in arch/ppc/platforms/4xx/xparameters/ folder. Configure the kernel as ML403.

I don't think so. I have looked into these two files. I found that there are many differences between them. Not only the addresses for each peripheral are different, but also the parameters' names. So If we just simply copy ml300.h file as ml403.h, many parameters will be undefined.

Quoted 3 lines

Like I said to you before, if you want to get started quickly and without much headache.. then please go step-by-step. Try the things I mention in the article PART I without applying any patches.

Thanks for your suggestion. I will start from the beginning.

Quoted 1 line

Please DONOT hesitate to ask further clarifications!

It is really like a big family in the Linux world because of the help among the persons. Thanks for all the help from the friends in Linux world!

Regards
Ming

_________________________________________________________________
免费下载 MSN Explorer: http://explorer.msn.com/lccn/

#2 lore raw

Hi Ming,
If your Xilinx EDK generates the xparameters_ml300.h file for the
ML403 board then it has been configured with the right parameters and address required by Linux. Don't look at the existing xparameters_ml403.h file in the kernel source. It has got too many parameters with address initializations that might not suit you at all. I think its safe to copy the ml300.h onto ml403.h. I tried it... the kernel compiles without any problems.

-Ameet

Quoted 35 lines · Ming Liu

Dear Ameet,

Quoted 3 lines

I DONOT have a ML403 with me. But does Xilinx EDK generate
xparameters_ml300.h in the BSP instead of xparameters_ml403.h for the ML403 board?

Yes. EKD only generates ml300.h instead of ml403.h, although you specify the platform is ML403.

Quoted 4 lines

You need to just copy the xparameters_ml300.h file (if that is what xilinx EDK generates) as xparameters_ml403.h in arch/ppc/platforms/4xx/xparameters/ folder. Configure the kernel as ML403.

I don't think so. I have looked into these two files. I found that there are many differences between them. Not only the addresses for each peripheral are different, but also the parameters' names. So If we just simply copy ml300.h file as ml403.h, many parameters will be undefined.

Quoted 3 lines

Like I said to you before, if you want to get started quickly and without much headache.. then please go step-by-step. Try the things I mention in the article PART I without applying any patches.

Thanks for your suggestion. I will start from the beginning.

Quoted 1 line

Please DONOT hesitate to ask further clarifications!

It is really like a big family in the Linux world because of the help among the persons. Thanks for all the help from the friends in Linux world!

Regards
Ming

_________________________________________________________________
免费下载 MSN Explorer: http://explorer.msn.com/lccn/

author
#3 lore raw

Dear Ameet,
A good news is that now my 2.6 kernel is running in my ML403 board! According your guidance, first I made the kernel as simple as possible and it works well. Then I included the patch for SystemACE and here is the information shown on the hyper teminal:

Linux/PPC load: console=ttyS0,9600 root=/dev/xsa3 [ 0.000148] Console: colour dummy device 80x25

[    0.000919] Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
[    0.002277] Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
[    0.012802] Memory: 63104k available (1340k kernel code, 384k data, 76k init,
0k highmem)
[    0.230310] Mount-cache hash table entries: 512
[    0.238305] VFS: Disk quotas dquot_6.5.1
[    0.238516] Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[    0.238817] JFFS2 version 2.2. (NAND) (C) 2001-2003 Red Hat, Inc.
[    0.239435] JFS: nTxBlock = 493, nTxLock = 3944
[    0.241883] Initializing Cryptographic API
[    0.241940] io scheduler noop registered (default)
[    0.322864] Serial: 8250/16550 driver $Revision: 1.90 $ 4 ports, IRQ sharing
disabled
[    0.324759] serial8250.0: ttyS0 at MMIO 0x40401003 (irq = 1) is a 16550A
[    1.653644] RAMDISK driver initialized: 16 RAM disks of 65536K size 1024 bloc
ksize
[    1.745079] loop: loaded (max 8 devices)
[    1.793392]  xsa: xsa1 xsa2 xsa3
[    1.839262] mice: PS/2 mouse device common for all mice
[    1.935059] VFS: Mounted root (ext2 filesystem) readonly.
[    2.000037] Freeing unused kernel memory: 76k init
[    2.075656] Warning: unable to open an initial console.

I use xsa3 as the partition to store the file system. Now the file system is the old one for my 2.4 kernel generated by busybox. Then I think that's why the problem "unable to open an initial console" is generated. Do you have some suggestion on how to solve it? Thanks for your opinion.

Also, when I compile the kernel, there is a error. That's in adapter.c file, undefined reference to "XAssert". I checked the source code and found that the function of XAssert is defined in the file xbasic_types.c, not the xbasic_types.h. So it cannot be included into adapter.c. And also in the makefile there is no dependency on xbasic_types.c. So I added the defination for this function in adapter.c, copying it from xbasic_types.c. It then worked well.

Waiting for your guidance. You know, an expert's opinion is always useful for a novice, like me. :)

Regards
Ming

_________________________________________________________________
免费下载 MSN Explorer: http://explorer.msn.com/lccn/

#4 lore raw

Hi Ming,

Excellent News!

Don't worry... the problem you are facing could be because of missing device files in your /dev folder.

Do as follows:
mount the CF card onto your PC and then goto the /dev folder on your root filesystem in the card. Here run the following commands as root:

# mknod -m 660 console c 5 1
# mknod -m 660 xsa b 254 0
# mknod -m 660 xsa1 b 254 1
# mknod -m 660 xsa2 b 254 2
# mknod -m 660 xsa3 b 254 3
Now there should be a directory tts in your dev. If not create one
"mkdir tts". Then do this in the dev/tts folder,
# mknod -m 660 0 b 4 64
Quoted 2 lines

Also, when I compile the kernel, there is a error. That's in adapter.c file, undefined reference to "XAssert". I checked the source code and

I think you have the old patch. If you download the new one, the compilation problem should not occur. But you resolved it yourself,... which is good.

Let me know if this works. I shall add this stuff in PART II of the article.

-Ameet

Quoted 57 lines · Ming Liu

Dear Ameet,
A good news is that now my 2.6 kernel is running in my ML403 board! According your guidance, first I made the kernel as simple as possible and it works well. Then I included the patch for SystemACE and here is the information shown on the hyper teminal:

Linux/PPC load: console=ttyS0,9600 root=/dev/xsa3 [ 0.000148]
Console: colour dummy device 80x25

[    0.000919] Dentry cache hash table entries: 16384 (order: 4, 65536 
bytes)
[    0.002277] Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
[    0.012802] Memory: 63104k available (1340k kernel code, 384k data, 
76k init,
0k highmem)
[    0.230310] Mount-cache hash table entries: 512
[    0.238305] VFS: Disk quotas dquot_6.5.1
[    0.238516] Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[    0.238817] JFFS2 version 2.2. (NAND) (C) 2001-2003 Red Hat, Inc.
[    0.239435] JFS: nTxBlock = 493, nTxLock = 3944
[    0.241883] Initializing Cryptographic API
[    0.241940] io scheduler noop registered (default)
[    0.322864] Serial: 8250/16550 driver $Revision: 1.90 $ 4 ports, IRQ 
sharing
disabled
[    0.324759] serial8250.0: ttyS0 at MMIO 0x40401003 (irq = 1) is a 16550A
[    1.653644] RAMDISK driver initialized: 16 RAM disks of 65536K size 
1024 bloc
ksize
[    1.745079] loop: loaded (max 8 devices)
[    1.793392]  xsa: xsa1 xsa2 xsa3
[    1.839262] mice: PS/2 mouse device common for all mice
[    1.935059] VFS: Mounted root (ext2 filesystem) readonly.
[    2.000037] Freeing unused kernel memory: 76k init
[    2.075656] Warning: unable to open an initial console.

I use xsa3 as the partition to store the file system. Now the file system is the old one for my 2.4 kernel generated by busybox. Then I think that's why the problem "unable to open an initial console" is generated. Do you have some suggestion on how to solve it? Thanks for your opinion.
Also, when I compile the kernel, there is a error. That's in adapter.c file, undefined reference to "XAssert". I checked the source code and found that the function of XAssert is defined in the file xbasic_types.c, not the xbasic_types.h. So it cannot be included into adapter.c. And also in the makefile there is no dependency on xbasic_types.c. So I added the defination for this function in adapter.c, copying it from xbasic_types.c. It then worked well. Waiting for your guidance. You know, an expert's opinion is always useful for a novice, like me. :)

Regards
Ming

_________________________________________________________________
免费下载 MSN Explorer: http://explorer.msn.com/lccn/

author
#5 lore raw

Dear Ameet,
It Works now! By creating these character and block devices in /dev, the system go further now. But another problem appears. That is, there is no login prompt shown in hyper terminal. The information is listed as:

[    1.745076] loop: loaded (max 8 devices)
[    1.793385]  xsa: xsa1 xsa2 xsa3
[    1.839258] mice: PS/2 mouse device common for all mice
[    1.925011] VFS: Mounted root (ext2 filesystem) readonly.
[    1.990035] Freeing unused kernel memory: 76k init

Welcome to ML403 powerpc linux 2.6.16-rc5, E.I.S. edition

Starting system...
mounting /proc: done.
Mounting '/' read-write: mount: Cannot read /etc/mtab: No such file or directory

done.
brining up loopback interface: ifconfig: socket: Function not implemented done.
Mounting /tmp: done.
Starting syslogd: done.
Starting klogd: syslogd: Couldn't get file descriptor for socket /dev/log: Funct ion not implemented
done.
Starting inetd: done.
System started.

My inittab files looks like:
::sysinit:/etc/init.d/rcS
#::askfirst:-/bin/sh
::ctrlaltdel:/sbin/reboot
::shutdown:/sbin/swapoff -a
::shutdown:/bin/umount -a -r
::restart:/sbin/init
::respawn:/sbin/getty 9600 tts/0

Any suggestion about this problem? Thanks in advance.

Regards
Ming

Quoted 25 lines

From: Ameet Patil <[email protected]>
To: Ming Liu <[email protected]>
CC: [email protected]
Subject: Re: Xilinx BSP for linux 2.6
Date: Fri, 07 Jul 2006 13:42:42 +0100

Hi Ming,

Excellent News!

Don't worry... the problem you are facing could be because of missing device files in your /dev folder.

Do as follows:
mount the CF card onto your PC and then goto the /dev folder on your root filesystem in the card. Here run the following commands as root:

# mknod -m 660 console c 5 1
# mknod -m 660 xsa b 254 0
# mknod -m 660 xsa1 b 254 1
# mknod -m 660 xsa2 b 254 2
# mknod -m 660 xsa3 b 254 3
Now there should be a directory tts in your dev. If not create one
"mkdir tts". Then do this in the dev/tts folder,
# mknod -m 660 0 b 4 64
Quoted 7 lines
Quoted 2 lines

Also, when I compile the kernel, there is a error. That's in adapter.c file, undefined reference to "XAssert". I checked the source code and

I think you have the old patch. If you download the new one, the compilation problem should not occur. But you resolved it yourself,... which is good.

Let me know if this works. I shall add this stuff in PART II of the

article.

Quoted 16 lines

-Ameet

Quoted 12 lines · Ming Liu

Dear Ameet,
A good news is that now my 2.6 kernel is running in my ML403 board! According your guidance, first I made the kernel as simple as possible and it works well. Then I included the patch for SystemACE and here is the information shown on the hyper teminal:

Linux/PPC load: console=ttyS0,9600 root=/dev/xsa3 [ 0.000148]
Console: colour dummy device 80x25

[    0.000919] Dentry cache hash table entries: 16384 (order: 4, 65536
bytes)
[    0.002277] Inode-cache hash table entries: 8192 (order: 3, 32768 

bytes)

Quoted 6 lines
Quoted 6 lines
[    0.012802] Memory: 63104k available (1340k kernel code, 384k data,
76k init,
0k highmem)
[    0.230310] Mount-cache hash table entries: 512
[    0.238305] VFS: Disk quotas dquot_6.5.1
[    0.238516] Dquot-cache hash table entries: 1024 (order 0, 4096 

bytes)

Quoted 8 lines
Quoted 8 lines
[    0.238817] JFFS2 version 2.2. (NAND) (C) 2001-2003 Red Hat, Inc.
[    0.239435] JFS: nTxBlock = 493, nTxLock = 3944
[    0.241883] Initializing Cryptographic API
[    0.241940] io scheduler noop registered (default)
[    0.322864] Serial: 8250/16550 driver $Revision: 1.90 $ 4 ports, IRQ
sharing
disabled
[    0.324759] serial8250.0: ttyS0 at MMIO 0x40401003 (irq = 1) is a 

16550A

Quoted 25 lines
Quoted 25 lines
[    1.653644] RAMDISK driver initialized: 16 RAM disks of 65536K size
1024 bloc
ksize
[    1.745079] loop: loaded (max 8 devices)
[    1.793392]  xsa: xsa1 xsa2 xsa3
[    1.839262] mice: PS/2 mouse device common for all mice
[    1.935059] VFS: Mounted root (ext2 filesystem) readonly.
[    2.000037] Freeing unused kernel memory: 76k init
[    2.075656] Warning: unable to open an initial console.

I use xsa3 as the partition to store the file system. Now the file system is the old one for my 2.4 kernel generated by busybox. Then I think that's why the problem "unable to open an initial console" is generated. Do you have some suggestion on how to solve it? Thanks for your opinion.
Also, when I compile the kernel, there is a error. That's in adapter.c file, undefined reference to "XAssert". I checked the source code and found that the function of XAssert is defined in the file xbasic_types.c, not the xbasic_types.h. So it cannot be included into adapter.c. And also in the makefile there is no dependency on xbasic_types.c. So I added the defination for this function in adapter.c, copying it from xbasic_types.c. It then worked well. Waiting for your guidance. You know, an expert's opinion is always useful for a novice, like me. :)

Quoted 6 lines
Quoted 6 lines

Regards
Ming

_________________________________________________________________
免费下载 MSN Explorer: http://explorer.msn.com/lccn/

_________________________________________________________________
与联机的朋友进行交流,请使用 MSN Messenger: http://messenger.msn.com/cn