主题 : 制作根文件系统-失败 复制链接 | 浏览器收藏 | 打印
误人子弟!
级别: 新手上路
UID: 799
精华: 0
发帖: 40
金钱: 355 两
威望: 130 点
综合积分: 80 分
注册时间: 2008-06-01
最后登录: 2013-09-03
楼主  发表于: 2008-08-31 14:35

 制作根文件系统-失败

用Ret hat 2.4.20的平台编译linux2.6.24的内核和制作文件系统 下载到开发板上会有问题吗?
不知道为什么根文件系统移植制作不成功,是不是跟我的开发平台2.4.20有关?
*無鈳取玳
级别: 论坛版主
UID: 27
精华: 12
发帖: 5398
金钱: 40120 两
威望: 17929 点
综合积分: 11036 分
注册时间: 2008-01-16
最后登录: 2014-11-22
1楼  发表于: 2008-08-31 16:36
我只能说制作文件系统理论上和用来制作文件系统的PC内核版本没关系,只和用来制作文件系统的工具有关。想解决问题的话,把错误的信息和现象贴出来
"If you have an apple and I have an apple and we exchange apples, then you and I will
still each have one apple. But if you have an idea and I have an idea and we exchange
these ideas, then each of us will have two ideas."
误人子弟!
级别: 新手上路
UID: 799
精华: 0
发帖: 40
金钱: 355 两
威望: 130 点
综合积分: 80 分
注册时间: 2008-06-01
最后登录: 2013-09-03
2楼  发表于: 2008-09-01 00:30
NOW, Booting Linux......
Uncompressing Linux.................................................................................
................... done, booting the kernel.
Linux version 2.6.24 (studyboy_3w@localhost.localdomain) (gcc version 3.4.6) #1 Sat Aug 23 12:05:28 EDT 20
08
CPU: ARM920T [41129200] revision 0 (ARMv4T), cr=c0007177
Machine: SMDK2440
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 00000003
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: 61568KB available (2840K code, 305K data, 124K init)
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
net_namespace: 64 bytes
NET: Registered protocol family 16
S3C2410 Power Management, (c) 2004 Simtec Electronics
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
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) 漏 2001-2006 Red Hat, Inc.
io scheduler noop registered
io scheduler anticipatory registered (default)
io scheduler deadline registered
io scheduler cfq registered
Console: switching to colour frame buffer device 30x40
fb0: s3c2410fb frame buffer device
lp: driver loaded but no devices found
ppdev: user-space parallel port driver
Serial: 8250/16550 driver $Revision: 1.90 $ 4 ports, IRQ sharing enabled
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
loop: module loaded
dm9000 Ethernet Driver
Uniform Multi-Platform E-IDE driver Revision: 7.00alpha2
ide: Assuming 50MHz system bus speed for PIO modes; override with idebus=xx
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)
NAND_ECC_NONE selected by board driver. This is not recommended !!
Scanning device for bad blocks
Creating 3 MTD partitions on "NAND 64MiB 3,3V 8-bit":
0x00000000-0x00030000 : "Boot Agent"
0x00050000-0x00250000 : "kernel"
0x00250000-0x03ffc000 : "S3C2410 flash partition 2"
usbmon: debugfs is not available
s3c2410-ohci s3c2410-ohci: S3C24XX OHCI
s3c2410-ohci s3c2410-ohci: new USB bus registered, assigned bus number 1
s3c2410-ohci s3c2410-ohci: irq 42, io mem 0x49000000
usb usb1: configuration #1 chosen from 1 choice
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 2 ports detected
mice: PS/2 mouse device common for all mice
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
S3C2410 Watchdog Timer, (c) 2004 Simtec Electronics
s3c2410-wdt s3c2410-wdt: watchdog inactive, reset disabled, irq enabled
TCP cubic registered
NET: Registered protocol family 1
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
VFS: Mounted root (cramfs filesystem) readonly.
Freeing init memory: 124K
init started: BusyBox v1.8.2 (2008-08-23 06:38:40 EDT)
starting pid 769, tty '': '/etc/init.d/rcS'
(none)
# mount all....
#starting mdev
********************************
              linux root disk
