Tiny Core Linux

Tiny Core Base => TCB Talk => Topic started by: caracalla on September 03, 2019, 11:38:49 PM

Title: Building Linux kernel and linux packages
Post by: caracalla on September 03, 2019, 11:38:49 PM
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!
Title: Re: Building Linux kernel and linux packages
Post by: curaga on September 03, 2019, 11:40:01 PM
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.
Title: Re: Building Linux kernel and linux packages
Post by: caracalla on September 04, 2019, 04: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!
Title: Re: Building Linux kernel and linux packages
Post by: curaga on September 04, 2019, 09:39:34 AM
All regular files and symlinks in that directory.
Title: Re: Building Linux kernel and linux packages
Post by: caracalla on September 05, 2019, 03: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.
Title: Re: Building Linux kernel and linux packages
Post by: Juanito on September 05, 2019, 03:30:00 AM
It should be under tcz/src/wl
Title: Re: Building Linux kernel and linux packages
Post by: caracalla on September 05, 2019, 05:15:14 AM
This is exactly what I was searching for.
Thanks!