Modifying Barebox variables from Linux

Sascha Hauer s.hauer at pengutronix.de

Mon Feb 2 23:38:41 PST 2015


On Mon, Feb 02, 2015 at 09:20:18PM +0000, Boulais, Marc-Andre wrote:

> Hi,

> I am working on an Phytec Phycore-OMAP4460 platform with a Linux BSP (provided by Phytec) which uses Barebox 2013.1.0 to boot the OMAP4. Our application previously ran in a Linux system where U-Boot was used. We could change U-boot variables from the Linux command line as follows:

>> fw_setenv bootargs 'mem=512M console=ttyS0,115200n8 noinitrd root=/dev/mtdblock4 ro rootfstype=yaffs2'

>> How would I go doing the same with Barebox ? Is bareboxenv-target part of the solution ?

Yes.

On the target do:

bareboxenv -l /tmp/env /dev/mtdblockx

... modify stuff in /tmp/env ...

bareboxenv -s /tmp/env /dev/mtdblockx

Note that with a newer barebox (v2015.01.0) barebox has nonvolatile

variables that are stored in the environment. With that changing

variables is a matter of doing:

echo "mybootargs" > /tmp/env/nv/linux.bootargs.mine

With your older barebox the variables are created in scripts which means

you have to modify scripts from other scripts, or you would have to add

something like "source /env/vars/*" to a barebox startup script.

Sascha

--

Pengutronix e.K. | |

Industrial Linux Solutions | http://www.pengutronix.de/ |

Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |

Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值