********************************
starting pid 775, tty '': '/bin/sh'
Profile Done.
/ #

/ # ls dev/
console          ptys5            tty22            ttyqb
fb0              ptys6            tty23            ttyqc
full            ptys7            tty24            ttyqd
kmem            ptys8            tty25            ttyqe
kmsg            ptys9            tty26            ttyqf
loop0            ptysa            tty27            ttyr0
loop1            ptysb            tty28            ttyr1
loop2            ptysc            tty29            ttyr2
loop3            ptysd            tty3            ttyr3
loop4            ptyse            tty30            ttyr4
loop5            ptysf            tty31            ttyr5
loop6            ptyt0            tty32            ttyr6
loop7            ptyt1            tty33            ttyr7
mem              ptyt2            tty34            ttyr8
mice            ptyt3            tty35            ttyr9
mtd0            ptyt4            tty36            ttyra
mtd0ro          ptyt5            tty37            ttyrb
mtd1            ptyt6            tty38            ttyrc
mtd1ro          ptyt7            tty39            ttyrd
mtd2            ptyt8            tty4            ttyre
mtd2ro          ptyt9            tty40            ttyrf
mtdblock0        ptyta            tty41            ttys0
mtdblock1        ptytb            tty42            ttys1
mtdblock2        ptytc            tty43            ttys2
null            ptytd            tty44            ttys3
psaux            ptyte            tty45            ttys4
ptmx            ptytf            tty46            ttys5
ptya0            ptyu0            tty47            ttys6
ptya1            ptyu1            tty48            ttys7
ptya2            ptyu2            tty49            ttys8
ptya3            ptyu3            tty5            ttys9
ptya4            ptyu4            tty50            ttysa
ptya5            ptyu5            tty51            ttysb
ptya6            ptyu6            tty52            ttysc
ptya7            ptyu7            tty53            ttysd
ptya8            ptyu8            tty54            ttyse
ptya9            ptyu9            tty55            ttysf
ptyaa            ptyua            tty56            ttyt0
ptyab            ptyub            tty57            ttyt1
ptyac            ptyuc            tty58            ttyt2
ptyad            ptyud            tty59            ttyt3

/etc # cat fstab
proc            /proc  proc            defaults                0      0
none            /var            ramfs  defaults                0      0
none            /tmp            ramfs  defaults                0      0
mdev            /dev            ramfs  defaults                0      0
sysfs  /sys            sysfs  defaults                0      0

/etc # cat init.d/rcS
#!/bin/sh

# System Startup Script

./etc/host
hostname ${HOSTNAME}

echo "# mount all...."
/bin/mount -a

echo "#starting mdev"
/bin/echo /sbin/mdev > /proc/sys/kernel/hotplug
mdev -s

#mount -t tmpfs mdev /dev
#mkdir /dev/pts
#mount -t devpts devpts /dev/pts
#mount -t sysfs sysfs /sys

echo "********************************"
echo "              linux root disk  "
echo "********************************"

/etc #
/etc # cat inittab
::sysinit:/etc/init.d/rcS

::respawn:-/bin/sh
tty2::askfirst:-/bin/sh

::ctrlaltdel:/bin/umount -a -r
::shutdown:/bin/umount -a -r
::shutdown:/sbin/swapoff -a

问题1, 为什么我的/dev目录下有那么多的文件?
问题2, 我下载文件的时,非常容易死机。
问题3, 是不是我内核的config错误了,怎么有那么多下面的东西的?内核移植时我只是修改了分区,串口等而已。对于led等没有移植,会造成以上等原因吗?
/etc # cd /sys/devices/platform/
/sys/devices/platform # ls
power          s3c2410-wdt    s3c2440-uart.1  s3c24xx_led.2
s3c2410-iis    s3c2440-i2c    s3c2440-uart.2  s3c24xx_led.3
s3c2410-lcd    s3c2440-nand    s3c24xx_led.0  serial8250
s3c2410-ohci    s3c2440-uart.0  s3c24xx_led.1  uevent
/sys/devices/platform #


