You are not logged in.

#1 2020-02-05 10:55:30

Shepy
Member
Registered: 2020-01-29
Posts: 5

[ SOLVED ] Regarding building the kernel via Arch Build System

Hi,

Until then I was compiling a vanilla kernel following the Traditional compilation procedure. Plus some modifications.
In this way I managed to have a tiny kernel specially made for my machine, which boots in (kernel) 1.05s

Recently I wanted to try using the Arch Build System method.
I managed to compile and install, but apart from the .config I did not hack too much.

As almost everything goes through the PKGBUILD I am a bit lost, in terms of customization, since this is not normally my way of doing things.

So I have a few questions about it :

1. I saw that during the installation of the pkg, that mkinitcpio is a dependency and it will create an initramfs.
Normally I don't use any initramfs.
How can I deactivate this dependency and prevent the creation of an initramfs during the installation of the pkg ?


2. In the _package-headers() step I saw some "special" headers installation.

# http://bugs.archlinux.org/task/20402
  install -Dt "$builddir/drivers/media/usb/dvb-usb" -m644 drivers/media/usb/dvb-usb/*.h

Are they always installed ?


3. About MAKEFLAGS, cflags, -march= etc ...

  1. Should I specify them in /etc/makepkg.conf or in the Makefile arch/x86/Makefile ?

  2. If I want some Parallel Execution do I have to specify it in the build() step ? 

    make bzImage modules htmldocs
    make -j8 bzImage modules htmldocs

    Or will the MAKEFLAGS of /etc/makepkg.conf prevail ?


My english is very bad, my apologies.

Last edited by Shepy (2020-02-05 21:56:17)

Offline

#2 2020-02-05 12:03:08

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,232

Re: [ SOLVED ] Regarding building the kernel via Arch Build System

The only question here that's really kernel specific is the first one, the others are general PKGBUILD/makepkg basics you should make yourself familiar with before proceeding:

  1. Find the line(s)

      # Used by mkinitcpio to name the kernel
      echo "$pkgbase" | install -Dm644 /dev/stdin "$modulesdir/pkgbase"

    and comment/remove them, without a pkgbase file, mkinitcpio will ignore it for initramfs creation.

  2. They will "always" be installed as part of the -headers subpackage. If you don't install the headers package you aren't going to get any of the files that happen within that function, read about split packages: https://wiki.archlinux.org/index.php/PKGBUILD#pkgbase (and in general read that entire page)

  3. all of the things that are general part of the make invocation (and not directly tied to a specific target of the existing Makefile) should be properly declared in the makepkg.conf , all of the things you are asking about here are detailed in: https://wiki.archlinux.org/index.php/Makepkg

Last edited by V1del (2020-02-05 12:06:25)

Offline

#3 2020-02-05 12:50:02

Shepy
Member
Registered: 2020-01-29
Posts: 5

Re: [ SOLVED ] Regarding building the kernel via Arch Build System

The only question here that's really kernel specific is the first one, the others are general PKGBUILD/makepkg basics you should make yourself familiar with before proceeding

Indeed, thinking about it my questions are more related to makepkg. But as the PKGBUILD I am talking about is specifically related to the kernel and therefore must contain specific functions for the kernel compilation I thought that posting here was the right solution.

Without wanting to be mean, I find that the configuration layer added by this makepkg system is more complicated compared to a traditional kernel compilation. Of course there are advantages, too smile

PKGBUILD/makepkg basics

For the moment it's not yet "basic" for me, but it will come smile

1. Thank you for the explanation !
The comment "# Used by mkinitcpio to name the kernel" was misleading to me.

2. Thank you for the additional information and the reading advice.

3. Same smile

Offline

Board footer

Powered by FluxBB