Homepage

  • Projekte
  • Shop
  • Forum
Erweiterte Suche
  • Schnellzugriff
    • Unbeantwortete Themen
    • Aktive Themen
    • Suche
  • FAQ
  • Anmelden
  • Registrieren
  • Foren-Übersicht
  • Suche

µClinux Compiling for "Philips ARM LPC22xx Board"

Fragen zu ARMs
Antworten
  • Druckansicht
Erweiterte Suche
29 Beiträge
  • 1
  • 2
  • Nächste
polm

µClinux Compiling for "Philips ARM LPC22xx Board"

  • Zitieren

Beitrag von polm » 15.02.2006, 22:39:56

hello,

I’m having some trouble when compiling uClinux for the Philips ARM LPC22xx Board!
What are the exact kernel settings I need to make in “make menuconfig” to make a correctly booting system when using the standard boot loader provide by Ulrich.

When I checked the “main.h” I saw:

//##########################################################################
#define KERNEL_START 0x81008000
#define BOOTIMG_ADDR 0x81100000
#define FILE1 "linux.bin"
#define FILE2 "romfs.img"
//##########################################################################
#define FOSC 12000000
#define PLL_M 4 // max. speed = 60 MHz
#define MSEL (PLL_M-1)
#define PSEL0 5
#define PSEL1 6

So I suppose I need the Crystal freq. = 12 Mhz and the CPU clock = 48 Mhz,
I made the following settings (as seen in the readme.txt file on the webste):

System Type--->
ARM System Type--->
[*] Philips LPC22xx
[*] Set flash/sdram size and base addr
(0x81000000) (S)DRAM Base Address
(0x00400000) (S)DRAM Size
(0x80000000) FLASH Base Address
(0x00200000) FLASH Size
LPC22xx options--->
[ ]Default Big Endian
(12000000) Oscillator Freqnecy
(48000000) ARM Core Frequency
[*] Remap Vectors to ram

General Setup--->
(root=/dev/ram0 initrd=0x81100000,800K console=ttyS0) Default kernel command string

When booting I see the boot loader, then all the dots which indicate the “linux.bin”-file being loaded but the I see something like this: “ Linux wird8 ‘üþ: Ð[/b] ” and it crashes…
What am I doing wrong?????

Many thanks in advance,

Polm
Nach oben

Benutzeravatar
Ulrich
Site Admin
Beiträge: 3054
Registriert: 29.02.2004, 18:12:19
Wohnort: Siegen
Kontaktdaten:
Kontaktdaten von Ulrich
Website

  • Zitieren

Beitrag von Ulrich » 16.02.2006, 09:28:20

Hello,

You must set the Quarz speed in serial.h by the µClinux dist.

Regards
Ulrich
Nach oben

polm

  • Zitieren

Beitrag von polm » 16.02.2006, 18:50:44

Hello,

I think I found a setting I forgot to make in "make menuconfig":

Character Devices--->
Serial Devices--->
[ ] 8250/16550 and compatible serial support
--- Non-8250 serial port support
[*] LPC2294 serial port support
[*] Support for console on LPC2294 serial port

Are these configurations correct?
When I do "make" I get a lot of errors like:

drivers/serial/serial_lpc2294.c: In function `lpc2294uart_int_rx':
drivers/serial/serial_lpc2294.c:103: warning: implicit declaration of function `clps_readl'
drivers/serial/serial_lpc2294.c:103: warning: implicit declaration of function `SYSFLG'
drivers/serial/serial_lpc2294.c:104: `SYSFLG_URXFE' undeclared
.........

What can I do about it?

P.S. I found a lot of serial.h files like in : /uClinux-dist/linux-2.6.x/include/asm/arch/serial.h and the do contain the following quarz speed setting:
" #define BASE_BAUD (10000000 / 16) "
but it's in comment so I think changing it will not change anything...

Can you please help me,
Thanks a lot in advance,

Polm
Nach oben

Benutzeravatar
Ulrich
Site Admin
Beiträge: 3054
Registriert: 29.02.2004, 18:12:19
Wohnort: Siegen
Kontaktdaten:
Kontaktdaten von Ulrich
Website

  • Zitieren

Beitrag von Ulrich » 16.02.2006, 23:08:16

[* ] 8250/16550 and compatible serial support
--- Non-8250 serial port support
[ ] LPC2294 serial port support
[ ] Support for console on LPC2294 serial port


The standart settings are correct the LPC2294 settings doesn't work.

Greetings
Ulrich
Nach oben

polm

"make menuconfig" memory configuration

  • Zitieren

Beitrag von polm » 19.02.2006, 12:48:01

Hello, the "Serial Baud Rate"-problem is fixed but I still have some memory configuration troubles:
In the "make menuconfig" I'm not very sure about the following:

General Setup--->
(root=/dev/ram0 initrd=0x81100000,800K console=ttyS0) Default kernel command string

Is this correct? The size of the linux.bin file = 1 MB and the size of the romfs.img = 12 Kb.
When booting I reveive the following:

