summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjan <jan.vermaete@gmail.com>2020-05-07 15:25:36 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-05-22 16:23:24 +0100
commit33763b8878ded977b6e129787e80c6baca6020f5 (patch)
tree99250a7acb1919ffff5594035f16a76aecf45b35
parent50f3180f92be1d58ed7139b74236be326ce06076 (diff)
downloadpoky-33763b8878ded977b6e129787e80c6baca6020f5.tar.gz
scripts/tiny/ksize: Fix for more recent kernels
In the past kernel built object files were named 'built-in.o'. Nowadays it is 'built-in.a'. The script is modified to work with both. I expect it will not happen that there are built-in.a and built-in.o files in the same kernel. (From OE-Core rev: 8a883c3b0773960908491c03c46e7ed320e41dc5) Signed-off-by: Jan Vermaete <jan.vermaete@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rwxr-xr-xscripts/tiny/ksize.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/scripts/tiny/ksize.py b/scripts/tiny/ksize.py
index 8316b85cb1..db2b9ec39f 100755
--- a/scripts/tiny/ksize.py
+++ b/scripts/tiny/ksize.py
@@ -4,7 +4,7 @@
4# 4#
5# SPDX-License-Identifier: GPL-2.0-or-later 5# SPDX-License-Identifier: GPL-2.0-or-later
6# 6#
7# Display details of the kernel build size, broken up by built-in.o. Sort 7# Display details of the kernel build size, broken up by built-in.[o,a]. Sort
8# the objects by size. Run from the top level kernel build directory. 8# the objects by size. Run from the top level kernel build directory.
9# 9#
10# Author: Darren Hart <dvhart@linux.intel.com> 10# Author: Darren Hart <dvhart@linux.intel.com>
@@ -59,7 +59,7 @@ class Report:
59 p = Popen("ls " + subglob, shell=True, stdout=PIPE, stderr=PIPE, universal_newlines=True) 59 p = Popen("ls " + subglob, shell=True, stdout=PIPE, stderr=PIPE, universal_newlines=True)
60 for f in p.communicate()[0].splitlines(): 60 for f in p.communicate()[0].splitlines():
61 path = os.path.dirname(f) 61 path = os.path.dirname(f)
62 r.parts.append(Report.create(f, path, str(path) + "/*/built-in.o")) 62 r.parts.append(Report.create(f, path, str(path) + "/*/built-in.[o,a]"))
63 r.parts.sort(reverse=True) 63 r.parts.sort(reverse=True)
64 64
65 for b in r.parts: 65 for b in r.parts:
@@ -139,7 +139,7 @@ def main():
139 else: 139 else:
140 assert False, "unhandled option" 140 assert False, "unhandled option"
141 141
142 glob = "arch/*/built-in.o */built-in.o" 142 glob = "arch/*/built-in.[o,a] */built-in.[o,a]"
143 vmlinux = Report.create("vmlinux", "Linux Kernel", glob) 143 vmlinux = Report.create("vmlinux", "Linux Kernel", glob)
144 144
145 vmlinux.show() 145 vmlinux.show()