Minimal build system

I would like to have minimal openwrt folder where i build my openwrt.
I always run make dirtclean after i build new firmware for my router. After running ./scripts/feeds update -a && ./scripts/feeds install -a Current openwrt folder is at 510M.

To reduce it i clone openwrt with this command git clone --depth 1 https://git.openwrt.org/openwrt/openwrt.git and after previous command update & install feeds openwrt folder is just 262 MB

But i get errors like these every time i try make menuconfig or update or install feeds. Does this mean that it needs older commit info? And why is it needed to just build firmware?

fatal: Invalid revision range ee53a240ac902dc83209008a2671e7fdcf55957a..HEAD
fatal: Invalid revision range ee53a240ac902dc83209008a2671e7fdcf55957a..4576a753f2afd9dcfa7ca129c57bc0712dca2fca
fatal: Invalid revision range ee53a240ac902dc83209008a2671e7fdcf55957a..HEAD
fatal: Invalid revision range ee53a240ac902dc83209008a2671e7fdcf55957a..4576a753f2afd9dcfa7ca129c57bc0712dca2fca

To calculate the version with ./scripts/getver.sh

The string like OpenWrt SNAPSHOT r12106-c6c4701def
The "r12106" portion is the number of commits since ee53a240

https://git.openwrt.org/?p=openwrt/openwrt.git;a=blob;f=scripts/getver.sh;h=9175f411db8345ab420fdb1edcaf0d20f858f12f;hb=HEAD

Thanks. So my firmware will have version "unknown" if i won't have whole .git folder with all commits since ee53a240 right?

Yep.
or simply have a file "version" with some content like "My own OpenWrt", and that will be preferred as the version (as "try_version" is evaluated first)

Or edit the git inquire functions used in scripts/getver.sh and simplify it.

1 Like

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