- 论坛徽章:
- 0
|
linux在2410上面启动时的打印信息
- NAND read: device 0 offset 0x100000, size 0x300000
- 3145728 bytes read: OK
- ## Starting application at 0x30008000 ...
- Uncompressing Linux.............................................................
- done, booting the kernel.
- Linux version 2.6.14.1 (jade@ubuntu) (gcc version 3.4.5) #2 Thu Mar 5 14:42:12 C
- ST 2009
- CPU: ARM920Tid(wb) [41129200] revision 0 (ARMv4T)
- Machine: SMDK2410
- Warning: bad configuration page, trying to continue
- Memory policy: ECC disabled, Data cache writeback
- CPU S3C2410A (id 0x32410002)
- S3C2410: core 202.800 MHz, memory 101.400 MHz, peripheral 50.700 MHz
- S3C2410 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
- Kernel command line: noinitrd root=/dev/mtdblock2 init=/linuxrc console=ttySAC0,
- 115200
- irq: clearing subpending status 00000002
- PID hash table entries: 128 (order: 7, 2048 bytes)
- timer tcon=00500000, tcnt a509, tcfg 00000200,00000000, usec 00001e4c
- Console: colour dummy device 80x30
- Dentry cache hash table entries: 4096 (order: 2, 16384 bytes)
- Inode-cache hash table entries: 2048 (order: 1, 8192 bytes)
- Memory: 16MB = 16MB total
- Memory: 14232KB available (1501K code, 342K data, 84K init)
- Mount-cache hash table entries: 512
- CPU: Testing write buffer coherency: ok
- softlockup thread 0 started up.
- NET: Registered protocol family 16
- S3C2410: Initialising architecture
- S3C2410 DMA Driver, (c) 2003-2004 Simtec Electronics
- DMA channel 0 at c1800000, irq 33
- DMA channel 1 at c1800040, irq 34
- DMA channel 2 at c1800080, irq 35
- DMA channel 3 at c18000c0, irq 36
- NetWinder Floating Point Emulator V0.97 (double precision)
- devfs: 2004-01-31 Richard Gooch ([email]rgooch@atnf.csiro.au[/email])
- devfs: boot_options: 0x1
- Console: switching to colour frame buffer device 80x25
- fb0: Virtual frame buffer device, using 1024K of video memory
- S3C2410 RTC, (c) 2004 Simtec Electronics
- s3c2410_serial0 at MMIO 0x50000000 (irq = 70) is a S3C2410
- s3c2410_serial1 at MMIO 0x50004000 (irq = 73) is a S3C2410
- s3c2410_serial2 at MMIO 0x50008000 (irq = 76) is a S3C2410
- io scheduler noop registered
- io scheduler anticipatory registered
- io scheduler deadline registered
- io scheduler cfq registered
- RAMDISK driver initialized: 16 RAM disks of 4096K size 1024 blocksize
- S3C24XX NAND Driver, (c) 2004 Simtec Electronics
- s3c2410-nand: mapped registers at c1980000
- s3c2410-nand: timing: Tacls 10ns, Twrph0 30ns, Twrph1 10ns
- 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 4 MTD partitions on "NAND 64MiB 3,3V 8-bit":
- 0x00000000-0x00100000 : "bootloader"
- 0x00100000-0x00400000 : "kernel"
- 0x00400000-0x02c00000 : "root"
- 0x02d00000-0x03c00000 : "user"
- mice: PS/2 mouse device common for all mice
- NET: Registered protocol family 2
- IP route cache hash table entries: 256 (order: -2, 1024 bytes)
- TCP established hash table entries: 1024 (order: 0, 4096 bytes)
- TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
- TCP: Hash tables configured (established 1024 bind 1024)
- TCP reno registered
- TCP bic registered
- NET: Registered protocol family 1
- Reading data from NAND FLASH without ECC is not recommended
- VFS: Mounted root (cramfs filesystem) readonly.
- Mounted devfs on /dev
- Freeing init memory: 84K
- Failed to execute /linuxrc. Attempting defaults...
- Kernel panic - not syncing: No init found. Try passing init= option to kernel.
复制代码
网上分析linuxrc不能运行无非三点原因
1 linuxrc不具备可执行属性
2 linuxrc的解释shell不在首行
3 linuxrc的解释shell不存在
- ls linuxrc -al
- -rwxrwxr-x 1 root root 687 1970-01-01 08:00 linuxrc
复制代码
说明第一条排除
root的结构
- |-- bin
- | |-- ash -> busybox
- | |-- busybox
- | |-- cat -> busybox
- | |-- cp -> busybox
- | |-- echo -> busybox
- | |-- ls -> busybox
- | |-- mkdir -> busybox
- | |-- mount -> busybox
- | |-- mv -> busybox
- | |-- pwd -> busybox
- | |-- rm -> busybox
- | |-- touch -> busybox
- | |-- umount -> busybox
- | `-- vi -> busybox
- |-- dev
- |-- etc
- |-- home
- |-- lib
- |-- linuxrc
- |-- linuxrc~
- |-- mnt
- | `-- etc
- |-- proc
- |-- root
- |-- sbin
- | |-- halt -> ../bin/busybox
- | |-- init -> ../bin/busybox
- | |-- poweroff -> ../bin/busybox
- | |-- reboot -> ../bin/busybox
- | `-- start-stop-daemon -> ../bin/busybox
- |-- sys
- |-- tmp
- `-- usr
- |-- bin
- | |-- [ -> ../../bin/busybox
- | |-- [[ -> ../../bin/busybox
- | |-- env -> ../../bin/busybox
- | |-- mesg -> ../../bin/busybox
- | `-- test -> ../../bin/busybox
- |-- lib
- `-- sbin
复制代码
linuxrc的内容
- #!/bin/sh#挂载/etc 为 ramfs, 并从/mnt/etc 下拷贝文件到/etc 目录当中
- echo "mount /etc as ramfs"
- /bin/mount -n -t ramfs ramfs /etc
- /bin/cp -a /mnt/etc/* /etc
- echo "re-create the /etc/mtab entries"
- # re-create the /etc/mtab entries
- /bin/mount -f -t cramfs -o remount,ro /dev/mtdblock/2 /
- #mount some file system
- echo "------------mount /dev/shm as tmpfs"
- /bin/mount -n -t tmpfs tmpfs /dev/shm
- #挂载/proc 为 proc 文件系统
- echo "------------mount /proc as proc"
- /bin/mount -n -t proc none /proc
- #挂载/sys 为 sysfs 文件系统
- echo "------------mount /sys as sysfs"
- /bin/mount -n -t sysfs none /sys
- exec /sbin/init
复制代码
我把第一行改成了#!/bin/ash也不行,因为在/bin下面没看见sh,只看见ash。
请高手解答一下这是什么原因哦。
没有装tinylog什么的,是不是嵌入式linux默认的就是root用户啊? |
|