• «
  • 1
  • 2
  • »
  • Pages: 1/2     Go
主题 : How to port 2.6.25 kernel 复制链接 | 浏览器收藏 | 打印
级别: 新手上路
UID: 807
精华: 1
发帖: 2
金钱: 40 两
威望: 22 点
贡献值: 10 点
综合积分: 24 分
注册时间: 2008-06-02
最后登录: 2009-03-27
楼主  发表于: 2008-06-02 16:47

 How to port 2.6.25 kernel

管理提醒: 本帖被 qq2440 执行置顶操作(2009-12-07)
Hello

I 'have a QQ2440 board and i try to port a linux 2.6.25 kernel.
I try to make a patch with 2.6.13 kernel with the original but when i patch the 2.6.25 kernel i have a lot of error.
I would know if someone have made a patch with just driver.
Thanks.
级别: 新手上路
UID: 989
精华: 0
发帖: 12
金钱: 120 两
威望: 12 点
贡献值: 0 点
综合积分: 24 分
注册时间: 2008-07-04
最后登录: 2017-09-13
1楼  发表于: 2008-07-04 17:12
Hello Kasim,

please, can you give me you local.conf for the openembedded?
i don't understand the system :(
级别: 新手上路
UID: 989
精华: 0
发帖: 12
金钱: 120 两
威望: 12 点
贡献值: 0 点
综合积分: 24 分
注册时间: 2008-07-04
最后登录: 2017-09-13
2楼  发表于: 2008-07-05 15:54
Hello Kasim,

thank you for your support.
last night i get openembedded to run. For linux newbie the whole linux-build system, e.g. autobuild, buildroot, openembedded is very complicated. you must reinstall this, you must configurate this and so on.

now kernel build is ok; i think, i compile now the uboot.
if i have anymore questions i feel free to contact you :-)

and if i have a running system i will write a small howto for dummys
级别: 新手上路
UID: 989
精华: 0
发帖: 12
金钱: 120 两
威望: 12 点
贡献值: 0 点
综合积分: 24 分
注册时间: 2008-07-04
最后登录: 2017-09-13
3楼  发表于: 2008-07-05 16:10
yeah, and every time something went wrong :-)

another question. Which way you use to build the root-fs?; because the kernel is build by the openmoko toolchain and the default rootfs (include qq2440v3) is build with ??? gcc.
Have you another configuration to build the root-fs via openembedded?
级别: 新手上路
UID: 989
精华: 0
发帖: 12
金钱: 120 两
威望: 12 点
贡献值: 0 点
综合积分: 24 分
注册时间: 2008-07-04
最后登录: 2017-09-13
4楼  发表于: 2008-07-05 16:53
ah ok. i should make a small break to go into the forest and reset my brain.

my kernel doesn't start; the mtd partitioning is bad.
Please, can you answer another question? I change the mtd-partitioning in kernel 2.6.24 to default in 2.6.13 to use the 2.6.24 with supervivi-default-parameter. It is correct? Must i change the bootarg? e.g. rootfstype etc.?
级别: 新手上路
UID: 989
精华: 0
发帖: 12
金钱: 120 两
威望: 12 点
贡献值: 0 点
综合积分: 24 分
注册时间: 2008-07-04
最后登录: 2017-09-13
5楼  发表于: 2008-07-05 17:14
VIVI version 0.1.4 (root@vmwarelinux) (gcc version 2.95.3 20010315 (release)) #0                            .1.4 Tue Sep 4 03:48:39 CST 2007
MMU table base address = 0x33DFC000
Succeed memory mapping.
DIVN_UPLL0
MPLLVal [M:7fh,P:2h,S:1h]
CLKDIVN:5h


+---------------------------------------------+
| S3C2440A USB Downloader ver R0.03 2004 Jan  |
+---------------------------------------------+
USB: IN_ENDPOINT:1 OUT_ENDPOINT:3
FORMAT: <ADDR(DATA):4>+<SIZE(n+10):4>+<DATA:n>+<CS:2>
NOTE: Power off/on or press the reset button for 1 sec
      in order to get a valid USB device address.

