Openwrt/scripts
Paul Spooren 0c87304d2b 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-24 18:18:48 -10:00
..
config scripts: update SPDX license names 2020-09-22 20:36:04 +02:00
flashing
arm-magic.sh
brcmImage.pl
bundle-libraries.sh scripts: bundle-libraries.sh: fix broken SDK compiler 2020-11-02 08:39:49 +01:00
cfe-bin-header.py
cfe-partition-tag.py
cfe-wfi-tag.py
checkpatch.pl scripts: checkpatch.pl: suppress warnings about MAINTAINERS 2020-11-18 21:50:53 +01:00
clang-gcc-wrapper
clean-package.sh
cleanfile
cleanpatch
combined-ext-image.sh
combined-image.sh
config.guess
config.rpath
config.sub
const_structs.checkpatch scripts: add const_structs.checkpatch for checkpatch.pl 2020-11-18 21:50:58 +01:00
deptest.sh
diffconfig.sh
dl_cleanup.py
dl_github_archive.py
download.pl scripts: download.pl: retry download using filename 2020-11-20 02:35:43 +01:00
dump-target-info.pl
env
ext-toolchain.sh
feeds
fixup-makefile.pl
functions.sh
gen_image_generic.sh
gen-dependencies.sh
get_source_date_epoch.sh
getver.sh scripts/getver.sh: silence rev-list errors 2020-11-02 08:39:49 +01:00
ipkg-build scripts: ipkg-build: simplify uid/gid resolving 2020-09-14 17:11:04 +02:00
ipkg-make-index.sh
ipkg-remove
json_add_image_info.py build: store SOURCE_DATE_EPOCH in JSON info files 2020-11-12 18:19:44 +01:00
json_overview_image_info.py
kconfig.pl scripts/kconfig.pl: allow regex syntax in filtering out config entries 2020-11-13 13:17:53 +01:00
linksys-image.sh
make-ipkg-dir.sh
md5sum
metadata.pm
mkhash.c scripts: mkhash fail on hashing a folder 2020-11-09 10:54:29 +00:00
mkits-qsdk-ipq-image.sh
mkits.sh scripts: mkits.sh make it possible to specify fdt@# 2020-09-25 19:32:33 +02:00
om-fwupgradecfg-gen.sh
package-metadata.pl
pad_image
patch-kernel.sh
patch-specs.sh
portable_date.sh
qemustart scripts/qemustart: update malta to use MIPS64 R2 cpu 2020-10-11 16:16:24 +02:00
redboot-script.pl
relink-lib.sh
remote-gdb
rstrip.sh
sercomm-crypto.py
sercomm-partition-tag.py
sercomm-payload.py
sign_images.sh
size_compare.sh scripts: add size_compare.sh 2020-11-24 18:18:48 -10:00
slugimage.pl
spelling.txt scripts: add spelling.txt for checkpatch.pl 2020-11-12 18:21:55 +01:00
srecimage.pl
strip-kmod.sh
symlink-tree.sh
sysupgrade-tar.sh
target-metadata.pl build: define PWM_SUPPORT arch feature flag 2020-09-25 19:32:33 +02:00
time.pl
timestamp.pl
ubinize-image.sh