Skip to content
View in the app

A better way to browse. Learn more.

Armbian Community Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

[Solved] Adding custom applications/packages to build

Featured Replies

In case anyone else needs help with this. These steps create an oven-baked .img complete with all custom goodies on board from the get-go.

 

1. rysnc custom code and any other local dependencies into userpatches/overlay

2. Ensure any library dependencies (libv4l-dev in this case) are met by adding 'PACKAGE_LIST="$PACKAGE_LIST libv4l-dev"' to userpatches/lib.config

3. Step 1 ensures that the target image will have content in /tmp/overlay. In userpatches/customize-image.sh one needs to move said content from the read-only directory to somewhere suitable (/test in my case)

4. Finally have customize-image.sh run the relevant build system and optionally install as usual.

 

In order to automate the process end to end I modified compilation.sh so it called an arbitrary set of scripts in the newly created userpatches/custom

 

install_external_applications()
{
#--------------------------------------------------------------------------------------------------------------------------------
# Install external applications example
#--------------------------------------------------------------------------------------------------------------------------------
	display_alert "Installing extra applications and drivers" "" "info"

	for plugin in $SRC/packages/extras/*.sh; do
		source $plugin
	done
	
	# set up any custom packages for cross-compilation
	for plugin in $SRC/userpatches/custom/*.sh; do
		display_alert "Processing custom $plugin" "" "wrn"
		source $plugin
	done
}

An example being

#!/bin/sh
# example of how to build custom stuff in Armbian environment
#
# This sets up the source code we need to build grab so it will
# be automatically copied to /tmp/overlay. 
# it would be great if we could add to $PACKAGE_LIST here
# as we need the V4L2 development stuff to build grab

rsync -rt ~/src/grab ~/armbian/userpatches/overlay
rsync -rt ~/src/g40 ~/armbian/userpatches/overlay

Finally, some trivial modifications to customize_image.sh

# your code here
# create test folder
mkdir /test
# copy from RO temp
cp -r /tmp/overlay/grab /test
cp -r /tmp/overlay/g40 /test
# clean and build on target
make -C /test/grab clean
make -C /test/grab

The target will end up with a binary in /test/grab in this case.

 

The final build step would probably benefit from the more abstracted, modular, mechanism used to rsync.

 

If anyone has ideas for improvement etc, or wants a PR please let me know. HTH

 

Jerry

2 minutes ago, g40 said:

In order to automate the process end to end I modified compilation.sh so it called an arbitrary set of scripts in the newly created userpatches/custom

This is why we have an (undocumented) hook for userpatches/customize-image-host.sh before calling userpatches/customize-image.sh

https://github.com/armbian/build/blob/master/lib/compilation.sh#L578

  • Author

Ha, ok good to know, thank you. Does undocumented mean likely to be removed?

2 minutes ago, g40 said:

Ha, ok good to know, thank you. Does undocumented mean likely to be removed?

No, there are no reasons to remove this. Even if customize-image.sh and customize-image-host.sh get some rework backwards compatibility will be preserved for as much as possible.

Guest
This topic is now closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.