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] Copying files to build target

Featured Replies

Documentation is a little thin here. Does anyone have a working example of how to get a file (or files) properly copied into the destination image? Specifically I'm trying to get a binary copied into /sbin on the target.

 

TAIA

 

Quote

To add files to image easily, put them in userpatches/overlay and access them in /tmp/overlay from customize-image.sh

 

  • Author

So,  after some digging around I discovered the following:

 

1. Any files placed in userpatches/overlay automatically get copied by the build process into /tmp/overlay

2. Shortly before the image is finalized, customize-image.sh is run. This is run at the root of the file system '/' as shown by calling `pwd` and `ls -als` from the script itself (see snippet below)

3. So the answer to the copy question is pretty simple. Simply add a line calling `cp /tmp/overlay/myfile` to the destination folder of your choice. Place this where it suits and optionally test the parameters passed to the script for build type/board name etc.

 

Hope this helps someone else. Will add to my upcoming documentation PR.

[ o.k. ] Calling image customization script [ customize-image.sh ]
Inside Main()
pwd
/
ls -als
0 drwxr-xr-x  21 root root  420 Aug 24 12:52 .
0 drwxr-xr-x  21 root root  420 Aug 24 12:52 ..
0 drwxr-xr-x   2 root root 3120 Aug 23 13:38 bin
0 drwxr-xr-x   4 root root  340 Aug 24 12:54 boot
0 drwxr-xr-x  19 root root 4240 Aug 22 19:27 dev
0 drwxr-xr-x  91 root root 3520 Aug 24 12:55 etc
0 drwxr-xr-x   2 root root   40 Jul 17 04:02 home
0 drwxr-xr-x  19 root root  640 Aug 24 12:54 lib
0 drwxr-xr-x   2 root root   40 Aug 23 13:33 media
0 drwxr-xr-x   2 root root   40 Aug 23 13:33 mnt
0 drwxr-xr-x   2 root root   40 Aug 23 13:33 opt
0 dr-xr-xr-x 299 root root    0 Aug 13 17:18 proc
0 drwx------   2 root root  100 Aug 24 12:52 root
0 drwxr-xr-x   2 root root   60 Aug 24 12:52 run
0 drwxr-xr-x   2 root root 3600 Aug 23 13:38 sbin
0 drwxrwxr-x   2 root root   40 Aug 24 12:52 selinux
0 drwxr-xr-x   2 root root   40 Aug 23 13:33 srv
0 dr-xr-xr-x  13 root root    0 Aug 24 12:36 sys
0 drwxrwxrwt   3 root root   80 Aug 24 12:55 tmp
0 drwxr-xr-x  10 root root  200 Aug 23 13:33 usr
0 drwxr-xr-x  11 root root  260 Aug 23 13:33 var

 

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.