Jump to content

Customizing armbian image without rebuilding everything


Ugo Riboni
 Share

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 ?

Link to comment
Share on other sites

Help Armbian team helping you

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

 

 

Link to comment
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.

Link to comment
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 ?

 

Link to comment
Share on other sites

18 minutes ago, Ugo Riboni said:

how do I replicate exactly the configuration of one of the pre-built images ?


That feature is not implemented but was considered. If you need commit ID - implementation is missing from here on: 

https://github.com/armbian/build/blob/master/lib/general.sh#L192

 

For our usage - pointing toward commit ID at source or freezing packages versions is not needed:

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share

×
×
  • Create New...