Create a FLASH partition to store user's HOME

From ArmadeusWiki
Revision as of 21:38, 23 October 2009 by JulienB (Talk | contribs) (New page: If you ever did some hacking/devt on your APF board and used ''/root/'' to download or install your experiments, I'm sure you got frustrated when it come the time where you had to reflash ...)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

If you ever did some hacking/devt on your APF board and used /root/ to download or install your experiments, I'm sure you got frustrated when it come the time where you had to reflash the whole rootfs. Indeed, by default, /root/ is located in the same partition as the rootfs image and so everything you did will be overwritten. Well you can always backup your data on a SD/microSD or through NFS before doing the rootfs flashing but I think, like me, you are little bit lazy.

So in this small tutorial I will explain you how to setup the FLASH to store your personnal data on a separated partition and so avoid the backup process when updating your rootfs.

Declare partition in U-Boot

apf27

  • Check your NAND FLASH size:
BIOS> nand info

Device 0: NAND 256MiB 1,8V 16-bit, sector size 128 KiB
  • So here I have 256MBytes. Then check current partitionning:
BIOS> printenv mtdparts
mtdparts=mtdparts=mxc_nand.0:640k(U-boot)ro,384k(U-boot_env),512k(firmware),5M(kernel),-(rootfs)
  • I have the default APF27 partitionning scheme. Now I will reduce rootfs size to 200 MBytes and so have the remaining (50 MBytes) for my "user" partition:
BIOS> setenv mtdparts mtdparts=mxc_nand.0:640k(U-boot)ro,384k(U-boot_env),512k(firmware),5M(kernel),200M(rootfs),-(user)

apf9328

TBDL