本文发布时间: 2019-Mar-22
如果有需要,patch内核:下载补丁:wget // 注意patch和patchscd linux //内核源码根目录zcat ../patch-3.18.17-rt14.patch.gz | patch -p1 //打补丁,如果.bz2压缩格式则使用 bzcat ;在源码根目录的上层目录,则patch -p0 < patch/rpi-3.2.27-xenomai.patch//或者 cd $linux_treepatch -p1 < rpi-linux-3.2.21-xenomai-2.6.1.patch在现有系统上修改配置:make mrproper //清理一下scp pi@raspberrypi:/proc/config.gz . //复制现有系统的配置文件gunzip -c config.gz > .configARCH=arm CROSS_COMPILE=${CCPREFIX} make oldconfig //使配置生效//根据需要修改.config文件,或者 make menuconfigARCH=arm CROSS_COMPILE=${CCPREFIX} make oldconfigARCH=arm CROSS_COMPILE=${CCPREFIX} make -jx // build kernel,多核系统mkdir module_build_directoryINSTALL_MOD_PATH=module_build_directory make modules_install // build modules复制新的内核到sd卡(树莓派2)Copy arch/arm/boot/Image to /boot/kernel7.img on SD card.Copy arch/arm/boot/dts/bcm2709-rpi-2-b.dtb to /boot/bcm2709-rpi-2-b.dtb on SD cardCopy (merge if necessary) kernel-rt/lib to / on SD linux/arch/arm/bootscp Image pi@raspberrypi:/tmpscp dtb/bcm2709-rpi-2-b.dtb pi@raspberrypi:/tmpcd module_build_directorytar czf modules.tgz *scp modules.tgz pi@raspberrypi:/tmp// ssh to raspberryssh pi@your_ip_address_to_raspcd /sudo mv /tmp/Image /boot/kernel7.img // 忽略属性不同的信息scp mv /tmp/bcm2709-rpi-2-b.dtb /boot/bcm2709-rpi-2-b.dtb sudo tar xzf /tmp/modules.tgz // 解压后可以通过ls /lib/modules查看关于内核配置Symbol(s) Description:[ ], [*] Options in square brackets can be activated or deactivated. The asterisk marks the menu entry as activated. The value can be changed with the space key. It is also possible to press Y key (Yes) to activate or N key (No) to deactivate the selected entry.If the option is activated, the selected feature/driver will be built into the kernel and will always be available at boot time.< >, <M>, <*> Options in angle brackets can be activated or deactivated, but also activated as module (indicated by a M). The values can be modified by pressing Y/N keys as before or by pressing the M key to activate the feature/driver as a module.See the Kernel Modules article for differentiation.{M}, {*} Options in curly brackets can be activated or activated as module but not be deactivated. This happens because another feature/driver is dependent on this feature.-M-, -*- Options between hyphens are activated in the shown way by another feature/driver. There is no choice.Tag Description:(NEW) This driver is new in the kernel and is maybe not stable enough.(EXPERIMENTAL) This driver is experimental and most likely not stable enough.(DEPRECATED) This driver is deprecated and not needed for most systems.(OBSOLETE) This driver is obsolete and should not be activated.


2024-Mar-04 02:09pm