WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Re-package modules64  (Read 1973 times)

Offline Tualua

  • Newbie
  • *
  • Posts: 2
Re-package modules64
« on: July 23, 2021, 01:15:17 AM »
Hello!

What is correct way of creating modules64.gz? I'm netbooting TinyCore64 - http://tinycorelinux.net/12.x/x86_64/release/distribution_files/

With original files everything works fine. Here is my ipxe script

Code: [Select]
kernel /vmlinuz64 initrd=rootfs64.gz initrd=modules64.gz
initrd /rootfs64.gz
initrd /modules64.gz

But I need mlx5_core module so I build kernel from source http://tinycorelinux.net/12.x/x86_64/release/src/kernel/ with this module enabled. I looked at the original modules64.gz and tried to do the same

Command to build
Code: [Select]
find ./ -depth -print | cpio -o -H newc | gzip -2 > /mnt/sda1/tce/src/bin/modules64.gz
I replaced original vmlinuz64 and modules64 with bzImage from newly built files and tried to boot. TC booted but it looks like it didn't load any modules because keyboard doesn't work.

What am I doing wrong? Is there any guide how to do this properly?

Directory structure of my modules64.gz

Code: [Select]
tree -L 5
.
|-- lib
|   `-- modules
|       `-- 5.10.3-tinycore64
|           |-- kernel
|           |   |-- arch
|           |   |-- crypto
|           |   |-- drivers
|           |   |-- fs
|           |   |-- lib
|           |   |-- net
|           |   `-- sound
|           |-- kernel.tclocal -> /usr/local/lib/modules/5.10.3-tinycore64/kernel/
|           |-- modules.alias
|           `-- modules.dep
`-- usr
    `-- local
        `-- lib
            `-- modules
                `-- 5.10.3-tinycore64

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11590
Re: Re-package modules64
« Reply #1 on: July 23, 2021, 07:44:54 AM »
Hi Tualua
Welcome to the forum

Go to the instructions posted here:
http://forum.tinycorelinux.net/index.php/topic,23797.msg149402.html#msg149402
Start with the line that says:
Quote
# Place the modules somewhere for packaging.

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11044
Re: Re-package modules64
« Reply #2 on: July 23, 2021, 12:26:56 PM »
It's useful to boot your custom setup in a VM too. They usually use ps/2 keyboards, which should work without any modules, letting you view logs etc.
The only barriers that can stop you are the ones you create yourself.

Offline Tualua

  • Newbie
  • *
  • Posts: 2
Re: Re-package modules64
« Reply #3 on: July 23, 2021, 11:15:50 PM »
Got it finally.
First of all, I compiled kernel with built-in usb driver and found out that modules folder is missing. After reading wiki for a while I realized that correct command was right there  ;D

Now everything is fine