开发者

Should backup U-Boot image use backup environment or original environment?

开发者 https://www.devze.com 2023-02-17 16:31 出处:网络
I\'m working on an embedded firmware project using U-Boot.We are required to have a backup copy of U-Boot in flash at a second location.All the technical stuff about relocating the processor\'s reset

I'm working on an embedded firmware project using U-Boot. We are required to have a backup copy of U-Boot in flash at a second location. All the technical stuff about relocating the processor's reset vector has been worked out.

My question is, should I have the alternate copy of U-Boot use an alternate environment location, or is it safe to use the same environment location开发者_Go百科 as the primary U-Boot copy?

I'm mostly wondering what the chances are that a screwed up environment might keep U-Boot from being accessible to the user.


It all depends on your system.

U-Boot uses a checksum to check that the environment has not been corrupted. If the checksum fails it falls back to compiled in defaults. If these are set to boot your system then you will be safe in this case.

If your environment is altered such that it is still valid, but does not boot your system then you have a problem. One way round this is to configure U-Boot to listen to a serial port and enter interactive mode if a key is pressed in the first few seconds after boot. Then you have a way of altering the environment, either manually or via an expect type script. However, the simplest solution is to use a separate environment for your backup U-Boot, as you suggest.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号