mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2024-11-18 22:54:00 +00:00
alarm/uboot-kirkwood to 2014.04.R3-1
This commit is contained in:
parent
c347aaf7d7
commit
5cee0ea0f2
2 changed files with 60 additions and 6 deletions
|
@ -4,8 +4,8 @@
|
|||
buildarch=2
|
||||
|
||||
pkgbase=uboot-kirkwood
|
||||
pkgname=('uboot-dockstar' 'uboot-goflexhome' 'uboot-goflexnet')
|
||||
pkgver=2014.04.R2
|
||||
pkgname=('uboot-dockstar' 'uboot-goflexhome' 'uboot-goflexnet' 'uboot-pogo_e02')
|
||||
pkgver=2014.04.R3
|
||||
pkgrel=1
|
||||
arch=('arm')
|
||||
url="https://github.com/archlinuxarm/u-boot"
|
||||
|
@ -14,11 +14,13 @@ depends=('uboot-env' 'mtd-utils')
|
|||
source=("https://github.com/archlinuxarm/u-boot/archive/${pkgver##*.}.tar.gz"
|
||||
'http://archlinuxarm.org/os/armv5te/boot/dockstar/uboot-dockstar.env'
|
||||
'http://archlinuxarm.org/os/armv5te/boot/goflexhome/uboot-goflexhome.env'
|
||||
'http://archlinuxarm.org/os/armv5te/boot/goflexnet/uboot-goflexnet.env')
|
||||
md5sums=('d9c20346e94f8e05d168b43fdc935bea'
|
||||
'http://archlinuxarm.org/os/armv5te/boot/goflexhome/uboot-goflexnet.env'
|
||||
'http://archlinuxarm.org/os/armv5te/boot/goflexhome/uboot-pogo_e02.env')
|
||||
md5sums=('6981030b38375877ff348925bafa60c1'
|
||||
'483bb63ff84c05d96e43ec4c85b8d7c2'
|
||||
'b9c1acb44e25a45767f31da1f9fd0261'
|
||||
'88197b33fee74a31d4914ca4f14007ec')
|
||||
'88197b33fee74a31d4914ca4f14007ec'
|
||||
'e707982899cebacd64878a87208fa750')
|
||||
|
||||
build() {
|
||||
cd u-boot-${pkgver##*.}
|
||||
|
@ -26,7 +28,7 @@ build() {
|
|||
unset CFLAGS CXXFLAGS LDFLAGS
|
||||
|
||||
mkdir bins
|
||||
for i in dockstar goflexhome goflexnet; do
|
||||
for i in dockstar goflexhome goflexnet pogo_e02; do
|
||||
make distclean
|
||||
make ${i}_config
|
||||
make u-boot.kwb EXTRAVERSION=.${pkgver##*.}-${pkgrel}
|
||||
|
@ -60,3 +62,12 @@ package_uboot-goflexnet() {
|
|||
cp u-boot-${pkgver##*.}/bins/uboot-goflexnet.kwb "${pkgdir}"/boot
|
||||
cp "${srcdir}"/uboot-goflexnet.env "${pkgdir}"/boot
|
||||
}
|
||||
|
||||
package_uboot-pogo_e02() {
|
||||
pkgdesc="U-Boot for the Pogoplug V2 (E02)"
|
||||
install="$pkgname.install"
|
||||
|
||||
mkdir -p "${pkgdir}"/boot
|
||||
cp u-boot-${pkgver##*.}/bins/uboot-pogo_e02.kwb "${pkgdir}"/boot
|
||||
cp "${srcdir}"/uboot-pogo_e02.env "${pkgdir}"/boot
|
||||
}
|
||||
|
|
43
alarm/uboot-kirkwood/uboot-pogo_e02.install
Normal file
43
alarm/uboot-kirkwood/uboot-pogo_e02.install
Normal file
|
@ -0,0 +1,43 @@
|
|||
flash_uboot() {
|
||||
if [[ ! -e /dev/mtd0 ]]; then
|
||||
echo '>> Error: /dev/mtd0 does not exist.'
|
||||
return
|
||||
fi
|
||||
# set up config for fw_printenv/setenv
|
||||
echo '/dev/mtd0 0xc0000 0x20000 0x20000' > /etc/fw_env.config
|
||||
# save MAC address
|
||||
mac=$(fw_printenv | grep ethaddr | cut -d= -f2)
|
||||
if [[ $mac == '' ]]; then
|
||||
echo '>> Error: Could not find MAC address from current U-Boot.'
|
||||
return
|
||||
fi
|
||||
# flash U-Boot
|
||||
flash_erase /dev/mtd0 0 4
|
||||
flash_erase /dev/mtd0 0xc0000 1
|
||||
nandwrite /dev/mtd0 /boot/uboot-pogo_e02.kwb
|
||||
nandwrite -s 0xc0000 /dev/mtd0 /boot/uboot-pogo_e02.env
|
||||
# set MAC address
|
||||
fw_setenv ethaddr ${mac}
|
||||
}
|
||||
|
||||
ask_uboot() {
|
||||
echo "A new U-Boot version needs to be flashed to NAND."
|
||||
echo "Do you want to do this now? [y|N]"
|
||||
read -r shouldwe
|
||||
if [[ $shouldwe =~ ^([yY][eE][sS]|[yY])$ ]]; then
|
||||
flash_uboot
|
||||
else
|
||||
echo "You can do this later by re-installing uboot-pogo_e02."
|
||||
fi
|
||||
}
|
||||
|
||||
## arg 1: the new package version
|
||||
post_install() {
|
||||
ask_uboot
|
||||
}
|
||||
|
||||
## arg 1: the new package version
|
||||
## arg 2: the old package version
|
||||
post_upgrade() {
|
||||
ask_uboot
|
||||
}
|
Loading…
Reference in a new issue