How can I build a single package without building the entire image

If file is extent after the first make invocation...none.

It would help a lot if you could elaborate a little bit more the right sequence of instructions. Thanks

There is no sequence of instructions, if the the file is built, what more do you want.

The logic behind this is to modify it, build a new version of the package and upload it to the device for testing. Being able to compile a package for fast design&test cycles should be a basic function of the OpenWrt kitchen.

And on top of that, the problem is that the package can't be built alone, it only works when doing a full make world.

1 Like

You just did what you said cannot be done, namely built a single package.

If you are thinking there is some magical make install that sends it to, and loads it on a running device, no. If a non kmod package, you can probably just scp and update. I just build and flash an image, ain't no big, six of one...

Make package/libs/zlip/install process installs the headers so other packages depending on it could be compiled. And the ipk package is not generated in the output folder unless you do a make <path_to_package>/install

I am not asking for a magical process, I just want to know a way to create a single ipk from its sources without requiring to compile the whole make world.

1 Like

Perhaps we are at cross purposes here, but that is exactly my understanding as to what {clean,complle} accomplishes.

Well, {clean,compile} doesn't generate an ipk file and doesn't install the headers, and that is the purpose of all this. For instance, if the zlib.so.1 is not in the right place then nano-plus package won't be able generated, returning a missing library failure.
Testing nano-plus requires to successfully install zlib and ncurses. This is why being able to "install" (not in the device, but in the development platform) packages is basic. However, I suspect there is a problem with the makefiles and the mk files under the include folder that is failing.

I must be misunderstanding something:

ls -las bin/targets/mvebu/cortexa9/packages/zlib_1.2.11-3_arm_cortex-a9_vfpv3.ipk45 -rw-r--r-- 1 x x 45398 Mar 15 16:34 bin/targets/mvebu/cortexa9/packages/zlib_1.2.11-3_arm_cortex-a9_vfpv3.ipk
make package/libs/zlib/{clean,compile}
ls -las bin/targets/mvebu/cortexa9/packages/zlib_1.2.11-3_arm_cortex-a9_vfpv3.ipk45 -rw-r--r-- 1 x x 45398 Mar 15 16:50 bin/targets/mvebu/cortexa9/packages/zlib_1.2.11-3_arm_cortex-a9_vfpv3.ipk

also I am pretty sure the clean on a package honours the dependency hierarchy on wiping and extracting requisite bits.

Here's a wacky thought, possibly way off-topic.

The Attended Sysupgrade Server at https://asu.aparcar.org/ has a facility for building a custom image. Enter your router model in the text field.

The click "Customize" and enter the names of the packages that you want to include.

Click "Request Build" - it'll build the image for you. No horsing around with build environments on your local computer. Does this work?

I don't have that ipk generated with a make package/libs/zlib/compile. I get it after doing a make world, and that is what I want to avoid.
How did you get there? did you do a make world previously?
If your "kitchen" cooks ipk packages with a simple make <path_to_package>/compile then what is the missing step of those described in the opening post post?

By the way, after completing the make toolchain/install the content of my bin/target/*/*/packages folder is:

  4 drwxr-xr-x 2 oki oki   4096 Mar 15 16:11 ./
  4 drwxr-xr-x 3 oki oki   4096 Mar 15 15:25 ../
256 -rw-r--r-- 1 oki oki 258447 Mar 15 16:11 libc_1.2.2-3_arm_cortex-a15_neon-vfpv4.ipk
 24 -rw-r--r-- 1 oki oki  21552 Mar 15 16:11 libgcc1_11.2.0-3_arm_cortex-a15_neon-vfpv4.ipk
  4 -rw-r--r-- 1 oki oki    909 Mar 15 16:11 libpthread_1.2.2-3_arm_cortex-a15_neon-vfpv4.ipk

Only those basic files.

The reason for compiling single packets is just for testing mods to current packages. the auc command and the attended sysupgrade is good to maintain devices up to date automatically, and that is a good initiative that I hope could one day mature to provide seamless updates.
But I am afraid that it is not a solution to the need of quick improve IPKs using the openwrt repo.

Interesting question, never tried that as I just have a tree in place, but I did this:

rm -rf bin tmp build_dir
make defconfig && make oldconfig
make package/libs/zlib/{clean,compile}

and it successfully built the specified package and a few other dependants (6), and nothing else. This of course left my existing toolchain in place. So, not sure where the difference in behaviour lies.

1 Like

Did you turn it on in make menuconfig, or are you still trying to hand-edit your .config?

If you absolutely insist on single-package building, at least build out the image first to create ALL the deps, then make your changes, then make package/libs/zlib/{clean,compile}. zlib installs headers to the device outside of just compiling. You will mostly likely find that the kernel-magic for the libs will not install because the kernel is different than whatever is on your device currently.

define Build/InstallDev
        mkdir -p $(1)/usr/include
        $(CP)   $(PKG_INSTALL_DIR)/usr/include/z{conf,lib}.h \
                $(1)/usr/include/
        mkdir -p $(1)/usr/lib
        $(CP)   $(PKG_INSTALL_DIR)/usr/lib/libz.{a,so*} \
                $(1)/usr/lib/
        mkdir -p $(1)/usr/lib/pkgconfig
        $(CP)   $(PKG_INSTALL_DIR)/usr/share/pkgconfig/zlib.pc \
                $(1)/usr/lib/pkgconfig/
endef

