immortalwrt/scripts
Paul Spooren 8836fd3d3c
scripts: add size_compare.sh
As package size changes are a continuous topic on the mailing list this
scripts helps developers to compare their local package modifications
against latest upstream.

The script downloads the latest package indexes based on env variables
or the `.config` file. The script compares the actual installed size
(data.tar.gz) or the IPK package size.

An example output is found below:

```
user@dawn:~/src/openwrt/openwrt$ ./scripts/size_compare.sh
Compare packages of ath79/tiny/mips_24kc:
dropbear busybox iw ubus

Checking configuration difference
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   554  100   554    0     0    336      0  0:00:01  0:00:01 --:--:--   336

 --- start config diff ---
--- /tmp/config.DDjwVh-LOCAL	2020-11-23 09:08:28.913203068 -1000
+++ /tmp/config.DDjwVh-UPSTREAM	2020-11-23 09:08:36.369240887 -1000
@@ -1,5 +1,9 @@
+CONFIG_ALL_KMODS=y
+CONFIG_ALL_NONSHARED=y
 CONFIG_AUTOREBUILD=y
+CONFIG_AUTOREMOVE=y
--- 8< ---
 CONFIG_BINARY_FOLDER=""
+CONFIG_BUILDBOT=y
+CONFIG_TARGET_ALL_PROFILES=y
 CONFIG_TARGET_ROOTFS_DIR=""
 CONFIG_USE_SSTRIP=y
 CONFIG_USE_UCLIBCXX=y
 --- end config diff ---

Checking installed size

Fetching latest package indexes...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 80634  100 80634    0     0  33499      0  0:00:02  0:00:02 --:--:-- 33485
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 54082  100 54082    0     0  24252      0  0:00:02  0:00:02 --:--:-- 24252

Comparing package sizes...
Change 	Local	Remote 	Package
+271	51386	51115	base-files
+123	705241	705118	bnx2-firmware
+86	17209	17123	fstools
+22	47989	47967	procd
+21	208311	208290	busybox
+19	67181	67162	netifd

```

I plan to integrate this script into the CI so we have a summary how
sizes change over different architectures.

