alarm/uboot-clearfog to 2013.01-5

This commit is contained in:
moonman 2016-06-05 18:42:15 -06:00
parent bd99105aec
commit 6333777680
5 changed files with 86 additions and 20 deletions

View file

@ -4,21 +4,21 @@ buildarch=4
pkgbase=uboot-clearfog
pkgname=('uboot-clearfog')
pkgver=2013.01
pkgrel=4
pkgrel=5
arch=('armv7h')
url="http://git.denx.de/u-boot.git/"
license=('GPL')
depends=('uboot-tools')
option=('!strip')
source=('u-boot-clearfog.mmc.xz'
source=('u-boot-clearfog.tar.xz'
'clearfog.txt'
'uEnv.txt'
'sd_fusing.sh')
md5sums=('7d4703da3cb5e278801512eaf3833987'
md5sums=('03b2a5122da09712abe8cf4d1740736a'
'0d5c13ccc7045af73de8685d4f961bb7'
'74553971c70ec14195955bbd579b63a6'
'cb9ea2fa6f4436c2645b0e465597a734')
'b6f566f456c4a066c41b8706613fd8ec')
prepare() {
@ -30,6 +30,6 @@ package() {
install=${pkgbase}.install
mkdir -p "${pkgdir}"/boot
cp ${srcdir}/{u-boot-clearfog.mmc,clearfog.env,sd_fusing.sh,uEnv.txt} "${pkgdir}"/boot
cp ${srcdir}/{u-boot-clearfog.??.mmc,clearfog.env,sd_fusing.sh,uEnv.txt} "${pkgdir}"/boot
}

View file

@ -14,6 +14,54 @@
#
####################################
sd_fuse() {
####################################
# fusing images
echo "u-boot fusing version $1"
dd if=./u-boot-clearfog.mmc of=$1 bs=512 seek=1
echo "u-boot environemnt fusing"
dd if=/dev/zero of=$1 bs=512 seek=1920 count=128
dd if=./clearfog.env of=$1 bs=512 seek=1920
####################################
#<Message Display>
echo "U-boot image is fused successfully."
}
choose_uboot() {
while :
do
cat<<EOF
Please choose uboot to flash:
<1st slot, 2nd slot>
1) PCIe, PCIe (default)
2) PCIe, mSata
3) mSata, PCIe
4) mSata, mSata
EOF
read -n1 -s
case "$REPLY" in
"1") sd_fuse pp
break
;;
"2") sd_fuse ps
break
;;
"3") sd_fuse sp
break
;;
"4") sd_fuse ss
break
;;
* ) echo "invalid option" ;;
esac
done
}
if [ -z $1 ]
then
echo "usage: ./sd_fusing.sh <SD Reader's device file>"
@ -28,16 +76,4 @@ else
exit 0
fi
####################################
# fusing images
echo "u-boot fusing"
dd if=./u-boot-clearfog.mmc of=$1 bs=512 seek=1
echo "u-boot environemnt fusing"
dd if=/dev/zero of=$1 bs=512 seek=1920 count=128
dd if=./clearfog.env of=$1 bs=512 seek=1920
####################################
#<Message Display>
echo "U-boot image is fused successfully."
choose_uboot

Binary file not shown.

View file

@ -5,7 +5,7 @@ sd_fuse() {
fi
# Flash U-Boot
dd if=/boot/u-boot-clearfog.mmc of=/dev/mmcblk0 bs=512 seek=1
dd if=/boot/u-boot-clearfog.$1.mmc of=/dev/mmcblk0 bs=512 seek=1
# Zero out old U-Boot environment
dd if=/dev/zero of=/dev/mmcblk0 bs=512 seek=1920 count=128
@ -19,13 +19,43 @@ flash_uboot() {
echo "Do you want to do this now? [y|N]"
read -r shouldwe
if [[ $shouldwe =~ ^([yY][eE][sS]|[yY])$ ]]; then
sd_fuse
choose_uboot
else
echo "You can do this later by running:"
echo "# cd /boot; ./sd_fusing.sh /dev/mmcblk0"
fi
}
choose_uboot() {
while :
do
cat<<EOF
Please choose uboot to flash:
<1st slot, 2nd slot>
1) PCIe, PCIe (default)
2) PCIe, mSata
3) mSata, PCIe
4) mSata, mSata
EOF
read -n1 -s
case "$REPLY" in
"1") sd_fuse pp
break
;;
"2") sd_fuse ps
break
;;
"3") sd_fuse sp
break
;;
"4") sd_fuse ss
break
;;
* ) echo "invalid option" ;;
esac
done
}
post_install() {
flash_uboot
}