完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
扫一扫,分享给好友
本帖最后由 一只耳朵怪 于 2018-6-20 15:02 编辑
1.我們的板子想用使用ramdisk 來當rootfs ( ti Linux SDK 6.0 ) ramdisk 放置於SD卡 boot分區 2.我該如何修改uboot 讓kernel 開機可以自動載入ramdisk?? (不使用setenv 方式) |
|
相关推荐
7个回答
|
|
可以参考以下命令,
fatload mmc 0 $loadaddr uImage fatload mmc 0 $rdaddr ramdisk.gz setenv bootargs console=ttyO0,115200n8 root=/dev/ram0 rw initrd=$rdaddr,64M bootm |
|
|
|
hgjhgd 发表于 2018-6-20 03:26 Dear Blaider 1.請問這些命令是要加再uboot 哪邊?? 2.或是有uenv.txt 可以參考?? 3.我看am335x_evm.h 的CONFIG_EXTRA_ENV_SETTINGS 已經有你列出的命令,請問要如何修改呢?? (我現在都會固定從mmc 抓取rootfs 然後抓不到) #define CONFIG_EXTRA_ENV_SETTINGS "loadaddr=0x80200000 " "kloadaddr=0x80007fc0 " "fdtaddr=0x80F80000 " "fdt_high=0xffffffff " "rdaddr=0x81000000 " "bootfile=uImage " "fdtfile= " "console=ttyO0,115200n8 " "optargs= " "mtdids=" MTDIDS_DEFAULT " " "mtdparts=" MTDPARTS_DEFAULT " " "dfu_alt_info_mmc=" DFU_ALT_INFO_MMC " " "dfu_alt_info_emmc=rawemmc mmc 0 3751936 " "dfu_alt_info_nand=" DFU_ALT_INFO_NAND " " "mmcdev=0 " "mmcroot=/dev/mmcblk0p2 ro " "mmcrootfstype=ext3 rootwait " "nandroot=ubi0:rootfs rw ubi.mtd=7,2048 " "nandrootfstype=ubifs rootwait=1 " "nandsrcaddr=0x280000 " "nandimgsize=0x500000 " "rootpath=/export/rootfs " "nfsopts=nolock " "static_ip=$[ipaddr]:$[serverip]:$[gatewayip]:$[netmask]:$[hostname]" "::off " "ramroot=/dev/ram0 rw ramdisk_size=65536 initrd=$[rdaddr],64M " "ramrootfstype=ext2 " "ip_method=none " "bootargs_defaults=setenv bootargs " "console=$[console] " "$[optargs] " "mmcargs=run bootargs_defaults;" "setenv bootargs $[bootargs] " "root=$[mmcroot] " "rootfstype=$[mmcrootfstype] ip=$[ip_method] " "nandargs=setenv bootargs console=$[console] " "$[optargs] " "root=$[nandroot] " "rootfstype=$[nandrootfstype] " "spiroot=/dev/mtdblock4 rw " "spirootfstype=jffs2 " "spisrcaddr=0xe0000 " "spiimgsize=0x362000 " "spibusno=0 " "spiargs=setenv bootargs console=$[console] " "$[optargs] " "root=$[spiroot] " "rootfstype=$[spirootfstype] " "netargs=setenv bootargs console=$[console] " "$[optargs] " "root=/dev/nfs " "nfsroot=$[serverip]:$[rootpath],$[nfsopts] rw " "ip=dhcp " "bootenv=uEnv.txt " "loadbootenv=fatload mmc $[mmcdev] $[loadaddr] $[bootenv] " "importbootenv=echo Importing environment from mmc ...; " "env import -t $loadaddr $filesize " "ramargs=setenv bootargs console=$[console] " "$[optargs] " "root=$[ramroot] " "rootfstype=$[ramrootfstype] " "loadramdisk=fatload mmc $[mmcdev] $[rdaddr] ramdisk.gz " "loaduimagefat=fatload mmc $[mmcdev] $[kloadaddr] $[bootfile] " "loaduimage=ext2load mmc $[mmcdev]:2 $[kloadaddr] /boot/$[bootfile] " "mmcboot=echo Booting from mmc ...; " "run mmcargs; " "bootm $[kloadaddr] " "nandboot=echo Booting from nand ...; " "run nandargs; " "nand read $[loadaddr] $[nandsrcaddr] $[nandimgsize]; " "bootm $[loadaddr] " "spiboot=echo Booting from spi ...; " "run spiargs; " "sf probe $[spibusno]:0; " "sf read $[loadaddr] $[spisrcaddr] $[spiimgsize]; " "bootm $[loadaddr] " "netboot=echo Booting from network ...; " "setenv autoload no; " "dhcp; " "tftp $[loadaddr] $[bootfile]; " "run netargs; " "bootm $[loadaddr] " "ramboot=echo Booting from ramdisk ...; " "run ramargs; " "bootm $[loadaddr] " "findfdt=" "if test $board_name = A335BONE; then " "setenv fdtfile am335x-bone.dtb; fi; " "if test $board_name = A33515BB; then " "setenv fdtfile am335x-evm.dtb; fi; " "if test $board_name = A335X_SK; then " "setenv fdtfile am335x-evmsk.dtb; fi " |
|
|
|
bootcmd= run loaduimagefat;run loadramdisk;run ramargs;bootm; |
|
|
|
hgjhgd 发表于 2018-6-20 03:48 简单点就是修改一下bootcmd变量,让它自动运行 bootcmd= run loaduimagefat;run loadramdisk;run ramargs;bootm $[kloadaddr]; |
|
|
|
hgjhgd 发表于 2018-6-20 03:57 可以参考我们wiki上的guide: http://processors.wiki.ti.com/index.php/Creating_a_Root_File_System_for_Linux_on_OMAP35x http://processors.wiki.ti.com/index.php/Creating_a_RAMDISK |
|
|
|
344868615qq 发表于 2018-6-20 04:09 Dear Jian ramdisk我早已經建好了 我是問要如何透過uEnv.txt 或是修改uboot 程式 使其可以 自動將SD卡boot 分區內的ramdisk.gz 自動mount 當作root file system |
|
|
|
参考过下面这个guide列出来的步骤和参数吗,可以从NAND或者SD卡启动ramdisk: http://processors.wiki.ti.com/index.php/AM335x_U-Boot_User%27s_Guide#Environment_Settings_for_Ramdisk |
|
|
|
只有小组成员才能发言,加入小组>>
351 浏览 1 评论
546 浏览 2 评论
NA555DR VCC最低电压需要在5V供电,为什么用3.3V供电搭了个单稳态触发器也使用正常?
790 浏览 3 评论
MSP430F249TPMR出现高温存储后失效了的情况,怎么解决?
660 浏览 1 评论
对于多级放大电路板,在PCB布局中,电源摆放的位置应该注意什么?
1140 浏览 1 评论
AT32F407在USART2 DMA发送数据时,接包接到了要发送的数据,程序还是处于等待传输完成的标识判断中,为什么?
87浏览 29评论
320浏览 23评论
请问下tpa3220实际测试引脚功能和官方资料不符,哪位大佬可以帮忙解答下
262浏览 20评论
请教下关于TAS5825PEVM评估模块原理图中不太明白的地方,寻求答疑
210浏览 14评论
两个TMP117传感器一个可以正常读取温度值,一个读取的值一直是0,为什么?
69浏览 13评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-12-29 00:41 , Processed in 1.135025 second(s), Total 90, Slave 74 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号