checking if image is initramfs...it isn't (ungzip failed); looks like an initrd
Bad page state at free_hot_cold_page (in process 'swapper', page 81202d28)
flags:0x20000080 mapping:00000000 mapped:0 count:0
Backtrace:
Trying to fix it up, but a reboot is needed
Freeing initrd memory: 1024K
POSIX conformance testing by UNIFIX
NET: Registered protocol family 16
Serial: 8250/16550 driver $Revision: 1.90 $ 6 ports, IRQ sharing disabled
ttyS0 at MMIO 0x0 (irq = 6) is a 16550A
ttyS1 at MMIO 0x0 (irq = 7) is a 16550A
RAMDISK driver initialized: 16 RAM disks of 4096K size 1024 blocksize
loop: loaded (max 8 devices)
NET: Registered protocol family 2
IP: routing cache hash table of 512 buckets, 4Kbytes
TCP: Hash tables configured (established 512 bind 512)
NET: Registered protocol family 1
NET: Registered protocol family 17
RAMDISK: Couldn't find valid RAM disk image starting at 0.
Kernel panic: VFS: Unable to mount root fs on ram0

Can you please help me??? Thanks a lot in advance,
Polm
Nach oben

Benutzeravatar
Ulrich
Site Admin
Beiträge: 3054
Registriert: 29.02.2004, 18:12:19
Wohnort: Siegen
Kontaktdaten:
Kontaktdaten von Ulrich
Website

  • Zitieren

Beitrag von Ulrich » 19.02.2006, 18:50:44

I thing the address 81200000 is better.
The Kernel has a size round about 1MB the beginning is 81008000 in this case the end is 81108000. Then you have trouble with the RAMFS image.
Zuletzt geändert von Ulrich am 20.02.2006, 20:07:03, insgesamt 1-mal geändert.
Nach oben

polm

SD/MMC card driver

  • Zitieren

Beitrag von polm » 20.02.2006, 14:34:51

Dear Ulrich, thank you for all your help. I still have a problem:

I would like to mount the root filesystem to the sd/mmc card like you did on the kernel which came on the SD-card with the LPC-board:

Kernel command line: rw ext2 root=/dev/bd0p2 console=ttyS0
(as seen when booting your kernel)

But this doesn't work because I do not have a sd/mmc-card driver to enable in the "make menuconfig"..., I can't find any option related to mmc/sd...

Do I need to install some kind of patch or driver before compiling the kernel?

Many thanks in advance,
Polm
Nach oben

Benutzeravatar
Ulrich
Site Admin
Beiträge: 3054
Registriert: 29.02.2004, 18:12:19
Wohnort: Siegen
Kontaktdaten:
Kontaktdaten von Ulrich
Website

  • Zitieren

Beitrag von Ulrich » 20.02.2006, 20:03:32

Copy the Driver in the current Directory! See README.TXT!!

http://www.ulrichradig.de/site/arm_proj ... reiber.zip

Regards
Ulrich
Nach oben

polm

SD/MMC error

  • Zitieren

Beitrag von polm » 20.02.2006, 23:01:23

Hello Ulrich, thank you for helping me so fast but I still can't get everything working:
After installing the MMC driver and compiling again I received the following output at startup:

Kernel command line: rw ext2 root=/dev/bd0p2 console=ttyS0
PID hash table entries: 32 (order 5: 256 bytes)
Memory: 4MB = 4MB total
Memory: 2888KB available (975K code, 101K data, 52K init)
Calibrating delay loop... 5.42 BogoMIPS
Dentry cache hash table entries: 1024 (order: 0, 4096 bytes)
Inode-cache hash table entries: 1024 (order: 0, 4096 bytes)
Mount-cache hash table entries: 512 (order: 0, 4096 bytes)
POSIX conformance testing by UNIFIX
NET: Registered protocol family 16
MMC/SD-Card Driver init failed
Serial: 8250/16550 driver $Revision: 1.90 $ 2 ports, IRQ sharing disabled
ttyS0 at MMIO 0x0 (irq = 6) is a 16550A
ttyS1 at MMIO 0x0 (irq = 7) is a 16550A
RAMDISK driver initialized: 16 RAM disks of 4096K size 1024 blocksize
loop: loaded (max 8 devices)
NET: Registered protocol family 2
IP: routing cache hash table of 512 buckets, 4Kbytes
TCP: Hash tables configured (established 512 bind 512)
NET: Registered protocol family 1
NET: Registered protocol family 17
VFS: Cannot open root device "bd0p2" or unknown-block(0,0)
Please append a correct "root=" boot option
Kernel panic: VFS: Unable to mount root fs on unknown-block(0,0)


(I receive the same output when using: (rw root=/dev/bd0p2 console=ttyS0))
I don't know how to fix this problem...
Can you help me?

Thanks a lot,
Polm
Nach oben

Benutzeravatar
Ulrich
Site Admin
Beiträge: 3054
Registriert: 29.02.2004, 18:12:19
Wohnort: Siegen
Kontaktdaten:
Kontaktdaten von Ulrich
Website

  • Zitieren

Beitrag von Ulrich » 20.02.2006, 23:28:15