NAND device: Manufacture ID: 0xec, Chip ID: 0x76 (Samsung K9D1208V0M)
Found saved vivi parameters.
Press Return to start the LINUX/Wince now, any other key for vivi
Copy linux kernel from 0x00050000 to 0x30008000, size = 0x00200000 ... done
zImage magic = 0x016f2818
Setup linux parameters at 0x30000100
linux command line is: "noinitrd root=/dev/mtdblock2 init=/linuxrc console=ttySA                            C0"
MACH_TYPE = 782
NOW, Booting Linux......
Uncompressing Linux.............................................................                            .............................................................. done, booting the                              kernel.
Linux version 2.6.24 (Thomas@localhost.localdomain) (gcc version 4.1.2) #2 PREEM                            PT Sat Jul 5 09:37:52 CEST 2008
CPU: ARM920T [41129200] revision 0 (ARMv4T), cr=c0007177
Machine: Friendly-ARM QQ2440 Development Board
ATAG_INITRD is deprecated; please update your bootloader.
Memory policy: ECC disabled, Data cache writeback
CPU S3C2440A (id 0x32440001)
S3C244X: core 405.000 MHz, memory 101.250 MHz, peripheral 50.625 MHz
S3C24XX Clocks, (c) 2004 Simtec Electronics
CLOCK: Slow mode (1.500 MHz), fast, MPLL on, UPLL on
CPU0: D VIVT write-back cache
CPU0: I cache: 16384 bytes, associativity 64, 32 byte lines, 8 sets
CPU0: D cache: 16384 bytes, associativity 64, 32 byte lines, 8 sets
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 16256
Kernel command line: noinitrd root=/dev/mtdblock2 init=/linuxrc console=ttySAC0
irq: clearing pending ext status 00000200
irq: clearing subpending status 00000002
PID hash table entries: 256 (order: 8, 1024 bytes)
timer tcon=00000000, tcnt a4ca, tcfg 00000200,00000000, usec 00001e57
Console: colour dummy device 80x30
console [ttySAC0] enabled
Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
Memory: 64MB = 64MB total
Memory: 60860KB available (3296K code, 342K data, 372K init)
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
net_namespace: 64 bytes
NET: Registered protocol family 16
S3C2440: Initialising architecture
S3C2440: IRQ Support
S3C2440: Clock Support, DVS off
S3C24XX DMA Driver, (c) 2003-2004,2006 Simtec Electronics
DMA channel 0 at c4800000, irq 33
DMA channel 1 at c4800040, irq 34
DMA channel 2 at c4800080, irq 35
DMA channel 3 at c48000c0, irq 36
Linux Plug and Play Support v0.97 (c) Adam Belay
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
NET: Registered protocol family 2
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 2048 (order: 2, 16384 bytes)
TCP bind hash table entries: 2048 (order: 1, 8192 bytes)
TCP: Hash tables configured (established 2048 bind 2048)
TCP reno registered
NetWinder Floating Point Emulator V0.97 (double precision)
JFFS2 version 2.2. (NAND) (SUMMARY)  © 2001-2006 Red Hat, Inc.
io scheduler noop registered
io scheduler deadline registered (default)
Console: switching to colour frame buffer device 133x43
fb0: s3c2410fb frame buffer device
GPIO L3 bus interface for S3C2440, installed
s3c2440-uart.0: s3c2410_serial0 at MMIO 0x50000000 (irq = 70) is a S3C2440
s3c2440-uart.1: s3c2410_serial1 at MMIO 0x50004000 (irq = 73) is a S3C2440
s3c2440-uart.2: s3c2410_serial2 at MMIO 0x50008000 (irq = 76) is a S3C2440
RAMDISK driver initialized: 16 RAM disks of 4096K size 1024 blocksize
S3C24XX NAND Driver, (c) 2004 Simtec Electronics
s3c2440-nand s3c2440-nand: Tacls=1, 9ns Twrph0=4 39ns, Twrph1=1 9ns
NAND device: Manufacturer ID: 0xec, Chip ID: 0x76 (Samsung NAND 64MiB 3,3V 8-bit                            )
s3c2410_nand_update_chip: chip c3ef94b8: 9
usbmon: debugfs is not available
usbcore: registered new interface driver libusual
s3c2410_udc: debugfs dir creation failed -19
s3c2440-usbgadget s3c2440-usbgadget: S3C2440: increasing FIFO to 128 bytes
ether gadget: using random self ethernet address
ether gadget: using random host ethernet address
usb0: Ethernet Gadget, version: May Day 2005
usb0: using s3c2410_udc, OUT ep2-bulk IN ep1-bulk STATUS ep3-bulk
usb0: MAC 2e:ad:ba:8a:e7:93
usb0: HOST MAC f6:ea:d2:21:04:b2
usb0: RNDIS ready
mice: PS/2 mouse device common for all mice
s3c2410 TouchScreen successfully loaded
input: s3c2410 TouchScreen as /devices/virtual/input/input0
i2c /dev entries driver
s3c2440-i2c s3c2440-i2c: slave address 0x10
s3c2440-i2c s3c2440-i2c: bus frequency set to 98 KHz
s3c2440-i2c s3c2440-i2c: i2c-0: S3C I2C adapter
pcf50633_attach_adapter: entering, calling i2c_probe
s3c2440-sdi s3c2410-sdi: powered down.
s3c2440-sdi s3c2410-sdi: initialisation done.
s3c2440-sdi s3c2410-sdi: running at 0kHz (requested: 0kHz).
s3c2440-sdi s3c2410-sdi: running at 198kHz (requested: 197kHz).
s3c2440-sdi s3c2410-sdi: running at 198kHz (requested: 197kHz).
s3c2440-sdi s3c2410-sdi: running at 198kHz (requested: 197kHz).
TCP cubic registered
NET: Registered protocol family 1
NET: Registered protocol family 17
s3c2440-sdi s3c2410-sdi: powered down.
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
drivers/rtc/hctosys.c: unable to open rtc device (rtc0)
Root-NFS: No NFS server available, giving up.
VFS: Unable to mount root fs via NFS, trying floppy.
VFS: Cannot open root device "mtdblock2" or unknown-block(2,0)
Please append a correct "root=" boot option; here are the available partitions:
1f00      65536 mtdblock0 (driver?)
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(2,0)
级别: 新手上路
UID: 989
精华: 0
发帖: 12
金钱: 120 两
威望: 12 点
贡献值: 0 点
综合积分: 24 分
注册时间: 2008-07-04
最后登录: 2017-09-13
6楼  发表于: 2008-07-06 15:24
Hello,

