For image 20130513, how to backup NAND to SD, and make SD bootable?

                                           

转载自pcduino官网pcduino.com

features:

One  of the most useful feature is that it allows us to backup the contents (program and data) in NAND  to a SD card when the flash is full, and make the SD bootable. So we can easily move to a bigger SD card and continue our work.

The key function we are going to use is:

  • make_mmc_boot “Clone system from nand to mmc card”
    • This function will copy the entire  content in NAND to a SD card. This is equivalent to flash a mmc-boot image. The benefit is that users still keep their own program/data. When the space of NAND is not enough,we can use the SD card to replace the system in NAND.

In the original image 20130513, the above mentioned function is not there in board-config.  We need to do an update in board-config to make it available.
There are two ways to run board-config. One is to run that after reset. The other is to run it in terminal.
In the following, we are going to use the second approach. We type:

  
  
  1. $sudo board-config.sh

step1

Next, we are going to choose ‘Update’:

step2

Then we choose ‘config’:
step3

After that, pcDuino will check for update:

step4

Press ‘Y’, and after the update is down, exit and re-run:

  
  
  1. $sudo board-config.sh

step5

The option “make_mmc_boot” will display in the menu:
step6

Plug in a SD card (16GB)  to the SD slot, and press “ENTER”:

step7

It takes some time to backup:
step8

After a long wait, we will get the following message:

step9

We reboot pcDuino, and check the storage space using

  
  
  1. $df -h

“:step10

In the above figure, we can see that although the SD card is of capacity 16GB, it only shows up as 2GB.

We are going to use a script to expand the file system to the whole SD card

$wget https://s3.amazonaws.com/pcduino/SampleCode/System/expandFS/expand_sdcard_rootfs.s

$sudo bash ./expand_sdcard_rootfs.sh

step11

After the expansion, we reboot pcDuino by:

  
  
  1. $sudo reboot

After reboot, we run:

  
  
  1. $ sudo resize2fs /dev/mmcblk0p2

step12

step13

Check the storage space again using

  
  
  1. $df -h

step14
We can see that we get a full access to the SD card.

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值