1

Few months back I have installed embedded Linux on an i.MX6 board using Mfgtools with image generated by buildroot.

I have made changes on the root file system and generated a new root file system. I don't want to reflash the existing setup, instead want to only copy the newly created files after making the configuration changes.

What is the best way to complete this task. I know I can compare the two root file system file by file and then manually copy one by one. Is there any other mechanism

md.jamal
  • 4,067
  • 8
  • 45
  • 108
  • Can you clarify how you "flashed" your root filesystem? If you flashed a rootfs archive to NAND or something and load the FS into RAM on boot, you can't have your changes persist without reflashing the image. If you need persistent changes, consider using a flash filesystem like UBIFS: https://elinux.org/UBIFS. Alternatively, you could network mount a folder or use something like an SD card. – John Moon Feb 27 '18 at 05:01
  • I am using eMMC. So I can manually copy the updated files. I need a better way to avoid this and also avoiding reflashing system – md.jamal Feb 27 '18 at 05:05
  • if your changes not related to the `kernel modules` and `binaries`, you can create `patch` and apply on your target. so that with one patch you can update all files. Like `Delta Patching` – ntshetty Feb 27 '18 at 06:52
  • what do you mean by binaries in the above comment. Do you mean utilities like ls, top – md.jamal Feb 27 '18 at 07:08

1 Answers1

0

Sounds like a job for rsync. You could run something like:

rsync -av --update dev_machine@192.168.X.X:/home/user/buildroot/output/images/unpacked_rootfs/ ./

I'm not exactly sure what files you're trying to update, but rsync is good at changing only files that need to be updated.

That said, Buildroot is not really designed for partial upgrades like this. The tool is designed to output a monolithic "firmware" image that gets regenerated and reflashed when changes need to be made. If you need a more flexible system which allows for individual package management, consider using Yocto.

John Moon
  • 924
  • 6
  • 10