# libz.so is needed for openssl (zlib-dynamic)
define Package/zlib/install
        $(INSTALL_DIR) $(1)/usr/lib
        $(CP) $(PKG_INSTALL_DIR)/usr/lib/libz.so $(1)/usr/lib/
        $(CP) $(PKG_INSTALL_DIR)/usr/lib/libz.so.* $(1)/usr/lib/
endef

define Package/zlib-dev/install
        $(INSTALL_DIR) $(1)/usr/include
        $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/include/zconf.h \
          $(1)/usr/include/
        $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/include/zlib.h \
          $(1)/usr/include/
        $(INSTALL_DIR) $(1)/usr/lib
        $(CP) $(PKG_INSTALL_DIR)/usr/lib/libz.a $(1)/usr/lib/
        $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
        $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/pkgconfig/zlib.pc \
          $(1)/usr/lib/pkgconfig/
endef

Edit: OpenWrt's build system is designed to be monolithic. It is all interconnected in such a way that you need sweep up all the deps, as we discussed in the other post.

The issue seems to be that you've actually built out the pre-reqs, and they keep wanting to piece-meal the build. In the time they've spent "debugging" this issue, they could have built the entire system, from scratch, on a i3 3rd gen about 10 times over.

make dirclean && ./scripts/feeds update -a -f && ./scripts/feeds install -a -f && make download && make defconfig && make menuconfig

Go into Utilities, Editors, select your nano-plus package.. Set your Device target. Save and Exit.

