zc@zc-hp-zhan-99-mobile-workstation-g1:~$ uname -a
linux zc-hp-zhan-99-mobile-workstation-g1 5.3.13 #1 smp fri feb 7 15:01:04 cst 2020 x86_64 x86_64 x86_64 gnu/linux
zc@zc-hp-zhan-99-mobile-workstation-g1:~$ sudo apt-cache search linux-source
linux-source - linux kernel source with ubuntu patcheslinux-source-4.15.0 - linux kernel source for version 4.15.0 with ubuntu patches
linux-source-4.18.0 - linux kernel source for version 4.18.0 with ubuntu patches
linux-source-5.0.0 - linux kernel source for version 5.0.0 with ubuntu patches
linux-source-5.3.0 - linux kernel source for version 5.3.0 with ubuntu patches
linux-source-3.13.0 - linux kernel source for version 3.13.0 with ubuntu patches
zc@zc-hp-zhan-99-mobile-workstation-g1:~$ sudo apt-get install linux-source-***
zc@zc-hp-zhan-99-mobile-workstation-g1:~$ cd /usr/src/linux-source-***解壓檔案zc@zc-hp-zhan-99-mobile-workstation-g1: /usr/src/linux-source-5.3.0$ ls
debian debian.hwe linux-source-5.3.0.tar.bz2
zc@zc-hp-zhan-99-mobile-workstation-g1: /usr/src/linux-source-5.3.0$ tar xvjf linux-source-5.3.0.tar.bz2進入解壓好的目錄
zc@zc-hp-zhan-99-mobile-workstation-g1: /usr/src/linux-source-5.3.0$ cd linux-source-5.3.0/
zc@zc-hp-zhan-99-mobile-workstation-g1: /usr/src/linux-source-5.3.0/linux-source-5.3.0$sudo make menuconfig找到device drivers -->,回車選擇;
繼續找到network device support -->,回車選擇;
找到universal tun/tap device driver support,看到前面是<*>,鍵盤輸入m,變成,退出並儲存,回到終端。
sudo make -j8 #8表示8執行緒編譯編譯中可能出現的錯誤
第乙個錯誤是fatal error: openssl/opensslv.h: no such file or directory,
這是因為沒有安裝openssl的,需要先安裝openssl:
sudo apt-get install libssl-dev
第二個錯誤是bc: not found,需要安裝bc:
sudo apt-get install bc
編譯可能花費較長時間。。。。
sudo make modules_install
sudo make install
zc@zc-hp-zhan-99-mobile-workstation-g1:$ modinfo tun如果顯示為下面結果,恭喜你成功了
description: universal tun/tap device driver
srcversion: 6f33dadd625cff3a126d0d0
depends:
retpoline: y
intree: y
name: tun
vermagic: 5.3.13 smp mod_unload
signat: pkcs#7
signer:
sig_key:
sig_hashalgo: md4
載入helloworld模組
include include if config modversions 1 define modversions include endif include include include module license gpl static int hello init void static ...
Odoo模組載入
odoo的啟動是通過openerp server指令碼完成,它是系統的入口。然後載入配置檔案openerp server.conf 或者 openerp serverrc openerp server.conf的主要內容 這個檔案預設是沒有的,odoo系統會有乙個預設值,但是一般情況我們都需配置這個...
angular模組載入
1.配置 在模組的載入階段,angularjs會在提供者註冊和配置的過程中對模組進行配置。需要特別注意,angularjs會以這些函式書寫和註冊的順序來執行它們。當對模組進行配置時,需要格外注意只有少數幾種型別的物件可以被注入到config 函式中 提供者和常量。2.執行塊 和配置塊不同,執行塊在注...