0
Ugo Riboni

Customizing armbian image without rebuilding everything

Recommended Posts

Hello everyone,

I have been using a pre-built Armbian image on a Nanopi M1 Plus and I have been very happy with it.

However I have several modifications specific to my usage of the board (setup some files in /etc/, create default users, install or remove some packages, etc.) that I would like to add to the image in a repeatable way.

By repeatable I mean that I could add the set of scripts/patches/packages etc. to source control so that other people could them rebuild the same exact image.

 

All of the advice I have found searching the forum points to this process https://docs.armbian.com/Developer-Guide_User-Configurations/

But it does require rebuilding the whole image, including the kernel, which is very cumbersome and totally unnecessary for my use case, as 95% of what is in the stock image is good for me and I don't actually need to compile anything.

 

So what I am doing right now is to loop mount the image, copy or edit the files that I need changed,  then use qemu to chroot into the image and install the packages I need.

 

But it does not feel clean and I wonder if there is a better way using Armbian scripts/tools to accomplish something similar.

Any suggestions ?

Share this post


Link to post
Share on other sites
1 hour ago, Ugo Riboni said:

But it does require rebuilding the whole image, including the kernel, which is very cumbersome and totally unnecessary for my use case, as 95% of what is in the stock image is good for me and I don't actually need to compile anything.

 

1 hour ago, Ugo Riboni said:

is a better way using Armbian scripts/tools to accomplish something similar.


https://docs.armbian.com/Developer-Guide_Build-Options/ Study parameter CLEAN_LEVEL

 

 

Share this post


Link to post
Share on other sites
1 minute ago, Ugo Riboni said:

but doesn't this option require that I build everything at least once


That is correct. We haven't developed an option to make use of pre-built kernel / u-boot packages from Armbian repository. IMO not a critical problem.

Share this post


Link to post
Share on other sites
2 hours ago, Igor said:

That is correct. We haven't developed an option to make use of pre-built kernel / u-boot packages from Armbian repository. IMO not a critical problem.

Fair enough. My main concern was the extra disk space, bandwidth and time needed for the first build, but you are right, it's survivable and not a critical problem.

 

One question I have if I go down this road is: how do I replicate exactly the configuration of one of the pre-built images ?

Is the .conf file used to generate one of the downloadable images available anywhere ?

 

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
0