LINUX.ORG.RU

Вопрос по «make LSMOD=xxx localmodconfig»

 , ,


0

2

Хочу собрать custom ядро для некоторого targetPC. На targetPC пакеты для сборки и т.п. ставить не хочу.
В инструкции https://github.com/torvalds/linux/blob/master/Documentation/admin-guide/READM... есть пример:

"make localmodconfig" Create a config based on current config and
                      loaded modules (lsmod). Disables any module
                      option that is not needed for the loaded modules.

                      To create a localmodconfig for another machine,
                      store the lsmod of that machine into a file
                      and pass it in as a LSMOD parameter.

              target$ lsmod > /tmp/mylsmod
              target$ scp /tmp/mylsmod host:/tmp

              host$ make LSMOD=/tmp/mylsmod localmodconfig
Копирую mylsmod на ПК где буду собирать, делаю как написано и получаю такое:
$ make LSMOD="/tmp/mylsmod" localmodconfig
using config: '/boot/config-4.19.80-pc'
WARNING: ACPI_THERMAL_REL is required, but nothing in the
  current config selects it.
WARNING: BT_QCA is required, but nothing in the
  current config selects it.
WARNING: BT_INTEL is required, but nothing in the
  current config selects it.
WARNING: SND_SOC_RT5640 is required, but nothing in the
  current config selects it.
WARNING: SND_SOC_RT5670 is required, but nothing in the
  current config selects it.
WARNING: SND_SST_IPC is required, but nothing in the
  current config selects it.
WARNING: SND_DMAENGINE_PCM is required, but nothing in the
  current config selects it.
WARNING: MFD_AXP20X is required, but nothing in the
  current config selects it.
WARNING: INTEL_SOC_DTS_IOSF_CORE is required, but nothing in the
  current config selects it.
WARNING: SND_COMPRESS_OFFLOAD is required, but nothing in the
  current config selects it.
WARNING: SND_SST_IPC_ACPI is required, but nothing in the
  current config selects it.
WARNING: BT_BCM is required, but nothing in the
  current config selects it.
WARNING: DW_DMAC_CORE is required, but nothing in the
  current config selects it.
WARNING: SND_SOC_RT5645 is required, but nothing in the
  current config selects it.
WARNING: BT_RTL is required, but nothing in the
  current config selects it.
WARNING: SND_SOC_ACPI_INTEL_MATCH is required, but nothing in the
  current config selects it.
WARNING: SND_SST_ATOM_HIFI2_PLATFORM is required, but nothing in the
  current config selects it.
WARNING: SND_SOC_ACPI is required, but nothing in the
  current config selects it.
WARNING: BT_RTL is required, but nothing in the
  current config selects it.
WARNING: SND_SOC_RT5645 is required, but nothing in the
  current config selects it.
WARNING: DW_DMAC_CORE is required, but nothing in the
  current config selects it.
WARNING: BT_BCM is required, but nothing in the
  current config selects it.
WARNING: SND_SST_IPC_ACPI is required, but nothing in the
  current config selects it.
WARNING: SND_SOC_ACPI is required, but nothing in the
  current config selects it.
WARNING: SND_SST_ATOM_HIFI2_PLATFORM is required, but nothing in the
  current config selects it.
WARNING: SND_SOC_ACPI_INTEL_MATCH is required, but nothing in the
  current config selects it.
WARNING: SND_SOC_RT5670 is required, but nothing in the
  current config selects it.
WARNING: SND_SST_IPC is required, but nothing in the
  current config selects it.
WARNING: BT_INTEL is required, but nothing in the
  current config selects it.
WARNING: SND_SOC_RT5640 is required, but nothing in the
  current config selects it.
WARNING: BT_QCA is required, but nothing in the
  current config selects it.
WARNING: ACPI_THERMAL_REL is required, but nothing in the
  current config selects it.
WARNING: INTEL_SOC_DTS_IOSF_CORE is required, but nothing in the
  current config selects it.
