rpi3 and rpi4 native build

  • Build rpi4 in native

    $ uname -r
    6.1.21-v8+
    mkdir rpi61_src/
    git clone  --depth=1 --branch rpi-6.1.y 
    (不能光sudo apt install raspberrypi-kernel-headers 在/usr/src下编译,会出错)
    cd linux
    >KERNEL=kernel8
    1)>make bcm2711_defconfig 
    	make -j4 Image.gz modules dtbs
    	
    sudo make modules_install
    (自动安装在/lib/modules,小心覆盖,这里我的为/lib/modules/6.1.53-v8+/,不会覆盖6.1.21-v8+)
    	
    
    覆盖,升级
    	sudo cp arch/arm64/boot/dts/broadcom/*.dtb /boot/
    	sudo cp arch/arm64/boot/dts/overlays/*.dtb* /boot/overlays/
    	sudo cp arch/arm64/boot/dts/overlays/README /boot/overlays/
    	sudo cp arch/arm64/boot/Image.gz /boot/$KERNEL.img
    
    修改安装目录:
    make ARCH=arm64 INSTALL_MOD_PATH=../ modules_install
    

  • Build rpi3 in native

    ​
    apt install git bc bison flex libssl-dev make libc6-dev libncurses5-dev
    
    git clone --depth=1 --branch rpi-5.9.y https://github.com/raspberrypi/linux
    
    git clone git://github.com/raspberrypi/tools.git
    
    /home/pi/myrasp/linux>make bcm2709_defconfig(3B) (bcmrpi_defconfig 为早期版)
    
    /home/pi/myrasp/linux>make -j4 &
    
    ​
    KERNEL=kernel7
    make -j4 zImage modules dtbs
    sudo make modules_install
    (自动安装在/lib/modules,小心覆盖)
    
    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 cp arch/arm/boot/zImage /boot/$KERNEL.img
    

你可能感兴趣的:(elasticsearch,大数据,搜索引擎)