Skip to content
This repository has been archived by the owner on Jul 1, 2020. It is now read-only.

--checksize no longer working for >= 4.17 #180

Closed
FAMILIAR-project opened this issue Jun 29, 2020 · 1 comment
Closed

--checksize no longer working for >= 4.17 #180

FAMILIAR-project opened this issue Jun 29, 2020 · 1 comment
Assignees

Comments

@FAMILIAR-project
Copy link
Collaborator

python3 kernel_generator.py --dev 1 --linux_version 4.17 --tiny --checksize

with an error (non-blocking):
size: '/TuxML/linux-4.17/*/built-in.o': No such file
and similar observations for 4.20 or 5.x

4.16 version seems to work fine!

the cause is there:

## retrieve_sizes
# @author SAFFRAY Paul
# @version 1
# @brief Retrieve the additional sizes with more specific commands
def retrieve_sizes(path):
    sizes_result = {}
    sizes_result['size_vmlinux'] = subprocess.run(['size {}/vmlinux'.format(path)], shell=True, stdout=subprocess.PIPE).stdout.decode('utf-8')
    sizes_result['nm_size_vmlinux'] = bz2.compress(
                                    subprocess.run(["nm --size -r {}/vmlinux | sed 's/^[0]*//'".format(path)], shell=True, stdout=subprocess.PIPE).stdout)
    sizes_result['size_builtin'] = bz2.compress(
                                    subprocess.run(['size {}/*/built-in.o'.format(path)], shell=True, stdout=subprocess.PIPE).stdout)
    return sizes_result

it seems related to this change:
https://gitlab.javinator9889.com/Javinator9889/thdkernel/commit/f49821ee32b76b1a356fab17316eb62430182ecf
and discussions:
https://patchwork.kernel.org/patch/10210515/
https://patchwork.kernel.org/patch/10210517/

basically we need to have a look at built-in.a instead of built-in.o

I will try to fix this issue with a conditional on version number...

@FAMILIAR-project
Copy link
Collaborator Author

now working: 96f6543

python3 kernel_generator.py --dev 1 --tiny --linux_version 5.1 --checksize --local

 text	   data	    bss	    dec	    hex	filename
  1871	      8	      8	   1887	    75f	/TuxML/linux-5.1/drivers/char/mem.o (ex /TuxML/linux-5.1/drivers/built-in.a)
  6100	    761	    792	   7653	   1de5	/TuxML/linux-5.1/drivers/char/random.o (ex /TuxML/linux-5.1/drivers/built-in.a)
  1030	     56	     16	   1102	    44e	/TuxML/linux-5.1/drivers/char/misc.o (ex /TuxML/linux-5.1/drivers/built-in.a)
  2082	     56	      0	   2138	    85a	/TuxML/linux-5.1/drivers/base/component.o (ex /TuxML/linux-5.1/drivers/built-in.a)
  7915	    296	     56	   8267	   204b	/TuxML/linux-5.1/drivers/base/core.o (ex /TuxML/linux-5.1/drivers/built-in.a)

also working with 4.17 (and non-regression with 4.13.3 and 4.15)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant