full boot中文boot mode什么意思思

Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.
I know this question is asked many times before, however with me it is just a bit different I guess.
Filesystem
Used Avail Use% Mounted on
0% /run/lock
0% /run/shm
0 100% /boot
My boot partition is full.
Current Kernel:
# uname -r
3.2.0-35-generic
All Kernels:
# dpkg --list | grep linux-image
linux-image-3.2.0-32-generic
3.2.0-32.51
Linux kernel image for version 3.2.0 on 64 bit x86 SMP
linux-image-3.2.0-34-generic
3.2.0-34.53
Linux kernel image for version 3.2.0 on 64 bit x86 SMP
linux-image-3.2.0-35-generic
3.2.0-35.55
Linux kernel image for version 3.2.0 on 64 bit x86 SMP
linux-image-3.2.0-37-generic
3.2.0-37.58
Linux kernel image for version 3.2.0 on 64 bit x86 SMP
linux-image-3.2.0-38-generic
3.2.0-38.60
Linux kernel image for version 3.2.0 on 64 bit x86 SMP
linux-image-generic
3.2.0.37.45
Generic Linux kernel image
So I thought of removing the 3.2.0.32-generic kernel with:
# sudo apt-get purge linux-image-3.2.0-32-generic
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
linux-generic : Depends: linux-headers-generic (= 3.2.0.37.45) but 3.2.0.38.46 is to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
No success.
When I try apt-get -f install it also fails:
# apt-get -f install
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following packages were automatically installed and are no longer required:
linux-headers-3.2.0-34 linux-headers-3.2.0-35 linux-headers-3.2.0-34-generic linux-headers-3.2.0-35-generic
Use 'apt-get autoremove' to remove them.
The following extra packages will be installed:
linux-generic linux-image-generic
The following packages will be upgraded:
linux-generic linux-image-generic
2 upgraded, 0 newly installed, 0 to remove and 9 not upgraded.
5 not fully installed or removed.
Need to get 0 B/4,334 B of archives.
After this operation, 0 B of additional disk space will be used.
Do you want to continue [Y/n]? y
Setting up initramfs-tools (0.99ubuntu13.1) ...
update-initramfs: deferring update (trigger activated)
Setting up linux-image-3.2.0-37-generic (3.2.0-37.58) ...
Running depmod.
update-initramfs: deferring update (hook will be called later)
The link /initrd.img is a dangling linkto /boot/initrd.img-3.2.0-38-generic
Examining /etc/kernel/postinst.d.
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 3.2.0-37-generic /boot/vmlinuz-3.2.0-37-generic
update-initramfs: Generating /boot/initrd.img-3.2.0-37-generic
gzip: stdout: No space left on device
E: mkinitramfs failure cpio 141 gzip 1
update-initramfs: failed for /boot/initrd.img-3.2.0-37-generic with 1.
run-parts: /etc/kernel/postinst.d/initramfs-tools exited with return code 1
Failed to process /etc/kernel/postinst.d at /var/lib/dpkg/info/linux-image-3.2.0-37-generic.postinst line 1010.
dpkg: error processing linux-image-3.2.0-37-generic (--configure):
subprocess installed post-installation script returned error exit status 2
Setting up linux-image-3.2.0-38-generic (3.2.0-38.60) ...
Running depmod.
update-initramfs: deferring update (hook will be called later)
The link /initrd.img is a dangling linkto /boot/initrd.img-3.2.0-37-generic
Examining /etc/kernel/postinst.d.
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 3.2.0-38-generic /boot/vmlinuz-3.2.0-38-generic
update-initramfs: Generating /boot/initrd.img-3.2.0-38-generic
gzip: stdout: No space left on device
E: mkinitramfs failure cpio 141 gzip 1
update-initramfs: failed for /boot/initrd.img-3.2.0-38-generic with 1.
run-parts: /etc/kernel/postinst.d/initramfs-tools exited with return code 1
Failed to process /etc/kernel/postinst.d at /var/lib/dpkg/info/linux-image-3.2.0-38-generic.postinst line 1010.
dpkg: error processing linux-image-3.2.0-38-generic (--configure):
subprocess installed post-installation script returned error exit status 2
dpkg: dependency problems prevent configuration of linux-image-generic:
linux-image-generic depends on linux-image-3.2.0-37- however:
Package linux-image-3.2.0-37-generic is not configured yet.
dpkg: error processing linux-image-generic (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of linux-generic:
linux-generic depends on linux-image-generic (= 3.2.0.37.45); however:
Package linux-image-generic is not configured yet.
linux-generic depends on linux-headers-generic (= 3.2.0.37.45); however:
Version of linux-headers-generic on system is 3.2.0.38.46.
dpkg: error processing linux-generic (--configure):
dependency problems - leaving unconfigured
Processing triggers for initramfs-tools ...
No apport report written because the error message indicates its a followup error from a previous failure.
No apport report written because MaxReports is reached already
update-initramfs: Generating /boot/initrd.img-3.2.0-35-generic
gzip: stdout: No space left on device
E: mkinitramfs failure cpio 141 gzip 1
update-initramfs: failed for /boot/initrd.img-3.2.0-35-generic with 1.
dpkg: error processing initramfs-tools (--configure):
subprocess installed post-installation script returned error exit status 1
No apport report written because MaxReports is reached already
Errors were encountered while processing:
linux-image-3.2.0-37-generic
linux-image-3.2.0-38-generic
linux-image-generic
linux-generic
initramfs-tools
E: Sub-process /usr/bin/dpkg returned an error code (1)
Any help would really be appreciated.
sudo rm /boot/*-3.2.0-32-generic /boot/*-3.2.0-34-generic
After that the following problem with apt-get -f install:
root@localhost:/# apt-get -f install
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following extra packages will be installed:
linux-generic
The following packages will be upgraded:
linux-generic
1 upgraded, 0 newly installed, 0 to remove and 9 not upgraded.
1 not fully installed or removed.
Need to get 0 B/1,722 B of archives.
After this operation, 0 B of additional disk space will be used.
Do you want to continue [Y/n]? y
dpkg: dependency problems prevent configuration of linux-generic:
linux-generic depends on linux-image-generic (= 3.2.0.37.45); however:
Version of linux-image-generic on system is 3.2.0.38.46.
linux-generic depends on linux-headers-generic (= 3.2.0.37.45); however:
Version of linux-headers-generic on system is 3.2.0.38.46.
dpkg: error processing linux-generic (--configure):
dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error
from a previous failure.
Errors were encountered while processing:
linux-generic
E: Sub-process /usr/bin/dpkg returned an error code (1)
31.6k1567127
You cannot use apt-get when your kernel is outdated.
sudo rm *-2.6.35-6.9-generic
sudo rm *-3.16.0-23-generic
use ls to see what is in the folder remove the oldest one or two then
sudo apt-get -f install
Then you cen either apt-get purge as in
sudo apt-get purge linux-image-3.2.0-32-generic linux-image-3.2.0-34-generic
or just continue with rm.
you should also sudo update-grub when you are finsihed
In a terminal, execute the following command:
dpkg -l 'linux-*' | sed '/^ii/!d;/'"$(uname -r | sed "s/\(.*\)-\([^0-9]\+\)/\1/")"'/d;s/^[^ ]* [^ ]* \([^ ]*\).*/\1/;/[0-9]/!d' | xargs sudo apt-get -y purge
This command lists all currently installed Linux kernels, then selects all of the ones that are currently not used and removes them.
7,59112549
For Ubuntu 12.04
sudo apt-get purge linux-image-[kernel version]
This will delete any kernel version. If your boot folder has many kernels
don't forget updating
grub and rebooting your system
ex. sudo apt-get purge linux-image-3.11.6*
I hope this can help:
i usually delete old kernels using ubuntu-tweak janitor, nice GUI and easy :)
click on 'system' and there will be list of old kernels, just click it and clean
You can delete old kernel files to free some space. Try:
sudo rm /boot/*-3.2.0-32-generic /boot/*-3.2.0-34-generic
apt-get -f install
sudo apt-get purge linux-image-3.2.0-32-generic linux-image-3.2.0-34-generic
90MB is not enough for /boot, I recommend at least 300MB.
21.8k135185
Apparently, this works:
sudo apt-get autoremove
3.16.0-39 is the one I tried to install, but failed because /boot was full.
3.16.0-38 is my current version.
You can see that -38 was skipped.
server:~$ uname -r
3.16.0-38-generic
server:~$ sudo apt-get autoremove
[sudo] password for mikeb:
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
linux-headers-3.16.0-30 linux-headers-3.16.0-30-generic
linux-headers-3.16.0-31 linux-headers-3.16.0-31-generic
linux-headers-3.16.0-33 linux-headers-3.16.0-33-generic
linux-headers-3.16.0-34 linux-headers-3.16.0-34-generic
linux-headers-3.16.0-36 linux-headers-3.16.0-36-generic
linux-headers-3.16.0-39 linux-headers-3.16.0-39-generic
linux-image-3.16.0-30-generic linux-image-3.16.0-31-generic
linux-image-3.16.0-33-generic linux-image-3.16.0-34-generic
linux-image-3.16.0-36-generic linux-image-3.16.0-39-generic
linux-image-extra-3.16.0-30-generic linux-image-extra-3.16.0-31-generic
linux-image-extra-3.16.0-33-generic linux-image-extra-3.16.0-34-generic
linux-image-extra-3.16.0-36-generic linux-image-extra-3.16.0-39-generic
0 upgraded, 0 newly installed, 24 to remove and 0 not upgraded.
you need to fix your dependency problems first.
I had the same problem with my moms 12.04 LTS box.
She was doing updates and JUST before the child process (apt-get or dpkg, i guess) finished, she turned off her computer.
I just went to this link on askubuntu and it fixed the problem.
then I removed a few old kernels just like you are going to. I hope this helps you. :)
I love Ubuntu, (and Debian GNU/Linux of course :) but I am not a apt or dpkg hacker, but I wish there was a way to make ALL updates atomic.
like ACID in PostgreSQL, MySQL, etc... (mainly Atomicity)
I am learning so it is a work in progress...
Open up a new terminal and do the following command for removing the old kernels.
sudo apt-get autoremove
Your Answer
Sign up or
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Post as a guest
By posting your answer, you agree to the
Not the answer you're looking for?
Browse other questions tagged
Ubuntu and Canonical are registered trademarks of Canonical Ltd.
Ask Ubuntu works best with JavaScript enabled扫扫二维码,随身浏览文档
手机或平板扫扫即可继续访问
编程器固件、uboot、fullflash
举报该文档为侵权文档。
举报该文档含有违规或不良信息。
反馈该文档无法正常浏览。
举报该文档为重复文档。
推荐理由:
将文档分享至:
分享完整地址
文档地址:
粘贴到BBS或博客
flash地址:
支持嵌入FLASH地址的网站使用
html代码:
&embed src='/DocinViewer-4.swf' width='100%' height='600' type=application/x-shockwave-flash ALLOWFULLSCREEN='true' ALLOWSCRIPTACCESS='always'&&/embed&
450px*300px480px*400px650px*490px
支持嵌入HTML代码的网站使用
您的内容已经提交成功
您所提交的内容需要审核后才能发布,请您等待!
3秒自动关闭窗口增加DM9000网卡驱动 - u-boot-2009.08在mini2440上的移植_Linux编程_Linux公社-Linux系统门户网站
你好,游客
u-boot-2009.08在mini2440上的移植
增加DM9000网卡驱动
来源:Linux社区&
作者:singleboy
1,主机环境:VMare下 5.5 ,1G内存。
2,集成开发环境:Elipse IDE
3,编译编译环境:arm-linux-gcc v4.4.3,arm-none-eabi-gcc v4.5.1。
4,开发板:mini2440,2M nor flash,128M nand flash。
5,u-boot版本:u-boot-2009.08
u-boot-2009.08版本已经对CS8900、RTL8019和DM9000X等网卡有比较完善的代码支持(代码在drivers/net/目录下),而且在S3C24XX系列中默认对CS8900网卡进行配置使用。而mini2440开发板使用的则是DM9000网卡芯片,所以只需在开发板上添加对DM9000的支持即可。还有一点,以前的 U-boot 对于网络延时部分有问题,需要修改许多地方。但是现在的U-boot 网络部分已经基本不需要怎么修改了,只有在DM9000 的驱动和NFS 的TIMEOUT 参数上需要稍微修改一下。
4.1,DM9000驱动代码修改
【1】修改static int dm9000_init函数中部分代码,如果不修改这一部分,在使用网卡的时候会报“could not establish link”的错误。
打开/drivers/net/dm9000x.c,定位到377行,修改如下:
&/* Activate DM9000 */&/* RX enable */&DM9000_iow(DM9000_RCR, RCR_DIS_LONG | RCR_DIS_CRC | RCR_RXEN);&/* Enable TX/RX interrupt mask */&DM9000_iow(DM9000_IMR, IMR_PAR);
&#if 0 //default to link MII interface&i = 0;&while (!(phy_read(1) & 0x20)) {&/* autonegation complete bit */&&udelay(1000);&&i++;&&if (i == 1650) { &&&//printf("could not establish link\n");&&&//return 0;&&&&&}&}#endif
【2】对于NFS,增加了延时,否则会出现“*** ERROR: Cannot mount”的错误。
打开/net/nfs.c,定位到36行,修改如下:
#if defined(CONFIG_CMD_NET) && defined(CONFIG_CMD_NFS)
#define HASHES_PER_LINE 65&/* Number of "loading" hashes per line&*/#define NFS_RETRY_COUNT 30#define NFS_TIMEOUT (CONFIG_SYS_HZ/UL) //2000UL
【3】添加网卡芯片(DM9000)的初始化函数
打开board/samsung/mini2440/mini2440.c,定位到194行附近,文件末尾处,修改如下:
int dram_init (void){&gd-&bd-&bi_dram[0].start = PHYS_SDRAM_1;&gd-&bd-&bi_dram[0].size = PHYS_SDRAM_1_SIZE;
&return 0;}
extern int dm9000_initialize(bd_t *bis);//implicit declaration of function 'dm9000_initialize'#ifdef CONFIG_DRIVER_DM9000int board_eth_init(bd_t *bis){&return dm9000_initialize(bis);}#endif
【4】添加串口 Xmodem 传输协议(可不修改)
对于使用串口传输数据到内存的操作,有可能会用到Xmodem协议。但是原本的kermit协议传输就挺好用的,速度也比较快,所以可添加此功能。
打开/common/cmd_load.c,定位到37行,修改如下:
#if defined(CONFIG_CMD_LOADB)#if defined(ENABLE_CMD_LOADB_X)static ulong load_serial_xmodem (ulong offset);#endifstatic ulong load_serial_ymodem (ulong offset);#endif
然后再定位到480行附近,修改如下:
&if (load_baudrate != current_baudrate) {&&printf ("## Switch baudrate to %d bps and press ENTER ...\n",&&&load_baudrate);&&udelay(50000);&&gd-&baudrate = load_&&serial_setbrg ();&&udelay(50000);&&for (;;) {&&&if (getc() == '\r')&&&&&&}&}#if defined(ENABLE_CMD_LOADB_X)&if (strcmp(argv[0],"loadx")==0) {&&printf ("## Ready for binary (xmodem) download "&&&"to 0x%08lX at %d bps...\n",&&&offset,&&&load_baudrate);
&&addr = load_serial_xmodem (offset);
&} else if (strcmp(argv[0],"loady")==0) {#else&if (strcmp(argv[0],"loady")==0) {#endif&&printf ("## Ready for binary (ymodem) download "&&&"to 0x%08lX at %d bps...\n",&&&offset,&&&load_baudrate);
&&addr = load_serial_ymodem (offset);
再定位到998行附近,修改如下:
static int getcxmodem(void) {&if (tstc())&&return (getc());&return -1;}#if defined(ENABLE_CMD_LOADB_X)static ulong load_serial_xmodem (ulong offset){&&char buf[32];&&&connection_info_&char xmodemBuf[1024];&ulong store_addr = ~0;&ulong addr = 0;
&size = 0;&info.mode = xyzModem_&res = xyzModem_stream_open (&info, &err);&if (!res) {
&&while ((res =&&&xyzModem_stream_read (xmodemBuf, 1024, &err)) & 0) {&&&store_addr = addr +&&&size +=&&&addr +=#ifndef CFG_NO_FLASH&&&if (addr2info (store_addr)) {&&&&
&&&&rc = flash_write ((char *) xmodemBuf,&&&&store_addr, res);&&&&if (rc != 0) {&&&&flash_perror (rc);&&&&return (~0);&&&&}&&&} else#endif&&&{&&&&memcpy ((char *) (store_addr), xmodemBuf,&&&&&res);&&&}
&&}&} else {&&printf ("%s\n", xyzModem_error (err));&}
&xyzModem_stream_close (&err);&xyzModem_stream_terminate (false, &getcxmodem);
&flush_cache (offset, size);
&printf ("## Total Size&&&&& = 0x%08x = %d Bytes\n", size, size);&sprintf (buf, "%X", size);&setenv ("filesize", buf);
&}#endifstatic ulong load_serial_ymodem (ulong offset)
再定位到1169行,修改如下:
#if defined(CONFIG_CMD_LOADB)U_BOOT_CMD(&loadb, 3, 0,&do_load_serial_bin,&"load binary file over serial line (kermit mode)",&"[ off ] [ baud ]\n"&"&&& - load binary file over serial line"&" with offset 'off' and baudrate 'baud'");#if defined(ENABLE_CMD_LOADB_X)U_BOOT_CMD(&loadx, 3, 0,&&& do_load_serial_bin,&"load binary file over serial line (xmodem mode)",&"[ off ] [ baud ]\n"&"&&& - load binary file over serial line"&" with offset 'off' and baudrate 'baud'");#endif
U_BOOT_CMD(&loady, 3, 0,&do_load_serial_bin,&"load binary file over serial line (ymodem mode)",&"[ off ] [ baud ]\n"&"&&& - load binary file over serial line"&" with offset 'off' and baudrate 'baud'");
【5】修改配置文件,在mini2440.h中加入相关定义
打开/include/configs/mini2440.h,定位到60行附近,修改如下:
/*&* Hardware drivers&*/#if 0#define CONFIG_DRIVER_CS8900&1&/* we have a CS8900 on-board */#define CS8900_BASE&&0x#define CS8900_BUS16&&1 /* the Linux driver does accesses as shorts */#endif #define CONFIG_NET_MULTI&&1#define CONFIG_DRIVER_DM9000 1#define CONFIG_DM9000_BASE 0x //网卡片选地址#define DM9000_IO CONFIG_DM9000_BASE#define DM9000_DATA (CONFIG_DM9000_BASE+4) //网卡数据地址#define CONFIG_DM9000_NO_SROM&&1//#define CONFIG_DM9000_USE_16BIT#undef CONFIG_DM9000_DEBUG
注意:u-boot-2009.08 可以自动检测DM9000网卡的位数,根据开发板原理图可知网卡的数据位为16位,并且网卡位于CPU的BANK4上,所以只需在 board/samsung/mini2440/lowlevel_init.S中设置 #define B4_BWSCON (DW16) 即可,不需要此处的 #define CONFIG_DM9000_USE_16BIT 1
给u-boot加上ping命令,用来测试网络通不通
/*&* Command line configuration.&*/#include &config_cmd_default.h&
#define CONFIG_CMD_CACHE#define CONFIG_CMD_DATE#define CONFIG_CMD_ELF#define CONFIG_CMD_NAND#define CONFIG_CMD_JFFS2& /* JFFS2 Support*/#define CONFIG_CMD_PING /*ping command support*/
恢复被注释掉的网卡MAC地址和修改你合适的开发板IP地址以及内核启动参数:
#define CONFIG_BOOTDELAY&3#define CONFIG_ETHADDR&08:00:3e:26:0a:5b #define CONFIG_NETMASK&&&& 255.255.255.0#define CONFIG_IPADDR&&10.1.0.129#define CONFIG_SERVERIP&&10.1.0.128#define CONFIG_GATEWAYIP&10.1.0.1#define CONFIG_OVERWRITE_ETHADDR_ONCE/*#define CONFIG_BOOTFILE&"elinos-lart" */
定位到139行附近,加入使能串口传输数据到内存的操作:
#define ENABLE_CMD_LOADB_X&&&&1 //使能串口传输数据到内存的操作
#if defined(CONFIG_CMD_KGDB)#define CONFIG_KGDB_BAUDRATE&115200&&/* speed to run kgdb serial port *//* what's this ? it's not used anywhere */#define CONFIG_KGDB_SER_INDEX&1&&/* which serial port to use */#endif
4.2,重新编译u-boot,下载到Nand中从Nand启动,查看启动信息和环境变量并使用ping命令测试网卡,操作如下:
Enter your selection: aUSB host is connected. Waiting a download.
Now, Downloading [ADDRESS:h,TOTAL:154934]RECEIVED FILE SIZE:& 1KB/S, 1S)Downloaded file at 0x, size = 154924 bytesWrite to flash ok: skipped size = 0x0, size = 0x25d2c
nand 方式上电重启后:
U-Boot 2009.08 ( 5鏈?09 2011 - 15:01:04)
DRAM:& 64 MBFlash:& 2 MBNAND:& 128 MiBIn:&&& serialOut:&& serialErr:&& serialNet:&& dm9000[u-boot@MINI2440]#
显示下环境变量:
[u-boot@MINI2440]# printenvbootdelay=3baudrate=115200netmask=255.255.255.0stdin=serialstdout=serialstderr=serialipaddr=10.1.129serverip=10.1.0.128ethact=dm9000
Environment size: 141/131068 bytes
ping测试:[u-boot@MINI2440]# ping 10.1.0.128dm9000 i/o: 0x, id: 0x90000a46DM9000: running in 16 bit modeMAC: 00:00:00:00:00:00operating at 100M full duplex mode*** ERROR: `ethaddr' not setdm9000 i/o: 0x, id: 0x90000a46DM9000: running in 16 bit modeMAC: 00:00:00:00:00:00operating at 100M full duplex mode host 10.1.0.128 is not alive
需要设定IP地址和MAC地址
[u-boot@MINI2440]# setenv ipaddr 10.1.0.129[u-boot@MINI2440]# setenv serverip 10.1.0.128[u-boot@MINI2440]# setenv setenv ethaddr 12:34:56:78:9A:BC[u-boot@MINI2440]# saveenvSaving Environment to NAND...Erasing Nand...Erasing at 0x2 --&& 0% complete.Writing to Nand... done[u-boot@MINI2440]#
然后再进行ping测试:
[u-boot@MINI2440]# ping 10.1.0.128dm9000 i/o: 0x, id: 0x90000a46DM9000: running in 16 bit modeMAC: 12:34:56:78:9a:bcoperating at 100M full duplex modeUsing dm9000 device host 10.1.0.128 is not alive[u-boot@MINI2440]#
可以看到,启动信息里面显示了Net:dm9000,printenv查看的环境变量也和include/configs/mini2440.h中设置的一致。但是现在有个问题就是ping不能通过。经过一段时间在网上搜索,原来有很多人都碰到了这种情况。出现问题的地方可能是DM9000网卡驱动中关闭网卡的地方,如是就试着修改代码如下:
打开drivers/net/dm9000x.c&,定位到456行附近,屏蔽掉dm9000_halt函数中的内容:
/*& Stop the interface.& The interface is stopped when it is brought.*/static void dm9000_halt(struct eth_device *netdev){#if 0&&DM9000_DBG("%s\n", __func__);
&/* RESET devie */&phy_write(0, 0x8000);&/* PHY RESET */&DM9000_iow(DM9000_GPR, 0x01);&/* Power-Down PHY */&DM9000_iow(DM9000_IMR, 0x80);&/* Disable all interrupt */&DM9000_iow(DM9000_RCR, 0x00);&/* Disable RX */#endif&}
重新编译下载,nand启动,运行结果:
[u-boot@MINI2440]# ping 10.1.0.128dm9000 i/o: 0x, id: 0x90000a46DM9000: running in 16 bit modeMAC: 00:00:00:00:00:00operating at unknown: 0 mode*** ERROR: `ethaddr' not setdm9000 i/o: 0x, id: 0x90000a46DM9000: running in 16 bit modeMAC: 00:00:00:00:00:00operating at unknown: 0 mode host 10.1.0.128 is not alive
[u-boot@MINI2440]# setenv gatewayip 10.1.0.1[u-boot@MINI2440]# setenv ethaddr 12:34:56:78:9a:bc //MAC地址,随便设[u-boot@MINI2440]# ping 10.1.0.128dm9000 i/o: 0x, id: 0x90000a46DM9000: running in 16 bit modeMAC: 12:34:56:78:9a:bcoperating at unknown: 0 modeUsing dm9000 devicehost 10.1.0.128 is alive[u-boot@MINI2440]# saveenvSaving Environment to NAND...Erasing Nand...Erasing at 0x2 --&& 0% complete.Writing to Nand... done
[u-boot@MINI2440]# ping 10.1.0.128dm9000 i/o: 0x, id: 0x90000a46DM9000: running in 16 bit modeMAC: 12:34:56:78:9a:bcoperating at unknown: 0 modeUsing dm9000 devicehost 10.1.0.128 is alive[u-boot@MINI2440]#
结果,只是第一次ping不通,以后都是可以ping通的(据网友们说这是正常的)。
4.3,tftp功能测试
首先需要将友善官方移植好的有关mini2440的内核文件zImage_T35复制到linux 宿主机的/tftpboot目录下,因为u-boot默认的此目录,然后执行:
[u-boot@MINI2440]# tftp 0x zImage_T35dm9000 i/o: 0x, id: 0x90000a46DM9000: running in 16 bit modeMAC: 12:34:56:78:9a:bcoperating at unknown: 0 modeUsing dm9000 deviceTFTP from server 10.1.0.128; our IP address is 10.1.0.129Filename 'zImage_T35'.Load address: 0xLoading: T ################################################T #################&&&&&&&& #############T T ######################T ##############################T T&&&&&&&& ########doneBytes transferred = edbcc hex)[u-boot@MINI2440]#
至此DM9000网卡驱动移植成功。但是还发现一个问题:"这里之前还是"operating at 100M full duplex mode",而现在怎么是"operating at unknown: 0 mode"?原来是dm9000的phy_read(int reg)函数延时出了问题,现操作如下:
打开/drivers/net/dm9000x.c,定位到595行附近,修改如下:
/*&& Read a word from phyxcer*/static u16phy_read(int reg){&u16
&/* Fill the phyxcer register into REG_0C */&DM9000_iow(DM9000_EPAR, DM9000_PHY | reg);&DM9000_iow(DM9000_EPCR, 0xc);&/* Issue phyxcer read command */&udelay(1000);&//udelay(100);&&&/* Wait read complete */&DM9000_iow(DM9000_EPCR, 0x0);&/* Clear phyxcer read command */&val = (DM9000_ior(DM9000_EPDRH) && 8) | DM9000_ior(DM9000_EPDRL);
&/* The read data keeps on REG_0D & REG_0E */&DM9000_DBG("phy_read(0x%x): 0x%x\n", reg, val);&}重新编译下载后:
[u-boot@MINI2440]# ping 10.1.0.128dm9000 i/o: 0x, id: 0x90000a46DM9000: running in 16 bit modeMAC: 12:34:56:78:9a:bcoperating at unknown: 15 modeUsing dm9000 device host 10.1.0.128 is not alive[u-boot@MINI2440]# ping 10.1.0.128dm9000 i/o: 0x, id: 0x90000a46DM9000: running in 16 bit modeMAC: 12:34:56:78:9a:bcoperating at 100M full duplex modeUsing dm9000 devicehost 10.1.0.128 is alive[u-boot@MINI2440]#可以看到"operating at 100M full duplex mode"这样的信息了
上面还有一个问题,就是问什么第一次ping不通呢?经过尝试,操作如下:
打开/drivers/net/dm9000x.c,定位到377行,修改如下:
&/* Activate DM9000 */&/* RX enable */&DM9000_iow(DM9000_RCR, RCR_DIS_LONG | RCR_DIS_CRC | RCR_RXEN);&/* Enable TX/RX interrupt mask */&DM9000_iow(DM9000_IMR, IMR_PAR);
&#if&1 //internet delay&loop&i = 0;&while (!(phy_read(1) & 0x20)) {&/* autonegation complete bit */&&udelay(1000);&&i++;&&if (i == 3000) {&&&&printf("could not establish link\n");&&&return 0;&&&//&&}&}#endif
修改后重新编译下载:
[u-boot@MINI2440]# ping 10.1.0.128dm9000 i/o: 0x, id: 0x90000a46DM9000: running in 16 bit modeMAC: 12:34:56:78:9a:bcoperating at 100M full duplex modeUsing dm9000 devicehost 10.1.0.128 is alive[u-boot@MINI2440]#
OK! 第一次ping不通的问题解决了!&
接下来将进入u-boot的第五阶段,为u-boot-2009.08增加yaffs2文件系统。4
【内容导航】
相关资讯 & & &
& (02月05日)
& (06/02/:50)
& (02月05日)
& (06/02/:48)
图片资讯 & & &
   同意评论声明
   发表
尊重网上道德,遵守中华人民共和国的各项有关法律法规
承担一切因您的行为而直接或间接导致的民事或刑事法律责任
本站管理人员有权保留或删除其管辖留言中的任意内容
本站有权在网站内转载或引用您的评论
参与本评论即表明您已经阅读并接受上述条款
mqynms2 发表于 强大的网站,
(0) 匿名 发表于 我按照你的移植,报part.c中有错误,402,403,404行有错误,我搞不懂
(0) 匿名 发表于 dm9000_initialize函数没有定义。。
(0) sourire 发表于 学习了}

我要回帖

更多关于 fastboot是什么意思 的文章

更多推荐

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

点击添加站长微信