You are not logged in.

#26 2009-12-05 04:19:30

markc
Member
From: Gold Coast, Australia
Registered: 2007-05-15
Posts: 502
Website

Re: kernel 2.6.32 package not in [testing]?

Has anyone tried using this new feature to build a custom kernel that does not require an initrd image?

1.8. Easy local kernel configuration (from http://kernelnewbies.org/LinuxChanges)

Most people uses the kernel shipped by distros - and that's good. But some people like to compile their own kernels from kernel.org, or maybe they like following the Linux development and want to try it. Configuring your own kernel, however, has become a very difficult and tedious task - there're too many options, and some times userspace software will stop working if you don't enable some key option. You can use a standard distro .config file, but it takes too many time to compile all the options it enables.

To make easier the process of configuration, a new build target has been added: make localmodconfig. It runs "lsmod" to find all the modules loaded on the current running system. It will read all the Makefiles to map which CONFIG enables a module. It will read the Kconfig files to find the dependencies and selects that may be needed to support a CONFIG. Finally, it reads the .config file and removes any module "=m" that is not needed to enable the currently loaded modules. With this tool, you can strip a distro .config of all the unuseful drivers that are not needed in our machine, and it will take much less time to build the kernel. There's an additional "make localyesconfig" target, in case you don't want to use modules and/or initrds.

Offline

#27 2009-12-05 04:29:46

venky80
Member
Registered: 2007-05-13
Posts: 1,002

Re: kernel 2.6.32 package not in [testing]?

B wrote:
skottish wrote:
sand_man wrote:

How do I subscribe?

Send me a check for $1,000,000 US and I'll send you a shiny new kernel.

Unlike skottish I am much more lenient - just send me your Visa card details and we're done with it.

here take is VISA 4408 0412 3456 7890 cvv 332  Name I will leave you to guess..;)


Acer Aspire V5-573P Antergos KDE

Offline

#28 2009-12-05 05:08:56

mikesd
Member
From: Australia
Registered: 2008-02-01
Posts: 788
Website

Re: kernel 2.6.32 package not in [testing]?

markc wrote:

Has anyone tried using this new feature to build a custom kernel that does not require an initrd image?

