squashfs3.0爱情是什么么

DM368 MT5 IPNC 3.0 SDK的问题? - 达芬奇(Davinci(TM)) - 德州仪器在线技术支持社区
DM368 MT5 IPNC 3.0 SDK的问题?
发表于3年前
<input type="hidden" id="hGroupID" value="33"
之前使用的是Appro 2.6 SDK,烧录SDK里自带ubl,u-boot,kernel,file system,软件都可以正常跑起来,也可以通过VLC和在IE里看到视频图像。现将SDK版本升级到Version 3.0,参照IPNC文档,烧录了SDK里的ubl,u-boot,uImage_ipnc_dm368_3.0.0和ipnc_dm368_3.0.0.squashfs,并且在u-boot下设置了参数,如下:&/p>
&p>tftpboot 0x uImage_ipnc_dm368_3.0.0;tftpboot 0x ipnc_dm368_3.0.0.squashfs&br>nand erase 0xx400000;nand write 0xxx400000&br>nand erase 0xx1000000;nand write 0xxx1000000&br>setenv bootcmd &#39;nboot 0x 0x500000;bootm 0x;&br>setenv bootargs &#39;mem=48M console=ttyS0, root=/dev/mtdblock3 rootfstype=squashfs ip=192.168.1.168:192.168.1.100:192.168.1.1:255.255.255.0:::off eth=00:0C:0C:02:37:A6 lpj=1077248 cmemk.phys_start=&0x& cmemk.phys_end=&0x&& cmemk.phys_start_1=&0x& cmemk.phys_end_1=&0x& cmemk.pools_1=&1x28672&& cmemk.allowOverlap=&1& quiet&#39;;reset&/p>
&p>系统无法启动,超级终端下的提示信息如下:&/p>
&p>Loading from NAND 32MiB 3,3V 8-bit, offset 0x500000&br>&& Image Name:&& Linux-2.6.18_pro500-davinci_IPNC&br>&& Image Type:&& ARM Linux Kernel Image (uncompressed)&br>&& Data Size:&&& 2658244 Bytes =& 2.5 MB&br>&& Load Address: &br>&& Entry Point:& &br>## Booting kernel from Legacy Image at
...&br>&& Image Name:&& Linux-2.6.18_pro500-davinci_IPNC&br>&& Image Type:&& ARM Linux Kernel Image (uncompressed)&br>&& Data Size:&&& 2658244 Bytes =& 2.5 MB&br>&& Load Address: &br>&& Entry Point:& &br>&& Loading Kernel Image ... OK&br>OK&/p>
&p>Starting kernel ...&/p>
&p>[&&& 0.250000] SQUASHFS error: Unknown inode type 0 in squashfs_iget!&br>[&&& 0.260000] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(31,3)&br>[&&& 0.270000]& &/p>
&p>是我的操作哪里出了问题吗? &/p>&div style=&clear:&>&/div>" />
DM368 MT5 IPNC 3.0 SDK的问题?
此问题已被解答
All Replies
之前使用的是Appro 2.6 SDK,烧录SDK里自带ubl,u-boot,kernel,file system,软件都可以正常跑起来,也可以通过VLC和在IE里看到视频图像。现将SDK版本升级到Version 3.0,参照IPNC文档,烧录了SDK里的ubl,u-boot,uImage_ipnc_dm368_3.0.0和ipnc_dm368_3.0.0.squashfs,并且在u-boot下设置了参数,如下:
tftpboot 0x uImage_ipnc_dm368_3.0.0;tftpboot 0x ipnc_dm368_3.0.0.squashfsnand erase 0xx400000;nand write 0xxx400000nand erase 0xx1000000;nand write 0xxx1000000setenv bootcmd 'nboot 0x 0x500000;bootm 0x'setenv bootargs 'mem=48M console=ttyS0, root=/dev/mtdblock3 rootfstype=squashfs ip=192.168.1.168:192.168.1.100:192.168.1.1:255.255.255.0:::off eth=00:0C:0C:02:37:A6 lpj=1077248 cmemk.phys_start="0x" cmemk.phys_end="0x"& cmemk.phys_start_1="0x" cmemk.phys_end_1="0x" cmemk.pools_1="1x28672"& cmemk.allowOverlap="1" quiet';reset
系统无法启动,超级终端下的提示信息如下:
Loading from NAND 32MiB 3,3V 8-bit, offset 0x500000&& Image Name:&& Linux-2.6.18_pro500-davinci_IPNC&& Image Type:&& ARM Linux Kernel Image (uncompressed)&& Data Size:&&& 2658244 Bytes =& 2.5 MB&& Load Address: && Entry Point:& ## Booting kernel from Legacy Image at
...&& Image Name:&& Linux-2.6.18_pro500-davinci_IPNC&& Image Type:&& ARM Linux Kernel Image (uncompressed)&& Data Size:&&& 2658244 Bytes =& 2.5 MB&& Load Address: && Entry Point:& && Loading Kernel Image ... OKOK
Starting kernel ...
[&&& 0.250000] SQUASHFS error: Unknown inode type 0 in squashfs_iget![&&& 0.260000] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(31,3)[&&& 0.270000]&
是我的操作哪里出了问题吗?
You have posted to a forum that requires a moderator to approve posts before they are publicly available.
进士4400分
mount不了根文件系统,把bootargs后面quiet去掉,把log贴出来看看
Stay hungry, stay foolish...
You have posted to a forum that requires a moderator to approve posts before they are publicly available.
Loading from NAND 32MiB 3,3V 8-bit, offset 0x500000
& Image Name: & Linux-2.6.18_pro500-davinci_IPNC
& Image Type: & ARM Linux Kernel Image (uncompressed)
& Data Size: & &2658244 Bytes = &2.5 MB
& Load Address:
& Entry Point: &
## Booting kernel from Legacy Image at
& Image Name: & Linux-2.6.18_pro500-davinci_IPNC
& Image Type: & ARM Linux Kernel Image (uncompressed)
& Data Size: & &2658244 Bytes = &2.5 MB
& Load Address:
& Entry Point: &
& Loading Kernel Image ... OK
Starting kernel ...
[ & &0.000000] Linux version 2.6.18_pro500-davinci_IPNC_DM368_3.0.0 (a0875405@bangvideoapps01) (gcc version 4.2.0
(prerelease) (MontaVista 4.2.0-3.0.0.7-03-10)) #1 PREEMPT Tue Feb 28 15:37:29 IST 2012
[ & &0.000000] CPU: ARM926EJ-S [] revision 5 (ARMv5TEJ), cr=
[ & &0.000000] Machine: DaVinci DM368 IPNC
[ & &0.000000] Memory policy: ECC disabled, Data cache writeback
[ & &0.000000] DaVinci DM0365 variant 0x8
[ & &0.000000] PLL0: fixedrate: , commonrate: , vpssrate:
[ & &0.000000] PLL0: vencrate_sd: , ddrrate:
mmcsdrate:
[ & &0.000000] PLL1: armrate: , voicerate: , vencrate_hd:
[ & &0.000000] CPU0: D VIVT write-back cache
[ & &0.000000] CPU0: I cache: 16384 bytes, associativity 4, 32 byte lines, 128 sets
[ & &0.000000] CPU0: D cache: 8192 bytes, associativity 4, 32 byte lines, 64 sets
[ & &0.000000] Built 1 zonelists. &Total pages: 12288
[ & &0.000000] Kernel command line: mem=48M console=ttyS0, root=/dev/mtdblock3 rootfstype=squashfs ip=192.168.1.168:192.168.1.100:192.168.1.1:255.255.255.0:::off eth=00:0C:0C:02:37:A6 lpj=1077248 cmemk.phys_start=&0x& cmemk.phys_end=&0x& cmemk.phys_start_1=&0x& cmemk.phys_end_1=&0x& cmemk.pools_1=&1x28672& cmemk.allowOverlap=&1&
[ & &0.000000] TI DaVinci EMAC: kernel boot params Ethernet address: 00:0C:0C:02:37:A6
[ & &0.000000] PID hash table entries: 256 (order: 8, 1024 bytes)
[ & &0.000000] Clock event device timer0_0 configured with caps set: 07
[ & &0.000000] Console: colour dummy device 80x30
[ & &0.000000] Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
[ & &0.000000] Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
[ & &0.000000] Memory: 48MB = 48MB total
[ & &0.000000] Memory: 45860KB available (2289K code, 276K data, 176K init)
[ & &0.000000] Calibrating delay loop (skipped)... 215.44 BogoMIPS preset
[ & &0.000000] Security Framework v1.0.0 initialized
[ & &0.000000] Capability LSM initialized
[ & &0.000000] Mount-cache hash table entries: 512
[ & &0.000000] CPU: Testing write buffer coherency: ok
[ & &0.010000] NET: Registered protocol family 16
[ & &0.010000] DaVinci: 104 gpio irqs
[ & &0.010000] MUX: initialized GPIO20
[ & &0.010000] MUX: initialized I2C_SCL
[ & &0.010000] Generic PHY: Registered new driver
[ & &0.010000] ch0 default output &COMPOSITE&, mode &NTSC&
[ & &0.020000] VPBE Encoder Initialized
[ & &0.020000] SCSI subsystem initialized
[ & &0.020000] NET: Registered protocol family 2
[ & &0.110000] IP route cache hash table entries: 512 (order: -1, 2048 bytes)
[ & &0.110000] TCP established hash table entries: 2048 (order: 1, 8192 bytes)
[ & &0.110000] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
[ & &0.110000] TCP: Hash tables configured (established 2048 bind 1024)
[ & &0.110000] TCP reno registered
[ & &0.120000] VFS: Disk quotas dquot_6.5.1
[ & &0.120000] Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[ & &0.120000] squashfs: version 3.1 () Phillip Lougher
[ & &0.120000] JFFS2 version 2.2. (NAND) (C)
Red Hat, Inc.
[ & &0.130000] Initializing Cryptographic API
[ & &0.130000] io scheduler noop registered
[ & &0.130000] io scheduler anticipatory registered (default)
[ & &0.130000] io scheduler deadline registered
[ & &0.130000] io scheduler cfq registered
[ & &0.160000] CSL: Module install successful, device major num = 253
[ & &0.160000] CSL: Module version 0.10.00, built on Feb 28 :46
[ & &0.160000] I2C: Module install successful, device major num = 252
[ & &0.160000] DMA: Module install successful, device major num = 251
[ & &0.160000] DRV: Module install successful
[ & &0.160000] DRV: Module built on Feb 28 :48
[ & &0.160000] DRV: EDMACC.QUEPRI &=
[ & &0.160000] DRV: SYSTEM.MSTPRI0 =
[ & &0.160000] DRV: SYSTEM.MSTPRI1 =
[ & &0.160000] DRV: ISP.BCR & & & &=
[ & &0.160000] DRV: SYSTEM.MISC & &=
[ & &0.160000] EDMAK module: built on Feb 28 2012 at 15:29:34
[ & &0.160000] & Reference Linux version 2.6.18
[ & &0.160000] & File /data/datalocal_videoapps01/user/kudva/DM36x/IPNetCam/dvsdk_ipnctools/linuxutils_2_24_03/packages/ti/sdo/linuxutils/edma/src/module/edmak.c
[ & &0.160000] IRQK module: built on Feb 28 2012 at 15:29:35
[ & &0.160000] & Reference Linux version 2.6.18
[ & &0.160000] & File /data/datalocal_videoapps01/user/kudva/DM36x/IPNetCam/dvsdk_ipnctools/linuxutils_2_24_03/packages/ti/sdo/linuxutils/irq/src/module/irqk.c
[ & &0.160000] irqk initialized
[ & &0.160000] CMEMK module: built on Feb 28 2012 at 15:29:33
[ & &0.160000] & Reference Linux version 2.6.18
[ & &0.170000] & File /data/datalocal_videoapps01/user/kudva/DM36x/IPNetCam/dvsdk_ipnctools/linuxutils_2_24_03/packages/ti/sdo/linuxutils/cmem/src/module/cmemk.c
[ & &0.170000] allocated heap buffer 0xc4000000 of size 0x5000000
[ & &0.170000] CMEM Range Overlaps Kernel Physical - allowing overlap
[ & &0.170000] CMEM phys_start (0x1000) overlaps kernel (0x -& 0x)
[ & &0.170000] cmemk initialized
[ & &0.170000] Serial:
driver $Revision: 1.90 $ 1 ports, IRQ sharing disabled
[ & &0.170000] serial8250.0: ttyS0 at MMIO map 0x1d06000 mem 0xfbd06000 (irq = 41) is a 16550A
[ & &0.180000] RAMDISK driver initialized: 1 RAM disks of 32768K size 1024 blocksize
[ & &0.190000] Davinci EMAC MII Bus: probed
[ & &0.200000] MAC address is 00:0C:0C:02:37:A6
[ & &0.200000] TI DaVinci EMAC Linux version updated 4.0
[ & &0.210000] Linux video capture interface: v2.00
[ & &0.210000] Trying to register davinci display video device.
[ & &0.220000] layer=c04cb200,layer-&video_dev=c04cb360
[ & &0.220000] Trying to register davinci display video device.
[ & &0.230000] layer=c04cb000,layer-&video_dev=c04cb160
[ & &0.230000] davinci_init:DaVinci V4L2 Display Driver V1.0 loaded
[ & &0.240000] i2c /dev entries driver
[ & &0.250000] nand_davinci nand_davinci.0: Using 4-bit hardware ECC
[ & &0.250000] NAND device: Manufacturer ID: 0xec, Chip ID: 0x75 (Samsung NAND 32MiB 3,3V 8-bit)
[ & &0.260000] Creating 6 MTD partitions on &nand_davinci.0&:
[ & &0.xx : &bootloader&
[ & &0.xx : &params&
[ & &0.xx : &kernel&
[ & &0.xx : &filesystem&
[ & &0.290000] mtd: partition &filesystem& extends beyond the end of device &nand_davinci.0& -- size truncated to 0x1700000
[ & &0.xx : &data1&
[ & &0.310000] mtd: partition &data1& is out of reach -- disabled
[ & &0.xx : &data2&
[ & &0.320000] mtd: partition &data2& is out of reach -- disabled
[ & &0.330000] nand_davinci nand_davinci.0: hardware revision: 2.3
[ & &0.340000] rtc_davinci_dm365 rtc_davinci_dm365.0: rtc intf: proc
[ & &0.340000] rtc_davinci_dm365 rtc_davinci_dm365.0: rtc intf: dev (254:0)
[ & &0.350000] rtc_davinci_dm365 rtc_davinci_dm365.0: rtc core: registered rtc_davinci_dm365 as rtc0
[ & &0.360000] Advanced Linux Sound Architecture Driver Version 1.0.12rc1 (Thu Jun 22 13:55:50 2006 UTC).
[ & &0.370000] ASoC version 0.13.1
[ & &0.370000] CQ0093 Voice Codec 0.1
[ & &0.380000] asoc: cq93vc &-& davinci-vcif mapping ok
[ & &0.390000] ALSA device list:
[ & &0.390000] & #0: On-chip voice codec (cq93vc)
[ & &0.390000] IPv4 over IPv4 tunneling driver
[ & &0.400000] TCP bic registered
[ & &0.400000] NET: Registered protocol family 1
[ & &0.410000] NET: Registered protocol family 17
[ & &0.410000] rtc_davinci_dm365 rtc_davinci_dm365.0: setting the system clock to
00:00:00 ()
[ & &0.420000] Time: timer0_1 clocksource has been installed.
[ & &0.430000] Clock event device timer0_0 configured with caps set: 08
[ & &0.430000] Switched to high resolution mode on CPU 0
[ & &0.470000] IP-Config: Complete:
[ & &0.470000] & & & device=eth0, addr=192.168.1.168, mask=255.255.255.0, gw=192.168.1.1,
[ & &0.480000] & & &host=192.168.1.168, domain=, nis-domain=(none),
[ & &0.480000] & & &bootserver=192.168.1.100, rootserver=192.168.1.100, rootpath=
[ & &0.500000] SQUASHFS error: Unknown inode type 0 in squashfs_iget!
[ & &0.500000] No filesystem could mount root, tried: &squashfs
[ & &0.510000] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(31,3)
[ & &0.520000] &
这是bootargs后面quiet去掉后,在超级终端里显示的启动信息。
照着IPNC 3.0 SDK里的文档都整出来有问题,真是晕死呀! 不会是Appro 这个版本的SDK本身还有Bugs就 Release出来了吧?!
You have posted to a forum that requires a moderator to approve posts before they are publicly available.
进士4400分
遇到问题不要慌! 搞清楚问题先! 心浮气躁怎么搞技术!!!
你这个flash是32M的吧,DM368缺省的配置是128MB,这样MTD表超过了大小限制了
[ & &0.250000] nand_davinci nand_davinci.0: Using 4-bit hardware ECC
[ & &0.250000] NAND device: Manufacturer ID: 0xec, Chip ID: 0x75 (Samsung NAND 32MiB 3,3V 8-bit)
[ & &0.260000] Creating 6 MTD partitions on &nand_davinci.0&:
[ & &0.xx : &bootloader&
[ & &0.xx : &params&
[ & &0.xx : &kernel&
[ & &0.xx : &filesystem&
[ & &0.290000] mtd: partition &filesystem& extends beyond the end of device &nand_davinci.0& -- size truncated to 0x1700000
[ & &0.xx : &data1&
[ & &0.310000] mtd: partition &data1& is out of reach -- disabled
[ & &0.xx : &data2&
[ & &0.320000] mtd: partition &data2& is out of reach -- disabled
[ & &0.330000] nand_davinci nand_davinci.0: hardware revision: 2.3
修改内核MTD表,你可以用DM365 IPNC的MTD表做参考!
Stay hungry, stay foolish...
You have posted to a forum that requires a moderator to approve posts before they are publicly available.
嗯,谢谢专家啊!
我之前看错误提示信息,也怀疑过是flash太小了的原因,但一直无法确认这个问题。所以,我不是还发了另外一个帖子,咨询有关DM368上支持三星K9F1G08U0C-PCB0 128MB nand flash的事情吗?目前还在做 SD Boot 呢,还没搞定。。。哎!老板每天都盯得紧,没办法呀!问题不搞定,国庆都还得加班呢。。
因为我们现在还是用的K9FMB nand flash,之前是跑的Appro 2.6 SDK,软件都可以正常运行,看得到视频;没想到升级到 3.0 SDK后,系统都跑不起来了,所以一开始确实也没往这个 flash 大小的问题去想。。
You have posted to a forum that requires a moderator to approve posts before they are publicly available.
请问ipnc 3.0 如何获取???
You have posted to a forum that requires a moderator to approve posts before they are publicly available.
进士4400分
请联系TI的代理商
Stay hungry, stay foolish...
You have posted to a forum that requires a moderator to approve posts before they are publicly available.[zz传谣]tinycore linux V3.0有人实现了汉化 lovenini Linux系统与应用 better smth
[zz传谣]tinycore linux V3.0有人实现了汉化 lovenini Linux系统与应用 better smth
: 未验证,tc V3试验性支持4GB内存,原来作汉化包的kangkang不见了,sir这人似乎汉化成功http://www.linuxsir.org/bbs/thread371555.html10-08-16, 17:32 & & & 第 1 帖hujy 注册日期: Aug 2005 &帖子: 234 精华: 1标题: tinycore 3.0汉化记录1 设置locale安装glibc_i18n_locale.tczglibc_add_libs.tczglibc_apps.tczglibc_gconv.tcz运行mkdir -p /usr/lib/localelocaledef -i zh_CN -f GBK zh_CNlocaledef -i zh_CN -f UTF-8 zh_CN将usr/lib/locale/locale-archive写入到/opt/.filetool.lst编辑grub的munu.lst在启动项目中加入lang=zh_CN.gbk2 安装中文字体下载wqy-microhei中文字体安装到/usr/share/fonts/将usr/share/fonts/wqy-microhei.ttc写入到/opt/.filetool.lst3 安装fcitx安装xorg-devfontconfig-devcompiletcsquashfs-tools下载fcitx-3.5./configure --enable-xft --prefix=/usr/localmaketouch /tmp/markmake DESTDIR=/tmp/package installcd /tmpmksquashfs package fcitx-3.5.tcz打包成功后通过appbrowser安装在~./xsession中写入export XMODIFIERS="@im=fcitx"export XIM=fcitxexport XIM_PROGRAM=fcitxfcitx &4 问题3.6版本编译后安装出错,3.5版本可以编译安装,但在zh_CN.utf8环境下输入会出现乱码等不正常现象估计是local的缘故,在zh_CN.gbk环境下输入正常。谈谈新版的使用感受tinycore 3.0版本感觉变化挺大的,tce包好像都取消了,对硬件的支持更好了。宽屏显示需要安装xorg,参考/Using+Xorg+over+Xvesa声卡设置,参考/Setting+up+Sound无线网卡设置,参考/Setting+up+Wifi安装在笔记本上,运行速度很快。我用一个1G分区安装tinycore,装了firefox、emelfm2、fcitx、wicd和一些编译工具大概用去150M。推荐帖
22:32:58楼主
(价值多军辩手)经测试,只需下列简化流程即可:1.安装k~kang版fcitx for TC2.x /tinycore2_fcitx.tar.gz&&注意它依赖的glibc_gconv包,需要从在线的包管理器里面安装先,似乎TC3.x不会自动装2.安装附件1的locale-zh_CN_tc3.tcz(包含了上文方法制作的 locale-archive for zh_CN)export LANG=zh_CN.UTF-8 #以下输入在term里面即可#export XMODIFIERS="@im=fcitx"export XIM=fcitxexport XIM_PROGRAM=fcitxfcitx & leafpad & & & & #打包 /tinycore3_fcitx.tar.gz【 在 lovenini (价值多军辩手) 的大作中提到: 】: http://www.linuxsir.org/bbs/thread371555.html
发表评论:
TA的最新馆藏[转]&[转]&[转]&[转]&[转]&[转]&将openwrt移植到P720
将openwrt移植到P720
[摘要:将openwrt移植到P720 从前写的条记,压箱底了,翻出去晒晒 目 录 将openwrt移植到P720 . 1 试验情况 ... 1 设置装备摆设,编译openwrt支撑平凡IXP路由器 ... 2 烧录oepnwrt到平凡路由器 ... 3 设置装备摆设,编译ope]
将openwrt移植到P720
早年写的笔记,压箱底了,翻出来晒晒
目&&&&&&&&& 录
将openwrt移植到P720.
实验环境...
配置,编译openwrt支持普通IXP路由器...
烧录oepnwrt到普通路由器...
配置,编译openwrt支持P720.
修改内核串口支持...
修改以太网驱动...
修改root文件系统...
烧录oepnwrt到P720.
配置P720上的openwrt7
启动P720以太网...
启动无线网卡...
移植的摸索过程...
解压squashfs12
重新制作suqashfs12
检查启动文件...
分析修改preinit18
检查inittab和rcS.
管道的问题...
jeffs的问题...
试验wrv54g.
redboot的支持问题...
配置以太网...
多出的配置分区...
u& P720,使用串口1.
u& kamikaze_8.09.1_source.tar.bz2
u& redboot2.04
&&&&&& 当Linksys 释放 WRT54G/GS 的源码后,网上出现了很多不同版本的 Firmware 去增强原有的功能。OpenWrt 的历史OpenWrt 项目由 2004 年 1 月开始, 第一个版本是基于 Linksys 提供的 GPL 源码及 uclibc 中的 buildroot 项目。到了2005年初释出了第一个 “experimental” 版本, 这版本差不多完全舍弃了 Linksys 的 GPL 源码, 使用了 buildroot2 作为核心技术, 将 OpenWrt 完全模块化。
&&&&&& openwrt的网站上有许多编译好的firmware,需要对照着要更新的路由器的信号选择对应的信号。
目前最新版本的openwrt代码是kamikaze_8.09.1_source.tar.bz2,可以在http://openwrt.org/下载。因为openwrt目前并不支持P720,所以需要重新编译,做一些简单的修改。
配置,编译openwrt支持普通IXP路由器
&&&&&& 这里的一般IXP路由器指的是openwrt网站上列出的已经经过测试能支持的使用IXP系列CPU的路由器。
下载的kamikaze_8.09.1_source.tar.bz2原始文件只有大约6.2M,这个显然不是全部的代码,不过剩余的东西并不需要人工再去慢慢准备,编译的过程openwrt会自动下载需要的文件。解压到kamikaze_8.09.1_source.tar.bz2 到/home/linuxuser/openwrt/kamikaze_8.09
执行如下命令:
#cd/home/linuxuser/openwrt/kamikaze_8.09
#make menuconfig
注意选择一下几样:
1.&&&&&Target System选择Intel IXP4xx [2.6]
2.&&&&&Target Images选择squashfs,这也是默认的选择。如果选择熟悉的ramdisk,openwrt并不能编译出zImage和ramdisk,而是编译出一个大的zImage。这样就无法修改一些关键的配置文件导致无法成功移植。而且就算是支持一般的路由器日常使用,也是使用squashfs支持更好。
3.&&&&&下面4个选项:
Advanced configuration options (for developers)
Build the OpenWrt Image Builder
Build the OpenWrt SDK
Image configuration
&&&&&& 如果需要进行深入分析配置,那么点上就可以,这对移植没有影响。
配置完成以后,执行。
#make V=99
系统将会自动下载各种文件,在/home/linuxuser/openwrt/kamikaze_8.09/bin下生成openwrt-ixp4xx-zImage和openwrt-ixp4xx-squashfs.img。这个两个文件已经足够支持openwrt网站上列出的已经经过测试能支持的路由器。
烧录oepnwrt到普通路由器
烧录openwrt到路由器的方法。在这里,假设P720的redboot已经烧录好了。在此注意,1.94版本的redboot是不能正常启动openwrt的,必须是2.04版本。
&&&&&& 在fc6下面执行
cp bin/openwrt-ixp4xx-zImage /tftpboot/zImage
cp bin/openwrt-ixp4xx-squashfs.img /tftpboot/rootfs
注意启动FC6上的tftp服务。在这里,假设FC6的IP地址是192.168.1.99, P720的redboot配置IP在同一网段。
用串口连接上P720,在redboot操作符下执行如下命令:
load -r -b 0x1800000 -h 192.168.1.99 zImage
fis create zImage
load -r -b 0x1800000 -h 192.168.1.99 rootfs
fis create rootfs
fis load zImage
这样P720就能够正常启动openwrt了。需要每次都自动启动openwrt的话,需要在redboot里执行fconfig,编译及启动脚本为
fis load zImage
就可以了。样例如下:
RedBoot& fconfig
Run script at boot: true
Boot script:
Enter script, terminate with empty line
&& fis load zImage
Boot script timeout (1000ms resolution): 1
Use BOOTP for network configuration: false
Gateway IP address: 10.0.0.1
Local IP address: 10.0.0.204
Local IP address mask: 255.255.255.0
Default server IP address: 10.0.0.110
Console baud rate: 115200
GDB connection port: 9000
Force console for special debug messages: false
Network debug at boot time: false
Default network device: npe_eth0
Update RedBoot non-volatile configuration - continue(y/n)? y
配置,编译openwrt支持P720
&&&&&& P720和普通的路由器有两个地方不同:
1.&&&&&普通的IXP路由器使用的是串口0,而P720使用的是串口1
2.&&&&&普通的IXP路由器以太网卡使用的PHY芯片的PHY id一般从0开始,而P720使用的是从1开始
在编译完普通路由器的基础上做一些简单修改就可以支持P720。现在假设已经执行完普通路由器的编译工作,还需要进行下面两个步骤。
修改内核串口支持
执行下面两条命令
#cd /home/linuxuser/openwrt/kamikaze_8.09
# make kernel_menuconfig
&&&&&& 在Boot options里修改启动命令
将console=ttyS0修改为console=ttyS1,然后保存设置。
修改以太网驱动
打开kamikaze_8.09/build_dir/linux-ixp4xx_genericlinux-2.6.26.8driversnetarmIxp4xx_eth.c,找到下面几句,添加红色部分
&&& switch (port-&id) {
&&& case IXP4XX_ETH_NPEA:
&&&&&&& port-&regs = (struct eth_regs __iomem*)IXP4XX_EthA_BASE_VIRT;
&&&&&&& regs_phys& = IXP4XX_EthA_BASE_PHYS;
&&& case IXP4XX_ETH_NPEB:
&&&&&&& port-&regs = (struct eth_regs __iomem*)IXP4XX_EthB_BASE_VIRT;
&&&&&&& regs_phys& = IXP4XX_EthB_BASE_PHYS;
&&& /*this is for P720 phy*/
&&&&&&& plat-&phy = 1;
&&& printk(KERN_INFO &change npe-b phy to 1for P720&);
&&& case IXP4XX_ETH_NPEC:
&&&&&&& port-&regs = (struct eth_regs __iomem*)IXP4XX_EthC_BASE_VIRT;
&&&&&&& regs_phys& = IXP4XX_EthC_BASE_PHYS;
&&& plat-&phy = 2;
&&& printk(KERN_INFO &change npe-c phy to 2for P720&);
&&& default:
&&&&&&& err = -ENOSYS;
&&&&&&& goto err_
修改root文件系统
修改完成以后,执行编译,得到openwrt-ixp4xx-zImage和openwrt-ixp4xx-squashfs.img。其中openwrt-ixp4xx-squashfs.img就是root文件系统,是采用lzma算法压缩成的squashfs&#26684;式。修改前需要先进行解压。
在kamikaze_8.09/build_dir/host/squashfs3.0/squashfs-tools下找到mksquashfs-lzma和unsquashfs-lzma两个文件,复制到/home/linuxuser/squashfs/squash10下。
将openwrt-ixp4xx-squashfs.img也复制到/home/linuxuser/squashfs/squash10下。执行如下操作解压:
#cd /home/linuxuser/squashfs/squash10
#./unsquashfs-lzmaopenwrt-ixp4xx-squashfs
解压后,得到squashfs-root文件夹,里面就是root文件系统的内容。打开squashfs-root/etc/inittab文件,原始内容如下:
::sysinit:/etc/init.d/rcSS boot
::shutdown:/etc/init.d/rcSK stop
tts/0::askfirst:/bin/ash--login
ttyS0::askfirst:/bin/ash--login
tty1::askfirst:/bin/ash–login
将tts/0和ttyS0修改为tts/1和ttyS1,修改完如下:
::sysinit:/etc/init.d/rcSS boot
::shutdown:/etc/init.d/rcSK stop
tts/1::askfirst:/bin/ash--login
ttyS1::askfirst:/bin/ash--login
tty1::askfirst:/bin/ash–login
修改完之后,执行如下操作:
./mksquashfs-lzma./squashfs-root root.squashfs -nopad -noappend -root-owned -be
ddif=root.squashfs of=tmpfile.1 bs=64k conv=sync
echo -ne'xdexadxc0xde' && tmpfile.1
ddof=root.squashfs if=tmpfile.1 bs=64k conv=sync
echo -ne'xdexadxc0xde' && root.squashfs
ddif=root.squashfs of=openwrt-ixp4xx-squashfs.img bs=131072 conv=sync
cp -rfopenwrt-ixp4xx-squashfs.img /tftpboot/rootfs
这样在/tftpboot文件夹下有了rootfs文件。
烧录oepnwrt到P720
复制openwrt-ixp4xx-zImage到/tftpboot,通过串口在P720的的redboot提示符下执行如下命令:
load -r -v -b 0x rootfs
fis create -b 0x -l 0x300000 -f 0x -e0x -r 0x rootfs
load -r -v -b 0x openwrt-ixp4xx-zImage
fis create -b 0x -l 0x100000 -f 0x -e0x -r 0x zImage
配置P720上的openwrt
第一次启动openwrt会很慢,因为openwrt要对flash进行一些操作。启动之后,因为openwrt的原始配置里面并没有支持P720,所以网卡和atheros无线网卡都不能正常启动,需要进行一些修改。
正常启动之后,显示如下:
BusyBox v1.11.2( 01:01:39 CST) built-in shell (ash)
Enter 'help' for a list of built-in commands.
& _______&&&&&&&&&&&&&&&&&&&& ________&&&&&&& __
&|&&&&&& |.-----.-----.-----.|& |&|& |.----.|& |_
&|&& -&&||& _& |& -__|&&&& ||&|& |& ||&&_||&& _|
&|_______||&& __|_____|__|__||________||__|& |____|
&&&&&&&&& |__|W I R E L E S S&& F R E E D O M
&KAMIKAZE (8.09.1,unknown) ----------------------------
& * 10 oz Vodka&&&&&& Shake well with ice and strain
& * 10 oz Triple sec& mixture into 10 shot glasses.
& * 10 oz lime juice& Salute!
&---------------------------------------------------
root@(none):/#
启动P720以太网
在提示符下执行
vi/etc/config/network
将内容修改为如下:
config'interface' 'loopback'
&&&&&&& option 'ifname' 'lo'
&&&&&&& option 'proto' 'static'
&&&&&&& option 'ipaddr' '127.0.0.1'
&&&&&&& option 'netmask' '255.0.0.0'
config'interface' 'lan'
&&&&&&& option 'ifname' 'eth0'
&&&&&&& option 'macaddr' '00:00:AA:BB:CC:D1'
&&&&&&& option 'proto' 'static'
&&&&&&& option 'netmask' '255.255.255.0'
&&&&&&& option 'dns' '202.106.46.151'
&&&&&&& option 'gateway' '10.0.0.1'
&&&&&&& option 'ipaddr' '10.0.0.204'
执行/etc/init.d/networkrestart,试试以太网,应该已经通了。
启动无线网卡
在提示符下执行vi /etc/config/wireless,将option disabled 1:这句话屏蔽,修改完内容如下:
config wifi-device&wifi0
&&&&&&& optiontype&&&& atheros
&&&&&&& optionchannel& auto
&&&&&&& #REMOVE THIS LINE TO ENABLE WIFI:
&&&&&& &#option disabled 1
config wifi-iface
&&&&&&& optiondevice&& wifi0
&&&&&&& optionnetwork& lan
&&&&&&& optionmode&&&& ap
&&&&&&& optionssid&&&& OpenWrt
&&&&&&& optionencryption none
保存。执行/etc/init.d/network restart重启网络,这个时候应该就可以通过笔记本的无线网卡找到叫做“OpenWrt”的无线网络,这时候就可以进行无线连接了。
&&&&&& 更详细复杂的配置请参看其他设置文档。
在openwrt中也支持wlanconfig和iwconfig,也可以用下面的命令启动无线网卡;
wlanconfig athcreate wlandev wifi0 wlanmode ap
iwconfig ath0channel 6
iwconfig ath0essid &wrv54gopen&
ifconfig ath0 10.0.0.205up
&&&&&& xwrt是openwrt的web界面,但是目前有许多东西是不能正确设置的,用处不是太大。在此简单介绍加入xwrt的方法。
在串口的openwrt提示符下执行如下命令:
echo &srcX-Wrt http://downloads.x-wrt.org/xwrt/kamikaze/8.09/ixp4xx/packages/&&& /etc/opkg.conf
opkg update
opkgremove -recursive luci-*
opkgupdate
opkg installwebif
如果发现Could not obtain administrative lock错误并且不能升级,则等等jffs刷写完成再说。这个需要的时间比较长。
升级时候的打印信息如下:
root@OpenWrt:/#opkg update
Downloadinghttp://downloads.openwrt.org/kamikaze/8.09.1/ixp4xx/packages/Packages.gz
Connecting todownloads.openwrt.org (78.24.191.177:80)
Packages.gz&&&&&&&&& 100%|*******************************|&& 142k00:00:00 ETA
Inflatinghttp://downloads.openwrt.org/kamikaze/8.09.1/ixp4xx/packages/Packages.gz
Updated list ofavailable packages in /var/opkg-lists/snapshots
Downloadinghttp://downloads.x-wrt.org/xwrt/kamikaze/8.09/ixp4xx/packages//Packages
Connecting todownloads.x-wrt.org (88.198.39.176:80)
Packages&&&&&&&&&&&& 100%|*******************************| :00 ETA
Updated list ofavailable packages in /var/opkg-lists/X-Wrt
root@OpenWrt:/#opkg install webif
Installing webif(0.3-4709) to root...
Downloadinghttp://downloads.x-wrt.org/xwrt/kamikaze/8.09/ixp4xx/packages//./webif_0.3-4709_armeb.ipk
Connecting todownloads.x-wrt.org (88.198.39.176:80)
webif_0.3-4709_armeb100% |*******************************|&&165k 00:00:00 ETA
Installinghaserl (0.9.24-1) to root...
Downloadinghttp://downloads.x-wrt.org/xwrt/kamikaze/8.09/ixp4xx/packages//./haserl_0.9.24-1_armeb.ipk
Connecting todownloads.x-wrt.org (88.198.39.176:80)
haserl_0.9.24-1_arme100% |*******************************| 10147&00:00:00 ETA
Configuringhaserl
Configuringwebif
Collectederrors:
&* Could not obtain administrative lock
Committing newfirmware id ...
Device: Generic
Committing newdevice id ...
SUCCESS! Webif^2installation appears OK. Welcome to X-Wrt!
You may need todo a hard REFRESH to clear old CSS style from your browser.
Reinitializinghttpd ...
root@OpenWrt:/#
执行完之后系统会自动安装上webif。这时在浏览器输入10.0.0.204,就可以看到xwrt。首先是设置密码:
移植的摸索过程
&&&&&& 一开始按照说明比较容易的就编译好了openwrt,配置target image是ramdisk,因为不想破坏目前flash的状态。结果很容易openwrt就在wrv54g上跑起来。而wrv54g就是openwrt支持的硬件列表上有的路由器。
解压squashfs
&&&&&& 然后使用make kernel_menuconfig将console=ttyS0修改为console=ttyS1,这样已经可以启动P720,但是不能够进入控制台,进入到命令行下。没有办法之后将targetimage该为squashfs以方便再次修改。开始安装squashfs-tools-3.0-4.i386.rpm,安装完成之后解压openwrt-ixp4xx-squashfs.img,但是报错,无法解压。
&&&&&& 查找官方网站http://www.squashfs-lzma.org/,上面所需要linux kernel 2.6.27or higher才能支持squashfs,&#20284;乎FC6不能解决这个问题。但是目前并不是要挂载squashfs,而是希望解压。FC6有squashfs-tools,就算内核无法支持,无法mount,但是没理由不能作为应用程序解压文件内容。另外网站上提到一种lzma的东西。
目前的错误信息是
FATAL ERROR aborting:uncompress_inode_table: failed to read block
zlib::uncompress failed, unknown error -3
FATAL ERROR aborting:uncompress_inode_table: failed to read block
zlib::uncompress failed, unknown error -3
FATAL ERROR aborting:uncompress_inode_table: failed to read block
zlib::uncompress failed, unknown error -3
根据下载的http://www.squashfs-lzma.org/上的squashfs3.4.tar.gz,解压之后在squashfs3.4/squashfs-tools执行make,编译得到unsquashfs和mksquashfs,这个&#20284;乎是比较新的版本。但是也不能正常解压,出的错误信息是:
zlib::uncompressfailed, unknown error -3
&&&&&& 干脆测试openwrt下载下来的工具。编译完后也是不行。难道做了修改?尝试了一下用mksquashfs可以做出squashfs文件,unsquashfs也可以解压。看来是lzma的问题,也许openwrt使用的是lzma算法而不是普通的zlib包含的算法。
&&&&&& 既然openwrt能做出这种squashfs,肯定在某个地方有编译好的工具,& 既然openwrt里面有打包的工具,也应该有解压的工具。使用find命令在整个openwrt编译文件夹查找,找到有几个地方有
[root@localhost kamikaze_8.09]# find ./ |grepunsquashfs
./build_dir/armeb/OpenWrt-SDK-ixp4xx-for-Linux-i686/staging_dir/host/bin/unsquashfs-lzma
./build_dir/armeb/OpenWrt-ImageBuilder-ixp4xx-for-Linux-i686/staging_dir/host/bin/unsquashfs-lzma
./build_dir/host/squashfs3.0/squashfs-tools/unsquashfs.c
./build_dir/host/squashfs3.0/squashfs-tools/unsquashfs-lzma
./build_dir/host/squashfs3.0/squashfs-tools/unsquashfs.o
./staging_dir/host/bin/unsquashfs-lzma
重新制作suqashfs
&&&&&& 使用编译好的工具直接解压openwrt-ixp4xx-squashfs.img果然没有问题。而且在同一个文件夹下面找到了mksquashfs-lzma,这个就是制作工具。解压完了之后尝试利用mksquashfs压缩,没有问题,但是无法下载到板子上,板子报unknow error。这个就比较奇怪,因为根本什么都没有修改。以为是网络坏了,尝试别的文件,可以下载。说明还是文件制作的原因,重新制作还是不行,只能查看openwrt在编译的时候是如何制作squashfs的。结果在编译的信息里面找到如下内容:
/home/linuxuser/openwrt/kamikaze_8.09/staging_dir/host/bin/mksquashfs-lzma
/home/linuxuser/openwrt/kamikaze_8.09/build_dir/armeb/root-ixp4xx/home/linuxuser/openwrt/kamikaze_8.09/build_dir/linux-ixp4xx_generic/root.squashfs-nopad -noappend -root-owned -be
Creating big endian 3.0 filesystem on/home/linuxuser/openwrt/kamikaze_8.09/build_dir/linux-ixp4xx_generic/root.squashfs,block size 65536.
Big endian filesystem, data block size 65536,compressed data, compressed metadata, compressed fragments
Filesystem size 1345.67 Kbytes (1.31 Mbytes)
&&&&&&& 36.50%of uncompressed filesystem size (3686.41 Kbytes)
Inode table size 3583 bytes (3.50 Kbytes)
&&&&&&& 24.88%of uncompressed inode table size (14404 bytes)
Directory table size 3969 bytes (3.88 Kbytes)
&&&&&&& 60.99%of uncompressed directory table size (6508 bytes)
Number of duplicate files found 0
Number of inodes 454
Number of files 231
Number of fragments 18
Number of symbolic links& 175
Number of device nodes 0
Number of fifo nodes 0
Number of socket nodes 0
Number of directories 48
Number of uids 1
&&&&&&& root(0)
Number of gids 0
ddif=/home/linuxuser/openwrt/kamikaze_8.09/build_dir/linux-ixp4xx_generic/root.squashfsof=/home/linuxuser/openwrt/kamikaze_8.09/build_dir/linux-ixp4xx_generic/tmpfile.1bs=64k
21&#43;1 records in
22&#43;0 records out
1441792 bytes (1.4 MB) copied, 0. seconds,405 MB/s
echo -ne'xdexadxc0xde' &&/home/linuxuser/openwrt/kamikaze_8.09/build_dir/linux-ixp4xx_generic/tmpfile.1
ddof=/home/linuxuser/openwrt/kamikaze_8.09/build_dir/linux-ixp4xx_generic/root.squashfsif=/home/linuxuser/openwrt/kamikaze_8.09/build_dir/linux-ixp4xx_generic/tmpfile.1bs=64k
22&#43;1 records in
23&#43;0 records out
1507328 bytes (1.5 MB) copied, 0. seconds,364 MB/s
echo -ne'xdexadxc0xde' &&/home/linuxuser/openwrt/kamikaze_8.09/build_dir/linux-ixp4xx_generic/root.squashfs
ddif=/home/linuxuser/openwrt/kamikaze_8.09/build_dir/linux-ixp4xx_generic/root.squashfsof=/home/linuxuser/openwrt/kamikaze_8.09/bin/openwrt-ixp4xx-squashfs.imgbs=131072 conv=sync
11&#43;1 records in
12&#43;0 records out
1572864 bytes (1.6 MB) copied, 0. seconds,405 MB/s
去掉太多的路径,摘录命令如下:
./mksquashfs-lzma./squashfs-root root.squashfs -nopad -noappend -root-owned -be
ddif=root.squashfs of=tmpfile.1 bs=64k conv=sync
echo -ne'xdexadxc0xde' && tmpfile.1
ddof=root.squashfs if=tmpfile.1 bs=64k conv=sync
echo -ne'xdexadxc0xde' && root.squashfs
ddif=root.squashfs of=openwrt-ixp4xx-squashfs.img bs=131072 conv=sync
&&&&&& 很明显,openwrt在制作完成之后,有对文件进行了一些操作。
在上面的步骤中一共生成了6个文件,依次对比如下
openwrt-ixp4xx-squashfs_ori.img是openwrt编译出来的原始文件,其他的按照文件名的最后一个数字表示各次生成的结果。
tmpfile.12仅仅比root.squashfs1补充了0,补全为64K的整倍数。
tmpfile.13 仅仅比tmpfile.12后面多了echo进去的4bytes
root.squashfs4也是在tmpfile.13后面补充0. 补全为64K的整倍数。
root.squashfs5比root.squashfs4多了echo进去的4bytes。
openwrt-ixp4xx-squashfs.img6比root.squashfs5后面补充0,补全为64K的整倍数
&&&&&& 经过研究,不管文件内容对错,文件大小是64K的整倍数才可以下载。使用下面的命令对squashfs重新制作了一篇,果然是好的。squashfs的问题终于解决了。
./mksquashfs-lzma./squashfs-root root.squashfs -nopad -noappend -root-owned -be
ddif=root.squashfs of=tmpfile.1 bs=64k conv=sync
echo -ne'xdexadxc0xde' && tmpfile.1
ddof=root.squashfs if=tmpfile.1 bs=64k conv=sync
echo -ne'xdexadxc0xde' && root.squashfs
ddif=root.squashfs of=openwrt-ixp4xx-squashfs.img bs=131072 conv=sync
检查启动文件
&&&&&& 不管是ramdisk还是squash,都是启动到一定阶段就没有信息了,无法进入控制台。
wifi0: 11a rates: 6Mbps 9Mbps 12Mbps 18Mbps24Mbps 36Mbps 48Mbps 54Mbps
wifi0: 11brates: 1Mbps 2Mbps 5.5Mbps 11Mbps
wifi0: 11g rates: 1Mbps 2Mbps 5.5Mbps 11Mbps6Mbps 9Mbps 12Mbps 18Mbps 24Mbps 36Mbps 48Mbps 54Mbps
wifi0: turboArates: 6Mbps 9Mbps 12Mbps 18Mbps 24Mbps 36Mbps 48Mbps 54Mbps
wifi0: turboGrates: 6Mbps 12Mbps 18Mbps 24Mbps 36Mbps 48Mbps 54Mbps
wifi0: H/Wencryption support: WEP AES AES_CCM TKIP
ath_pci: wifi0:Atheros 5212: mem=0x, irq=27
&&&&&& 这个时候在串口敲击键盘,可以有回显,但是命令不会执行。
猜测是启动脚本在某个地方出现了错误,而控制台是在启动脚本执行之后才出现的,所以先检查openwrt的启动脚本。
分析修改preinit
根据资料,preinit是openwrt的第一个启动文件
echo &-preinit -&
echo &PressCTRL-C for failsafe&
trap'FAILSAFE=true' INT
trap'FAILSAFE=true' USR1
[ -e /etc/preinit.arch] && . /etc/preinit.arch
set_statepreinit
echo&$HOTPLUG& & /proc/sys/kernel/hotplug
export FAILSAFE
eval${FAILSAFE:&#43;failsafe}
lock -w/tmp/.failsafe
if [ -z&$INITRAMFS& ]; then
&&& mount_root
&&& [ -f /sysupgrade.tgz ] && {
&&&&&&& echo &- config restore -&
&&&&&&& cd /
&&&&&&& mv sysupgrade.tgz /tmp
&&&&&&& tar xzf /tmp/sysupgrade.tgz
&&&&&&& rm -f /tmp/sysupgrade.tgz
&&&&&&& sync
&&& echo &- init -&
&&& exec /sbin/init
&&&&&& 既然不能正常启动,就按照failsafe启动。但是按了CTRL-C根本没作用,干脆修改preinit。
&&&&&& 其中trap的含义有这么一段解释:
INT 就是中断信号(linux
中是ctrl-C,SCO unix
中是&del&键)
trap 就是捕捉信号,与所提供的arg联系起来,就是当捕捉到某个信号时执行arg规定的动作。
#!/bin/bash
trap &echo-e &nreceive intn&;exit& INT
((i&#43;&#43;))
由于是死循环,不会退出,按下ctrl-c键后,程序会显示
将preinit相关内容修改如下:
echo &-preinit -&
echo &PressCTRL-C for failsafe&
#trap'FAILSAFE=true' INT
#trap'FAILSAFE=true' USR1
FAILSAFE=true
[ -e/etc/preinit.arch ] && . /etc/preinit.arch
重新烧录squashfs,可以正常启动进入控制台。说明系统本身没有问题。
检查inittab和rcS
经过加入echo,发现preinit实际上是exec /sbin/init执行的。而init一般是通过inittab来执行任务的。inittab的内容如下:
::sysinit:/etc/init.d/rcSS boot
::shutdown:/etc/init.d/rcSK stop
tts/0::askfirst:/bin/ash--login
ttyS0::askfirst:/bin/ash--login
tty1::askfirst:/bin/ash–login
查找OPENWRT的网站资料,有如下说明
exec /sbin/init启动文件系统,在OpenWrt上也就是busybox的init程序。它会自动分析/etc/inittab这个文件,其内容解释详见busybox网站的cmd
help。如果找不到该文件,默认按照如下内容执行:
::sysinit:/etc/init.d/rcS
::askfirst:/bin/sh
::ctrlaltdel:/sbin/reboot
::shutdown:/sbin/swapoff-a
::shutdown:/bin/umount-a -r
::restart:/sbin/init
既然目前编译好的openwrt有inittab,那么肯定是按照inittab来执行。找到/etc/init.d/rcS,内容如下:
# Copyright (C)2006 OpenWrt.org
run_scripts() {
&&& for i in /etc/rc.d/$1*; do
&&&&&&& [ -x $i ] && $i $2 2&&1
&&& done | $LOGGER
LOGGER=&cat&
[ -x/usr/bin/logger ] && LOGGER=&logger -s -p 6 -t sysinit&
if [&$1& = &S& ]; then
&&& run_scripts &$1& &$2&&
&&& run_scripts &$1& &$2&
这个脚本就是轮循执行/rc.d/下的脚本,因为inittab执行参数为rcS S boot,所以在此执行命令为run_scripts boot &。
管道的问题
在rcS中有done |$LOGGER,这句话会把所有的打印都定向到$LOGGER,妨碍调试,必须去掉| $LOGGER。
在/rc.d/下的脚本的start或者boot里都加上echo语句,发现这些脚本执行的其实没有问题。在failsafe模式下手动执行这些脚本,执行也都没有问题,那看起来就不是这些脚本的问题。
猜测也许是inittab启动控制台命令导致的?对比以前uclinux启动控制台的命令:::askfirst:/bin/sh,在检查inittab,发现多了tts/0, ttyS0,tty1:等内容。ttyS0显然是错误的,查资料发现tts/0也是串口0的意思,估计就是这个错误了。将其全部修改成1,重新烧录启动,果然能够看到控制台了。当然第一次启动的时候比较长,需要耐心多等待,不然会当作启动失败。
jeffs的问题
&&&&&& 修改inittab串口的过程中,走了一段弯路。
在没有正确修改串口的时候,启动的过程中,使用echo之后,可以看到如果等待的时间长一点,实际上会出现如下的信息:
ath_pci: wifi0:Atheros 5212: mem=0x, irq=27
jffs2_scan_eraseblock():End of filesystem marker found at 0x0
jffs2_build_filesystem():unlocking the mtd device... done.
jffs2_build_filesystem():erasing all blocks after the end marker...
过了好长一段时间,又打印出几句话,
mini_fo: usingbase directory: /
mini_fo: usingstorage directory: /jffs
然后就彻底没响应了。当时猜测既然flash上没有jffs分区,又没有usb。这个可能是造成问题的原因。google得到如下信息:
Changingmini_fo's storage directory (/jffs on external media)
1. Introduction
This guide describes how to use your USB stick or your MMC/SD card for storingpakages and files instead of
using the JFFS2 partion on your flash chip. / in this case is the SquashFSpartition on the flash chip and the
writable EXT2 partion is on your external media. With little modifications youcan use this guide also for MMC/SD
card. Tested with Kamikaze pre1 on a Asus WL-500GD and a 512MB Sundisk CruzerMini USB 2.0 stick. With little
modifications it will also work with WhiteRussian 0.9.
With this guide you do not have to mess around with PATH, LD_LIBRARY_PATH orcreate symlinks anymore.
另外在jffs信息之前是ath_pci: wifi0: Atheros 5212: mem=0x, irq=27,而ath_pci信息是S10boot里面的。所以猜测是s10boot之后启动的一些操作。在rc.d的启动脚本里检查相关内容, S10boot看起来[ -f /proc/jffs2_bbc ] &&echo &S& & /proc/jffs2_bbc可能是导致无法启动的原因。去掉再说。当时尝试了几个都不行,而且在failsafe模式下执行各个启动脚本也没有问题。仔细检查启动信息,根据在执行rcs之前就有一些jffs错误,ath_pci后面的也许是后续操作,猜测是preinit就已经执行了让系统无法运行的操作。
加入echo,打印信息如下
- preinit -
Press CTRL-C forfailsafe
preinit 20
preinit 30
preinit 35
preinit 40
preinit 50
jffs2 using ramdisk
mini_fo:using base directory: /
mini_fo:using storage directory: /tmp/root
br-lan: DroppingNETIF_F_UFO since no NETIF_F_HW_CSUM feature.
ath5k: Unknownsymbol __bad_udelay
PPP generic driverversion 2.4.2
看起来是是preinit里面的mount_root的问题,屏蔽再说。但是还是没有出现控制台,这些试验都表明,初始化脚本里没有造成致命错误的地方。最后还是检查inittab的问题。终于最后找到了是串口的问题。
试验wrv54g
&&&&&& 为了测试initab的影响,特意试了一下wrv54g。wrv54g使用的串口0,将inittab里的tts/0和ttys0都改成1,看看能不能启动。现象果然是可以输入信息由回显,但是控制台就是无法启动。
redboot的支持问题
&&&&&& 同样的zImage在另外一个P720盒子上无法启动。但是唯一的区别就是redboot而已。能启动的盒子redboot是2.04的,不能启动的是原始的1.94的。重新刷了盒子,结果好了。
配置以太网
&&&&&& openwrt启动以后,输入ifconfig eth0 up报错。
ifconfig:SIOCSIFFLAGS: Cannot assign requested address
&&&&&& 查找资料得知,这个是因为因为mac地址错误的原因而不是IP地址错误。所以执行ifconfig eth0 hw ether00:00:AA:BB:CC:DD,然后就可以执行ifconfigeth0 up。但是还是会报错。
eth0: MII readfailed
eth0: MII readfailed
用eth1没有问题,但是这个明明是NPEB,openwrt的配置和其他的不同?
无法ping通,因为P720的phy的配置是不同的,eth0使用的是phy1。也许是openwrt使用eth0配phy0,eth1配phy1,所以eth0的MII读取总是错误的,而eth1读取phy1是正确的,但是因为实际上用的是eth0,所以网络还是不通。在启动语句里找到下面的话
eth0: MII PHY 0on NPE-B
eth0: MII readfailed
eth0: MII readfailed
eth0: MII readfailed
eth0: MII readfailed
eth1: MII PHY 1on NPE-C
这更明显的提示了错误的所在。menuconfig没有phy的设置,只能自己看以太网驱动了。搜索源代码中“: MII PHY”的打印语句,就应该是设定phy的语句。一共有好几个文件都有打印这句话:
Ixp4xx_eth.c (linux-ixp4xx_genericlinux-2.6.26.8.pcplatform202-npe_driver_switch_support.patchdriversnetarm):&&&&&& printk(KERN_INFO &%s: MII PHY %i on%sn&, dev-&name, plat-&phy,
Ixp4xx_eth.c (linux-ixp4xx_genericlinux-2.6.26.8.pcplatform203-npe_driver_phy_reset_autoneg.patchdriversnetarm):&&&&&& printk(KERN_INFO &%s: MII PHY %i on%sn&, dev-&name, phy_id,
Ixp4xx_eth.c (linux-ixp4xx_genericlinux-2.6.26.8.pcplatform204-npe_driver_ixp43x_support.patchdriversnetarm):&&&&&& printk(KERN_INFO &%s: MII PHY %i on%sn&, dev-&name, phy_id,
Ixp4xx_eth.c (linux-ixp4xx_genericlinux-2.6.26.8.pcplatform303-avila_gw23x7_phy_quirk.patchdriversnetarm):&&&&&& printk(KERN_INFO &%s: MII PHY %i on%sn&, dev-&name, phy_id,
Ixp4xx_eth.c (linux-ixp4xx_genericlinux-2.6.26.8driversnetarm):&&& printk(KERN_INFO &%s: MII PHY %i on%sn&, dev-&name, phy_id,
只有linux-ixp4xx_genericlinux-2.6.26.8driversnetarm的Ixp4xx_eth.c有编译的迹象,应该就是这个。强行在eth_init_one()修改phy id
&&& switch (port-&id) {
&&& case IXP4XX_ETH_NPEA:
&&&&&&& port-&regs = (struct eth_regs __iomem*)IXP4XX_EthA_BASE_VIRT;
&&&&&&& regs_phys& = IXP4XX_EthA_BASE_PHYS;
&&& case IXP4XX_ETH_NPEB:
&&&&&&& port-&regs = (struct eth_regs __iomem*)IXP4XX_EthB_BASE_VIRT;
&&&&&&& regs_phys& = IXP4XX_EthB_BASE_PHYS;
&&& /*this is for P720 phy*/
&&&&&&& plat-&phy = 1;
&&& printk(KERN_INFO &change npe-b phy to 1for P720&);
&&& case IXP4XX_ETH_NPEC:
&&&&&&& port-&regs = (struct eth_regs __iomem*)IXP4XX_EthC_BASE_VIRT;
&&&&&&& regs_phys& = IXP4XX_EthC_BASE_PHYS;
&&& plat-&phy = 2;
&&& printk(KERN_INFO &change npe-c phy to 2for P720&);
&&& default:
&&&&&&& err = -ENOSYS;
&&&&&&& goto err_
这样就能正确启动以太网了。
多出的配置分区
通过xwrt配置完成以后,多了一个rootfs_data分区,应该是存储配置的。
Creating 5 MTDpartitions on &IXP4XX-Flash.0&:
0xx: &RedBoot&
0xx: &zImage&
0xx00fe0000: &rootfs&
mtd: partition&rootfs& set to be root filesystem
mtd: partition&rootfs_data& created automatically, ofs=300000, len=CE0000
0xx00fe0000: &rootfs_data&
0x00fefff000: &FIS directory&
0x00fff000-0x: &RedBoot config&
感谢关注 Ithao123精品文库频道,是专门为互联网人打造的学习交流平台,全面满足互联网人工作与学习需求,更多互联网资讯尽在 IThao123!
Laravel是一套简洁、优雅的PHP Web开发框架(PHP Web Framework)。它可以让你从面条一样杂乱的代码中解脱出来;它可以帮你构建一个完美的网络APP,而且每行代码都可以简洁、富于表达力。
Hadoop是一个由Apache基金会所开发的分布式系统基础架构。
用户可以在不了解分布式底层细节的情况下,开发分布式程序。充分利用集群的威力进行高速运算和存储。
Hadoop实现了一个分布式文件系统(Hadoop Distributed File System),简称HDFS。HDFS有高容错性的特点,并且设计用来部署在低廉的(low-cost)硬件上;而且它提供高吞吐量(high throughput)来访问应用程序的数据,适合那些有着超大数据集(large data set)的应用程序。HDFS放宽了(relax)POSIX的要求,可以以流的形式访问(streaming access)文件系统中的数据。
Hadoop的框架最核心的设计就是:HDFS和MapReduce。HDFS为海量的数据提供了存储,则MapReduce为海量的数据提供了计算。
产品设计是互联网产品经理的核心能力,一个好的产品经理一定在产品设计方面有扎实的功底,本专题将从互联网产品设计的几个方面谈谈产品设计
随着国内互联网的发展,产品经理岗位需求大幅增加,在国内,从事产品工作的大部分岗位为产品经理,其实现实中,很多从事产品工作的岗位是不能称为产品经理,主要原因是对产品经理的职责不明确,那产品经理的职责有哪些,本专题将详细介绍产品经理的主要职责
IThao123周刊}

我要回帖

更多关于 爱情是什么 的文章

更多推荐

版权声明:文章内容来源于网络,版权归原作者所有,如有侵权请点击这里与我们联系,我们将及时删除。

点击添加站长微信