Re: Cross compiling user applications for armv7
- In reply to: Michał_Kruszewski : "Re: Cross compiling user applications for armv7"
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 24 Sep 2025 15:30:07 UTC
On Tue, Sep 23, 2025 at 3:24 AM Michał Kruszewski <mkru@protonmail.com> wrote: > > make installworld/kernel won’t work without root privileges because it > would create an invalid ‘world’ > > how would a setuid binary work after non-root install lets say passwd(1) > > I have no idea. > However, embedded Linux build tools, for example Buildroot, are able to > prepare valid target root files systems with valid permissions without > requiring root privileges on the host machine. > For FreeBSD, NO_ROOT installs write a manifest files that things like makefs use to get the permissions write in the final images. The metadata for the files on the host do not match what they be in the final image, but the METALOG that's produced in NO_ROOT installs allows makefs to get them right. Linux does similar things, I'm told, but I'm not familiar with all the details. Here's a silly proof of concept script I wrote to generate images for 14.3/15.0 w/o root privs using pkgbase and boot them in qemu. pkgbase as a non-privileged user also does the metalog, and the script adds some extra data to the metalog for the files that are created to get the boot in qemu working. https://people.freebsd.org/~imp/poc-imaging-pkgbase.sh I wrote it to start to bring pkgbase support to nanobsd.sh, which is a work in progress. Warner