dmitgrib Posted July 5 Posted July 5 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? 0 Quote
Werner Posted July 5 Posted July 5 https://docs.armbian.com/Developer-Guide_User-Configurations/#user-provided-image-customization-script 0 Quote
dmitgrib Posted July 5 Author Posted July 5 (edited) 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 July 5 by dmitgrib 0 Quote
Werner Posted July 5 Posted July 5 12 minutes ago, dmitgrib said: but I can't find the development tools to build packages there. What prevents you to use apt inside the customization script to install the necessary tools? 0 Quote
dmitgrib Posted July 5 Author Posted July 5 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? 0 Quote
Solution SteeMan Posted July 5 Solution Posted July 5 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. 0 Quote
Werner Posted July 5 Posted July 5 Maybe. But I don't know how. The easiest is probably sticking with the customization script. Install the tools, build your thing, and then do some cleanup (apt purge, apt clean, apt autoremove ....). 0 Quote
dmitgrib Posted July 6 Author Posted July 6 @Werner, is there a workable scenario, but I realized it's more complicated than I'd like. Thank you! 0 Quote
dmitgrib Posted July 6 Author Posted July 6 @SteeMan, thanks for clearing that up. I will compile separately and make my own repository. 0 Quote
going Posted July 6 Posted July 6 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. 0 Quote
dmitgrib Posted July 7 Author Posted July 7 (edited) On 7/6/2024 at 2:52 PM, going said: SWUpdate package - Here, please, in more detail. What is this package? @going This package https://packages.debian.org/bookworm/swupdate swupdate is a Linux update agent with the goal to provide an efficient and safe way to update an embedded system. Edited July 7 by dmitgrib 0 Quote
going Posted July 8 Posted July 8 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. 0 Quote
Recommended Posts
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.