Bug 27321 - Problem with builtin modules and different kernel types
Summary: Problem with builtin modules and different kernel types
Status: CLOSED FIXED
Alias: None
Product: Sisyphus
Classification: Development
Component: make-initrd (show other bugs)
Version: unstable
Hardware: all Linux
: P3 normal
Assignee: Alexey Gladkov
QA Contact: qa-sisyphus
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-05-11 14:42 MSK by Vitaly Kuznetsov
Modified: 2012-05-14 19:21 MSK (History)
5 users (show)

See Also:


Attachments
make-initrd -v -k 3.3.5-std-def-alt1 bug-report (168.03 KB, application/x-bzip)
2012-05-11 15:01 MSK, Vitaly Kuznetsov
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Vitaly Kuznetsov 2012-05-11 14:42:40 MSK

    
Comment 1 Vitaly Kuznetsov 2012-05-11 14:57:17 MSK
Пытаюсь собрать initrd для ядра std-def из-под ядра el-smp. Проблема в том, что не добавляется модуль scsi_mod т.к. в el-smp он встроенный. Не работает даже 
MODULES_PRELOAD="scsi_mod" make-initrd -v -k 3.3.5-std-def-alt1
с сообщением "add-module: Builtin module "scsi_mod""
Comment 2 Vitaly Kuznetsov 2012-05-11 15:01:03 MSK
Created attachment 5457 [details]
make-initrd -v -k 3.3.5-std-def-alt1 bug-report
Comment 3 Vitaly Kuznetsov 2012-05-11 15:32:27 MSK
Проблема в следующем:

# depinfo --set-version 3.3.5-std-def-alt1 scsi_mod
builtin scsi_mod
# find /lib/modules/3.3.5-std-def-alt1/ -name "scsi_mod.ko"
/lib/modules/3.3.5-std-def-alt1/kernel/drivers/scsi/scsi_mod.ko

т.е. depinfo работает некорректно
Comment 4 Alexey Gladkov 2012-05-11 16:47:59 MSK
Вот не оставляют шансов создатели kmod полюбить их.

kmod_module_get_initstate() лезет в /sys если модуля нет в modules.builtin. Все функции для работы с базой modules.builtin приватные. kmod_module_get_path() возвращает неинициализированный указатель если модуль builtin. И нет никаких путей получить эту информацию, хотя она есть.

Предётся вернуть старый код, который делает отдельный а-ля:

grep '/modname.ko$' modules.builtin.
Comment 5 Alexey Gladkov 2012-05-11 18:49:39 MSK
А не мог бы ты выполнить на этой машине:

$ runas modinfo /bin/kmod -k 3.3.5-std-def-alt1 scsi_mod
$ modinfo -k 3.3.5-std-def-alt1 scsi_mod

?
Comment 6 Vitaly Kuznetsov 2012-05-12 08:19:45 MSK
(В ответ на комментарий №5)
> А не мог бы ты выполнить на этой машине:
> 
> $ runas modinfo /bin/kmod -k 3.3.5-std-def-alt1 scsi_mod
> $ modinfo -k 3.3.5-std-def-alt1 scsi_mod

У меня на этой машине не был установлен kmod. Если установить, то получим следующее:

# runas modinfo /bin/kmod -k 3.3.5-std-def-alt1 scsi_mod
filename:       /lib/modules/3.3.5-std-def-alt1/kernel/drivers/scsi/scsi_mod.ko
license:        GPL
description:    SCSI core
srcversion:     9F74F6882E1F8B530A14AF9
depends:        
intree:         Y
vermagic:       3.3.5-std-def-alt1 SMP mod_unload modversions 
parm:           dev_flags:Given scsi_dev_flags=vendor:model:flags[,v:m:f] add black/white list entries for vendor and model with an integer value of flags to the scsi device info list (string)
parm:           default_dev_flags:scsi default device flag integer value (int)
parm:           max_luns:last scsi LUN (should be between 1 and 2^32-1) (uint)
parm:           scan:sync, async or none (string)
parm:           max_report_luns:REPORT LUNS maximum number of LUNS received (should be between 1 and 16384) (uint)
parm:           inq_timeout:Timeout (in seconds) waiting for devices to answer INQUIRY. Default is 20. Some devices may need more; most need less. (uint)
parm:           scsi_logging_level:a bit mask of logging levels (int)

# modinfo -k 3.3.5-std-def-alt1 scsi_mod
filename:       /lib/modules/3.3.5-std-def-alt1/kernel/drivers/scsi/scsi_mod.ko
license:        GPL
description:    SCSI core
srcversion:     9F74F6882E1F8B530A14AF9
depends:        
intree:         Y
vermagic:       3.3.5-std-def-alt1 SMP mod_unload modversions 
parm:           dev_flags:Given scsi_dev_flags=vendor:model:flags[,v:m:f] add black/white list entries for vendor and model with an integer value of flags to the scsi device info list (string)
parm:           default_dev_flags:scsi default device flag integer value (int)
parm:           max_luns:last scsi LUN (should be between 1 and 2^32-1) (uint)
parm:           scan:sync, async or none (string)
parm:           max_report_luns:REPORT LUNS maximum number of LUNS received (should be between 1 and 16384) (uint)
parm:           inq_timeout:Timeout (in seconds) waiting for devices to answer INQUIRY. Default is 20. Some devices may need more; most need less. (uint)
parm:           scsi_logging_level:a bit mask of logging levels (int)
Comment 7 Alexey Gladkov 2012-05-14 14:56:17 MSK
Не мог бы ты попробовать версию make-initrd из моего git ?
Comment 8 Repository Robot 2012-05-14 19:21:57 MSK
make-initrd-0.7.8-alt1 -> sisyphus:

* Mon May 14 2012 Alexey Gladkov <legion@altlinux> 0.7.8-alt1
- Fix detection of builtin modules (ALT#27321).
- Add guess-modules option.
- Add --no-depmod option.