1.8. Easy local kernel configuration (from http://kernelnewbies.org/LinuxChanges)

<snip>

Good read. This looks interesting. I haven't run a custom kernel in ages though I may have a look at this. Sounds cool.

Btrfs has new features too.

Offline

#29 2009-12-05 06:02:46

markc
Member
From: Gold Coast, Australia
Registered: 2007-05-15
Posts: 502
Website

Re: kernel 2.6.32 package not in [testing]?

@mikesd: yeah, I normally wouldn't bother with a custom kernel because it's too much work to maintain over the long term for multiple machines but if the kernel devs are going to maintain this method of taking a modules snapshot of my current system and allowing me to build a quick booting customised kernel then... I'm in. Can anyone suggest a good PKGBUILD to start from?

Re btrfs, yes that looks like it could be usable too. I'm struggling to find a NoSQL database system that does not require Java or python and one idea I'd like to test is to mount -o loop a 1Gb btrfs image with, say, a really small 128 byte leafsize so files could be used as records in a directory "table" (128 bytes is way too small for a day-to-day filesystem.) All databases end up using the filesystem so why not use a filesystem directly, especially one that has fast database-like b-tree lookups.

Offline

#30 2009-12-05 09:36:50

DIDI2002
Member
Registered: 2009-08-06
Posts: 66

Re: kernel 2.6.32 package not in [testing]?

Has anyone tried using this new feature to build a custom kernel that does not require an initrd image?

"make localmodconfig", works without initrd (I added ext4 and disabled initrd support manually) smile

Without loading an initrd, boot-times reduced by ~4s, KMS finally works great.
2.6.32 really improved from rc1 to final, great release!
But probably, for every feature that works for me, someone else will have trouble with his hardware...

Offline

#31 2009-12-05 13:16:26

n0kS
Member
Registered: 2009-10-19
Posts: 25
Website

Re: kernel 2.6.32 package not in [testing]?

 _________________________________________ 
/ Linux phr33d0m.info 2.6.32-phr33d0m #1  \
| SMP PREEMPT Fri Dec 4 03:07:38 CET 2009 |
| x86_64 AMD Phenom(tm) 9750 Quad-Core    |
\ Processor AuthenticAMD GNU/Linux        /
 ----------------------------------------- 
      \                    / \  //\
       \    |\___/|      /   \//  \\
            /0  0  \__  /    //  | \ \    
           /     /  \/_/    //   |  \  \  
           @_^_@'/   \/_   //    |   \   \ 
           //_^_/     \/_ //     |    \    \
        ( //) |        \///      |     \     \
      ( / /) _|_ /   )  //       |      \     _\
    ( // /) '/,_ _ _/  ( ; -.    |    _ _\.-~        .-~~~^-.
  (( / / )) ,-{        _      `-.|.-~-.           .~         `.
 (( // / ))  '/\      /                 ~-. _ .-~      .-~^-.  \
 (( /// ))      `.   {            }                   /      \  \
  (( / ))     .----~-.\        \-'                 .~         \  `. \^-.
             ///.----..>        \             _ -~             `.  ^-`  ^-_
               ///-._ _ _ _ _ _ _}^ - - - - ~                     ~-- ,.-~
                                                                  /.-~

If you want it... compile it yourself wink

Offline

#32 2009-12-05 13:41:30

markc
Member
From: Gold Coast, Australia
Registered: 2007-05-15
Posts: 502
Website

Re: kernel 2.6.32 package not in [testing]?

FWIW, this is a start using localyesconfig. I presume this is on-topic, as it allows the OP to consider installing a non-modular 2.6.32 kernel.

# Maintainer: Eth-OS @ http://eth-os.org (AGPLv3)

pkgname=kernel26-local
pkgver=$(curl -s \
  'http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=blob_plain;f=Makefile;hb=HEAD' | \
  head -n 4 | \
  sed 's/[^0-9]//g' | \
  sed ':a;N;$!ba;s/\n/./g' | \
  sed 's/\.*$//')
pkgrel=$(date +%Y%m%d%H)
pkgdesc="The Linux Kernel from the Linus Torvalds git tree"
url="http://www.kernel.org/"
license=(GPL2)

arch=(i686 x86_64)
depends=(coreutils)
makedepends=(make perl git)
source=()

build()
{
  getsource || return 1
  cd $srcdir/$pkgname
  [ -x /sbin/lsmod ] || sudo ln -s /bin/lsmod /sbin/lsmod
  make localyesconfig && make || return 1
# TODO: package the resulting kernel
}

getsource()
{
  [ -d $SRCDEST ] && cd $SRCDEST || return 1
  if [ -d $pkgname/.git ]; then
    cd $pkgname && git pull origin
  else
    git clone --depth 1 git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git $pkgname
  fi
  rsync -a --delete $SRCDEST/$pkgname/ $srcdir/$pkgname
}

Offline

#33 2009-12-05 14:06:29

Allan
Pacman
From: Brisbane, AU
Registered: 2007-06-09
Posts: 11,390
Website

Re: kernel 2.6.32 package not in [testing]?

n0kS wrote:

If you want it... compile it yourself wink

Or... just install it from [testing].  It has been there a few hours now.

Offline

#34 2009-12-05 14:28:07

markc
Member
From: Gold Coast, Australia
Registered: 2007-05-15
Posts: 502
Website

Re: kernel 2.6.32 package not in [testing]?

It's not available via my local AU mirrors as I type this.

Offline

#35 2009-12-05 14:32:30

hungerfish
Member
Registered: 2009-09-13
Posts: 254

Re: kernel 2.6.32 package not in [testing]?

You can't just compile a kernel from kernel.org, because you run into the issue that I mentioned earlier. With arch-kernels, all hard disks are enumerated with /dev/sdXy. Vanilla does /dev/hdXy.
This will lead to fsck-complaining about 'unclean' file systems once you boot with custom kernel. changing entries in /etc/fstab solves this, and the system will come up nicely. But obviously this is annoying.

So I repeat my question, where does this get configured/which patch that arch-kernels use is responsible for this change?

Btw. this has nothing todo with devtmpfs, the 'in-kernel /dev-tree', which I left disabled in my config as I think it wont play nice with arch.


Beetles and bacteria are vastly more successful than humans in terms of survival.

Offline

#36 2009-12-05 14:34:59

.:B:.
Forum Fellow
Registered: 2006-11-26
Posts: 5,819
Website

Re: kernel 2.6.32 package not in [testing]?

hungerfish wrote:

You can't just compile a kernel from kernel.org, because you run into the issue that I mentioned earlier. With arch-kernels, all hard disks are enumerated with /dev/sdXy. Vanilla does /dev/hdXy

I've been compiling kernels from kernel.org since I ran Linux pretty much, and I've never had problems with sda/hda swapping.

Don't take this the wrong way - but the problem is on your side. Don't start from scratch, take the Arch config and throw out what you don't need.

I'm a 100% sure you're using the old PATA layer and not the libata one.


Got Leenucks? :: Arch: Power in simplicity :: Get Counted! Registered Linux User #392717 :: Blog thingy

Offline

#37 2009-12-05 14:41:30

markc
Member
From: Gold Coast, Australia
Registered: 2007-05-15
Posts: 502
Website

Re: kernel 2.6.32 package not in [testing]?

@hungerfish: I don't know the answer to your question but I just booted on a non-modular vmlinuz kernel from the above quasi PKGBUILD and I have /dev/sda* entries in my /etc/fstab. I haven't seen an empty /lib/modules for ~10 years!

Offline

#38 2009-12-05 15:20:10

hungerfish
Member
Registered: 2009-09-13
Posts: 254

Re: kernel 2.6.32 package not in [testing]?

I'm a 100% sure you're using the old PATA layer and not the libata one.

Yes, that's kind of what I thought might be my problem, could you perhaps elaborate?!
I'm not entirely sure 'what is what' in regard to 'old' and 'new' ata-layer.

Also, I did not start from scratch,I used the new make localmodconfig which kind of worked well, but still resulted in this switching behaviour.
I did this without the PKGBUILD, but I that shouldn't matter..


Beetles and bacteria are vastly more successful than humans in terms of survival.

Offline

#39 2009-12-05 15:22:05

flamelab
Member
From: Athens, Hellas (Greece)
Registered: 2007-12-26
Posts: 2,160

Re: kernel 2.6.32 package not in [testing]?

localmodconfig won't use Arch's config which (I guess) changes the libata behaviour (from hdX to sdX). Try to merge them, if you know how to do that smile

Offline

#40 2009-12-05 15:31:39

hungerfish
Member
Registered: 2009-09-13
Posts: 254

Re: kernel 2.6.32 package not in [testing]?

Why wouldn't it use Arch's config?? My running kernel is arch-kernel minus the stuff my box doesn't use, as it uses libata, it should generate a config that fits, as far as my reasoning takes me.
What part in the kernel-configuration is relevant for deciding if new-libata or the 'old-pata-layer' gets used???

EDIT: Ok, I've managed to build a kernel that does not do this swapping. Please tell me if I've understood this correctly:

'Old-pata-layer': --> Device Drivers --> <*>ATA/ATAPI/MFM/RLL support --><*> generic ATA/ATAPI disk support
                                                                         [*] ATA disk support
                                                                          + a driver from ***PCI IDE chipsets support***

'New-libata':  --> Device Drivers --> <*>ATA/ATAPI/MFM/RLL support --><*> generic ATA/ATAPI disk support
                                                                      [*] ATA disk support
                                      <*> Serial ATA (prod) and Parallel ATA (experimental) drivers -->[*] ATA SFF support
                                                                                                        + a driver from that list

If above is correct, why do I seemingly have to enable 'both paths', and then choose the driver I need/want?
I tried completely disabling ATA/ATAPI/MFM/RLL support, but that results in failure.

Also, the kernel is now complaining that it can't find the firmware for my radeon. What do I need to do to make it find it?

Last edited by hungerfish (2009-12-05 16:03:31)


Beetles and bacteria are vastly more successful than humans in terms of survival.

Offline

#41 2009-12-05 16:06:39

falconindy
Developer
From: New York, USA
Registered: 2009-10-22
Posts: 4,111
Website

Re: kernel 2.6.32 package not in [testing]?

markc wrote:

Has anyone tried using this new feature to build a custom kernel that does not require an initrd image?

1.8. Easy local kernel configuration (from http://kernelnewbies.org/LinuxChanges)

Most people uses the kernel shipped by distros - and that's good. But some people like to compile their own kernels from kernel.org, or maybe they like following the Linux development and want to try it. Configuring your own kernel, however, has become a very difficult and tedious task - there're too many options, and some times userspace software will stop working if you don't enable some key option. You can use a standard distro .config file, but it takes too many time to compile all the options it enables.

To make easier the process of configuration, a new build target has been added: make localmodconfig. It runs "lsmod" to find all the modules loaded on the current running system. It will read all the Makefiles to map which CONFIG enables a module. It will read the Kconfig files to find the dependencies and selects that may be needed to support a CONFIG. Finally, it reads the .config file and removes any module "=m" that is not needed to enable the currently loaded modules. With this tool, you can strip a distro .config of all the unuseful drivers that are not needed in our machine, and it will take much less time to build the kernel. There's an additional "make localyesconfig" target, in case you don't want to use modules and/or initrds.

If you want to use localmodconfig on Arch, you need to make a symlink in /sbin to /bin/lsmod.

Edit: I'm not happy with what localmodconfig does. Any device drivers you've compiled into the kernel (filesystem drivers, network support) are skipped/disabled. Nuts to that. Only makes more work for me when I can just as easily port over my old config from /proc/config.gz.

Last edited by falconindy (2009-12-05 16:47:01)

Offline

#42 2009-12-05 16:21:57

hokasch
Member
Registered: 2007-09-23
Posts: 1,461

Re: kernel 2.6.32 package not in [testing]?

Remember that localmodconfig will strip all drivers for usb devices not plugged in at compile time.
A comment from aur:

cmorlok wrote:

I solved it for me in the following way, maybe this could be useful for others: I ran localmodconfig, then I stripped all USB entries from the generated config and replaced it by the original ones:

make localmodconfig
grep -v USB .config > .config.local
grep USB ../config.x86_64 >> .config.local
mv .config.local .config
make oldconfig

Offline

#43 2009-12-05 16:35:00

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: kernel 2.6.32 package not in [testing]?

Something to consider here: localmodconfig, like any automated process, will give you some version of whatever it's meant to give you, but it is not meant to replace a thoroughly-researched manual configuration. As quoted, it has been provided "To make easier the process of configuration" - I understand that to mean that it will give you a configuration that you can use a starting point, not a finished product.

So use it by all means, but don't expect miracles, and always remember - you're Archers. You LIKE manual configs. smile

Offline

#44 2009-12-06 02:53:51

markc
Member
From: Gold Coast, Australia
Registered: 2007-05-15
Posts: 502
Website

Re: kernel 2.6.32 package not in [testing]?

I LIKE plain text config files where I can copy n paste settings (compared to gui gunk) but a computer is a computer and should be held responsible for doing most of the mundane self-supporting work leaving me, the human attached to the keyboard, free to develop on the edge where standard computer tech hasn't gone yet (or something like that). Anyway, I'm sure the streamline_config.pl script could be improved to just about get it right so the procedure could be reliably automated, perhaps with yet another config file with local specifics like extra nvidia and vbox modules etc. I think it's a really interesting concept and the foundational howto is mostly in this script...

From scripts/kconfig/streamline_config.pl

# What it does?
#
#   If you have installed a Linux kernel from a distribution
#   that turns on way too many modules than you need, and
#   you only want the modules you use, then this program
#   is perfect for you.
#
#   It gives you the ability to turn off all the modules that are
#   not loaded on your system.
#
# Howto:
#
#  1. Boot up the kernel that you want to stream line the config on.
#  2. Change directory to the directory holding the source of the
#       kernel that you just booted.
#  3. Copy the configuraton file to this directory as .config
#  4. Have all your devices that you need modules for connected and
#      operational (make sure that their corresponding modules are loaded)
#  5. Run this script redirecting the output to some other file
#       like config_strip.
#  6. Back up your old config (if you want too).
#  7. copy the config_strip file to .config
#  8. Run "make oldconfig"
#
#  Now your kernel is ready to be built with only the modules that
#  are loaded.
#
# Here's what I did with my Debian distribution.
#
#    cd /usr/src/linux-2.6.10
#    cp /boot/config-2.6.10-1-686-smp .config
#    ~/bin/streamline_config > config_strip
#    mv .config config_sav
#    mv config_strip .config
#    make oldconfig

Offline

Board footer

Powered by FluxBB