WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: how to make modules smaller  (Read 1443 times)

Offline sititou70

  • Newbie
  • *
  • Posts: 2
how to make modules smaller
« on: July 19, 2018, 06:06:26 PM »
hello

I want to build modules of piCore-9.0.3.

First, I downloaded piCore-9.0.3 from http://tinycorelinux.net/9.x/armv6/releases/RPi/, burned to my SD card, booted and checked size of /lib/modules/4.9.22-piCore-v7. This is about 1.5MB.

Next, I found kernel source at http://distro.ibiblio.org/tinycorelinux/9.x/armv7/releases/RPi/src/kernel/. I downloaded 4.9.22-piCore-v7_modules.tar.xz, decompressed and checked size of /lib/modules/4.9.22-piCore-v7. This is about 47MB.

Why is there differnce of both size?

I'm making misstake of place of kernel source?
Is there way to make modules more smaller?

Any advice is wellcome.

thanks.

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14799
Re: how to make modules smaller
« Reply #1 on: July 20, 2018, 03:45:54 AM »
4.9.22-piCore-v7_modules.tar.xz is not the kernel source, it is an archive of all of the modules compiled using 4.9.22-piCore-v7.config.xz.

The kernel source is linux-rpi-4.9.22.tar.xz

Some of the modules in 4.9.22-piCore-v7_modules.tar.xz are contained in the kernel module extensions, alsa-modules-4.9.22-piCore-v7.tcz, ax25-4.9.22-piCore-v7.tcz, etc.

4.9.22-piCore-v7_modules.tar.xz also provides kernel modules not found in other kernel module extensions - you don't need to use all of the kernel modules in the archive, instead you can make an extension containing only the modules you need.
« Last Edit: July 20, 2018, 03:48:42 AM by Juanito »

Offline sititou70

  • Newbie
  • *
  • Posts: 2
Re: how to make modules smaller
« Reply #2 on: July 20, 2018, 06:26:25 PM »
thanks for reply.

I understanded well it. But, I don't know how to make modules of released piCore-9.0.3.

do you know how to reduce 4.9.22-piCore-v7_modules.tar.xz and to make modules of released piCore-9.0.3?

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14799
Re: how to make modules smaller
« Reply #3 on: July 21, 2018, 05:58:09 AM »
Which kernel module are you looking for?

Perhaps the module you need is available in one of the existing kernel module extensions or, if not, it is available in 4.9.22-piCore-v7_modules.tar.xz?

To reduce the size of 4.9.22-piCore-v7_modules.tar.xz, untar it somewhere, copy only the modules you need to /usr/local and then make an extension out of them.

To compile your own modules, use the supplied piCore kernel source, "make oldconfig" using the supplied piCore config and then "make modules".
« Last Edit: July 21, 2018, 06:01:34 AM by Juanito »