ubuntu debian 模組載入方式

2021-06-23 10:00:57 字數 713 閱讀 7499

如果你希望系統啟動時自動載入你的模組,有兩種方式:

一種是將你的模組包含進initrd檔案裡,一般情況下不需要使用這種方式,除非不載入你的模組的話核心不能正常啟動。參見initramfs-tools軟體包的相關資訊。

另一種是通過配置檔案完成的,主要的配置檔案是/etc/modules 。

比如你的模組名字叫mymod,載入引數是paraa=1,就在/etc/modules加入一行

mymod paraa=1

這樣,系統啟動時就自動以引數paraa=1載入mymod模組。

你還可以通過/etc/modprobe.d/目錄下的配置檔案進行進一步的配置,這個目錄下的每個.conf檔案都會被讀取。具體用法請man modprobe.d。

/etc/moduels用於系統自動載入模組的配置。而/etc/modprob.d/目錄下的配置檔案在每次載入模組時(包括自動和手動)都會起作用,如下所示:

root@lemaker:/etc/modprobe.d# catbpi-blacklist.conf

# blacklist spi and i2c by default (manyusers don't need them)

#blacklist spi-sun7i

blacklist i2c-sunxi

Ubuntu Debian中locale的配置教程

常見錯誤 1.no such file 用locale 命令的時候就會出現 locale cannot set lc ctype to default locale no such file or directory locale cannot set lc messages to default ...

Ubuntu Debian中locale的配置教程

常見錯誤 1.no such file 用locale 命令的時候就會出現 locale cannot set lc ctype to default locale no such file or directory locale cannot set lc messages to default ...

python載入模組 Python 模組的載入順序

基本概念 module 模組,乙個 py 檔案或以其他檔案形式存在的可被匯入的就是乙個模組 package 包,包含有 init 檔案的資料夾 relative path 相對路徑,相對於某個目錄的路徑 absolute path 絕對路徑,全路徑 python 直譯器是如何查詢包和模組的 pyth...