WARNING: SND_COMPRESS_OFFLOAD is required, but nothing in the
  current config selects it.
WARNING: MFD_AXP20X is required, but nothing in the
  current config selects it.
WARNING: SND_DMAENGINE_PCM is required, but nothing in the
  current config selects it.
WARNING: BT_RTL is required, but nothing in the
  current config selects it.
WARNING: SND_SOC_RT5645 is required, but nothing in the
  current config selects it.
WARNING: DW_DMAC_CORE is required, but nothing in the
  current config selects it.
WARNING: BT_BCM is required, but nothing in the
  current config selects it.
WARNING: SND_SST_IPC_ACPI is required, but nothing in the
  current config selects it.
WARNING: SND_SOC_ACPI is required, but nothing in the
  current config selects it.
WARNING: SND_SST_ATOM_HIFI2_PLATFORM is required, but nothing in the
  current config selects it.
WARNING: SND_SOC_ACPI_INTEL_MATCH is required, but nothing in the
  current config selects it.
WARNING: SND_SOC_RT5670 is required, but nothing in the
  current config selects it.
WARNING: SND_SST_IPC is required, but nothing in the
  current config selects it.
WARNING: BT_INTEL is required, but nothing in the
  current config selects it.
WARNING: SND_SOC_RT5640 is required, but nothing in the
  current config selects it.
WARNING: BT_QCA is required, but nothing in the
  current config selects it.
WARNING: ACPI_THERMAL_REL is required, but nothing in the
  current config selects it.
WARNING: INTEL_SOC_DTS_IOSF_CORE is required, but nothing in the
  current config selects it.
WARNING: SND_COMPRESS_OFFLOAD is required, but nothing in the
  current config selects it.
WARNING: MFD_AXP20X is required, but nothing in the
  current config selects it.
WARNING: SND_DMAENGINE_PCM is required, but nothing in the
  current config selects it.
module snd_soc_acpi_intel_match did not have configs CONFIG_SND_SOC_ACPI_INTEL_MATCH
module bluetooth did not have configs CONFIG_BT
module intel_soc_dts_iosf did not have configs CONFIG_INTEL_SOC_DTS_IOSF_CORE
module 8250_dw did not have configs CONFIG_SERIAL_8250_DW
module snd_pcm_dmaengine did not have configs CONFIG_SND_DMAENGINE_PCM
module axp20x did not have configs CONFIG_MFD_AXP20X
module dw_dmac did not have configs CONFIG_DW_DMAC
module punit_atom_debug did not have configs CONFIG_PUNIT_ATOM_DEBUG
module input_leds did not have configs CONFIG_INPUT_LEDS
module axp288_adc did not have configs CONFIG_AXP288_ADC
module sdhci did not have configs CONFIG_MMC_SDHCI
module ip_tables did not have configs CONFIG_IP_NF_IPTABLES
module intel_cht_int33fe did not have configs CONFIG_INTEL_CHT_INT33FE
module snd_soc_rt5670 did not have configs CONFIG_SND_SOC_RT5670
module snd_soc_sst_atom_hifi2_platform did not have configs CONFIG_SND_SST_ATOM_HIFI2_PLATFORM
module snd_soc_acpi did not have configs CONFIG_SND_SOC_ACPI
module snd_soc_rt5640 did not have configs CONFIG_SND_SOC_RT5640
module roles did not have configs CONFIG_USB_ROLE_SWITCH
module int3406_thermal did not have configs CONFIG_INT3406_THERMAL
module joydev did not have configs CONFIG_INPUT_JOYDEV
module int3403_thermal did not have configs CONFIG_INT340X_THERMAL
module snd_compress did not have configs CONFIG_SND_COMPRESS_OFFLOAD
module btrtl did not have configs CONFIG_BT_RTL
module axp20x_pek did not have configs CONFIG_INPUT_AXP20X_PEK
module aes_i586 did not have configs CONFIG_CRYPTO_AES_586
module snd_hdmi_lpe_audio did not have configs CONFIG_HDMI_LPE_AUDIO
module btintel did not have configs CONFIG_BT_INTEL
module btbcm did not have configs CONFIG_BT_BCM
module axp20x_i2c did not have configs CONFIG_MFD_AXP20X_I2C
module snd_soc_core did not have configs CONFIG_SND_SOC
module dw_dmac_core did not have configs CONFIG_DW_DMAC_CORE
module mac_hid did not have configs CONFIG_MAC_EMUMOUSEBTN
module sdhci_acpi did not have configs CONFIG_MMC_SDHCI_ACPI
module snd_intel_sst_core did not have configs CONFIG_SND_SST_IPC
module int340x_thermal_zone did not have configs CONFIG_INT340X_THERMAL
module gpio_keys did not have configs CONFIG_KEYBOARD_GPIO
module acpi_thermal_rel did not have configs CONFIG_ACPI_THERMAL_REL
module mmc_block did not have configs CONFIG_MMC_BLOCK
module axp288_fuel_gauge did not have configs CONFIG_AXP288_FUEL_GAUGE
module rfcomm did not have configs CONFIG_BT_RFCOMM
module mei_txe did not have configs CONFIG_INTEL_MEI_TXE
module extcon_axp288 did not have configs CONFIG_EXTCON_AXP288
module lpc_ich did not have configs CONFIG_LPC_ICH
module processor_thermal_device did not have configs CONFIG_INT340X_THERMAL
module cfg80211 did not have configs CONFIG_CFG80211
module x_tables did not have configs CONFIG_NETFILTER_XTABLES
module sch_fq_codel did not have configs CONFIG_NET_SCH_FQ_CODEL
module snd_soc_rt5645 did not have configs CONFIG_SND_SOC_RT5645
module intel_soc_dts_thermal did not have configs CONFIG_INTEL_SOC_DTS_THERMAL
module r8723bs did not have configs CONFIG_RTL8723BS
module intel_int0002_vgpio did not have configs CONFIG_INTEL_INT0002_VGPIO
module int3400_thermal did not have configs CONFIG_INT340X_THERMAL
module snd_soc_sst_bytcr_rt5640 did not have configs CONFIG_SND_SOC_INTEL_BYTCR_RT5640_MACH
module dptf_power did not have configs CONFIG_DPTF_POWER
module soc_button_array did not have configs CONFIG_INPUT_SOC_BUTTON_ARRAY
module snd_intel_sst_acpi did not have configs CONFIG_SND_SST_IPC_ACPI
module btqca did not have configs CONFIG_BT_QCA
module bnep did not have configs CONFIG_BT_BNEP
module snd_soc_rl6231 did not have configs CONFIG_SND_SOC_RL6231
module hci_uart did not have configs CONFIG_BT_HCIUART
module axp288_charger did not have configs CONFIG_AXP288_CHARGER
#
# configuration written to .config
#
По выхлопу видно, что make берёт почему-то текущий конфиг ядра системы /boot/config-4.19.80-pc и всё делает не так как задумывалось, в результирующем .config отсутствуют все нужные модули (axp288_charger и т.д.).

Документация устарела? Как правильно это сделать?

★★★★★

Последнее исправление: superuser (всего исправлений: 3)

и всё делает не так как задумывалось

А как задумавалось? Если на другой машине другой конфиг ядра, то как компилящее ядро машина его узнает? lsmod это ведь только про модули.

mky ★★★★★
()
Ответ на: комментарий от mky

Вроде-бы понял.

Проблема была в том, что конфиги ядер на host и targetPC сильно отличались,
а так как модули имеют зависимости, то они и не включались как задумывалось.
Надо было взять конфиг с targetPC, переименовать в .config и поместить его в дир. с исходником ядра.
После этого можно запускать $ make LSMOD=/tmp/mylsmod localmodconfig

superuser ★★★★★
() автор топика
Вы не можете добавлять комментарии в эту тему. Тема перемещена в архив.