rootfsinstall: rpi3 support

This commit is contained in:
Silvan Calarco 2016-07-19 10:19:54 +02:00
parent 3bd2e78eaf
commit f1e6c5a27d

View File

@ -155,18 +155,22 @@ case $TARGETDEVICE in
[ "$USEKERNEL" ] || USEKERNEL=uImage-sunxi
KERNELDEST="@BOOT@/kernel.img"
INSTALLPACKAGES="kernel-sunxi kernel-sunxi-modules u-boot-sunxi-Bananapi $INSTALLPACKAGES"
FSTAB_ROOT_DEVICE="/dev/mmcblk0p2"
;;
rpi) ARCH=arm
BOOTFSTYPE=fat32
BOOTFSSIZE=40M
BOOTFSSTART=0
[ "$USEKERNEL" ] || USEKERNEL="zImage-*-rpi"
[ "$USEKERNEL2" ] || USEKERNEL2="zImage-*-rpi2"
[ "$USEKERNEL2" ] || USEKERNEL2="zImage-*-rpi-v7"
KERNELDEST="@BOOT@/kernel.img"
KERNELDEST2="@BOOT@/kernel7.img"
INSTALLPACKAGES="kernel-rpi kernel-rpi-modules raspberrypi-firmware \
kernel-rpi2 kernel-rpi2-modules \
kernel-rpi-v7 kernel-rpi-v7-modules \
raspberrypi-utils raspi-config $INSTALLPACKAGES"
RPI_FIRMWARE_FILES="bootcode.bin fixup_x.dat start_x.elf \
bcm27*.dtb cmdline.txt config.txt"
FSTAB_ROOT_DEVICE="/dev/mmcblk0p2"
;;
cubox) ARCH=arm
BOOTFSTYPE=ext3
@ -362,8 +366,6 @@ _EOF
:
elif [ "$TARGETDEVICE" = "rpi" ]; then
# fetch and install firmware files if missing
RPI_FIRMWARE_FILES="bootcode.bin fixup_x.dat start_x.elf \
bcm2708-rpi-b.dtb cmdline.txt config.txt bcm2708-rpi-b-plus.dtb bcm2709-rpi-2-b.dtb"
for f in $RPI_FIRMWARE_FILES; do
if [ -e $ROOTMP/boot/$f ]; then
cp $ROOTMP/boot/$f $BOOTMP/$f
@ -441,6 +443,12 @@ _EOF
fi
fi
if [ "$FSTAB_ROOT_DEVICE" ]; then
cat >> $ROOTMP/etc/fstab << _EOF
$FSTAB_ROOT_DEVICE / auto defaults 0 0
_EOF
fi
if [ "$USEKERNEL" ]; then
if [ -r $ROOTMP/boot/$USEKERNEL ]; then
cp $ROOTMP/boot/$USEKERNEL $KERNELDEST || {