conan-io / conan

Conan - The open-source C and C++ package manager
https://conan.io
MIT License
8.17k stars 974 forks source link

[question] Updating a Buildroot Image into SD card #9831

Open luiscarlos63 opened 2 years ago

luiscarlos63 commented 2 years ago

Hello, I saw your guide called "Creating small Linux images with Buildroot" (very helpful).

My questing is basically, what if I modify the image and want to update it to he SD card? Is it possible to do it without formatting the card or losing all the files than I passed to the system, for example cross-compiled files that were supposed to run on that machine.

thank you!! Luís

uilianries commented 2 years ago

Saudações @luiscarlos63!

You can't update an image without formatting the SD card, because it will take a compressed file and unzip it to your entire SD card. Thus, you have to format before updating.

However, there are some options besides formatting your SD card. First and easier is copying only what your need. After building the image, all generated binaries are located on the build folder, so you can use scp command to copy your new binaries.

Another option is creating a separated partition where you put your changes there, so you could format and update only that partition. That's a more elaborated scenario, but very real for embedded market, where you can not update an entire image every time due its size or connection limitation or even due embedded database.

I would suggest you using the first approach first, copy what you need. You won't be able to track changes in your embedded device, but at least you can do quick changes when prototyping.

Regards!

jwillikers commented 2 years ago

@luiscarlos63 You might be interested in libostree.