[SOLVED] Missing files (fstools) in custom build (19.07.6), questions

I am trying to build an image for a device that space-wise can only use a "tiny" kernel but I need swap support (it should be noted in the extroot wiki that tiny kernels do not support swap, I'll see if may do that - if not, please direct me to relevant person).

Imagebuilder is therefore not enough.

So I went with the dev-guide and built an image myself.
(Fixed the "WARNING: No feed for package 'jansson' found" and similar on the go, as I checked out the v19.06.7 tag and did not use master, adapted feeds.conf.default to read "src-git packages https://git.openwrt.org/feed/packages.git;openwrt-19.07" for example, hope that's right, also did not see this in the wiki)

It completes as it should, no visible errors. Swap works as well, so I achieved what I wanted initially.

However there are files missing from the build, e.g. /sbin/block.

Fstools is untouched (so default=y), and I also see the file in ./staging_dir/target-mips_24kc_musl/root-ath79/sbin/block
In the final image, it is not contained, however, at least I can not find it on the extroot-booted device.

A few questions:

  • Can I only build the kernel for my device
  • and not build all packages for all devices? Kernel might probably not work then, I know, but just adding one option should be OK from my desktop kernel-compiling experience)?
    Building takes ages and I feel I don't need most of the stuff as I can use ready-made packages anyway.
  • Can I stop the build system from rebuilding all packages If I only add a package? This also seems unnecessary to me.
  • Can I just trigger the squashfs building step (in debug mode) so I can see why the files do not get added?

I have a full make V=s build log for searching through, but it has 395M so I don't upload it just yet. :slight_smile:

Also info similar to this one seems error free in the log:
install -m0755 /home/tbart/openwrt/git/build_dir/target-mips_24kc_musl/fstools-2020-05-12-84269037/ipkg-install/usr/sbin/block /home/tbart/openwrt/git/build_dir/target-mips_24kc_musl/fstools-2020-05-12-84269037/ipkg-mips_24kc/block-mount/sbin/

I am a little clueless as to how this can be debugged further.
Thanks in advance for any help!

Alright, lots of sleepless hours later I finally got it to work.

What was the problem?
I don't know for sure.

What did I do?

./scripts/feeds install -a
make clean
wget https://downloads.openwrt.org/releases/19.07.6/targets/ath79/tiny/config.buildinfo -O .config
make menuconfig #and did what I did in the imagebuilder before:
# ADD kmod-usb-storage kmod-fs-f2fs f2fsck kmod-usb-net-cdc-ether kmod-usb-net-rndis usb-modeswitch block-mount kmod-usb2
# REMOVE -kmod-pppoe -kmod-ppp -ppp -ppp-mod-pppoe -ip6tables -odhcp6c
# and additionally remove IPv6 support globally (CONFIG_IPV6) if unneeded

# add config files (ssh key, network config, local tools) to files/ directory
make download
make -j5

To answer my other questions:
The default config builds nearly all modules. I would have expected only the necessary packages to be built per the "meta" selection for my platform. But that's how it is. Remove all the modules you don't need (audio, video, voip, modules for hardware you don't use etc.)
I am down to ~ 15min for a make -j5 after the first one. On a (powerful) notebook from 2018.
Still, all the kernels for all platforms are built and I could not find out what more to select to only build for my model..
I also did not dig deeper to only trigger single steps as it worked out this way as well.

FWIW, here is a config for my TL-MR3420v2.1 for extroot, swap, and a USB LTE modem:

Something's wrong with the board name vs. the sysupgrade image.
You have to sed -i 's#tplink,##' /tmp/sysinfo/board_name before being able to call sysupgrade (and it will fail with a not so descriptive error in luci)

Don't forget to mount extroot and remove etc/.extroot-uuid on your usb storage and reboot.
I am using f2fs as it was the only FS fitting into the image.

This topic was automatically closed 0 minutes after the last reply. New replies are no longer allowed.