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.

Build custom source code in customize-image.sh

Featured Replies

Hello guys,

is it possible to build custom source code in customize-image.sh ?

Seems like /tmp/overlay is read-only, can I use another location to git clone my source code, make and install in target file system ?

My idea is to build & deploy sources using native gcc compiler.

 

Thanks

19 hours ago, ssuloev said:

Seems like /tmp/overlay is read-only, can I use another location to git clone my source code, make and install in target file system ?

You can use any directory, i.e. you can create a new directory under /tmp and remove it afterwards.

/tmp/overlay is currently mounted as read-only, but I may revert it to rw later if it won't cause any problems.

  • Author

Hello again,

I tried like you said but it didn't work.

My custom directory that I created in userpatches is not visible in /tmp during build, there are only customize-image and overlay folder visible.

I can use customize-image-host.sh to mount my own dir without readonly bu there is no way to unmount it without changing compilation.sh. Not sure if is critical to unmount it.

Any suggestions ?

Thanks

1 hour ago, ssuloev said:

My custom directory that I created in userpatches is not visible in /tmp during build, there are only customize-image and overlay folder visible.

I meant that contents of userpatches/overlay will be visible in /tmp/overay inside, there are no other (easy) ways to transfer files between the host and chroot environment. You can create a temp directory from customize-image.sh to use for cross-compilation or building if you need to.

 

1 hour ago, ssuloev said:

Any suggestions ?

What do you want to do exactly? Transfer files from chroot to host?

  • Author

I want to build QT5 in chroot and then install it to /usr/local. 

Ok, so I can create a folder like /tmp/build, git clone there, build and install, right ?  All this can be done from customize-image.sh ?

 

14 minutes ago, ssuloev said:

Ok, so I can create a folder like /tmp/build, git clone there, build and install, right ?  All this can be done from customize-image.sh ?

Yes, assuming there is enough RAM to do this (since temporary rootfs lives in tmpfs by default), if you encounter "out of space" errors you may need to use FORCE_USE_RAMDISK=no parameter.

  • Author

I tried to compile QT5 from customize-image.sh using target gcc but it is way too slow than normal cross-compile using linaro toolchain... 

And so I am going to stick with linaro cross-compile.

Can you give me an advice about the following scenario.

I want to cross-compile QT5 from customize-image-host.sh script, i.e. git clone and make (with linaro toolchain) in userpatches directory, then copy binaries to userpatches/overlay and install to target fs from customize-image.sh script.

So far so good but I in order to build QT5 I need a device SYSROOT (/usr/lib, /usr/include, etc) which is not prepared yet when customize-image-host.sh is executed. 

SYSROOT is prepared with customize-image.sh and it does not contain all required libs & headers when customize-image-host.sh is executed.

 

 

 

17 hours ago, ssuloev said:

So far so good but I in order to build QT5 I need a device SYSROOT (/usr/lib, /usr/include, etc) which is not prepared yet when customize-image-host.sh is executed. 

customize-image-host.sh is called almost right before the customize-image.sh. If you are using customize-image-host.sh you may as well do everything in it, use $SDCARD variable to get a path to the rootfs and use chroot $SDCARD to execute anything in chroot

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.