Create OTA updater (#34)

* Create OTA updater

* Create .gitignore

* Update build-all.sh

* Update hdd-image.sh

* Update ota.sh

* Update ota.sh

* Update ota.sh

* Update ota.sh

* Update post-image.sh

* Create name.sh

* Update name.sh

* Update post-build.sh

* Update name.sh

* Update post-image.sh

* Update ota.sh

* Update hdd-image.sh

* Update post-image.sh

* Update name.sh

* Update ota.sh

* Update post-image.sh

* Update hdd-image.sh

* Update hdd-image.sh

* Update hdd-image.sh

* Update post-image.sh

* Update post-image.sh

* Update hdd-image.sh

* Update hdd-image.sh

* Update post-image.sh

* Update post-image.sh

* Update post-image.sh

* Update info

* Update info

* Update info

* Update info

* Update info

* Update info

* Rename buildroot-external/board/raspberrypi/uboot-boot64.sh to buildroot-external/board/raspberrypi/rpi3-64/uboot-boot.sh

* Update rpi3_64_defconfig

* Update hdd-image.sh

* Update ota.sh

* Update post-image.sh

* Update post-image.sh

* Fix building

Signed-off-by: Pascal Vizeli <pvizeli@syshack.ch>

* Fix building v2

Signed-off-by: Pascal Vizeli <pvizeli@syshack.ch>
This commit is contained in:
Pascal Vizeli
2018-06-24 00:11:54 +02:00
committed by GitHub
parent 1e30f5120c
commit 17ca2ccf0a
16 changed files with 118 additions and 39 deletions

View File

@@ -6,12 +6,10 @@ BOARD_DIR=${2}
BOOT_DATA=${BINARIES_DIR}/boot
. ${SCRIPT_DIR}/hdd-image.sh
. ${SCRIPT_DIR}/name.sh
. ${BR2_EXTERNAL_HASSOS_PATH}/info
. ${BOARD_DIR}/info
# Filename
IMAGE_FILE=${BINARIES_DIR}/${HASSOS_ID}_${BOARD_ID}-${VERSION_MAJOR}.${VERSION_BUILD}.img
# Init boot data
rm -rf ${BOOT_DATA}
mkdir -p ${BOOT_DATA}
@@ -38,18 +36,16 @@ echo "dwc_otg.lpm_enable=0 console=tty1" > ${BOOT_DATA}/cmdline.txt
# Enable 64bit support
if [ "${BOARD_ID}" == "rpi3-64" ]; then
echo "arm_64bit=1" >> ${BOOT_DATA}/config.txt
KERNEL_NAME="Image"
else
KERNEL_NAME="zImage"
fi
# Create other layers
create_boot_image ${BINARIES_DIR}
create_overlay_image ${BINARIES_DIR}
create_kernel_image ${BINARIES_DIR} ${KERNEL_NAME}
prepare_disk_image
create_disk_image ${BINARIES_DIR} ${IMAGE_FILE} 2
fix_disk_image_mbr ${IMAGE_FILE}
create_disk_image 2
fix_disk_image_mbr
convert_disk_image_gz
rm -rf ${IMAGE_FILE}.gz
gzip --best ${IMAGE_FILE}
# Generate OTA update file
rm -f ${BOOT_DATA}/*.txt
create_ota_update ${KERNEL_NAME}

View File

@@ -2,3 +2,4 @@ BOARD_ID=rpi
BOARD_NAME="RaspberryPi"
CHASSIS=embedded
BOOTLOADER=uboot
KERNEL_FILE=zImage

View File

@@ -2,3 +2,4 @@ BOARD_ID=rpi0-w
BOARD_NAME="RaspberryPi Zero-W"
CHASSIS=embedded
BOOTLOADER=uboot
KERNEL_FILE=zImage

View File

@@ -2,3 +2,4 @@ BOARD_ID=rpi2
BOARD_NAME="RaspberryPi 2"
CHASSIS=embedded
BOOTLOADER=uboot
KERNEL_FILE=zImage

View File

@@ -2,3 +2,4 @@ BOARD_ID=rpi3-64
BOARD_NAME="RaspberryPi 3 64bit"
CHASSIS=embedded
BOOTLOADER=uboot
KERNEL_FILE=Image

View File

@@ -2,3 +2,4 @@ BOARD_ID=rpi3
BOARD_NAME="RaspberryPi 3"
CHASSIS=embedded
BOOTLOADER=uboot
KERNEL_FILE=zImage