⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 using_nand_flash_with_u-boot_and_linux_kernel.html

📁 ADI 公司blackfin系列的用户使用文挡。
💻 HTML
📖 第 1 页 / 共 2 页
字号:
For further information see:http://www.uclinux.org/http://blackfin.uclinux.org/BusyBox v1.00 (2006.01.20-06:56+0000) Built-in shell (msh)Enter 'help' for a list of built-in commands.root:~&gt;</pre></div><!-- SECTION [479-6771] --><h2><a name="loading_uclinux_kernel_from_the_nand_flash_with_yaffs_rootfs" id="loading_uclinux_kernel_from_the_nand_flash_with_yaffs_rootfs">Loading uClinux kernel from the NAND flash with YAFFS rootfs</a></h2><div class="level2"><ul><li class="level1"><div class="li"> Build kernel with NAND support and make the yaffs image on your linux host, See the section: <a href="blackfin_nand_flash_mtd_driver.html" class="wikilink1" title="blackfin_nand_flash_mtd_driver.html">blackfin_nand_flash_mtd_driver</a></div></li><li class="level1"><div class="li"> On the target board, format the file system partition and install the YAFFS file system image<pre class="code">root:~&gt;mkyaffs -e /dev/mtd2 yaffs.img</pre></div></li><li class="level1"><div class="li"> Program the kernel image to the NAND flash by U-Boot<pre class="code">U-Boot-1.1.3-ADI-2005R4 (Feb  8 2006 - 15:49:36)CPU:   ADSP BF537 Rev.: 0.2Board: ADI BF537 stamp board       Support: http://blackfin.uclinux.org/Clock: VCO: 500 MHz, Core: 500 MHz, System: 100 MHzSDRAM: 64 MBFLASH:   4 MBIn:    serialOut:   serialErr:   serialNAND:  16 MBNet:    ADI BF537 EMACI2C:   readyHit any key to stop autoboot:  0bf537&gt; tftpboot 0x1000000 uImageUsing MAC Address 00:E0:22:FE:42:84TFTP from server 192.168.0.2; our IP address is 192.168.0.15Filename 'uImage'.Load address: 0x1000000Loading: #################################################################         #################################################################         #################################################################         #################################################################         #################################################################         #################################################################         #################################################################         #################################################################         ###########doneBytes transferred = 2713868 (29690c hex)bf537&gt; nand erase 0x0 0x400000NAND erase: device 0 offset 0, size 4194304 ... OKbf537&gt; nand write 0x1000000 0x0 $(filesize)NAND write: device 0 offset 0, size 2713868 ...  2713868 bytes written: OK</pre></div></li><li class="level1"><div class="li"> Set the boot arguments<pre class="code">bf537&gt; setenv bootargs root=/dev/mtdblock2 rw rootfstype=yaffsbf537&gt; setenv autostart yes</pre></div></li><li class="level1"><div class="li"> Boot from the NAND flash with YAFFS rootfs.<pre class="code">bf537&gt; nboot 0x2000000 0Loading from device 0: &lt;NULL&gt; at 0x20202000 (offset 0x0)   Image Name:   uClinux Kernel and Filesystem   Created:      2006-02-08  10:07:01 UTC   Image Type:   Blackfin Linux Kernel Image (gzip compressed)   Data Size:    2713804 Bytes =  2.6 MB   Load Address: 00001000   Entry Point:  00001000Automatic boot of image at addr 0x02000000 ...## Booting image at 02000000 ...   Image Name:   uClinux Kernel and Filesystem   Created:      2006-02-08  10:07:01 UTC   Image Type:   Blackfin Linux Kernel Image (gzip compressed)   Data Size:    2713804 Bytes =  2.6 MB   Load Address: 00001000   Entry Point:  00001000   Verifying Checksum ... OK   Uncompressing Kernel Image ... OKStarting Kernel at = 1000Linux version 2.6.12.1 (aubrey@linux) (gcc version 3.4.5) #2 Wed Feb 8 17:42:00 CST 2006Blackfin support (C) 2004 Analog Devices, Inc.ADSP-BF537 Rev. 0.2uClinux/BF537Blackfin uClinux support by blackfin.uclinux.orgProcessor Speed: 500 MHz core clock and 100 Mhz System ClockBoard Memory: 64MBMemory map:  text = 0x001000-0x0e69a4  data = 0x0f3924-0x120e90  bss  = 0x120e90-0x12eac8  rootfs = 0x3700000-0x3f00000  stack = 0x0f4000-0x0f6000Command line: 'root=/dev/mtdblock2 rw rootfstype=yaffs'Instruction Cache EnabledData Cache Enabled (write-through)Hardware Trace EnabledBuilt 1 zonelistsKernel command line: root=/dev/mtdblock2 rw rootfstype=yaffsConfiguring Blackfin Priority Driven InterruptsPID hash table entries: 256 (order: 8, 4096 bytes)Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)Physical pages: 3700Memory available: 54528k/64561k RAM, (50k init code, 918k kernel code, 236k data, 9216k dma)Blackfin Scratchpad data SRAM: 4 KBBlackfin DATA_A SRAM: 16 KBBlackfin DATA_B SRAM: 16 KBSecurity Framework v1.0.0 initializedCapability LSM initializedMount-cache hash table entries: 512NET: Registered protocol family 16Blackfin DMA Controller for BF533stamp_init(): registering device resourcesyaffs Feb  8 2006 17:40:41 Installing.Real Time Clock Driver v1.10eBlackFin BF533 serial driver version 2.00 With DMA Supportio scheduler noop registeredio scheduler cfq registeredRAMDISK driver initialized: 16 RAM disks of 4096K size 1024 blocksizeBlackfin 537 mac net device registered.uclinux[mtd]: RAM probe address=0x3700000 size=0x800000Creating 1 MTD partitions on &quot;RAM&quot;:0x00000000-0x00800000 : &quot;EXT2fs&quot;uclinux[mtd0]: set EXT2fs to be root filesystemNAND device: Manufacturer ID: 0x20, Chip ID: 0x73 (ST Micro NAND 16MiB 3,3V 8-bit)Scanning device for bad blocksBad eraseblock 807 at 0x00c9c000Creating 2 MTD partitions on &quot;NAND 16MiB 3,3V 8-bit&quot;:0x00000000-0x00400000 : &quot;linux kernel&quot;0x00400000-0x01000000 : &quot;file system&quot;NET: Registered protocol family 2IP: routing cache hash table of 512 buckets, 4KbytesTCP 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)NET: Registered protocol family 1NET: Registered protocol family 17yaffs: dev is 32505858 name is &quot;mtdblock2&quot;yaffs: Attempting MTD mount on 31.2, &quot;mtdblock2&quot;yaffs: yaffs_GutsInitialise()block 552 is badyaffs: yaffs_GutsInitialise() done.VFS: Mounted root (yaffs filesystem).Freeing unused kernel memory: 48k freed (0xe7000 - 0xf2000)ttyS0 at irq = 18 is a builtin BlackFin UARTdma_alloc_init: dma_page @ 0x000f0000 - 256 pages at 0x03f00000bfin_change_speed: baud = 57600, cval = 0x13Welcome to:       ____ _  _      /  __| ||_|             _  _ _   _| |  | | _ ____  _   _ \ \/ /| | | | |  | || |  _ \| | | | \  /| |_| | |__| || | | | | |_| | /  \|  ___\____|_||_|_| |_|\____|/_/\_\|_|For further information see:http://www.uclinux.org/http://blackfin.uclinux.org/BusyBox v1.00 (2006.02.08-08:59+0000) Built-in shell (msh)Enter 'help' for a list of built-in commands.root:~&gt; cat /proc/cmdlineroot=/dev/mtdblock2 rw rootfstype=yaffsroot:~&gt;</pre></div></li><li class="level1"><div class="li"> Upgrade the kernel image. As the above mentioned, you can upgrade the kernel image by the uboot. You also can upgrade the kernel image in the kernel by a simple &ldquo;cp&rdquo; command line.<pre class="code">root:~&gt; cat /proc/cmdlineroot=/dev/mtdblock2 rw rootfstype=yaffsroot:~&gt; cat /proc/mtddev:    size   erasesize  namemtd0: 00800000 00001000 &quot;EXT2fs&quot;mtd1: 00400000 00004000 &quot;linux kernel&quot;mtd2: 00c00000 00004000 &quot;file system&quot;root:~&gt; lsbin         home        mnt         sbin        uImagedev         lib         proc        sys         usretc         lost+found  root        tmp         varroot:~&gt; cp uImage /dev/mtd1</pre></div></li></ul></div><!-- SECTION [6772-] --></body></html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -