Jump to content

[WIP][TEST] Image customization


BennySt

Recommended Posts

Hi there,

 

while the customize-image.sh got some attention lately because of OMV integration, I've started a try to enhance the customization process.

At the moment any changes to the script are valid for the whole buildenv. That might be good when building just one image but all over I think thats not a good situation, especially for automated building or with more then one customization.

 

I startet to define a $CUSTOM Buildvar and redefined the script locations, starting with the following changes:

- delete customize-image.sh an overlay dir

- placed it under config/customizations with following layout

   *-chroot.sh, *-host.sh, *-overlay dir

- changed the buildenv script to show a new dialog when $CUSTOM is not set or set to 'none'

- append $CUSTOM to .img name

 

At the moment I do some testings but it should work already.

Want to share this for some feedback, thoughts and opinions

The code is her: https://github.com/Diggen85/build/tree/customize-image

 

 

Link to comment
Share on other sites

I second Zador's opinion. Backwards compatibility is mandatory. But a few more variables need to be exported to the script (since it's not 'costly' I would suggest exporting as much as possible). ATM I run a rather stupid kernel detection method for example.

Link to comment
Share on other sites

My changes are not gone break much. existing scripts will work in the same favour as before, just renamed/changed location.

In my opinion it is just flexible if you have not more than one customization, like atm OMV. When adding in the future e.g own/nextcloud it will become unflexible

But I understand your concerns.

Putting all logic to customize-image.sh may be also a way. This would mean no dialog options but flexibility while retain full backward compatibility.

 

Adding extra variables to customize-image.sh should be no big problem. Will have a look a it.

 

 

Link to comment
Share on other sites

I know is WIP & POC. I was the one who posted the initial customized-image.sh and tkaiser improved it a lot and take a lot of effort on this.

If you are in favor to separate it, tell me more about it and I will help you, if you want.

Link to comment
Share on other sites

My 2 cents: The OMV addition is really just a POC and we should use it to discuss use cases like this (since looking around it feels really weird that the wheel gets re-invented every few hours again, so many projects could easily use Armbian's build system as a stable base).

 

The OMV installation routine should be removed from the customize-image.sh template and we should try to make such 'add-ons' ready for build-all.sh (eg. define CUSTOMIZE=OMV prior to calling build-all.sh)

 

Based on my experiences this is the wrong approach anyway since we optimized Armbian's build system that much that after the first run the base image is built within 5 minutes and the lousy OMV installation routine takes another 20 minutes **for every build** but that's part of the journey.

 

We discussed optimizing build-all process a year ago and maybe that's something to look into again if some more of these 'add-ons' should be supported (since it's plain stupid to build let's say 10 sun7i OS images that way which will take 250 minutes in total instead of building one generic sun7i image in 5 minutes, adding OMV in 20 minutes and creating all the individual OS images in 3 seconds later -- that's the btrfs magic we were talking about one year ago)

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines