#!/bin/bash ################################################################################ # This file is part of LibreELEC - https://libreelec.tv # Copyright (C) 2016-present Team LibreELEC # # LibreELEC is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 2 of the License, or # (at your option) any later version. # # LibreELEC is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with LibreELEC. If not, see . ################################################################################ if [ -f "$RELEASE_DIR/3rdparty/bootloader/u-boot.bin" ]; then echo "Writing u-boot to $(basename $DISK)" dd if="$RELEASE_DIR/3rdparty/bootloader/u-boot.bin" of="$DISK" conv=fsync,notrunc bs=1 count=112 >"$SAVE_ERROR" 2>&1 || show_error dd if="$RELEASE_DIR/3rdparty/bootloader/u-boot.bin" of="$DISK" conv=fsync,notrunc bs=512 skip=1 seek=1 >"$SAVE_ERROR" 2>&1 || show_error fi if [ -f "$RELEASE_DIR/3rdparty/bootloader/boot.ini" ]; then mcopy $RELEASE_DIR/3rdparty/bootloader/boot.ini :: fi if [ -f "$RELEASE_DIR/3rdparty/bootloader/meson64_odroidc2.dtb" ]; then mcopy $RELEASE_DIR/3rdparty/bootloader/meson64_odroidc2.dtb :: fi