Signed-off-by: Paul Spooren <mail@aparcar.org>
2020-11-28 18:27:07 +08:00
..
config build: mconf readme update 2020-07-08 12:02:08 +08:00
flashing scripts/flashing/flash.sh: remove trailing whitespaces 2020-05-24 22:45:18 +08:00
arm-magic.sh sync build script for OpenWrt 19.07 2020-02-21 02:41:00 +08:00
brcmImage.pl Merge branch 'master' of https://github.com/lede-project/source 2018-01-09 14:38:15 +08:00
bundle-libraries.sh scripts: bundle-libraries.sh: fix broken SDK compiler 2020-11-03 11:54:47 +08:00
checkpatch.pl scripts: checkpatch.pl: suppress warnings about MAINTAINERS 2020-11-21 17:58:25 +08:00
clang-gcc-wrapper update source 2017-09-06 19:19:45 +08:00
clean-package.sh sync build script for OpenWrt 19.07 2020-02-21 02:41:00 +08:00
cleanfile update source 2017-09-06 19:19:45 +08:00
cleanpatch update source 2017-09-06 19:19:45 +08:00
combined-ext-image.sh update to R7.5.4 2018-01-15 18:26:41 +08:00
combined-image.sh update source 2017-09-06 19:19:45 +08:00
config.guess Merge branch master of https://github.com/coolsnowwolf/lede 2019-01-03 19:29:28 +08:00
config.rpath update source 2017-09-06 19:19:45 +08:00
config.sub Merge branch master of https://github.com/coolsnowwolf/lede 2019-01-03 19:29:28 +08:00
const_structs.checkpatch scripts: add const_structs.checkpatch for checkpatch.pl 2020-11-21 17:58:30 +08:00
deptest.sh update source 2017-09-06 19:19:45 +08:00
diffconfig.sh update source 2017-09-06 19:19:45 +08:00
dl_cleanup.py update source 2017-09-06 19:19:45 +08:00
dl_github_archive.py sync build script for OpenWrt 19.07 2020-02-21 02:41:00 +08:00
download.pl scripts: download.pl: retry download using filename 2020-11-21 18:02:13 +08:00
dump-target-info.pl scripts: Add Buildbot dump-target-info.pl script 2020-08-04 23:54:03 +08:00
env scripts/env: Fix 56f813674a scripts/env: use command -v instead of which 2020-07-12 23:11:33 +08:00
ext-toolchain.sh update source 2017-09-06 19:19:45 +08:00
feeds sync build script for OpenWrt 19.07 2020-02-21 02:41:00 +08:00
fixup-makefile.pl sync with OpenWrt trunk 2018-09-07 13:43:55 +08:00
functions.sh ramips: mt7621: add support for Netgear R6800 2019-12-13 08:25:54 -08:00
gen_image_generic.sh scripts/gen_image_generic.sh: use /bin/sh 2020-07-12 12:17:33 +08:00
gen-dependencies.sh sync build script for OpenWrt 19.07 2020-02-21 02:41:00 +08:00
get_source_date_epoch.sh build: get_source_date_epoch allow external repos 2020-09-01 17:29:22 +08:00
getver.sh scripts/getver.sh: silence rev-list errors 2020-11-03 11:53:49 +08:00
ipkg-build scripts: ipkg-build: simplify uid/gid resolving 2020-09-15 11:37:24 +08:00
ipkg-make-index.sh sync build script for OpenWrt 19.07 2020-02-21 02:41:00 +08:00
ipkg-remove sync build script for OpenWrt 19.07 2020-02-21 02:41:00 +08:00
json_add_image_info.py build: store SOURCE_DATE_EPOCH in JSON info files 2020-11-14 23:34:48 +08:00
json_overview_image_info.py build,json: fix compatibility with Python 3.5 2020-11-14 23:34:21 +08:00
kconfig.pl scripts/kconfig.pl: allow regex syntax in filtering out config entries 2020-11-14 13:51:51 +08:00
linksys-image.sh build: add a script for generating Linksys EA6350v3 factory image 2019-03-07 19:45:12 +08:00
make-ipkg-dir.sh update source 2017-09-06 19:19:45 +08:00
md5sum update source 2017-09-06 19:19:45 +08:00
metadata.pm sync build script for OpenWrt 19.07 2020-02-21 02:41:00 +08:00
mkhash.c scripts: mkhash fail on hashing a folder 2020-11-12 11:10:10 +08:00
mkits-qsdk-ipq-image.sh ipq40xx: add G-DOCK 2.0 (P&W R619AC) support 2019-10-22 23:14:35 -07:00
mkits.sh scripts: mkits.sh make it possible to specify fdt@# 2020-09-26 11:33:12 +08:00
om-fwupgradecfg-gen.sh Merge branch master of https://github.com/coolsnowwolf/lede 2019-01-03 19:29:28 +08:00
package-metadata.pl sync build script for OpenWrt 19.07 2020-02-21 02:41:00 +08:00
pad_image update source 2017-09-06 19:19:45 +08:00
patch-kernel.sh update source 2017-09-06 19:19:45 +08:00
patch-specs.sh sync build script for OpenWrt 19.07 2020-02-21 02:41:00 +08:00
portable_date.sh update source 2017-09-06 19:19:45 +08:00
qemustart sync build script for OpenWrt 19.07 2020-02-21 02:41:00 +08:00
redboot-script.pl update source 2017-09-06 19:19:45 +08:00
relink-lib.sh update source 2017-09-06 19:19:45 +08:00
remote-gdb sync build script for OpenWrt 19.07 2020-02-21 02:41:00 +08:00
rstrip.sh Merge branch master of https://github.com/coolsnowwolf/lede 2019-01-03 19:29:28 +08:00
sign_images.sh sync build script for OpenWrt 19.07 2020-02-21 02:41:00 +08:00
size_compare.sh scripts: add size_compare.sh 2020-11-28 18:27:07 +08:00
slugimage.pl sync with OpenWrt trunk 2018-09-07 13:43:55 +08:00
spelling.txt scripts: add spelling.txt for checkpatch.pl 2020-11-14 13:45:59 +08:00
srecimage.pl update source 2017-09-06 19:19:45 +08:00
strip-kmod.sh sync build script for OpenWrt 19.07 2020-02-21 02:41:00 +08:00
symlink-tree.sh sync build script for OpenWrt 19.07 2020-02-21 02:41:00 +08:00
sysupgrade-tar.sh sync build script for OpenWrt 19.07 2020-02-21 02:41:00 +08:00
target-metadata.pl build: define PWM_SUPPORT arch feature flag 2020-09-26 11:34:00 +08:00
time.pl sync build script for OpenWrt 19.07 2020-02-21 02:41:00 +08:00
timestamp.pl update source 2017-09-06 19:19:45 +08:00
ubinize-image.sh ramips: mt7621: add support for Netgear R6800 2019-12-13 08:25:54 -08:00