达芬奇开发_烧写Flash:方案一:使用ramdisk,烧写到nor flash,文件格式ext2
2008-07-03 21:37
585 查看
达芬奇开发_烧写Flash:
方案一:使用ramdisk,烧写到nor flash,文件格式ext2
作者:耿磊
说明:跳线选择12连通其它都不连接。
1. Copy the kernel image in /tftpboot directory:
host $ cp ~workdir/lsp/ti-davinci/arch/arm/boot/uImage /tftpboot
2. Copy the initial RAM disk file system in /tftpboot directory:
host $ cp /mnt/def_cd/ramdisk.gz /tftpboot/
3. Download the Linux kernel via TFTP:
DVEVM # setenv serverip <tftp server ip address>
DVEVM # setenv bootfile uImage
DVEVM # dhcp
BOOTP broadcast 1
*** Unhandled DHCP Option in OFFER/ACK: 44
*** Unhandled DHCP Option in OFFER/ACK: 46
DHCP client bound to address <dvem ip address>
TFTP from server <tftp server ip address>; our IP address is <dvevm ipaddress>
Filename 'uImage'.
Load address: 0x80700000
Loading:
###################################################
###################################################
done
Bytes transferred = 823844 (c9224 hex)
The dhcp command obtains IP settings and then downloads the Linux kernel image (as specified by the serverip and bootfile environment variables). Note the Load address (0x80700000) and Bytes transferred (0xc9224), as these are needed in the following steps.
4. Download the RAM disk file system via TFTP:
DVEVM # tftp 0x85000000 ramdisk.gz
TFTP from server <tftp server ip address>; our IP address is <dvevm ip
address>
Filename 'ramdisk.gz'.
Load address: 0x85000000
Loading:
###################################################
###################################################
done
Bytes transferred = 2304639 (232a7f hex)
The tftp command downloads the ramdisk.gz file at 0x85000000. Note the Load address (0x85000000)and Bytes transferred (0x232a7f), as these are needed in the following steps.
5. Determine the location in flash to store image:
EVM # flinfo
Bank # 1: MY AMD 29LV256M (256 Mbit)
Size: 16 MB in 256 Sectors
Sector Start Addresses:
02000000 02010000 02020000 02030000 02040000 (RO)
02050000 02060000 02070000 02080000 02090000
020A0000 020B0000 020C0000 020D0000 020E0000
0x2FBCA3=232a7f+0xc9224
The U-Boot code and data are stored in the first five sectors,
starting at 0x2000000. Note that the trailing (RO) indicates that the sectors are read-only or protected from erasing and writing. The Linux kernel image should be saved to the 0x20500000 location, the first free sector after U-Boot.
6. Erase the flash:
DVEVM # protect off 0x2050000 +0x2FBCA3
Note: 0x2FBCA3(长度)是内核和RAM Disk大小的和。
DVEVM # erase 0x2050000 +0x2FBCA3
Erasing sector 5 ... done.
Erasing sector 6 ... done.
The protect off command makes the flash writable (not necessary for this example), while the erase command prepares the flash for writing by erasing the old contents. Note the start address (0x2050000) is derived from the output of flinfo and the length (the size of the Linux kernel image plus the RAM disk file system downloaded via the TFTP server).
7. Copy from RAM into flash:
DVEVM # cp.b 0x80700000 0x2050000 0xc9224
Copy to Flash.../done
DVEVM # cp.b 0x85000000 0x2119224 0x232a7f
Copy to Flash.../done
The cp (copy) command is used to copy the Linux kernel image in RAM into the accessible flash memory. The arguments are the source address, the destination address, and the length. The .b extension on the cp command specifies a byte-wise copy.
8. Protect the flash from writing:
DVEVM # protect on 0x2050000 +0x2FBCA3
The protect command makes the flash sector read-only, to ensure that the kernel image and RAM disk file system are not accidentally overwritten.
9. Set the U-Boot Command and Linux Kernel Command Line:
DVEVM # setenv bootargs console=ttyS0,115200n8 ip=dhcp root=/dev/ram0 rw initrd=0x85000000,6M
DVEVM# setenv bootcmd ‘cp.b 0x2119224 0x85000000 0x232a7f; bootm 0x20500000’
这个启动命令是设置使用Flash中的内核镜像,地址是0x2050000.
Linux内核中的参数(bootargs)设置使用RAM disk 作为跟文件系统。The Linux kernel command line arguments are set (bootargs) to use the RAM disk as the root file system.
10. Now, the system is ready to boot, so save the u-boot environment variable:
DVEVM # saveenv
DVEVM # boot
Linux现在就可以从flash上启动,并且根文件系统被挂载到/dev/ram0上。
在16MNOR flash存储器上,u-boot、root file system和压缩的RAM disk如表分布。
方案一:使用ramdisk,烧写到nor flash,文件格式ext2
作者:耿磊
说明:跳线选择12连通其它都不连接。
1. Copy the kernel image in /tftpboot directory:
host $ cp ~workdir/lsp/ti-davinci/arch/arm/boot/uImage /tftpboot
2. Copy the initial RAM disk file system in /tftpboot directory:
host $ cp /mnt/def_cd/ramdisk.gz /tftpboot/
3. Download the Linux kernel via TFTP:
DVEVM # setenv serverip <tftp server ip address>
DVEVM # setenv bootfile uImage
DVEVM # dhcp
BOOTP broadcast 1
*** Unhandled DHCP Option in OFFER/ACK: 44
*** Unhandled DHCP Option in OFFER/ACK: 46
DHCP client bound to address <dvem ip address>
TFTP from server <tftp server ip address>; our IP address is <dvevm ipaddress>
Filename 'uImage'.
Load address: 0x80700000
Loading:
###################################################
###################################################
done
Bytes transferred = 823844 (c9224 hex)
The dhcp command obtains IP settings and then downloads the Linux kernel image (as specified by the serverip and bootfile environment variables). Note the Load address (0x80700000) and Bytes transferred (0xc9224), as these are needed in the following steps.
4. Download the RAM disk file system via TFTP:
DVEVM # tftp 0x85000000 ramdisk.gz
TFTP from server <tftp server ip address>; our IP address is <dvevm ip
address>
Filename 'ramdisk.gz'.
Load address: 0x85000000
Loading:
###################################################
###################################################
done
Bytes transferred = 2304639 (232a7f hex)
The tftp command downloads the ramdisk.gz file at 0x85000000. Note the Load address (0x85000000)and Bytes transferred (0x232a7f), as these are needed in the following steps.
5. Determine the location in flash to store image:
EVM # flinfo
Bank # 1: MY AMD 29LV256M (256 Mbit)
Size: 16 MB in 256 Sectors
Sector Start Addresses:
02000000 02010000 02020000 02030000 02040000 (RO)
02050000 02060000 02070000 02080000 02090000
020A0000 020B0000 020C0000 020D0000 020E0000
0x2FBCA3=232a7f+0xc9224
The U-Boot code and data are stored in the first five sectors,
starting at 0x2000000. Note that the trailing (RO) indicates that the sectors are read-only or protected from erasing and writing. The Linux kernel image should be saved to the 0x20500000 location, the first free sector after U-Boot.
6. Erase the flash:
DVEVM # protect off 0x2050000 +0x2FBCA3
Note: 0x2FBCA3(长度)是内核和RAM Disk大小的和。
DVEVM # erase 0x2050000 +0x2FBCA3
Erasing sector 5 ... done.
Erasing sector 6 ... done.
The protect off command makes the flash writable (not necessary for this example), while the erase command prepares the flash for writing by erasing the old contents. Note the start address (0x2050000) is derived from the output of flinfo and the length (the size of the Linux kernel image plus the RAM disk file system downloaded via the TFTP server).
7. Copy from RAM into flash:
DVEVM # cp.b 0x80700000 0x2050000 0xc9224
Copy to Flash.../done
DVEVM # cp.b 0x85000000 0x2119224 0x232a7f
Copy to Flash.../done
The cp (copy) command is used to copy the Linux kernel image in RAM into the accessible flash memory. The arguments are the source address, the destination address, and the length. The .b extension on the cp command specifies a byte-wise copy.
8. Protect the flash from writing:
DVEVM # protect on 0x2050000 +0x2FBCA3
The protect command makes the flash sector read-only, to ensure that the kernel image and RAM disk file system are not accidentally overwritten.
9. Set the U-Boot Command and Linux Kernel Command Line:
DVEVM # setenv bootargs console=ttyS0,115200n8 ip=dhcp root=/dev/ram0 rw initrd=0x85000000,6M
DVEVM# setenv bootcmd ‘cp.b 0x2119224 0x85000000 0x232a7f; bootm 0x20500000’
这个启动命令是设置使用Flash中的内核镜像,地址是0x2050000.
Linux内核中的参数(bootargs)设置使用RAM disk 作为跟文件系统。The Linux kernel command line arguments are set (bootargs) to use the RAM disk as the root file system.
10. Now, the system is ready to boot, so save the u-boot environment variable:
DVEVM # saveenv
DVEVM # boot
Linux现在就可以从flash上启动,并且根文件系统被挂载到/dev/ram0上。
在16MNOR flash存储器上,u-boot、root file system和压缩的RAM disk如表分布。
相关文章推荐
- 【转载】使用铁哥SmartFlash快速开发方案:66行代码搞定抽奖程序!
- Jlink v8 烧写s3c2440的nor flash(需要使用配置文件)
- 使用铁哥SmartFlash快速开发方案:66行代码搞定抽奖程序!
- [转载红鱼儿]Delphi实现微信开发(3)如何使用multipart/form-data格式上传文件
- [EPANET][翻译]使用EPANET开发包(1):开发库使用流程与导入文件格式介绍
- Porting:telnet远程登录开发板、制作并烧写cramfs和ext4和ramdisk三种格式根文件系统镜像
- Android开发 使用Lame把音频文件转换成mp3格式
- ARM开发各种烧写文件格式说明(ELF、HEX、BIN)
- PHP开发之归档格式phar文件概念与用法详解【创建,使用,解包还原提取】
- Android开发 使用Lame把音频文件转换成mp3格式
- CC2530 IAR配置生成hex烧写文件(可使用Flash programmer直接烧写)
- 解决使用intellij idea开发MAVEN项目在target目录下不存在mapper.xml文件
- Cocos2dx 使用Cocostudio导出文件支持.ttf格式字体
- DirectX11 With Windows SDK--19 模型加载:obj格式的读取及使用二进制文件提升读取效率
- DSP/BIOS使用之初窥门径——滴答时钟及烧写Flash
- ios开发之使用UIWebView打开本地的HTML、txt、PDF、PPT文件、打开远程的共享资源
- VIM+TagList( 使用VIM开发软件项目 - 使用tag文件和taglist插件)
- 不使用Cygwin,在eclipse中快速开发JNI,一键生成C头文件.h,以及一键使用NDK交叉编译
- Qt开发: Pro文件使用说明
- 使用JDBC获取数据库数据,并生成json格式文件(省市区三级联动)