ok. now i have a u-boot bootloader.
In u-boot i can write the kernel in nandflash; the kernel starts (same log as yesterday). Then i try the same rootfs from cd-rom (2.6.13), extract on pc and make a jffs2 image with mkfs.jffs2-script. If i write the jffs2 rootfs into nandflash at 0x634000 the system crashed; damaged kernel etc? So confused :-( i only want a working system; and i don't think, that i can build a working rootfs for myself
级别: 新手上路
UID: 989
精华: 0
发帖: 12
金钱: 120 两
威望: 12 点
贡献值: 0 点
综合积分: 24 分
注册时间: 2008-07-04
最后登录: 2017-09-13
7楼  发表于: 2008-07-07 03:12
Hello Kasim,

sorry - it looks like an other problem.
At first; i use your uboot (without lcd support because size of uboot) and your kernel.

Now, i write uboot into nand-flash. After board-reset the uboot-console is active via serial line.
Then i write the kernel (uimage) via mmc card at the device.

with following commands:
mmcinit
fatload mmc 0:0 0x32000000 uimage
nand write.jffs2 0x32000000 0x34000 $filesize

after reset the board, the kernel start. Now, i switch off the board, unplug the batterie and switch the board on the u-boot write an error:

incorrect device type in kernel
'kernel' is not a number
## Booting image at 32000000 ...
Bad Magic Number
QQ2440 #

for me; it looks like, that the kernel will not be copied from nand-flash into ram.
级别: 新手上路
UID: 989
精华: 0
发帖: 12
金钱: 120 两
威望: 12 点
贡献值: 0 点
综合积分: 24 分
注册时间: 2008-07-04
最后登录: 2017-09-13
8楼  发表于: 2008-07-07 04:01
next stepp.
i can't set env-variables in uboot / after power-down the variables have the default-value!
If i use in uboot <dynpart> and then <bootd> the kernel will be load out of nand-flash (yeah :-) ).
Now, i write the root.bin which i create following:
extract <root_default.tgz> (from cd-rom).
create with mkfs.jffs2 (mtd-tools) the root.bin file (i use this way at various linux-systems - and it works fine).

here my log:

In:    serial
Out:  serial
Err:  serial
Hit any key to stop autoboot:  0
QQ2440 # setenv bootargs_base 'rootfstype=jffs2 root=/dev/mtdblock4 init=/linuxrc console=ttySAC0,115200 loglevel=8'
QQ2440 # saveenv
Saving Environment to NAND...
Erasing Nand...QQ2440 # dynpart
mtdparts mtdparts=qq2440-nand:0x00030000(u-boot),0x00004000(u-boot_env),0x00200000(kernel),0x000a0000(splash),0x03d2c000(rootfs)
QQ2440 # bootd

NAND read: device 0 offset 0x34000, size 0x200000

Reading data from 0x233e00 -- 100% complete.
2097152 bytes read: OK
## Booting image at 32000000 ...
  Image Name:  Openmoko/2.6.24+svnr65/qq2440
  Created:      2008-07-05  19:43:13 UTC
  Image Type:  ARM Linux Kernel Image (uncompressed)
  Data Size:    1781736 Bytes =  1.7 MB
  Load Address: 30008000
  Entry Point:  30008000
  Verifying Checksum ... OK
OK

Starting kernel ...

Uncompressing Linux........................................................................................................................... done, booting the kernel.
Linux version 2.6.24 (Thomas@localhost.localdomain) (gcc version 4.1.2) #3 PREEMPT Sat Jul 5 19:55:11 CEST 2008
CPU: ARM920T [41129200] revision 0 (ARMv4T), cr=c0007177
Machine: Friendly-ARM QQ2440 Development Board
Memory policy: ECC disabled, Data cache writeback
On node 0 totalpages: 16384
  DMA zone: 128 pages used for memmap
  DMA zone: 0 pages reserved
  DMA zone: 16256 pages, LIFO batch:3
  Normal zone: 0 pages used for memmap
  Movable zone: 0 pages used for memmap
CPU S3C2440A (id 0x32440001)
S3C244X: core 304.000 MHz, memory 101.333 MHz, peripheral 50.666 MHz
S3C24XX Clocks, (c) 2004 Simtec Electronics
CLOCK: Slow mode (1.500 MHz), fast, MPLL on, UPLL on
CPU0: D VIVT write-back cache
CPU0: I cache: 16384 bytes, associativity 64, 32 byte lines, 8 sets
CPU0: D cache: 16384 bytes, associativity 64, 32 byte lines, 8 sets
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 16256
Kernel command line: rootfstype=jffs2 root=/dev/mtdblock4 init=/linuxrc console=ttySAC0,115200 loglevel=8 mtdparts=qq2440-nand:0x00030000(u-boot),0x00004000(u-boot_env),0x00200000(kernel),0x000a0000(splash),0x03d2c000(rootfs)
irq: clearing pending ext status 00000200
irq: clearing subpending status 00000003
irq: clearing subpending status 00000002
PID hash table entries: 256 (order: 8, 1024 bytes)
timer tcon=00500000, tcnt a4ed, tcfg 00000200,00000000, usec 00001e51
Console: colour dummy device 80x30
console [ttySAC0] enabled
Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
Memory: 64MB = 64MB total
Memory: 60860KB available (3296K code, 342K data, 372K init)
Calibrating delay loop... 151.55 BogoMIPS (lpj=378880)
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
net_namespace: 64 bytes
NET: Registered protocol family 16
S3C2440: Initialising architecture
S3C2440: IRQ Support
S3C2440: Clock Support, DVS off
S3C24XX DMA Driver, (c) 2003-2004,2006 Simtec Electronics
DMA channel 0 at c4800000, irq 33
DMA channel 1 at c4800040, irq 34
DMA channel 2 at c4800080, irq 35
DMA channel 3 at c48000c0, irq 36
Linux Plug and Play Support v0.97 (c) Adam Belay
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
pnp: the driver 'system' has been registered
NET: Registered protocol family 2
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 2048 (order: 2, 16384 bytes)
TCP bind hash table entries: 2048 (order: 1, 8192 bytes)
TCP: Hash tables configured (established 2048 bind 2048)
TCP reno registered
NetWinder Floating Point Emulator V0.97 (double precision)
JFFS2 version 2.2. (NAND) (SUMMARY)  © 2001-2006 Red Hat, Inc.
io scheduler noop registered
io scheduler deadline registered (default)
Console: switching to colour frame buffer device 133x43
fb0: s3c2410fb frame buffer device
GPIO L3 bus interface for S3C2440, installed
s3c2440-uart.0: s3c2410_serial0 at MMIO 0x50000000 (irq = 70) is a S3C2440
s3c2440-uart.1: s3c2410_serial1 at MMIO 0x50004000 (irq = 73) is a S3C2440
s3c2440-uart.2: s3c2410_serial2 at MMIO 0x50008000 (irq = 76) is a S3C2440
RAMDISK driver initialized: 16 RAM disks of 4096K size 1024 blocksize
S3C24XX NAND Driver, (c) 2004 Simtec Electronics
s3c2440-nand s3c2440-nand: Tacls=1, 9ns Twrph0=4 39ns, Twrph1=1 9ns
NAND device: Manufacturer ID: 0xec, Chip ID: 0x76 (Samsung NAND 64MiB 3,3V 8-bit)
s3c2410_nand_update_chip: chip c3df92b8: 9
Bad block table found at page 131040, version 0x01
Bad block table found at page 131008, version 0x01
nand_read_bbt: Bad block at 0x00980000
5 cmdlinepart partitions found on MTD device qq2440-nand
Creating 5 MTD partitions on "qq2440-nand":
0x00000000-0x00030000 : "u-boot"
0x00030000-0x00034000 : "u-boot_env"
0x00034000-0x00234000 : "kernel"
0x00234000-0x002d4000 : "splash"
0x002d4000-0x04000000 : "rootfs"
usbmon: debugfs is not available
usbcore: registered new interface driver libusual
s3c2410_udc: debugfs dir creation failed -19
s3c2440-usbgadget s3c2440-usbgadget: S3C2440: increasing FIFO to 128 bytes
ether gadget: using random self ethernet address
ether gadget: using random host ethernet address
usb0: Ethernet Gadget, version: May Day 2005
usb0: using s3c2410_udc, OUT ep2-bulk IN ep1-bulk STATUS ep3-bulk
usb0: MAC 12:d3:d2:fd:be:f5
usb0: HOST MAC ca:1a:ea:8f:a4:c8
usb0: RNDIS ready
mice: PS/2 mouse device common for all mice
s3c2410 TouchScreen successfully loaded
input: s3c2410 TouchScreen as /devices/virtual/input/input0
i2c /dev entries driver
s3c2440-i2c s3c2440-i2c: slave address 0x10
s3c2440-i2c s3c2440-i2c: bus frequency set to 98 KHz
s3c2440-i2c s3c2440-i2c: i2c-0: S3C I2C adapter
pcf50633_attach_adapter: entering, calling i2c_probe
mmc_set_power(power_mode=0, vdd=0
s3c2440-sdi s3c2410-sdi: powered down.
s3c2440-sdi s3c2410-sdi: initialisation done.
pnp: the driver 'sdio_wlan' has been registered
TCP cubic registered
NET: Registered protocol family 1
NET: Registered protocol family 17
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
drivers/rtc/hctosys.c: unable to open rtc device (rtc0)
mmc_set_power(power_mode=1, vdd=20
s3c2440-sdi s3c2410-sdi: running at 0kHz (requested: 0kHz).
mmc_set_power(power_mode=2, vdd=20
s3c2440-sdi s3c2410-sdi: running at 198kHz (requested: 197kHz).
mmc_set_power(power_mode=2, vdd=20
s3c2440-sdi s3c2410-sdi: running at 198kHz (requested: 197kHz).
mmc_set_power(power_mode=2, vdd=20
s3c2440-sdi s3c2410-sdi: running at 198kHz (requested: 197kHz).
mmc_set_power(power_mode=2, vdd=20
s3c2440-sdi s3c2410-sdi: running at 198kHz (requested: 197kHz).
mmc_set_power(power_mode=2, vdd=20
s3c2440-sdi s3c2410-sdi: running at 198kHz (requested: 197kHz).
mmc_set_power(power_mode=2, vdd=20
s3c2440-sdi s3c2410-sdi: running at 198kHz (requested: 197kHz).
mmc_set_power(power_mode=2, vdd=20
s3c2440-sdi s3c2410-sdi: running at 198kHz (requested: 197kHz).
mmc_set_power(power_mode=2, vdd=20
s3c2440-sdi s3c2410-sdi: running at 16888kHz (requested: 25000kHz).
mmc_set_power(power_mode=2, vdd=20
s3c2440-sdi s3c2410-sdi: running at 16888kHz (requested: 25000kHz).
mmc0: new SD card at address 0001
mmcblk0: mmc0:0001 256MB 247424KiB
mmcblk0: unknown partition table
VFS: Mounted root (jffs2 filesystem).
Freeing init memory: 372K
Warning: unable to open an initial console.
级别: 新手上路
UID: 989
精华: 0
发帖: 12
金钱: 120 两
威望: 12 点
贡献值: 0 点
综合积分: 24 分
注册时间: 2008-07-04
最后登录: 2017-09-13
9楼  发表于: 2008-07-07 14:37
you mean this?
mknod -m 660 console c 5 1
mknod -m 660 null c 1 3
  • «
  • 1
  • 2
  • »
  • Pages: 1/2     Go