Thanks a lot.
*無鈳取玳
级别: 论坛版主
UID: 27
精华: 12
发帖: 5398
金钱: 40120 两
威望: 17929 点
综合积分: 11036 分
注册时间: 2008-01-16
最后登录: 2014-11-22
3楼  发表于: 2008-09-01 15:05
问题1, 为什么我的/dev目录下有那么多的文件?

我好像以前告诉过你,你的文件系统用的是busybox的mdev, /dev目录下有多少文件是由内核里包含多少device类型和数量来决定的,和你的文件系统没关系

问题2, 我下载文件的时,非常容易死机。

死机也分很多种,列出操作的步骤和出现的现象,也许有人能帮你

问题3, 是不是我内核的config错误了,怎么有那么多下面的东西的?内核移植时我只是修改了分区,串口等而已。对于led等没有移植,会造成以上等原因吗?

/sys/devices/platform/下面的是内核里所有包含的'platform device', 其中绝大部分在你移植之前就已经包含在2.6.24的内核里了
"If you have an apple and I have an apple and we exchange apples, then you and I will
still each have one apple. But if you have an idea and I have an idea and we exchange
these ideas, then each of us will have two ideas."
误人子弟!
级别: 新手上路
UID: 799
精华: 0
发帖: 40
金钱: 355 两
威望: 130 点
综合积分: 80 分
注册时间: 2008-06-01
最后登录: 2013-09-03
4楼  发表于: 2008-09-01 21:46
Quote:问题1, 为什么我的/dev目录下有那么多的文件?
我好像以前告诉过你,你的文件系统用的是busybox的mdev, /dev目录下有多少文件是由内核里包含多少device类型和数量来决定的,和你的文件系统没关系

请问如何解决呢?


Quote:问题2, 我下载文件的时,非常容易死机。
死机也分很多种,列出操作的步骤和出现的现象,也许有人能帮你

步骤很简单,file->transfer->Zmodem->send 到34%就hang机了。是不是我内核移植得不成功呢?有部分没有做呢?
*無鈳取玳
级别: 论坛版主
UID: 27
精华: 12
发帖: 5398
金钱: 40120 两
威望: 17929 点
综合积分: 11036 分
注册时间: 2008-01-16
最后登录: 2014-11-22
5楼  发表于: 2008-09-02 07:22
既然/dev下面的device数量是内核决定的,重新配置内核就可以了

如果是用Zmodem下载到tmpfs或ramfs的目录下,先检查一下tmpfs或ramfs的大小,可以用df -h,是不是下载的东西太大,超过限制了
"If you have an apple and I have an apple and we exchange apples, then you and I will
still each have one apple. But if you have an idea and I have an idea and we exchange
these ideas, then each of us will have two ideas."
误人子弟!
级别: 新手上路
UID: 799
精华: 0
发帖: 40
金钱: 355 两
威望: 130 点
综合积分: 80 分
注册时间: 2008-06-01
最后登录: 2013-09-03
6楼  发表于: 2008-09-02 20:54
我也试过df,很迷惑,为什么一个都没有 连/proc都没有
# df -h
Filesystem                Size      Used Available Use% Mounted on
/ #
但是
/ # ls proc/
1              776            diskstats      loadavg        stat
2              778            driver        locks          swaps
3              802            execdomains    meminfo        sys
4              94            fb            misc          sysrq-trigger
5              95            filesystems    modules        sysvipc
58            96            fs            mounts        timer_list
6              97            ide            mtd            tty
63            buddyinfo      interrupts    net            uptime
69            bus            iomem          pagetypeinfo  version
72            cmdline        ioports        partitions    vmstat
731            cpu            irq            sched_debug    zoneinfo
755            cpuinfo        kallsyms      self
762            devices        kmsg          slabinfo
/ # ls sys/
block    class    firmware  kernel    power
bus      devices  fs        module
/ #


我怀疑是不是我文件系统的/etc文件有配置错误? 能发个文件系统/etc的压缩包上来吗?