Bug 26015 - overweight kernel for ARM aarch64
Summary: overweight kernel for ARM aarch64
Status: RESOLVED FIXED
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: 7
Hardware: aarch64 Linux
Priority: Normal normal
Target Milestone: ---
Assignee: Kernel and Drivers maintainers
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-01-04 21:38 CET by Jybz
Modified: 2020-01-13 18:00 CET (History)
3 users (show)

See Also:
Source RPM: kernel-desktop
CVE:
Status comment:


Attachments

Description Jybz 2020-01-04 21:38:20 CET
Hello !

I was making an image of Mageia for an ARM devices, the first I do with aarch64.
And I see that it takes a long time to download, to process... I look further, and see that the kernel is 20 times bigger for aarch64 compared to armv7hl.

Some comparison :
```
[jibz@jabztop ~]$ curl http://ftp.free.fr/mirrors/mageia.org/distrib/7/armv7hl/media/core/release/ -s | sed -e '/kernel-desktop-5/!d' -e 's/^.*class="s">//' -e 's/<.*$//'
26.4M
[jibz@jabztop ~]$ curl http://ftp.free.fr/mirrors/mageia.org/distrib/7/aarch64/media/core/release/ -s | sed -e '/kernel-desktop-5/!d' -e 's/^.*class="s">//' -e 's/<.*$//'
451.4M
[jibz@jabztop ~]$ curl http://ftp.free.fr/mirrors/mageia.org/distrib/7/i586/media/core/release/ -s | sed -e '/kernel-desktop-5/!d' -e 's/^.*class="s">//' -e 's/<.*$//'
53.6M
[jibz@jabztop ~]$ curl http://ftp.free.fr/mirrors/mageia.org/distrib/7/x86_64/media/core/release/ -s | sed -e '/kernel-desktop-5/!d' -e 's/^.*class="s">//' -e 's/<.*$//'
60.2M
```

ARMV7HL :  26.4M
AARCH64 : 451.4M
i586    :  53.6M
x86_64  :  60.2M

Is there any problem ? Is it normal ?
Comment 1 Lewis Smith 2020-01-04 21:50:22 CET
Thanks for the alert. It does not look right...
Assigning to kernel team.

Summary: overweight kernel => overweight kernel for ARM aarch64
Assignee: bugsquad => kernel

Comment 2 Pascal Terjan 2020-01-04 22:20:25 CET
Yes I noticed that but haven't investigated why yet. Kernel itself is of similar size but modules are huge.

A random module on aarch64, about 1MB:
-rw-r--r-- 1 root root 1011844 Jan  4 17:27 /lib/modules/5.4.7-server-3.mga7/kernel/drivers/net/wireless/realtek/rtlwifi/rtl8723ae/rtl8723ae.ko.xz

Same on x86_64, about 47kB:
-rw-r--r-- 1 root root 47088 Dec 23 17:21 /lib/modules/5.4.6-server-2.mga7/kernel/drivers/net/wireless/realtek/rtlwifi/rtl8723ae/rtl8723ae.ko.xz

CC: (none) => pterjan

Comment 3 Pascal Terjan 2020-01-04 22:22:28 CET
It seems we have debug info:

rtl8723ae.ko: ELF 64-bit LSB relocatable, ARM aarch64, version 1 (SYSV), BuildID[sha1]=1c04d1d940900b5a7cac8bf052c0dd9b8a414afe, with debug_info, not stripped

rtl8723ae.ko: ELF 64-bit LSB relocatable, x86-64, version 1 (SYSV), BuildID[sha1]=067ef59aacb438bc5b29af3e1bb2c37d99436063, not stripped
Comment 4 Pascal Terjan 2020-01-04 22:41:07 CET
That will be easy to fix:
defconfig-arm64-desktop:CONFIG_DEBUG_INFO=y

I'll work on fixing a lot of other differences in kernel config
Comment 5 Thomas Backlund 2020-01-06 16:05:43 CET
(In reply to Pascal Terjan from comment #4)
> That will be easy to fix:
> defconfig-arm64-desktop:CONFIG_DEBUG_INFO=y
> 
> I'll work on fixing a lot of other differences in kernel config

Yeah, we just started with some default config for arm64 and did not think much about it since we had no actual users or systems using the kernel...

basically "we will fix it later..." but forgot about it...

I really need to setup an arm64 testrig to experiment on...

CC: (none) => tmb

Comment 6 Thomas Backlund 2020-01-06 16:07:11 CET
And there is now a kernel 5.4.8-2.mga7 in mga7 updates_testing with all changes so far...
Comment 7 Pascal Terjan 2020-01-06 16:35:30 CET
Just tested it, it fixes this size problem and still works fine for me.

[root@ec2aa1 ~]# uname -a
Linux ec2aa1 5.4.8-server-2.mga7 #1 SMP PREEMPT Mon Jan 6 11:34:54 UTC 2020 aarch64 aarch64 aarch64 GNU/Linux
[root@ec2aa1 ~]# rpm -q --qf "%{SIZE}\n" kernel-server-5.4.8-2.mga7
49734565
Comment 8 Thierry Vignaud 2020-01-06 23:19:22 CET
(In reply to Thomas Backlund from comment #5)
> I really need to setup an arm64 testrig to experiment on...

qemu-system-aarch64 is your friend… :-)
https://fedoraproject.org/wiki/Architectures/AArch64/Install_with_QEMU
https://wiki.qemu.org/Documentation/Platforms/ARM
https://wiki.ubuntu.com/ARM64/QEMU

CC: (none) => thierry.vignaud

Comment 9 Thierry Vignaud 2020-01-08 11:56:12 CET
Fixed in kernel-5.4.8-3.mga7

Status: NEW => RESOLVED
Resolution: (none) => FIXED

Comment 10 Thomas Backlund 2020-01-13 18:00:38 CET
An update for this issue has been pushed to the Mageia Updates repository.

https://advisories.mageia.org/MGASA-2020-0036.html

Note You need to log in before you can comment on or make changes to this bug.