WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Building Linux kernel and linux packages  (Read 7258 times)

Offline caracalla

  • Newbie
  • *
  • Posts: 21
Building Linux kernel and linux packages
« on: September 04, 2019, 02:38:49 AM »
I would like to update Linux kernel to the 5.x version. I know that I have to download Linux kernel sources, use TC configuration and apply all the patches. When Linux kernel compilation is done, I will have Linux kernel image (vmlinuz) and a lot of Linux kernel modules. TC is providing Linux kernel image (vmlinuz64) and filesystem files (corepure64.gz = rootfs64.gz + modules64.gz) and I know that I will have to regenerate modules64.gz file at least.

Here is my dilemma ..
When you are preparing a new TC release, how do you know which Linux kernel modules files go into modules64.gz? Do you have some kind of list somewhere? How do you resolve dependencies? The same question goes for Linux kernel TCZ packages .. how do you know which Linux kernel modules files belong together when preparing bluetooth-4.19.10-tinycore64.tcz, graphics-4.19.10-tinycore64.tcz, .. etc. How can you be sure that you are not missing a dependency?

Thank you for your support!

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11050
Re: Building Linux kernel and linux packages
« Reply #1 on: September 04, 2019, 02:40:01 AM »
https://github.com/tinycorelinux/sorter

This script creates the various extensions and modules.gz. The dependencies are manually checked by the .deps files it outputs.
The only barriers that can stop you are the ones you create yourself.

Offline caracalla

  • Newbie
  • *
  • Posts: 21
Re: Building Linux kernel and linux packages
« Reply #2 on: September 04, 2019, 07:27:30 AM »
In sorter.sh script there is a comment
Quote
#   Sorts out all built modules to module extensions, and a tarball for what goes in the base.
#
#   Before running, do a "make INSTALL_MOD_PATH=/tmp/somewhere/usr/local modules_install" and
#   any other preprocessing, like gzipping the modules and removing generated files in
#   lib/modules/KERNELVER.
#   Things will happen in the current directory.

Could you please give some guidance on which generated files should be removed?
Is far as I was able to figure out, these are modules.order, modules.builtin, modules.builtin.modinfo

Of course I could be wrong ..

Thanks!

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11050
Re: Building Linux kernel and linux packages
« Reply #3 on: September 04, 2019, 12:39:34 PM »
All regular files and symlinks in that directory.
The only barriers that can stop you are the ones you create yourself.

Offline caracalla

  • Newbie
  • *
  • Posts: 21
Re: Building Linux kernel and linux packages
« Reply #4 on: September 05, 2019, 06:21:02 AM »
I have successfully compiled Linux kernel 5.1.21 and using your script it was a breeze generating all the Linux kernel modules packages.
Thanks!

Quote
In the TC repository there is also Broadcom kernel driver modules packages available
Title:          wl-modules-4.14.10-tinycore64.tcz
Description:    broadcom wl kernel module
Version:        6.30.223.271

Who is preparing this package?
It would be great if there is a build I could use.

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14851
Re: Building Linux kernel and linux packages
« Reply #5 on: September 05, 2019, 06:30:00 AM »
It should be under tcz/src/wl

Offline caracalla

  • Newbie
  • *
  • Posts: 21
Re: Building Linux kernel and linux packages
« Reply #6 on: September 05, 2019, 08:15:14 AM »
This is exactly what I was searching for.
Thanks!