pi zero build

#!/bin/bash -e

export KERNEL=kernel
export PATH=${PATH}:......../tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- bcmrpi_defconfig
make -j4 ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- zImage modules dtbs

 

 

install:

ls mnt || mkdir mnt
ls mnt/fat32 || mkdir mnt/fat32
ls mnt/ext4 || mkdir mnt/ext4

PATH=${PATH}:......tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin

mount /dev/sdd1 mnt/fat32
mount /dev/sdd2 mnt/ext4

ls mnt/fat32/overlays || exit

export KERNEL=kernel
cp mnt/fat32/$KERNEL.img mnt/fat32/$KERNEL-backup.img
cp arch/arm/boot/zImage mnt/fat32/$KERNEL.img
cp arch/arm/boot/dts/*.dtb mnt/fat32/
cp arch/arm/boot/dts/overlays/*.dtb* mnt/fat32/overlays/
cp arch/arm/boot/dts/overlays/README mnt/fat32/overlays/

make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- INSTALL_MOD_PATH=mnt/ext4 modules_install

sync
umount mnt/fat32
umount mnt/ext4

 

 

你可能感兴趣的:(pi,zero,linux,Raspberry,Pi,树莓派)