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.

How to build a package from source inside the armbian build system?

Featured Replies

Hi
I am building armbian image for Nanopi Neo. I need to include SWUpdate package in my armbian build. The already built SWUpdate package does not work for me, because I need to disable CONFIG_SIGNED_IMAGES.

 

As far as I understand, I need to rebuild SWUpdate inside the armbian build system.


Can you please help me to understand where I should write commands to build SWUpdate from source (git repo), so that armbian build system will put the built binary and libraries into the resulting image?

 

Solved by SteeMan

  • Author

Thank you @Werner for your time. But this method does not produce the desired result.
The `customize-image.sh` script is called from an environment with no development tools. I tried running `gcc` and got

Quote

[🐳|🔨]   + gcc --version
[🐳|🔨]   /tmp/customize-image.sh: line 54: gcc: command not found


The link you provided says "You can run additional commands to customize the created image." and it works successfully, but nothing more. That is, I can copy, delete files from the image, I can call `apt-get` to install packages, but I can't find the development tools to build packages there.

I assumed that I could compile and build the SWUpdate package from the environment where the Linux kernel and U-Boot are built. Is this how to do it?

 

Edited by dmitgrib

  • Author

Thank you @Werner!

I realized that I can add everything I need for the build.

But after the build, I have to remove packages and maybe something else to make the target system clean. It seems to me that this is an artificially created job, while in the part where the kernel was just built, all the necessary cross-compilation tools are present.

Can't I build a package in a toolchain environment?

  • Solution
6 minutes ago, dmitgrib said:

Can't I build a package in a toolchain environment?


That isn't how the armbian build system works.  Armbian is basically the u-boot and linux kernel (which are built from sources in the framework) plus an ubuntu/debian userspace.

 

The build process builds the u-boot and kernel packages and then installs them along with the user space packages from ubuntu or debian based on what distribution you are using.  There isn't a reason to build other things as they are just installed from repositories.

 

So what you probably want to do is build your custom .deb in your own environment and then install it through the armbian build.

 

17 часов назад, dmitgrib сказал:

I assumed that I could compile and build the SWUpdate package from the environment where the Linux kernel and U-Boot are built. Is this how to do it?

SWUpdate package - Here, please, in more detail. What is this package?
Maybe I can help.

10 часов назад, dmitgrib сказал:

swupdate is a Linux update agent with the goal to provide an efficient and safe way to update an embedded system.

@dmitgrib As far as I understand from your messages, the package from the debian repository does not work for you.

 

Warning:
Several packages that install and modify files on flash devices, memory devices, and bootloaders do not work correctly in the Armbian OS.

Just because the paths or names of the target files are different.

 

In this package, at least two libraries require additional attention, in addition to attention to the source texts of the package itself:

swupdate (2022.12+dfsg-4+deb12u1)

 swupdate is a Linux update agent with the goal to provide an efficient and safe way to update an embedded system.

 - Install on embedded media (eMMC, SD, Raw NAND, NOR and SPI-NOR flashes)
 - Allow delivery single image for multiple devices
 - Multiple interfaces for getting software
   1. local storage
   2. integrated web server
   3. integrated REST client connector to hawkBit
   4. remote server download
 - Software delivered as images, gzipped tarball, etc
 - Allow custom handlers for installing FPGA/ microcontroller firmware.
 - Power-Off safe

.....
dep: libgpiod2 (>= 1.1)
    C library for interacting with Linux GPIO device - shared libraries
.....
dep: libswupdate0.1 (>= 2021.04)
    Library for controlling the swupdate framework

 

The best way to make a package is to repeat the steps described in the debian documentation #packaging-tutorial

You can do this directly on the device.

sudo nano /etc/apt/sources.list
replace "# deb-src" to "deb-src"

sudo apt update
mkdir packaging
cd packaging
# not sudo:
apt-get source swupdate

sudo apt-get build-dep swupdate

Next, we edit the source texts and assemble them as described in the documentation.

 

 

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

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.