The problem the kernel does not found the MMC/SD card because the problem is the MMC init routine. The Driver Init is the same routine as the bootloader init routine.
Nach oben

polm

  • Zitieren

Beitrag von polm » 21.02.2006, 11:11:27

Hello Ulrich,
I'm sorry but I don't understand exactly what you mean...

I tried replacing the mmc.c & mmc.h files in the ../linux-2.6.x/arch/armnommu/mach-lpc2294 folder by those in the "bootloader" folder on your CD-Rom but when I do "make" I receive errors like:

CC arch/armnommu/mach-lpc2294/mmc.o
arch/armnommu/mach-lpc2294/mmc.c:34: arch/philips/lpc2119.h: Onbekend bestand of map
make[2]: *** [arch/armnommu/mach-lpc2294/mmc.o] Fout 1
make[1]: *** [arch/armnommu/mach-lpc2294] Fout 2
make[1]: Leaving directory `/uc/uClinux-dist/linux-2.6.x'
make: *** [linux] Fout 1

Thanks for all your help,
Polm
Nach oben

Benutzeravatar
Ulrich
Site Admin
Beiträge: 3054
Registriert: 29.02.2004, 18:12:19
Wohnort: Siegen
Kontaktdaten:
Kontaktdaten von Ulrich
Website

  • Zitieren

Beitrag von Ulrich » 21.02.2006, 12:56:28

Hello,

Sorry I gave the incorrect Driver!! Here the new one:

http://www.ulrichradig.de/site/arm_proj ... reiber.zip

The difference are in mmc.h therefore the driver can't found the MMC/SD card!

#define MMC_Chip_Select 10
Nach oben

polm

  • Zitieren

Beitrag von polm » 21.02.2006, 20:41:41

Hello,

The sd/mmc driver is now working but I still have a problem when trying to mount the root filesystem. The startup output is the following:

MC/SD-Card Driver init OK
Using deadline io scheduler
Capacity 123 MB
bd0: unknown partition table
....
VFS: Cannot open root device "bd0p2" or bd0p2
Please append a correct "root=" boot option
Kernel panic: VFS: Unable to mount root fs on bd0p2

How can I fix this problem? The /dev/mmc devices are correct and the sd card is diveded in 2 partitions as it should be:

Schijf /dev/sde: 125 MB, 125698048 bytes
4 koppen, 60 sectoren/spoor, 1022 cylinders
Eenheden = cylinders van 240 * 512 = 122880 bytes

Apparaat Boot Start Einde Blokken Id Systeem
/dev/sde1 1 82 9810 6 FAT16
/dev/sde2 83 1022 112800 83 Linux

Can you please help me?
Many thanks in advance,
Polm
Nach oben

Benutzeravatar
Ulrich
Site Admin
Beiträge: 3054
Registriert: 29.02.2004, 18:12:19
Wohnort: Siegen
Kontaktdaten:
Kontaktdaten von Ulrich
Website

  • Zitieren

Beitrag von Ulrich » 21.02.2006, 20:48:50

:-)

You must select a new option. This option you found under Filesystem/Partition Tabel (PC BIOS partition tabel)

Regards
Ulrich
Nach oben

polm

  • Zitieren

Beitrag von polm » 21.02.2006, 22:09:40

Hello Ulrich,

I succesfully booted a kernel, thank you for all your help. But,
when I start using the ethernet interface the system crashes and I receive the following output:

# ping 192.168.0.1
PING 192.168.0.1Unhandled fault: alignment exception (0x7000101) at 0x8133dc4c
Internal error: Oops: 0 [#1]
CPU: 0
pc : [<8101527c>] lr : [<810164d0>] Not tainted
sp : 8133dc4c ip : 811331c8 fp : 00000000
r10: 811437e0 r9 : 00000102 r8 : 8133c000
r7 : 00000103 r6 : 00000000 r5 : 8133dc94 r4 : 8133dc80
r3 : 00000104 r2 : 00000105 r1 : 00000001 r0 : 00000104
Flags: nzCv IRQs off FIQs on Mode SVC_32 Segment user
(192.168.0.1): <1>Unhandled fault: alignment exception (0x5000001) at 0x8133d90
Unhandled fault: alignment exception (0x7000001) at 0x8133d8e8
Unhandled fault: alignment exception (0x7000001) at 0x8133d870
Unhandled fault: alignment exception (0x7000001) at 0x8133d7f8
Unhandled fault: alignment exception (0x7000001) at 0x8133d780
Unhandled fault: alignment exception (0x7000001) at 0x8133d708
.....

Do you have any idee of how to fix this problem?

Many many thanks in advance,
Polm
Nach oben

Antworten
  • Druckansicht

29 Beiträge
  • 1
  • 2
  • Nächste

Zurück zu „ARM Mikrocontroller“



  • Foren-Übersicht
  • Alle Zeiten sind UTC+02:00
  • Alle Cookies löschen

Powered by phpBB® Forum Software © phpBB Limited

Deutsche Übersetzung durch phpBB.de

Datenschutz | Nutzungsbedingungen

 

 

sitemap  |    |  datenschutz   |  impressum