Then just run make - Not make world, not make -C xxxx.. Just make (or make -jX if youa re multi-threading.. Be aware that when reporting errors, you'll want to use make -j1 V=sc to easily see the error)

Once it is done.. THEN you edit your nano-plus or zlib package.. THEN you can make package/feeds/packages/nano/{clean,compile} (which will ALSO rebuild zlib because you changed it)..

And... You're done..

1 Like

:tada: This worked pretty well. Now compile generates the ipk. I will work on the idea a little bit more, maybe there is no need to generate the whole tree in advance.

If your problem is solved, please consider marking this topic as [Solved]. See How to mark a topic as [Solved] for a short how-to.

Well, not really. I am having a problem compiling iproute2. It was giving me problems when I was using a low number of make threads. The process however doesn't seem to be working for this package.

When I prepare the OpenWrt package kitchen according to @anomeome advice here, and I try to compile iproute2 package with:

make package/network/utils/iproute2/clean
make V=sc package/network/utils/iproute2/compile

I get this output:

make[2]: Entering directory '/build/openwrt/scripts/config'
make[2]: 'conf' is up to date.
make[2]: Leaving directory '/build/openwrt/scripts/config'
time: target/linux/prereq#0.11#0.01#0.11
make[1]: Entering directory '/build/openwrt'
make[2]: Entering directory '/build/openwrt/package/libs/toolchain'
touch /build/openwrt/build_dir/target-aarch64_cortex-a53_musl/toolchain/.prepared_460486047fa77a68464b12034d1cfc84_6664517399ebbbc92a37c5bb081b5c53_check
mkdir -p /build/openwrt/build_dir/target-aarch64_cortex-a53_musl/toolchain
touch /build/openwrt/build_dir/target-aarch64_cortex-a53_musl/toolchain/.prepared_460486047fa77a68464b12034d1cfc84_6664517399ebbbc92a37c5bb081b5c53
rm -f /build/openwrt/build_dir/target-aarch64_cortex-a53_musl/toolchain/.configured_*
rm -f /build/openwrt/staging_dir/target-aarch64_cortex-a53_musl/stamp/.toolchain_installed
(cd /build/openwrt/build_dir/target-aarch64_cortex-a53_musl/toolchain/./; if [ -x ./configure ]; then find /build/openwrt/build_dir/target-aarch64_cortex-a53_musl/toolchain/ -name config.guess | xargs -r chmod u+w; find /build/openwrt/build_dir/target-aarch64_cortex-a53_musl/toolchain/ -name config.guess | xargs -r -n1 cp --remove-destination /build/openwrt/scripts/config.guess; find /build/openwrt/build_dir/target-aarch64_cortex-a53_musl/toolchain/ -name config.sub | xargs -r chmod u+w; find /build/openwrt/build_dir/target-aarch64_cortex-a53_musl/toolchain/ -name config.sub | xargs -r -n1 cp --remove-destination /build/openwrt/scripts/config.sub; AR="aarch64-openwrt-linux-musl-gcc-ar" AS="aarch64-openwrt-linux-musl-gcc -c -Os -pipe -mcpu=cortex-a53 -g3 -fno-caller-saves -fno-plt -fhonour-copts -Wno-error=unused-but-set-variable -Wno-error=unused-result -fmacro-prefix-map=/build/openwrt/build_dir/target-aarch64_cortex-a53_musl/toolchain=toolchain -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro" LD=aarch64-openwrt-linux-musl-ld NM="aarch64-openwrt-linux-musl-gcc-nm" CC="aarch64-openwrt-linux-musl-gcc" GCC="aarch64-openwrt-linux-musl-gcc" CXX="aarch64-openwrt-linux-musl-g++" RANLIB="aarch64-openwrt-linux-musl-gcc-ranlib" STRIP=aarch64-openwrt-linux-musl-strip OBJCOPY=aarch64-openwrt-linux-musl-objcopy OBJDUMP=aarch64-openwrt-linux-musl-objdump SIZE=aarch64-openwrt-linux-musl-size CFLAGS="-Os -pipe -mcpu=cortex-a53 -g3 -fno-caller-saves -fno-plt -fhonour-copts -Wno-error=unused-but-set-variable -Wno-error=unused-result -fmacro-prefix-map=/build/openwrt/build_dir/target-aarch64_cortex-a53_musl/toolchain=toolchain -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro " CXXFLAGS="-Os -pipe -mcpu=cortex-a53 -g3 -fno-caller-saves -fno-plt -fhonour-copts -Wno-error=unused-but-set-variable -Wno-error=unused-result -fmacro-prefix-map=/build/openwrt/build_dir/target-aarch64_cortex-a53_musl/toolchain=toolchain -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro " CPPFLAGS="-I/build/openwrt/staging_dir/toolchain-aarch64_cortex-a53_gcc-11.2.0_musl/usr/include -I/build/openwrt/staging_dir/toolchain-aarch64_cortex-a53_gcc-11.2.0_musl/include/fortify -I/build/openwrt/staging_dir/toolchain-aarch64_cortex-a53_gcc-11.2.0_musl/include " LDFLAGS="-L/build/openwrt/staging_dir/toolchain-aarch64_cortex-a53_gcc-11.2.0_musl/usr/lib -L/build/openwrt/staging_dir/toolchain-aarch64_cortex-a53_gcc-11.2.0_musl/lib -znow -zrelro "   ./configure --target=aarch64-openwrt-linux --host=aarch64-openwrt-linux --build=x86_64-pc-linux-gnu --program-prefix="" --program-suffix="" --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --libexecdir=/usr/lib --sysconfdir=/etc --datadir=/usr/share --localstatedir=/var --mandir=/usr/man --infodir=/usr/info --disable-nls  ; fi; )
touch /build/openwrt/build_dir/target-aarch64_cortex-a53_musl/toolchain/.configured_68b329da9893e34099c7d8ad5cb9c940
rm -f /build/openwrt/build_dir/target-aarch64_cortex-a53_musl/toolchain/.built
touch /build/openwrt/build_dir/target-aarch64_cortex-a53_musl/toolchain/.built_check
cp -fpR /build/openwrt/staging_dir/toolchain-aarch64_cortex-a53_gcc-11.2.0_musl/lib/libgcc_s.so.1 /build/openwrt/build_dir/target-aarch64_cortex-a53_musl/toolchain/
touch /build/openwrt/build_dir/target-aarch64_cortex-a53_musl/toolchain/.built
rm -rf /build/openwrt/build_dir/target-aarch64_cortex-a53_musl/toolchain/.pkgdir/libc.installed /build/openwrt/build_dir/target-aarch64_cortex-a53_musl/toolchain/.pkgdir/libc
mkdir -p /build/openwrt/build_dir/target-aarch64_cortex-a53_musl/toolchain/.pkgdir/libc
install -d -m0755 /build/openwrt/build_dir/target-aarch64_cortex-a53_musl/toolchain/.pkgdir/libc/lib /build/openwrt/build_dir/target-aarch64_cortex-a53_musl/toolchain/.pkgdir/libc/usr/bin
cp -fpR /build/openwrt/staging_dir/toolchain-aarch64_cortex-a53_gcc-11.2.0_musl/lib/ld-musl-*.so* /build/openwrt/build_dir/target-aarch64_cortex-a53_musl/toolchain/.pkgdir/libc/lib/
cp -fpR /build/openwrt/staging_dir/toolchain-aarch64_cortex-a53_gcc-11.2.0_musl/lib/libc.so* /build/openwrt/build_dir/target-aarch64_cortex-a53_musl/toolchain/.pkgdir/libc/lib/
ln -sf ../../lib/libc.so /build/openwrt/build_dir/target-aarch64_cortex-a53_musl/toolchain/.pkgdir/libc/usr/bin/ldd
cp -fpR /build/openwrt/staging_dir/toolchain-aarch64_cortex-a53_gcc-11.2.0_musl/lib/libcrypt.a /build/openwrt/staging_dir/toolchain-aarch64_cortex-a53_gcc-11.2.0_musl/lib/libstdc++fs.a /build/openwrt/staging_dir/toolchain-aarch64_cortex-a53_gcc-11.2.0_musl/lib/libm.a /build/openwrt/staging_dir/toolchain-aarch64_cortex-a53_gcc-11.2.0_musl/lib/libresolv.a /build/openwrt/staging_dir/toolchain-aarch64_cortex-a53_gcc-11.2.0_musl/lib/libssp_nonshared.a /build/openwrt/staging_dir/toolchain-aarch64_cortex-a53_gcc-11.2.0_musl/lib/libatomic.a /build/openwrt/staging_dir/toolchain-aarch64_cortex-a53_gcc-11.2.0_musl/lib/libsupc++.a /build/openwrt/staging_dir/toolchain-aarch64_cortex-a53_gcc-11.2.0_musl/lib/libitm.a /build/openwrt/staging_dir/toolchain-aarch64_cortex-a53_gcc-11.2.0_musl/lib/libutil.a /build/openwrt/staging_dir/toolchain-aarch64_cortex-a53_gcc-11.2.0_musl/lib/libxnet.a /build/openwrt/staging_dir/toolchain-aarch64_cortex-a53_gcc-11.2.0_musl/lib/libpthread.a /build/openwrt/staging_dir/toolchain-aarch64_cortex-a53_gcc-11.2.0_musl/lib/libstdc++.a /build/openwrt/staging_dir/toolchain-aarch64_cortex-a53_gcc-11.2.0_musl/lib/librt.a /build/openwrt/staging_dir/toolchain-aarch64_cortex-a53_gcc-11.2.0_musl/lib/libc.a /build/openwrt/staging_dir/toolchain-aarch64_cortex-a53_gcc-11.2.0_musl/lib/libdl.a /build/openwrt/build_dir/target-aarch64_cortex-a53_musl/toolchain/.pkgdir/libc/lib/
cp -fpR /build/openwrt/staging_dir/toolchain-aarch64_cortex-a53_gcc-11.2.0_musl/lib/gcc/aarch64-openwrt-linux-musl/11.2.0/libgcc_pic.a /build/openwrt/build_dir/target-aarch64_cortex-a53_musl/toolchain/.pkgdir/libc/lib/libgcc_s_pic.a; cp -fpR /build/openwrt/staging_dir/toolchain-aarch64_cortex-a53_gcc-11.2.0_musl/lib/gcc/aarch64-openwrt-linux-musl/11.2.0/libgcc.map /build/openwrt/build_dir/target-aarch64_cortex-a53_musl/toolchain/.pkgdir/libc/lib/libgcc_s_pic.map
touch /build/openwrt/build_dir/target-aarch64_cortex-a53_musl/toolchain/.pkgdir/libc.installed
mkdir -p /build/openwrt/staging_dir/target-aarch64_cortex-a53_musl/root-mediatek/stamp
SHELL= flock /build/openwrt/tmp/.root-copy.flock -c 'cp -fpR /build/openwrt/build_dir/target-aarch64_cortex-a53_musl/toolchain/.pkgdir/libc/. /build/openwrt/staging_dir/target-aarch64_cortex-a53_musl/root-mediatek/'
touch /build/openwrt/staging_dir/target-aarch64_cortex-a53_musl/root-mediatek/stamp/.libc_installed
mkdir -p /build/openwrt/bin/targets/mediatek/mt7622/packages /build/openwrt/build_dir/target-aarch64_cortex-a53_musl/toolchain/ipkg-aarch64_cortex-a53/libgcc/CONTROL /build/openwrt/staging_dir/target-aarch64_cortex-a53_musl/pkginfo
install -d -m0755 /build/openwrt/build_dir/target-aarch64_cortex-a53_musl/toolchain/ipkg-aarch64_cortex-a53/libgcc/lib
cp -fpR /build/openwrt/staging_dir/toolchain-aarch64_cortex-a53_gcc-11.2.0_musl/lib/libgcc_s.so.* /build/openwrt/build_dir/target-aarch64_cortex-a53_musl/toolchain/ipkg-aarch64_cortex-a53/libgcc/lib/
find /build/openwrt/build_dir/target-aarch64_cortex-a53_musl/toolchain/ipkg-aarch64_cortex-a53/libgcc -name 'CVS' -o -name '.svn' -o -name '.#*' -o -name '*~'| xargs -r rm -rf
export CROSS="aarch64-openwrt-linux-musl-"  NO_RENAME=1 ; NM="aarch64-openwrt-linux-musl-nm" STRIP="/build/openwrt/staging_dir/host/bin/sstrip -z" STRIP_KMOD="/build/openwrt/scripts/strip-kmod.sh" PATCHELF="/build/openwrt/staging_dir/host/bin/patchelf" /build/openwrt/scripts/rstrip.sh /build/openwrt/build_dir/target-aarch64_cortex-a53_musl/toolchain/ipkg-aarch64_cortex-a53/libgcc
rstrip.sh: /build/openwrt/build_dir/target-aarch64_cortex-a53_musl/toolchain/ipkg-aarch64_cortex-a53/libgcc/lib/libgcc_s.so.1: shared object
(cd /build/openwrt/build_dir/target-aarch64_cortex-a53_musl/toolchain/ipkg-aarch64_cortex-a53/libgcc/CONTROL; ( echo "$CONTROL"; printf "Description: "; echo "$DESCRIPTION" | sed -e 's,^[[:space:]]*, ,g'; ) > control; chmod 644 control; ( echo "#!/bin/sh"; echo "[ \"\${IPKG_NO_SCRIPT}\" = \"1\" ] && exit 0"; echo "[ -s "\${IPKG_INSTROOT}/lib/functions.sh" ] || exit 0"; echo ". \${IPKG_INSTROOT}/lib/functions.sh"; echo "default_postinst \$0 \$@"; ) > postinst; ( echo "#!/bin/sh"; echo "[ -s "\${IPKG_INSTROOT}/lib/functions.sh" ] || exit 0"; echo ". \${IPKG_INSTROOT}/lib/functions.sh"; echo "default_prerm \$0 \$@"; ) > prerm; chmod 0755 postinst prerm;  )
install -d -m0755 /build/openwrt/bin/targets/mediatek/mt7622/packages
/build/openwrt/staging_dir/host/bin/fakeroot /build/openwrt/staging_dir/host/bin/bash /build/openwrt/scripts/ipkg-build -m "" /build/openwrt/build_dir/target-aarch64_cortex-a53_musl/toolchain/ipkg-aarch64_cortex-a53/libgcc /build/openwrt/bin/targets/mediatek/mt7622/packages
Packaged contents of /build/openwrt/build_dir/target-aarch64_cortex-a53_musl/toolchain/ipkg-aarch64_cortex-a53/libgcc into /build/openwrt/bin/targets/mediatek/mt7622/packages/libgcc1_11.2.0-3_aarch64_cortex-a53.ipk
mkdir -p /build/openwrt/bin/targets/mediatek/mt7622/packages /build/openwrt/build_dir/target-aarch64_cortex-a53_musl/toolchain/ipkg-aarch64_cortex-a53/libc/CONTROL /build/openwrt/staging_dir/target-aarch64_cortex-a53_musl/pkginfo
install -d -m0755 /build/openwrt/build_dir/target-aarch64_cortex-a53_musl/toolchain/ipkg-aarch64_cortex-a53/libc/lib /build/openwrt/build_dir/target-aarch64_cortex-a53_musl/toolchain/ipkg-aarch64_cortex-a53/libc/usr/bin
cp -fpR /build/openwrt/staging_dir/toolchain-aarch64_cortex-a53_gcc-11.2.0_musl/lib/ld-musl-*.so* /build/openwrt/build_dir/target-aarch64_cortex-a53_musl/toolchain/ipkg-aarch64_cortex-a53/libc/lib/
cp -fpR /build/openwrt/staging_dir/toolchain-aarch64_cortex-a53_gcc-11.2.0_musl/lib/libc.so* /build/openwrt/build_dir/target-aarch64_cortex-a53_musl/toolchain/ipkg-aarch64_cortex-a53/libc/lib/
ln -sf ../../lib/libc.so /build/openwrt/build_dir/target-aarch64_cortex-a53_musl/toolchain/ipkg-aarch64_cortex-a53/libc/usr/bin/ldd
find /build/openwrt/build_dir/target-aarch64_cortex-a53_musl/toolchain/ipkg-aarch64_cortex-a53/libc -name 'CVS' -o -name '.svn' -o -name '.#*' -o -name '*~'| xargs -r rm -rf
export CROSS="aarch64-openwrt-linux-musl-"  NO_RENAME=1 ; NM="aarch64-openwrt-linux-musl-nm" STRIP="/build/openwrt/staging_dir/host/bin/sstrip -z" STRIP_KMOD="/build/openwrt/scripts/strip-kmod.sh" PATCHELF="/build/openwrt/staging_dir/host/bin/patchelf" /build/openwrt/scripts/rstrip.sh /build/openwrt/build_dir/target-aarch64_cortex-a53_musl/toolchain/ipkg-aarch64_cortex-a53/libc
rstrip.sh: /build/openwrt/build_dir/target-aarch64_cortex-a53_musl/toolchain/ipkg-aarch64_cortex-a53/libc/lib/libc.so: shared object
(cd /build/openwrt/build_dir/target-aarch64_cortex-a53_musl/toolchain/ipkg-aarch64_cortex-a53/libc/CONTROL; ( echo "$CONTROL"; printf "Description: "; echo "$DESCRIPTION" | sed -e 's,^[[:space:]]*, ,g'; ) > control; chmod 644 control; ( echo "#!/bin/sh"; echo "[ \"\${IPKG_NO_SCRIPT}\" = \"1\" ] && exit 0"; echo "[ -s "\${IPKG_INSTROOT}/lib/functions.sh" ] || exit 0"; echo ". \${IPKG_INSTROOT}/lib/functions.sh"; echo "default_postinst \$0 \$@"; ) > postinst; ( echo "#!/bin/sh"; echo "[ -s "\${IPKG_INSTROOT}/lib/functions.sh" ] || exit 0"; echo ". \${IPKG_INSTROOT}/lib/functions.sh"; echo "default_prerm \$0 \$@"; ) > prerm; chmod 0755 postinst prerm;  )
install -d -m0755 /build/openwrt/bin/targets/mediatek/mt7622/packages
/build/openwrt/staging_dir/host/bin/fakeroot /build/openwrt/staging_dir/host/bin/bash /build/openwrt/scripts/ipkg-build -m "" /build/openwrt/build_dir/target-aarch64_cortex-a53_musl/toolchain/ipkg-aarch64_cortex-a53/libc /build/openwrt/bin/targets/mediatek/mt7622/packages
Packaged contents of /build/openwrt/build_dir/target-aarch64_cortex-a53_musl/toolchain/ipkg-aarch64_cortex-a53/libc into /build/openwrt/bin/targets/mediatek/mt7622/packages/libc_1.2.2-3_aarch64_cortex-a53.ipk
mkdir -p /build/openwrt/bin/targets/mediatek/mt7622/packages /build/openwrt/build_dir/target-aarch64_cortex-a53_musl/toolchain/ipkg-aarch64_cortex-a53/libpthread/CONTROL /build/openwrt/staging_dir/target-aarch64_cortex-a53_musl/pkginfo
install -d -m0755 /build/openwrt/build_dir/target-aarch64_cortex-a53_musl/toolchain/ipkg-aarch64_cortex-a53/libpthread/lib
find /build/openwrt/build_dir/target-aarch64_cortex-a53_musl/toolchain/ipkg-aarch64_cortex-a53/libpthread -name 'CVS' -o -name '.svn' -o -name '.#*' -o -name '*~'| xargs -r rm -rf
export CROSS="aarch64-openwrt-linux-musl-"  NO_RENAME=1 ; NM="aarch64-openwrt-linux-musl-nm" STRIP="/build/openwrt/staging_dir/host/bin/sstrip -z" STRIP_KMOD="/build/openwrt/scripts/strip-kmod.sh" PATCHELF="/build/openwrt/staging_dir/host/bin/patchelf" /build/openwrt/scripts/rstrip.sh /build/openwrt/build_dir/target-aarch64_cortex-a53_musl/toolchain/ipkg-aarch64_cortex-a53/libpthread
(cd /build/openwrt/build_dir/target-aarch64_cortex-a53_musl/toolchain/ipkg-aarch64_cortex-a53/libpthread/CONTROL; ( echo "$CONTROL"; printf "Description: "; echo "$DESCRIPTION" | sed -e 's,^[[:space:]]*, ,g'; ) > control; chmod 644 control; ( echo "#!/bin/sh"; echo "[ \"\${IPKG_NO_SCRIPT}\" = \"1\" ] && exit 0"; echo "[ -s "\${IPKG_INSTROOT}/lib/functions.sh" ] || exit 0"; echo ". \${IPKG_INSTROOT}/lib/functions.sh"; echo "default_postinst \$0 \$@"; ) > postinst; ( echo "#!/bin/sh"; echo "[ -s "\${IPKG_INSTROOT}/lib/functions.sh" ] || exit 0"; echo ". \${IPKG_INSTROOT}/lib/functions.sh"; echo "default_prerm \$0 \$@"; ) > prerm; chmod 0755 postinst prerm;  )
install -d -m0755 /build/openwrt/bin/targets/mediatek/mt7622/packages
/build/openwrt/staging_dir/host/bin/fakeroot /build/openwrt/staging_dir/host/bin/bash /build/openwrt/scripts/ipkg-build -m "" /build/openwrt/build_dir/target-aarch64_cortex-a53_musl/toolchain/ipkg-aarch64_cortex-a53/libpthread /build/openwrt/bin/targets/mediatek/mt7622/packages
Packaged contents of /build/openwrt/build_dir/target-aarch64_cortex-a53_musl/toolchain/ipkg-aarch64_cortex-a53/libpthread into /build/openwrt/bin/targets/mediatek/mt7622/packages/libpthread_1.2.2-3_aarch64_cortex-a53.ipk
mkdir -p /build/openwrt/bin/targets/mediatek/mt7622/packages /build/openwrt/build_dir/target-aarch64_cortex-a53_musl/toolchain/ipkg-aarch64_cortex-a53/librt/CONTROL /build/openwrt/staging_dir/target-aarch64_cortex-a53_musl/pkginfo
install -d -m0755 /build/openwrt/build_dir/target-aarch64_cortex-a53_musl/toolchain/ipkg-aarch64_cortex-a53/librt/lib
find /build/openwrt/build_dir/target-aarch64_cortex-a53_musl/toolchain/ipkg-aarch64_cortex-a53/librt -name 'CVS' -o -name '.svn' -o -name '.#*' -o -name '*~'| xargs -r rm -rf
export CROSS="aarch64-openwrt-linux-musl-"  NO_RENAME=1 ; NM="aarch64-openwrt-linux-musl-nm" STRIP="/build/openwrt/staging_dir/host/bin/sstrip -z" STRIP_KMOD="/build/openwrt/scripts/strip-kmod.sh" PATCHELF="/build/openwrt/staging_dir/host/bin/patchelf" /build/openwrt/scripts/rstrip.sh /build/openwrt/build_dir/target-aarch64_cortex-a53_musl/toolchain/ipkg-aarch64_cortex-a53/librt
(cd /build/openwrt/build_dir/target-aarch64_cortex-a53_musl/toolchain/ipkg-aarch64_cortex-a53/librt/CONTROL; ( echo "$CONTROL"; printf "Description: "; echo "$DESCRIPTION" | sed -e 's,^[[:space:]]*, ,g'; ) > control; chmod 644 control; ( echo "#!/bin/sh"; echo "[ \"\${IPKG_NO_SCRIPT}\" = \"1\" ] && exit 0"; echo "[ -s "\${IPKG_INSTROOT}/lib/functions.sh" ] || exit 0"; echo ". \${IPKG_INSTROOT}/lib/functions.sh"; echo "default_postinst \$0 \$@"; ) > postinst; ( echo "#!/bin/sh"; echo "[ -s "\${IPKG_INSTROOT}/lib/functions.sh" ] || exit 0"; echo ". \${IPKG_INSTROOT}/lib/functions.sh"; echo "default_prerm \$0 \$@"; ) > prerm; chmod 0755 postinst prerm;  )
install -d -m0755 /build/openwrt/bin/targets/mediatek/mt7622/packages
/build/openwrt/staging_dir/host/bin/fakeroot /build/openwrt/staging_dir/host/bin/bash /build/openwrt/scripts/ipkg-build -m "" /build/openwrt/build_dir/target-aarch64_cortex-a53_musl/toolchain/ipkg-aarch64_cortex-a53/librt /build/openwrt/bin/targets/mediatek/mt7622/packages
Packaged contents of /build/openwrt/build_dir/target-aarch64_cortex-a53_musl/toolchain/ipkg-aarch64_cortex-a53/librt into /build/openwrt/bin/targets/mediatek/mt7622/packages/librt_1.2.2-3_aarch64_cortex-a53.ipk
echo "libc" >> /build/openwrt/staging_dir/target-aarch64_cortex-a53_musl/pkginfo/toolchain.default.install
rm -rf /build/openwrt/build_dir/target-aarch64_cortex-a53_musl/toolchain/.pkgdir/libgcc.installed /build/openwrt/build_dir/target-aarch64_cortex-a53_musl/toolchain/.pkgdir/libgcc
mkdir -p /build/openwrt/build_dir/target-aarch64_cortex-a53_musl/toolchain/.pkgdir/libgcc
install -d -m0755 /build/openwrt/build_dir/target-aarch64_cortex-a53_musl/toolchain/.pkgdir/libgcc/lib
cp -fpR /build/openwrt/staging_dir/toolchain-aarch64_cortex-a53_gcc-11.2.0_musl/lib/libgcc_s.so.* /build/openwrt/build_dir/target-aarch64_cortex-a53_musl/toolchain/.pkgdir/libgcc/lib/
touch /build/openwrt/build_dir/target-aarch64_cortex-a53_musl/toolchain/.pkgdir/libgcc.installed
rm -rf /build/openwrt/build_dir/target-aarch64_cortex-a53_musl/toolchain/.pkgdir/libpthread.installed /build/openwrt/build_dir/target-aarch64_cortex-a53_musl/toolchain/.pkgdir/libpthread
mkdir -p /build/openwrt/build_dir/target-aarch64_cortex-a53_musl/toolchain/.pkgdir/libpthread
install -d -m0755 /build/openwrt/build_dir/target-aarch64_cortex-a53_musl/toolchain/.pkgdir/libpthread/lib
touch /build/openwrt/build_dir/target-aarch64_cortex-a53_musl/toolchain/.pkgdir/libpthread.installed
rm -rf /build/openwrt/build_dir/target-aarch64_cortex-a53_musl/toolchain/.pkgdir/librt.installed /build/openwrt/build_dir/target-aarch64_cortex-a53_musl/toolchain/.pkgdir/librt
mkdir -p /build/openwrt/build_dir/target-aarch64_cortex-a53_musl/toolchain/.pkgdir/librt
install -d -m0755 /build/openwrt/build_dir/target-aarch64_cortex-a53_musl/toolchain/.pkgdir/librt/lib
touch /build/openwrt/build_dir/target-aarch64_cortex-a53_musl/toolchain/.pkgdir/librt.installedmkdir -p /build/openwrt/staging_dir/target-aarch64_cortex-a53_musl/root-mediatek/stamp
echo '1' | cmp -s - /build/openwrt/staging_dir/target-aarch64_cortex-a53_musl/pkginfo/libgcc.version || { echo '1' > /build/openwrt/staging_dir/target-aarch64_cortex-a53_musl/pkginfo/libgcc.version;  }
SHELL= flock /build/openwrt/tmp/.root-copy.flock -c 'cp -fpR /build/openwrt/build_dir/target-aarch64_cortex-a53_musl/toolchain/.pkgdir/libgcc/. /build/openwrt/staging_dir/target-aarch64_cortex-a53_musl/root-mediatek/'
touch /build/openwrt/staging_dir/target-aarch64_cortex-a53_musl/root-mediatek/stamp/.libgcc_installed
echo "libgcc" >> /build/openwrt/staging_dir/target-aarch64_cortex-a53_musl/pkginfo/toolchain.default.install
mkdir -p /build/openwrt/staging_dir/target-aarch64_cortex-a53_musl/root-mediatek/stamp
SHELL= flock /build/openwrt/tmp/.root-copy.flock -c 'cp -fpR /build/openwrt/build_dir/target-aarch64_cortex-a53_musl/toolchain/.pkgdir/libpthread/. /build/openwrt/staging_dir/target-aarch64_cortex-a53_musl/root-mediatek/'
touch /build/openwrt/staging_dir/target-aarch64_cortex-a53_musl/root-mediatek/stamp/.libpthread_installed
echo "libpthread" >> /build/openwrt/staging_dir/target-aarch64_cortex-a53_musl/pkginfo/toolchain.default.install
mkdir -p /build/openwrt/staging_dir/target-aarch64_cortex-a53_musl/root-mediatek/stamp
SHELL= flock /build/openwrt/tmp/.root-copy.flock -c 'cp -fpR /build/openwrt/build_dir/target-aarch64_cortex-a53_musl/toolchain/.pkgdir/librt/. /build/openwrt/staging_dir/target-aarch64_cortex-a53_musl/root-mediatek/'
touch /build/openwrt/staging_dir/target-aarch64_cortex-a53_musl/root-mediatek/stamp/.librt_installed
echo "librt" >> /build/openwrt/staging_dir/target-aarch64_cortex-a53_musl/pkginfo/toolchain.default.install
make[2]: Leaving directory '/build/openwrt/package/libs/toolchain'
time: package/libs/toolchain/compile#0.48#0.43#0.84
make[2]: Entering directory '/build/openwrt/package/firmware/linux-firmware'
make[2]: Nothing to be done for 'compile'.
make[2]: Leaving directory '/build/openwrt/package/firmware/linux-firmware'
time: package/firmware/linux-firmware/compile#0.14#0.00#0.13
make[2]: Entering directory '/build/openwrt/package/firmware/prism54-firmware'
make[2]: Nothing to be done for 'compile'.
make[2]: Leaving directory '/build/openwrt/package/firmware/prism54-firmware'
time: package/firmware/prism54-firmware/compile#0.29#0.02#0.29
make[2]: Entering directory '/build/openwrt/package/kernel/gpio-button-hotplug'
touch /build/openwrt/build_dir/target-aarch64_cortex-a53_musl/linux-mediatek_mt7622/gpio-button-hotplug/.prepared_78472b6b11de300f4bad49f61cec3db4_6664517399ebbbc92a37c5bb081b5c53_check
true
[ ! -d ./src/ ] || cp -fpR ./src/. /build/openwrt/build_dir/target-aarch64_cortex-a53_musl/linux-mediatek_mt7622/gpio-button-hotplug
touch /build/openwrt/build_dir/target-aarch64_cortex-a53_musl/linux-mediatek_mt7622/gpio-button-hotplug/.prepared_78472b6b11de300f4bad49f61cec3db4_6664517399ebbbc92a37c5bb081b5c53
rm -f /build/openwrt/build_dir/target-aarch64_cortex-a53_musl/linux-mediatek_mt7622/gpio-button-hotplug/.configured_*
rm -f /build/openwrt/staging_dir/target-aarch64_cortex-a53_musl/stamp/.gpio-button-hotplug_installed
(cd /build/openwrt/build_dir/target-aarch64_cortex-a53_musl/linux-mediatek_mt7622/gpio-button-hotplug/./; if [ -x ./configure ]; then find /build/openwrt/build_dir/target-aarch64_cortex-a53_musl/linux-mediatek_mt7622/gpio-button-hotplug/ -name config.guess | xargs -r chmod u+w; find /build/openwrt/build_dir/target-aarch64_cortex-a53_musl/linux-mediatek_mt7622/gpio-button-hotplug/ -name config.guess | xargs -r -n1 cp --remove-destination /build/openwrt/scripts/config.guess; find /build/openwrt/build_dir/target-aarch64_cortex-a53_musl/linux-mediatek_mt7622/gpio-button-hotplug/ -name config.sub | xargs -r chmod u+w; find /build/openwrt/build_dir/target-aarch64_cortex-a53_musl/linux-mediatek_mt7622/gpio-button-hotplug/ -name config.sub | xargs -r -n1 cp --remove-destination /build/openwrt/scripts/config.sub; AR="aarch64-openwrt-linux-musl-gcc-ar" AS="aarch64-openwrt-linux-musl-gcc -c -Os -pipe -mcpu=cortex-a53 -g3 -fno-caller-saves -fno-plt -fhonour-copts -Wno-error=unused-but-set-variable -Wno-error=unused-result -fmacro-prefix-map=/build/openwrt/build_dir/target-aarch64_cortex-a53_musl/linux-mediatek_mt7622/gpio-button-hotplug=gpio-button-hotplug -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro" LD=aarch64-openwrt-linux-musl-ld NM="aarch64-openwrt-linux-musl-gcc-nm" CC="aarch64-openwrt-linux-musl-gcc" GCC="aarch64-openwrt-linux-musl-gcc" CXX="aarch64-openwrt-linux-musl-g++" RANLIB="aarch64-openwrt-linux-musl-gcc-ranlib" STRIP=aarch64-openwrt-linux-musl-strip OBJCOPY=aarch64-openwrt-linux-musl-objcopy OBJDUMP=aarch64-openwrt-linux-musl-objdump SIZE=aarch64-openwrt-linux-musl-size CFLAGS="-Os -pipe -mcpu=cortex-a53 -g3 -fno-caller-saves -fno-plt -fhonour-copts -Wno-error=unused-but-set-variable -Wno-error=unused-result -fmacro-prefix-map=/build/openwrt/build_dir/target-aarch64_cortex-a53_musl/linux-mediatek_mt7622/gpio-button-hotplug=gpio-button-hotplug -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro " CXXFLAGS="-Os -pipe -mcpu=cortex-a53 -g3 -fno-caller-saves -fno-plt -fhonour-copts -Wno-error=unused-but-set-variable -Wno-error=unused-result -fmacro-prefix-map=/build/openwrt/build_dir/target-aarch64_cortex-a53_musl/linux-mediatek_mt7622/gpio-button-hotplug=gpio-button-hotplug -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro " CPPFLAGS="-I/build/openwrt/staging_dir/toolchain-aarch64_cortex-a53_gcc-11.2.0_musl/usr/include -I/build/openwrt/staging_dir/toolchain-aarch64_cortex-a53_gcc-11.2.0_musl/include/fortify -I/build/openwrt/staging_dir/toolchain-aarch64_cortex-a53_gcc-11.2.0_musl/include " LDFLAGS="-L/build/openwrt/staging_dir/toolchain-aarch64_cortex-a53_gcc-11.2.0_musl/usr/lib -L/build/openwrt/staging_dir/toolchain-aarch64_cortex-a53_gcc-11.2.0_musl/lib -znow -zrelro "   ./configure --target=aarch64-openwrt-linux --host=aarch64-openwrt-linux --build=x86_64-pc-linux-gnu --program-prefix="" --program-suffix="" --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --libexecdir=/usr/lib --sysconfdir=/etc --datadir=/usr/share --localstatedir=/var --mandir=/usr/man --infodir=/usr/info --disable-nls  ; fi; )
touch /build/openwrt/build_dir/target-aarch64_cortex-a53_musl/linux-mediatek_mt7622/gpio-button-hotplug/.configured_68b329da9893e34099c7d8ad5cb9c940
make[2]: *** No rule to make target '/build/openwrt/build_dir/target-aarch64_cortex-a53_musl/linux-mediatek_mt7622/linux-5.10.104/.config', needed by '/build/openwrt/build_dir/target-aarch64_cortex-a53_musl/linux-mediatek_mt7622/gpio-button-hotplug/.built'.  Stop.
make[2]: Leaving directory '/build/openwrt/package/kernel/gpio-button-hotplug'
time: package/kernel/gpio-button-hotplug/compile#0.14#0.00#0.12
    ERROR: package/kernel/gpio-button-hotplug failed to build.
make[1]: *** [package/Makefile:116: package/kernel/gpio-button-hotplug/compile] Error 1
make[1]: Leaving directory '/build/openwrt'
make: *** [/build/openwrt/include/toplevel.mk:230: package/network/utils/iproute2/compile] Error 2
make[1]: Leaving directory '/build/openwrt'

Is there anything special in this package?

2 Likes

Solved the gpio-button-hotplug issue. However IPROUTE2 has something wrong with the TCFULL variant.

1 Like