0

I have built an embedded linux using buildroot. after generating rootfs.tar file system, I have tested the embedded linux and figured out that every change I made to the linux is not taking place after reboot.

my question is: how to enable buildroot linux to have a persistence file system and can save changes?

I have generated: rootfs.tar , rootfs.cpio , bzImage of kernel.

any help appreciated.

  • Sounds like you have specified and built an **initramfs** instead of an ordinary rootfs for installation in Flash. Check you configuration. Did you write the **rootfs.tar** anywhere to the target after the build? – sawdust Sep 15 '14 at 20:12
  • in "file system image" i have specified the following: cpio the root filesystem (for use as an initial RAM filesystem) , iso image , tar the root filesystem. – Amir Avarzamani Sep 15 '14 at 20:24
  • Unselect the cpio item. You should also do a `make clean`, and then a `make` which will cause a complete rebuild of everything. – sawdust Sep 15 '14 at 20:43
  • do i need to check the "ext2/3/4 root filesystem" ? – Amir Avarzamani Sep 15 '14 at 20:55
  • Depends. Where are you going to write this rootfs? You can specify and build any number of filesystems. It's just that if you have an **initramfs**, then that will prevent the kernel from mounting any rootfs specified in the kernel command line.. – sawdust Sep 15 '14 at 21:06
  • I have plan to write on CF. can you please guide me to achieve this purpose? – Amir Avarzamani Sep 15 '14 at 21:13
  • You can use ext[234] filesystems on Compact Flash and SD cards. These is debate as to whether journaling (e.g. ext4) or not (i.e. ext2) will improve filesystem integrity at the expense of more erase cycles. – sawdust Sep 15 '14 at 21:36
  • thanks for your comments.now I have created rootfs.ext2 , rootfs.ext4 , rootfs.tar as you said, how to go ahead to make embedded linux? do i need to have separate partitions on CF? any guide? – Amir Avarzamani Sep 15 '14 at 21:58
  • You have not provided any details to allow an answer. The various SoCs have different booting schemes. I've worked on Etrax that has ROM that boots the kernel directly, whereas Atmel SAM9 has a ROMboot, a bootstrap, then U-Boot and finally the kernel. Marvell, Freescale and Allwinner all use ARM cores yet have their own boot schemes. – sawdust Sep 15 '14 at 22:27
  • Dear sawdust, I am working on x86_64 arch and I think bootloader could be grub to be installed. if you need more info I can provide. – Amir Avarzamani Sep 16 '14 at 04:07
  • -1: This isn't a Buildroot question. There isn't enough information about the target board or configuration or boot method to provide an answer. – Jonathan Ben-Avraham Sep 16 '14 at 12:03
  • so what is it? if you understand, I have specified the board: is a very simple x86 architecture. configuration: is exactly what i need to know!!!! in order to make the file system persistence. method???? – Amir Avarzamani Sep 16 '14 at 12:20

1 Answers1

1

In embedded system, one don't normally update the rootfs.tar.gz (sometime that built with kernel together).

You can mount a data partition to a MTD, EMMC, SD, USB, etc and update the data there.

tony-p-lee
  • 797
  • 1
  • 7
  • 13