Автор Тема: Създаване на много embedded kernel.  (Прочетена 989 пъти)

d3v1ous

  • Напреднали
  • *****
  • Публикации: 127
    • Профил
Здравейте, идеята ми е да създам много орязано ядро за виртуалната машина (работеща под Debian Lenny - VirtualBox). За целта направих следния експеримент.

1. Свалих си най-ново ядро от kernel.org
2. Резархивирах го и написах make menuconfig за да видя как изглежда със стандартния си config.
3. Написах make localmodconfig за да ми добави модулите за моя хардуер.

Нямаше кой знае каква промяна.. За теста, след make localmodconfig изпълних отново make menuconfig и изключих поддръжката на sound cart-ата ми. След което написах отново make localmodconfig, като се надявах, че то ще включи отново поддръжката на sound cart-ата ми. Уви това не беше направено.

След което написах make menuconfig и нарочно изключих всички възможни опции в ядрото, т.е. навсякъде да е (N). След което написах пак make localmodconfig, за да видя дали ще бъдат включени модулите към моя хардуер, разбира се това не беше направено.

Някой може ли обясни как точно работи make localmodconfig и каква всъщност му е идеята. Благодаря.
Активен

d3v1ous

  • Напреднали
  • *****
  • Публикации: 127
    • Профил
Re: Създаване на много embedded kernel.
« Отговор #1 -: Feb 03, 2010, 17:28 »
Цитат
1.8. Easy local kernel configuration

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.

Гледам хората са писали, че ти unload-ва излишните модули и т.н. но :)) при мен нещо не сработи.
« Последна редакция: Feb 03, 2010, 17:32 от zeridon »
Активен

tyuio

  • Гост
Re: Създаване на много embedded kernel.
« Отговор #2 -: Feb 03, 2010, 17:31 »
Да ти кажа Кристияне не съм я ползвал още тая опция мисля че пуска lsmod преди работа ето ти нещо за четене. Най трябва да си вкарал и флашка за да е всичко ок например ама не знам де :)
http://www.linuxquestions.org/questions/slackware-14/easier-kernel-configuration-with-2.6.32-774072/
http://pdg86.wordpress.com/2009/12/09/example-compiling-2-6-32-kernel-in-slackware-64/
във втория линк има добри връзки за четене аз дето не харесвам Слакуер мога да кажа че по добро не намерих :)
Активен

ivo1204

  • Напреднали
  • *****
  • Публикации: 987
    • Профил
Re: Създаване на много embedded kernel.
« Отговор #3 -: Feb 04, 2010, 01:23 »

/usr/src/linux/scripts/kconfig/streamline_config.pl
------------------------------------------------------------

#  It's simple enough to figure out how this works.
#  If not, then you can ask me at stripconfig@goodmis.org
#
# 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
-------------------------------------------------------------------------
Активен

Подобни теми
Заглавие Започната от Отговора Прегледи Последна публикация
Embedded Systems
Идеи и мнения
BanishMemory 2 2135 Последна публикация Oct 29, 2005, 01:27
от
Embedded linux, arm...
Предложения за подобрения на този форум
gat3way 2 2969 Последна публикация Mar 10, 2007, 23:03
от ivo1204
Intel embedded raid technology 2
Настройка на хардуер
EazySnatch 0 2105 Последна публикация Mar 07, 2007, 09:28
от EazySnatch
Embedded linux developer
Търсене
Olias 0 2528 Последна публикация Jun 01, 2007, 11:26
от Olias
Embedded systems market analyst
Търсене
Olias 0 1815 Последна публикация Jun 01, 2007, 11:30
от Olias