updating boot

This commit is contained in:
mudler
2016-08-04 16:50:24 +02:00
parent 385cec42b8
commit 60dda6299e
12 changed files with 133 additions and 0 deletions
Binary file not shown.
+35
View File
@@ -0,0 +1,35 @@
#!/bin/sh
#
# Copyright (C) 2015 Hardkernel Co,. Ltd
# Dongjin Kim <tobetter@gmail.com>
#
# SPDX-License-Identifier: GPL-2.0+
#
DIR=$(dirname "${0}")
BL1="${DIR}/bl1.bin.hardkernel"
UBOOT="${DIR}/u-boot.bin"
if [ -z $1 ]; then
echo "Usage ./sd_fusing.sh <SD card reader's device>"
exit 1
fi
if [ ! -f $BL1 ]; then
echo "error: $BL1 is not exist"
exit 1
fi
if [ ! -f $UBOOT ]; then
echo "error: $UBOOT is not exist"
exit 1
fi
sudo dd if=$BL1 of=$1 conv=fsync bs=1 count=442
sudo dd if=$BL1 of=$1 conv=fsync bs=512 skip=1 seek=1
sudo dd if=$UBOOT of=$1 conv=fsync bs=512 seek=97
sudo sync
echo Finished.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+54
View File
@@ -0,0 +1,54 @@
#!/bin/sh
#
# Copyright (C) 2011 Samsung Electronics Co., Ltd.
# http://www.samsung.com/
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
# published by the Free Software Foundation.
#
####################################
DIR=$(dirname "${0}")
if [ -z $1 ]
then
echo "usage: ./sd_fusing.sh <SD Reader's device file>"
exit 0
fi
if [ -b $1 ]
then
echo "$1 reader is identified."
else
echo "$1 is NOT identified."
exit 0
fi
####################################
# fusing images
signed_bl1_position=1
bl2_position=31
uboot_position=63
tzsw_position=2111
#<BL1 fusing>
echo "BL1 fusing"
dd iflag=dsync oflag=dsync if="${DIR}/bl1.HardKernel" of="${1}" seek="${signed_bl1_position}" || exit 1
#<BL2 fusing>
echo "BL2 fusing"
dd iflag=dsync oflag=dsync if="${DIR}/bl2.HardKernel" of="${1}" seek="${bl2_position}" || exit 1
#<u-boot fusing>
echo "u-boot fusing"
dd iflag=dsync oflag=dsync if="${DIR}/../u-boot.bin" of="${1}" seek="${uboot_position}" || exit 1
#<TrustZone S/W fusing>
echo "TrustZone S/W fusing"
dd iflag=dsync oflag=dsync if="${DIR}/tzsw.HardKernel" of="${1}" seek="${tzsw_position}" || exit 1
####################################
#<Message Display>
echo "U-boot image is fused successfully."
Binary file not shown.
Binary file not shown.
View File
Binary file not shown.
+44
View File
@@ -0,0 +1,44 @@
#!/bin/sh
#
# mudler@sabayon.org
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
# published by the Free Software Foundation.
#
####################################
DIR=$(dirname "${0}")
if [ -z $1 ]
then
echo "usage: ./sd_fusing.sh <SD Reader's device file>"
exit 0
fi
if [ -b $1 ]
then
echo "$1 reader is identified."
else
echo "$1 is NOT identified."
exit 0
fi
####################################
# fusing images
spl_position=1
uboot_position=69
#SPL fusing>
echo "SPL fusing"
dd iflag=dsync oflag=dsync if="${DIR}/SPL" of="${1}" seek="${spl_position}" || exit 1
#u-boot fusing>
echo "u-boot fusing"
dd iflag=dsync oflag=dsync if="${DIR}/u-boot.img" of="${1}" seek="${uboot_position}" || exit 1
####################################
#<Message Display>
echo "U-boot image is fused successfully."
Binary file not shown.