PKGBUILDs/alarm/uboot-clearfog/sd_fusing.sh

44 lines
1,014 B
Bash
Raw Normal View History

2015-12-08 10:45:37 +00:00
#!/usr/bin/bash
####################################
#
# 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.
#
####################################
#
# Modified for Arch Linux ARM package uboot-clearfog
#
####################################
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
echo "u-boot fusing"
2015-12-12 06:47:38 +00:00
dd if=./u-boot-clearfog.mmc of=$1 bs=512 seek=1
2015-12-08 10:45:37 +00:00
echo "u-boot environemnt fusing"
2015-12-12 06:47:38 +00:00
dd if=/dev/zero of=$1 bs=512 seek=1920 count=128
dd if=./clearfog.env of=$1 bs=512 seek=1920
2015-12-08 10:45:37 +00:00
####################################
#<Message Display>
echo "U-boot image is fused successfully."