How to configure OpenWrt for minimal general linux build

Hi,

I would like to do a minimal build for a linkit-smart that just has enough functionality to boot the device and configure network interfaces for client use (I don't need any of the router/webui/config/python/lua functionality). Can someone guide me through how this process works at a high level?

Thanks,
Cliff

https://openwrt.org/toh/seeed/linkit7688

If a "vanilla" OpenWrt build isn't what you're looking for, I prefer the full build chain

https://openwrt.org/docs/guide-developer/build-system/start

Some have good luck with the Image Builder as well.

https://openwrt.org/docs/guide-user/additional-software/saving-space

So I followed the process on this page, and I have an image that will install and boot.

What drives what packages are installed in the rootfs, and how does one modify this package list?

I see the documentation on the "make image" command, but when I run that, there is no image target in the makefile:

[cbrake@mars openwrt]$ make image PROFILE=tl-wr941nd-v6 PACKAGES="-ppp -ppp-mod-pppoe -ip6tables -odhcp6c -kmod-ipv6 -kmod-ip6tables" V=s
make[1]: Entering directory '/scratch/linkit-smart/openwrt'
make[1]: *** No rule to make target 'image'.  Stop.
make[1]: Leaving directory '/scratch/linkit-smart/openwrt'
make: *** [/scratch/linkit-smart/openwrt/include/toplevel.mk:218: image] Error 2

Again, I would just like a simple image with init, busybox, and not a lot else. Is there a "base image" configuration that provides this, or is openwrt all or nothing?

"make image" is an Image Builder "only" command. Since that's not an OpenWrt project you've referenced, what is supplied may or may not be consistent with OpenWrt packages. The Image Builder can only assemble images from pre-built packages. I don't use the Image Builder at all due to it being limited to pre-built packages, but some documentation includes

https://openwrt.org/docs/guide-developer/quickstart-build-images

The full toolchain is required to build from source. The contents of an image is controlled by the make menuconfig command, or the like.

Another option are the "snapshot" images which are built without LuCI and are pretty close to "minimal" (though they do have a few extra kernel modules and utilities to support PPP and other "generic" upstream connections).

"snapshot" image sounds like what I am looking for. How do you build this?

grepping in https://git.openwrt.org/openwrt/openwrt.git/, I'm not coming up with much.

Read the links I gave a couple posts ago on the build system if you want to build your own.

Nightly builds are on https://downloads.openwrt.org/snapshots/targets/

ahh, this is likely what is pulling in boatloads of stuff:

define Package/mtk-linkit
TITLE:=LinkIt Smart board support package
DEPENDS:=@TARGET_ramips_mt76x8_DEVICE_LinkIt7688 \
         +gdbserver +curl +strace +coreutils \
         +avahi-nodbus-daemon +mjpg-streamer +blockd \
         +uhttpd +rpcd +git +git-http +samba36-server \
         +python +python-pyserial +python-pip +hidapi \
         +yunbridge \
         +luci +luci-theme-openwrt +luci-app-mjpg-streamer +luci-app-samba +luci-lib-json \
         +cgi-io +avrdude +spi-tools +uboot-envtools \
         +kmod-fs-vfat +kmod-i2c-core \
         +kmod-nls-base +kmod-nls-cp437 +kmod-nls-iso8859-1 \
         +kmod-nls-iso8859-15 +kmod-nls-iso8859-2 +kmod-nls-utf8 \
         +kmod-sdhci-mt7620 +kmod-usb-storage \
         +kmod-video-core \
         +kmod-sound-core +madplay-alsa +alsa-utils \
         +tcpdump-mini +@KERNEL_DEVMEM
1 Like