檢視 Kernel 的原始碼
←
Kernel
前往:
導覽
、
搜尋
由於下列原因,您沒有權限進行 編輯此頁面 的動作:
您請求的操作只有這個群組的使用者能使用:
使用者
您可以檢視並複製此頁面的原始碼。
== source == * <nowiki>git clone git://github.com/raspberrypi/linux.git</nowiki> * <nowiki>svn co file:///var/svn/rpi_linux/trunk</nowiki> == toolchain == * <nowiki>git clone https://github.com/raspberrypi/tools</nowiki> == Prepare SD == * Transfer the following files from the firmware/boot directory to the Raspberry pi /boot directory: bootcode.bin fixup.dat start.elf * cp firmware/hardfp/opt/ /media/root/opt/ -rf == build == * make mrproper * cp arch/arm/configs/bcmrpi_defconfig .config * export CCPREFIX=/path/to/your/compiler/binary/prefix-of-binary- * make ARCH=arm CROSS_COMPILE=${CCPREFIX} oldconfig * make ARCH=arm CROSS_COMPILE=${CCPREFIX} == libraries == * pi@raspberrypi:~$ ls /lib/ <br> arm-linux-gnueabihf libip4tc.so.0 libnih.so.1.0.0<br> cpp libip4tc.so.0.1.0 libxtables.so.7<br> firmware libip6tc.so.0 libxtables.so.7.0.0<br> init libip6tc.so.0.1.0 lsb<br> klibc-sO6SifHCdmbehHGtm0y1yHu6vb0.so libipq.so.0 modprobe.d<br> ld-linux-armhf.so.3 libipq.so.0.0.0 modules<br> ld-linux.so.3 libiptc.so.0 systemd<br> libaudit.so.0 libiptc.so.0.0.0 terminfo<br> libaudit.so.0.0.0 libnih-dbus.so.1 udev<br> libauparse.so.0 libnih-dbus.so.1.0.0 xtables<br> libauparse.so.0.0.0 libnih.so.1<br> == Update kernel in Raspbian == === Get source === # $ git clone --depth=1 https://github.com/raspberrypi/linux # $ sudo apt-get install bc === Raspberry Pi 1 (or Compute Module) Default Build Configuration === # $ cd linux # $ KERNEL=kernel # $ make bcmrpi_defconfig === Raspberry Pi 2 Default Build Configuration === # $ cd linux # $ KERNEL=kernel7 # $ make bcm2709_defconfig === Build and install the kernel, modules and Device Tree blobs === # $ make zImage modules dtbs # $ sudo make modules_install # $ sudo cp arch/arm/boot/dts/*.dtb /boot/ # $ sudo cp arch/arm/boot/dts/overlays/*.dtb* /boot/overlays/ # $ sudo cp arch/arm/boot/dts/overlays/README /boot/overlays/ # $ sudo scripts/mkknlimg arch/arm/boot/zImage /boot/$KERNEL.img Note: On a Raspberry Pi 2, adding -j4 (make -j4 zImage modules dtbs) splits the work between all four cores, speeding up compilation significantly. === Cross Compile === #$ git clone https://github.com/raspberrypi/tools #add /tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin to your $PATH # make bcm2709_defconfig ARCH=arm # make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- zImage modules dtbs -j4 ==reference == * [http://elinux.org/RPi_Kernel_Compilation RPi Kernel Compilation] * [https://www.raspberrypi.org/documentation/linux/kernel/building.md Kernel Building]
返回「
Kernel
」頁面
導覽選單
個人工具
登入
命名空間
頁面
討論
變體
檢視
閱讀
檢視原始碼
檢視歷史
更多
搜尋
導覽
首頁
近期變更
隨機頁面
說明
工具
連結至此的頁面
相關變更
特殊頁面
頁面資訊