Jump to content

customize-image.sh for orangepizero minimal network-install image


lrrr

Recommended Posts

For anyone who wants a minimal "network-install" like image for orangepizero. Does this with the customize-image.sh and armbian build scripts.  Could be cleaner but would be much easier to just hack the build scripts.

 

I've tested with jessie and stretch, and with branches default, next, and dev. The image should boot up, get eth0 dhcp address, and have serial console on ttyS0.  Script option to remove systemd and use sysvinit.  Might be modded to work with other boards?

 

Set the following options and use the customize-image.sh.  If script breaks due to upstream changes, use last tested commit:  git checkout -f a66121

 

# required options for ./config-default.conf to prevent external packages
EXTERNAL="no"
EXTERNAL_NEW="no"
KERNEL_ONLY="no"
BOARD="orangepizero"


# required options for ./userpatches/lib.config to set minimal package install
PACKAGE_LIST="linux-base u-boot-tools initramfs-tools"
PACKAGE_LIST_RELEASE=""
PACKAGE_LIST_ADDITIONAL=""


# to build stretch, set in ./userpatches/sources/sun8i.conf
CAN_BUILD_STRETCH=yes


# ./userpatches/customize-image.sh
WITHOUT_SYSTEMD=yes # yes for sysvinit, no for systemd.
SERIAL_CONSOLE=yes  # enable serial console with sysvinit

 

Attached:

customize-image.sh

Edited by lrrr
Move code from codeblock to attached file
Link to comment
Share on other sites

Here is a slightly cleaner approach.  Download lib.config, lib.sh, customize-image.sh to userpatches.  Most options are already set in lib.config.  The resulting image is close to a basic chroot install with the minimal armbian packages needed for booting.

 

Options: REMOVE_SYSTEMD in customize-image.sh to use systemd or not.  PACKAGE_LIST* in lib.config will determine which armbian based configs are added to the image.

 

There are a few optimizations, that might be of interest, which are not included.  Some are located in the SDK under packages/bsp/common/usr/lib/armbian/*.  There is an example of one optimization in the customize-image.sh.

 

Only tested debian, with Orange Pi Zero and R1 boards.  Last git commit used: be0778b.

customize-image.sh

lib.config

lib.sh

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