mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2024-11-28 22:57:37 +00:00
removed alarm/uboot-kirkwood
This commit is contained in:
parent
b2905e501a
commit
0facbe14ee
21 changed files with 0 additions and 834 deletions
|
@ -1,141 +0,0 @@
|
|||
# U-Boot: Marvell Kirkwood platforms
|
||||
# Maintainer: Kevin Mihelich <kevin@archlinuxarm.org>
|
||||
# Maintainer: Oleg Rakhmanov <oleg@archlinuxarm.org>
|
||||
|
||||
buildarch=2
|
||||
|
||||
pkgbase=uboot-kirkwood
|
||||
pkgname=('uboot-dockstar' 'uboot-goflexhome' 'uboot-goflexnet' 'uboot-pogo_e02' 'uboot-pogoplugv4' 'uboot-nsa310' 'uboot-nsa325' 'uboot-nsa320' 'uboot-guruplug' 'uboot-sheevaplug')
|
||||
pkgver=2016.09
|
||||
_commit=9c386a6152dd05691c2a972d4d898cda96563d4b
|
||||
pkgrel=1
|
||||
arch=('arm')
|
||||
url="https://github.com/archlinuxarm/u-boot"
|
||||
license=('GPL')
|
||||
depends=('uboot-tools' 'mtd-utils')
|
||||
source=("https://github.com/moonman/u-boot/archive/${_commit}.tar.gz"
|
||||
'uboot-dockstar.txt'
|
||||
'uboot-goflexhome.txt'
|
||||
'uboot-goflexnet.txt'
|
||||
'uboot-pogo_e02.txt'
|
||||
'uboot-pogoplugv4.txt'
|
||||
'uboot-nsa310.txt'
|
||||
'uboot-nsa325.txt'
|
||||
'uboot-nsa320.txt'
|
||||
'uboot-guruplug.txt'
|
||||
'uboot-sheevaplug.txt')
|
||||
md5sums=('0eaeab86c1ff45978abe5062598c1cf2'
|
||||
'50f4cf74fc0993435f8b18d028a3c006'
|
||||
'0a92d44729e81669525b0b4393974aa1'
|
||||
'8d64678dacb49d191f5fba42045e0637'
|
||||
'c4eae149aabd571c01b4ec38a1da3da0'
|
||||
'5608f2b2b89a214fe079718de1d75df2'
|
||||
'60933ca914d393de2f5c4a2d3b21e394'
|
||||
'56a342174c72513b71f58e41182c2204'
|
||||
'88c86409d25bcac06bd7456d60258a34'
|
||||
'691953980b0a1c12d6ef768781b60f09'
|
||||
'39cfec42fc01141adb7e84dfca18bf4a')
|
||||
|
||||
build() {
|
||||
cd u-boot-${_commit}
|
||||
|
||||
unset CFLAGS CXXFLAGS LDFLAGS
|
||||
|
||||
mkdir bins
|
||||
for i in dockstar goflexhome goflexnet pogo_e02 pogoplugv4 nsa310 nsa325 nsa320 guruplug sheevaplug; do
|
||||
msg2 "Building for ${i}"
|
||||
|
||||
# Sort all commands in alphabetical order
|
||||
sort -bd -o uboot-${i}.txt ${srcdir}/uboot-${i}.txt
|
||||
|
||||
# Make flashable env file out of a text file
|
||||
mkenvimage -s 0x20000 -o bins/uboot-${i}.env uboot-${i}.txt
|
||||
|
||||
# Build U-Boot finally
|
||||
make distclean
|
||||
make ${i}_config
|
||||
make u-boot.kwb EXTRAVERSION=-${pkgrel}
|
||||
dd if=u-boot.kwb of=bins/uboot-${i}.kwb bs=512k conv=sync
|
||||
done;
|
||||
}
|
||||
|
||||
package_uboot-dockstar() {
|
||||
pkgdesc="U-Boot for the Seagate FreeAgent DockStar"
|
||||
install="$pkgname.install"
|
||||
|
||||
mkdir -p "${pkgdir}"/boot
|
||||
cp u-boot-${_commit}/bins/uboot-dockstar.{kwb,env} "${pkgdir}"/boot
|
||||
}
|
||||
|
||||
package_uboot-goflexhome() {
|
||||
pkgdesc="U-Boot for the Seagate GoFlex Home"
|
||||
install="$pkgname.install"
|
||||
|
||||
mkdir -p "${pkgdir}"/boot
|
||||
cp u-boot-${_commit}/bins/uboot-goflexhome.{kwb,env} "${pkgdir}"/boot
|
||||
}
|
||||
|
||||
package_uboot-goflexnet() {
|
||||
pkgdesc="U-Boot for the Seagate GoFlex Net"
|
||||
install="$pkgname.install"
|
||||
|
||||
mkdir -p "${pkgdir}"/boot
|
||||
cp u-boot-${_commit}/bins/uboot-goflexnet.{kwb,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-${_commit}/bins/uboot-pogo_e02.{kwb,env} "${pkgdir}"/boot
|
||||
}
|
||||
|
||||
package_uboot-pogoplugv4() {
|
||||
pkgdesc="U-Boot for the Pogoplug V4 & Pogoplug Mobile"
|
||||
depends+=('pogoplug-blparam')
|
||||
install="$pkgname.install"
|
||||
|
||||
mkdir -p "${pkgdir}"/boot
|
||||
cp u-boot-${_commit}/bins/uboot-pogoplugv4.{kwb,env} "${pkgdir}"/boot
|
||||
}
|
||||
|
||||
package_uboot-nsa325() {
|
||||
pkgdesc="U-Boot for the Zyxel NSA325"
|
||||
install="$pkgname.install"
|
||||
|
||||
mkdir -p "${pkgdir}"/boot
|
||||
cp u-boot-${_commit}/bins/uboot-nsa325.{kwb,env} "${pkgdir}"/boot
|
||||
}
|
||||
|
||||
package_uboot-nsa320() {
|
||||
pkgdesc="U-Boot for the Zyxel NSA320"
|
||||
install="$pkgname.install"
|
||||
|
||||
mkdir -p "${pkgdir}"/boot
|
||||
cp u-boot-${_commit}/bins/uboot-nsa320.{kwb,env} "${pkgdir}"/boot
|
||||
}
|
||||
|
||||
package_uboot-nsa310() {
|
||||
pkgdesc="U-Boot for the Zyxel NSA310"
|
||||
install="$pkgname.install"
|
||||
|
||||
mkdir -p "${pkgdir}"/boot
|
||||
cp u-boot-${_commit}/bins/uboot-nsa310.{kwb,env} "${pkgdir}"/boot
|
||||
}
|
||||
|
||||
package_uboot-guruplug() {
|
||||
pkgdesc="U-Boot for the Guruplug (plus)"
|
||||
install="$pkgname.install"
|
||||
|
||||
mkdir -p "${pkgdir}"/boot
|
||||
cp u-boot-${_commit}/bins/uboot-guruplug.{kwb,env} "${pkgdir}"/boot
|
||||
}
|
||||
|
||||
package_uboot-sheevaplug() {
|
||||
pkgdesc="U-Boot for the Sheevaplug (esata)"
|
||||
install="$pkgname.install"
|
||||
|
||||
mkdir -p "${pkgdir}"/boot
|
||||
cp u-boot-${_commit}/bins/uboot-sheevaplug.{kwb,env} "${pkgdir}"/boot
|
||||
}
|
|
@ -1,43 +0,0 @@
|
|||
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-dockstar.kwb
|
||||
nandwrite -s 0xc0000 /dev/mtd0 /boot/uboot-dockstar.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-dockstar."
|
||||
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
|
||||
}
|
|
@ -1,26 +0,0 @@
|
|||
bootcmd=run startboot;run bootubi
|
||||
bootdir=/boot
|
||||
bootfilem=uImage
|
||||
bootfilez=zImage
|
||||
bootubi=echo Trying to boot from NAND ...;if run mountubi; then ubifsload ${loadaddr} /boot/zImage;ubifsload ${fdtaddr} /boot/dtbs/${fdtfile};ubifsumount; setenv bootargs console=${console} ubi.mtd=1 root=ubi0:rootfs ro rootfstype=ubifs rootwait ${mtdparts};bootz ${loadaddr} - ${fdtaddr};fi
|
||||
console=ttyS0,115200
|
||||
ethact=egiga0
|
||||
fdtaddr=0x800000
|
||||
fdtdir=/boot/dtbs
|
||||
fdtfile=kirkwood-dockstar.dtb
|
||||
ipaddr=10.10.10.3
|
||||
loadaddr=0x810000
|
||||
loadfdt=echo loading ${fdtdir}/${fdtfile} ...; load ${devtype} ${bootpart} ${fdtaddr} ${fdtdir}/${fdtfile}
|
||||
loadimage=load ${devtype} ${bootpart} ${loadaddr} ${bootdir}/${bootfilez} || load ${devtype} ${bootpart} ${loadaddr} ${bootdir}/${bootfilem}
|
||||
loadrd=load ${devtype} ${bootpart} ${rdaddr} ${bootdir}/${rdfile}
|
||||
mainargs=setenv bootargs console=${console} ${mtdparts} root=${root} rw rootwait ${optargs} ${ncargs}
|
||||
mountubi=ubi part rootfs; ubifsmount ubi0:rootfs
|
||||
mtdids=nand0=orion_nand
|
||||
mtdparts=mtdparts=orion_nand:1M(u-boot),-(rootfs)
|
||||
ncip=10.10.10.5
|
||||
ncipk=10.10.10.4
|
||||
netconsole=on
|
||||
preboot=if env exists netconsole && test ${netconsole} = on; then if ping ${ncip}; then setenv stdin nc; setenv stdout nc; setenv stderr nc; version; if env exists ncargsusr; then echo ncargs has been defined by user; setenv ncargs ${ncargsusr}; else setenv ncargs ignore_loglevel netconsole=6665@${ipaddr}/eth0,6666@${ncipk}/; fi; fi; else echo Netconsole has been turned off.; echo To turn it on, set netconsole variable to on.; setenv stdin; setenv stdout; setenv stderr; setenv ncargs; fi
|
||||
rdaddr=0x1100000
|
||||
rdfile=initramfs-linux.img
|
||||
startboot=usb start; for devtype in usb; do setenv devnum 0; while ${devtype} dev ${devnum}; do echo ${devtype} found on device ${devnum}; setenv bootpart ${devnum}:1; echo Checking for: ${bootdir}/uEnv.txt ...; if test -e ${devtype} ${bootpart} ${bootdir}/uEnv.txt; then load ${devtype} ${bootpart} ${loadaddr} ${bootdir}/uEnv.txt; env import -t ${loadaddr} ${filesize}; echo Loaded environment from ${bootdir}/uEnv.txt; echo Checking if uenvcmd is set ...; if test -n ${uenvcmd}; then echo Running uenvcmd ...; run uenvcmd; fi; fi; if run loadimage; then if env exists root; then echo root has been defined by user; else part uuid ${devtype} ${bootpart} uuid; setenv root PARTUUID=${uuid}; fi; run mainargs; if run loadfdt; then if run loadrd; then bootz ${loadaddr} ${rdaddr}:${filesize} ${fdtaddr}; else bootz ${loadaddr} - ${fdtaddr}; fi; else if run loadrd; then echo Booting uImage with initrd; bootm ${loadaddr} ${rdaddr}:${filesize}; else bootm ${loadaddr}; fi; fi; else echo No kernel found; fi; setexpr devnum ${devnum} + 1; done; done;
|
|
@ -1,43 +0,0 @@
|
|||
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-goflexhome.kwb
|
||||
nandwrite -s 0xc0000 /dev/mtd0 /boot/uboot-goflexhome.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-goflexhome."
|
||||
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
|
||||
}
|
|
@ -1,26 +0,0 @@
|
|||
bootcmd=run startboot;run bootubi
|
||||
bootdir=/boot
|
||||
bootfilem=uImage
|
||||
bootfilez=zImage
|
||||
bootubi=echo Trying to boot from NAND ...;if run mountubi; then ubifsload ${loadaddr} /boot/zImage;ubifsload ${fdtaddr} /boot/dtbs/${fdtfile};ubifsumount; setenv bootargs console=${console} ubi.mtd=1 root=ubi0:rootfs ro rootfstype=ubifs rootwait ${mtdparts};bootz ${loadaddr} - ${fdtaddr};fi
|
||||
console=ttyS0,115200
|
||||
ethact=egiga0
|
||||
fdtaddr=0x800000
|
||||
fdtdir=/boot/dtbs
|
||||
fdtfile=kirkwood-goflexhome.dtb
|
||||
ipaddr=10.10.10.3
|
||||
loadaddr=0x810000
|
||||
loadfdt=echo loading ${fdtdir}/${fdtfile} ...; load ${devtype} ${bootpart} ${fdtaddr} ${fdtdir}/${fdtfile}
|
||||
loadimage=load ${devtype} ${bootpart} ${loadaddr} ${bootdir}/${bootfilez} || load ${devtype} ${bootpart} ${loadaddr} ${bootdir}/${bootfilem}
|
||||
loadrd=load ${devtype} ${bootpart} ${rdaddr} ${bootdir}/${rdfile}
|
||||
mainargs=setenv bootargs console=${console} ${mtdparts} root=${root} rw rootwait ${optargs} ${ncargs}
|
||||
mountubi=ubi part rootfs; ubifsmount ubi0:rootfs
|
||||
mtdids=nand0=orion_nand
|
||||
mtdparts=mtdparts=orion_nand:1M(u-boot),-(rootfs)
|
||||
ncip=10.10.10.5
|
||||
ncipk=10.10.10.4
|
||||
netconsole=on
|
||||
preboot=if env exists netconsole && test ${netconsole} = on; then if ping ${ncip}; then setenv stdin nc; setenv stdout nc; setenv stderr nc; version; if env exists ncargsusr; then echo ncargs has been defined by user; setenv ncargs ${ncargsusr}; else setenv ncargs ignore_loglevel netconsole=6665@${ipaddr}/eth0,6666@${ncipk}/; fi; fi; else echo Netconsole has been turned off.; echo To turn it on, set netconsole variable to on.; setenv stdin; setenv stdout; setenv stderr; setenv ncargs; fi
|
||||
rdaddr=0x1100000
|
||||
rdfile=initramfs-linux.img
|
||||
startboot=usb start; ide reset; for devtype in usb ide; do setenv devnum 0; while ${devtype} dev ${devnum}; do echo ${devtype} found on device ${devnum}; setenv bootpart ${devnum}:1; echo Checking for: ${bootdir}/uEnv.txt ...; if test -e ${devtype} ${bootpart} ${bootdir}/uEnv.txt; then load ${devtype} ${bootpart} ${loadaddr} ${bootdir}/uEnv.txt; env import -t ${loadaddr} ${filesize}; echo Loaded environment from ${bootdir}/uEnv.txt; echo Checking if uenvcmd is set ...; if test -n ${uenvcmd}; then echo Running uenvcmd ...; run uenvcmd; fi; fi; if run loadimage; then if env exists root; then echo root has been defined by user; else part uuid ${devtype} ${bootpart} uuid; setenv root PARTUUID=${uuid}; fi; run mainargs; if run loadfdt; then if run loadrd; then bootz ${loadaddr} ${rdaddr}:${filesize} ${fdtaddr}; else bootz ${loadaddr} - ${fdtaddr}; fi; else if run loadrd; then echo Booting uImage with initrd; bootm ${loadaddr} ${rdaddr}:${filesize}; else bootm ${loadaddr}; fi; fi; else echo No kernel found; fi; setexpr devnum ${devnum} + 1; done; done;
|
|
@ -1,43 +0,0 @@
|
|||
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-goflexnet.kwb
|
||||
nandwrite -s 0xc0000 /dev/mtd0 /boot/uboot-goflexnet.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-goflexnet."
|
||||
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
|
||||
}
|
|
@ -1,26 +0,0 @@
|
|||
bootcmd=run startboot;run bootubi
|
||||
bootdir=/boot
|
||||
bootfilem=uImage
|
||||
bootfilez=zImage
|
||||
bootubi=echo Trying to boot from NAND ...;if run mountubi; then ubifsload ${loadaddr} /boot/zImage;ubifsload ${fdtaddr} /boot/dtbs/${fdtfile};ubifsumount; setenv bootargs console=${console} ubi.mtd=1 root=ubi0:rootfs ro rootfstype=ubifs rootwait ${mtdparts};bootz ${loadaddr} - ${fdtaddr};fi
|
||||
console=ttyS0,115200
|
||||
ethact=egiga0
|
||||
fdtaddr=0x800000
|
||||
fdtdir=/boot/dtbs
|
||||
fdtfile=kirkwood-goflexnet.dtb
|
||||
ipaddr=10.10.10.3
|
||||
loadaddr=0x810000
|
||||
loadfdt=echo loading ${fdtdir}/${fdtfile} ...; load ${devtype} ${bootpart} ${fdtaddr} ${fdtdir}/${fdtfile}
|
||||
loadimage=load ${devtype} ${bootpart} ${loadaddr} ${bootdir}/${bootfilez} || load ${devtype} ${bootpart} ${loadaddr} ${bootdir}/${bootfilem}
|
||||
loadrd=load ${devtype} ${bootpart} ${rdaddr} ${bootdir}/${rdfile}
|
||||
mainargs=setenv bootargs console=${console} ${mtdparts} root=${root} rw rootwait ${optargs} ${ncargs}
|
||||
mountubi=ubi part rootfs; ubifsmount ubi0:rootfs
|
||||
mtdids=nand0=orion_nand
|
||||
mtdparts=mtdparts=orion_nand:1M(u-boot),-(rootfs)
|
||||
ncip=10.10.10.5
|
||||
ncipk=10.10.10.4
|
||||
netconsole=on
|
||||
preboot=if env exists netconsole && test ${netconsole} = on; then if ping ${ncip}; then setenv stdin nc; setenv stdout nc; setenv stderr nc; version; if env exists ncargsusr; then echo ncargs has been defined by user; setenv ncargs ${ncargsusr}; else setenv ncargs ignore_loglevel netconsole=6665@${ipaddr}/eth0,6666@${ncipk}/; fi; fi; else echo Netconsole has been turned off.; echo To turn it on, set netconsole variable to on.; setenv stdin; setenv stdout; setenv stderr; setenv ncargs; fi
|
||||
rdaddr=0x1100000
|
||||
rdfile=initramfs-linux.img
|
||||
startboot=usb start; ide reset; for devtype in usb ide; do setenv devnum 0; while ${devtype} dev ${devnum}; do echo ${devtype} found on device ${devnum}; setenv bootpart ${devnum}:1; echo Checking for: ${bootdir}/uEnv.txt ...; if test -e ${devtype} ${bootpart} ${bootdir}/uEnv.txt; then load ${devtype} ${bootpart} ${loadaddr} ${bootdir}/uEnv.txt; env import -t ${loadaddr} ${filesize}; echo Loaded environment from ${bootdir}/uEnv.txt; echo Checking if uenvcmd is set ...; if test -n ${uenvcmd}; then echo Running uenvcmd ...; run uenvcmd; fi; fi; if run loadimage; then if env exists root; then echo root has been defined by user; else part uuid ${devtype} ${bootpart} uuid; setenv root PARTUUID=${uuid}; fi; run mainargs; if run loadfdt; then if run loadrd; then bootz ${loadaddr} ${rdaddr}:${filesize} ${fdtaddr}; else bootz ${loadaddr} - ${fdtaddr}; fi; else if run loadrd; then echo Booting uImage with initrd; bootm ${loadaddr} ${rdaddr}:${filesize}; else bootm ${loadaddr}; fi; fi; else echo No kernel found; fi; setexpr devnum ${devnum} + 1; done; done;
|
|
@ -1,43 +0,0 @@
|
|||
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-guruplug.kwb
|
||||
nandwrite -s 0xc0000 /dev/mtd0 /boot/uboot-guruplug.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-guruplug."
|
||||
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
|
||||
}
|
|
@ -1,26 +0,0 @@
|
|||
bootcmd=run startboot;run bootubi
|
||||
bootdir=/boot
|
||||
bootfilem=uImage
|
||||
bootfilez=zImage
|
||||
bootubi=echo Trying to boot from NAND ...;if run mountubi; then ubifsload ${loadaddr} /boot/zImage;ubifsload ${fdtaddr} /boot/dtbs/${fdtfile};ubifsumount; setenv bootargs console=${console} ubi.mtd=1 root=ubi0:rootfs ro rootfstype=ubifs rootwait ${mtdparts};bootz ${loadaddr} - ${fdtaddr};fi
|
||||
console=ttyS0,115200
|
||||
ethact=egiga0
|
||||
fdtaddr=0x800000
|
||||
fdtdir=/boot/dtbs
|
||||
fdtfile=kirkwood-guruplug.dtb
|
||||
ipaddr=10.10.10.3
|
||||
loadaddr=0x810000
|
||||
loadfdt=echo loading ${fdtdir}/${fdtfile} ...; load ${devtype} ${bootpart} ${fdtaddr} ${fdtdir}/${fdtfile}
|
||||
loadimage=load ${devtype} ${bootpart} ${loadaddr} ${bootdir}/${bootfilez} || load ${devtype} ${bootpart} ${loadaddr} ${bootdir}/${bootfilem}
|
||||
loadrd=load ${devtype} ${bootpart} ${rdaddr} ${bootdir}/${rdfile}
|
||||
mainargs=setenv bootargs console=${console} ${mtdparts} root=${root} rw rootwait ${optargs} ${ncargs}
|
||||
mountubi=ubi part rootfs; ubifsmount ubi0:rootfs
|
||||
mtdids=nand0=orion_nand
|
||||
mtdparts=mtdparts=orion_nand:1M(u-boot),-(rootfs)
|
||||
ncip=10.10.10.5
|
||||
ncipk=10.10.10.4
|
||||
netconsole=on
|
||||
preboot=if env exists netconsole && test ${netconsole} = on; then if ping ${ncip}; then setenv stdin nc; setenv stdout nc; setenv stderr nc; version; if env exists ncargsusr; then echo ncargs has been defined by user; setenv ncargs ${ncargsusr}; else setenv ncargs ignore_loglevel netconsole=6665@${ipaddr}/eth0,6666@${ncipk}/; fi; fi; else echo Netconsole has been turned off.; echo To turn it on, set netconsole variable to on.; setenv stdin; setenv stdout; setenv stderr; setenv ncargs; fi
|
||||
rdaddr=0x1100000
|
||||
rdfile=initramfs-linux.img
|
||||
startboot=usb start; ide reset; for devtype in mmc usb ide; do setenv devnum 0; while ${devtype} dev ${devnum}; do echo ${devtype} found on device ${devnum}; setenv bootpart ${devnum}:1; echo Checking for: ${bootdir}/uEnv.txt ...; if test -e ${devtype} ${bootpart} ${bootdir}/uEnv.txt; then load ${devtype} ${bootpart} ${loadaddr} ${bootdir}/uEnv.txt; env import -t ${loadaddr} ${filesize}; echo Loaded environment from ${bootdir}/uEnv.txt; echo Checking if uenvcmd is set ...; if test -n ${uenvcmd}; then echo Running uenvcmd ...; run uenvcmd; fi; fi; if run loadimage; then if env exists root; then echo root has been defined by user; else part uuid ${devtype} ${bootpart} uuid; setenv root PARTUUID=${uuid}; fi; run mainargs; if run loadfdt; then if run loadrd; then bootz ${loadaddr} ${rdaddr}:${filesize} ${fdtaddr}; else bootz ${loadaddr} - ${fdtaddr}; fi; else if run loadrd; then echo Booting uImage with initrd; bootm ${loadaddr} ${rdaddr}:${filesize}; else bootm ${loadaddr}; fi; fi; else echo No kernel found; fi; setexpr devnum ${devnum} + 1; done; done;
|
|
@ -1,43 +0,0 @@
|
|||
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-nsa310.kwb
|
||||
nandwrite -s 0xc0000 /dev/mtd0 /boot/uboot-nsa310.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-nsa310."
|
||||
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
|
||||
}
|
|
@ -1,26 +0,0 @@
|
|||
bootcmd=run startboot;run bootubi
|
||||
bootdir=/boot
|
||||
bootfilem=uImage
|
||||
bootfilez=zImage
|
||||
bootubi=echo Trying to boot from NAND ...;if run mountubi; then ubifsload ${loadaddr} /boot/zImage;ubifsload ${fdtaddr} /boot/dtbs/${fdtfile};ubifsumount; setenv bootargs console=${console} ubi.mtd=1 root=ubi0:rootfs ro rootfstype=ubifs rootwait ${mtdparts};bootz ${loadaddr} - ${fdtaddr};fi
|
||||
console=ttyS0,115200
|
||||
ethact=egiga0
|
||||
fdtaddr=0x800000
|
||||
fdtdir=/boot/dtbs
|
||||
fdtfile=kirkwood-nsa310.dtb
|
||||
ipaddr=10.10.10.3
|
||||
loadaddr=0x810000
|
||||
loadfdt=echo loading ${fdtdir}/${fdtfile} ...; load ${devtype} ${bootpart} ${fdtaddr} ${fdtdir}/${fdtfile}
|
||||
loadimage=load ${devtype} ${bootpart} ${loadaddr} ${bootdir}/${bootfilez} || load ${devtype} ${bootpart} ${loadaddr} ${bootdir}/${bootfilem}
|
||||
loadrd=load ${devtype} ${bootpart} ${rdaddr} ${bootdir}/${rdfile}
|
||||
mainargs=setenv bootargs console=${console} ${mtdparts} root=${root} rw rootwait ${optargs} ${ncargs}
|
||||
mountubi=ubi part rootfs; ubifsmount ubi0:rootfs
|
||||
mtdids=nand0=orion_nand
|
||||
mtdparts=mtdparts=orion_nand:1M(u-boot),-(rootfs)
|
||||
ncip=10.10.10.5
|
||||
ncipk=10.10.10.4
|
||||
netconsole=on
|
||||
preboot=if env exists netconsole && test ${netconsole} = on; then if ping ${ncip}; then setenv stdin nc; setenv stdout nc; setenv stderr nc; version; if env exists ncargsusr; then echo ncargs has been defined by user; setenv ncargs ${ncargsusr}; else setenv ncargs ignore_loglevel netconsole=6665@${ipaddr}/eth0,6666@${ncipk}/; fi; fi; else echo Netconsole has been turned off.; echo To turn it on, set netconsole variable to on.; setenv stdin; setenv stdout; setenv stderr; setenv ncargs; fi
|
||||
rdaddr=0x1100000
|
||||
rdfile=initramfs-linux.img
|
||||
startboot=usb start; ide reset; for devtype in usb ide; do setenv devnum 0; while ${devtype} dev ${devnum}; do echo ${devtype} found on device ${devnum}; setenv bootpart ${devnum}:1; echo Checking for: ${bootdir}/uEnv.txt ...; if test -e ${devtype} ${bootpart} ${bootdir}/uEnv.txt; then load ${devtype} ${bootpart} ${loadaddr} ${bootdir}/uEnv.txt; env import -t ${loadaddr} ${filesize}; echo Loaded environment from ${bootdir}/uEnv.txt; echo Checking if uenvcmd is set ...; if test -n ${uenvcmd}; then echo Running uenvcmd ...; run uenvcmd; fi; fi; if run loadimage; then if env exists root; then echo root has been defined by user; else part uuid ${devtype} ${bootpart} uuid; setenv root PARTUUID=${uuid}; fi; run mainargs; if run loadfdt; then if run loadrd; then bootz ${loadaddr} ${rdaddr}:${filesize} ${fdtaddr}; else bootz ${loadaddr} - ${fdtaddr}; fi; else if run loadrd; then echo Booting uImage with initrd; bootm ${loadaddr} ${rdaddr}:${filesize}; else bootm ${loadaddr}; fi; fi; else echo No kernel found; fi; setexpr devnum ${devnum} + 1; done; done;
|
|
@ -1,43 +0,0 @@
|
|||
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-nsa320.kwb
|
||||
nandwrite -s 0xc0000 /dev/mtd0 /boot/uboot-nsa320.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-nsa320."
|
||||
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
|
||||
}
|
|
@ -1,26 +0,0 @@
|
|||
bootcmd=run startboot;run bootubi
|
||||
bootdir=/boot
|
||||
bootfilem=uImage
|
||||
bootfilez=zImage
|
||||
bootubi=echo Trying to boot from NAND ...;if run mountubi; then ubifsload ${loadaddr} /boot/zImage;ubifsload ${fdtaddr} /boot/dtbs/${fdtfile};ubifsumount; setenv bootargs console=${console} ubi.mtd=1 root=ubi0:rootfs ro rootfstype=ubifs rootwait ${mtdparts};bootz ${loadaddr} - ${fdtaddr};fi
|
||||
console=ttyS0,115200
|
||||
ethact=egiga0
|
||||
fdtaddr=0x800000
|
||||
fdtdir=/boot/dtbs
|
||||
fdtfile=kirkwood-nsa320.dtb
|
||||
ipaddr=10.10.10.3
|
||||
loadaddr=0x810000
|
||||
loadfdt=echo loading ${fdtdir}/${fdtfile} ...; load ${devtype} ${bootpart} ${fdtaddr} ${fdtdir}/${fdtfile}
|
||||
loadimage=load ${devtype} ${bootpart} ${loadaddr} ${bootdir}/${bootfilez} || load ${devtype} ${bootpart} ${loadaddr} ${bootdir}/${bootfilem}
|
||||
loadrd=load ${devtype} ${bootpart} ${rdaddr} ${bootdir}/${rdfile}
|
||||
mainargs=setenv bootargs console=${console} ${mtdparts} root=${root} rw rootwait ${optargs} ${ncargs}
|
||||
mountubi=ubi part rootfs; ubifsmount ubi0:rootfs
|
||||
mtdids=nand0=orion_nand
|
||||
mtdparts=mtdparts=orion_nand:1M(u-boot),-(rootfs)
|
||||
ncip=10.10.10.5
|
||||
ncipk=10.10.10.4
|
||||
netconsole=on
|
||||
preboot=if env exists netconsole && test ${netconsole} = on; then if ping ${ncip}; then setenv stdin nc; setenv stdout nc; setenv stderr nc; version; if env exists ncargsusr; then echo ncargs has been defined by user; setenv ncargs ${ncargsusr}; else setenv ncargs ignore_loglevel netconsole=6665@${ipaddr}/eth0,6666@${ncipk}/; fi; fi; else echo Netconsole has been turned off.; echo To turn it on, set netconsole variable to on.; setenv stdin; setenv stdout; setenv stderr; setenv ncargs; fi
|
||||
rdaddr=0x1100000
|
||||
rdfile=initramfs-linux.img
|
||||
startboot=usb start; ide reset; for devtype in usb ide; do setenv devnum 0; while ${devtype} dev ${devnum}; do echo ${devtype} found on device ${devnum}; setenv bootpart ${devnum}:1; echo Checking for: ${bootdir}/uEnv.txt ...; if test -e ${devtype} ${bootpart} ${bootdir}/uEnv.txt; then load ${devtype} ${bootpart} ${loadaddr} ${bootdir}/uEnv.txt; env import -t ${loadaddr} ${filesize}; echo Loaded environment from ${bootdir}/uEnv.txt; echo Checking if uenvcmd is set ...; if test -n ${uenvcmd}; then echo Running uenvcmd ...; run uenvcmd; fi; fi; if run loadimage; then if env exists root; then echo root has been defined by user; else part uuid ${devtype} ${bootpart} uuid; setenv root PARTUUID=${uuid}; fi; run mainargs; if run loadfdt; then if run loadrd; then bootz ${loadaddr} ${rdaddr}:${filesize} ${fdtaddr}; else bootz ${loadaddr} - ${fdtaddr}; fi; else if run loadrd; then echo Booting uImage with initrd; bootm ${loadaddr} ${rdaddr}:${filesize}; else bootm ${loadaddr}; fi; fi; else echo No kernel found; fi; setexpr devnum ${devnum} + 1; done; done;
|
|
@ -1,43 +0,0 @@
|
|||
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-nsa325.kwb
|
||||
nandwrite -s 0xc0000 /dev/mtd0 /boot/uboot-nsa325.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-nsa325."
|
||||
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
|
||||
}
|
|
@ -1,26 +0,0 @@
|
|||
bootcmd=run startboot;run bootubi
|
||||
bootdir=/boot
|
||||
bootfilem=uImage
|
||||
bootfilez=zImage
|
||||
bootubi=echo Trying to boot from NAND ...;if run mountubi; then ubifsload ${loadaddr} /boot/zImage;ubifsload ${fdtaddr} /boot/dtbs/${fdtfile};ubifsumount; setenv bootargs console=${console} ubi.mtd=1 root=ubi0:rootfs ro rootfstype=ubifs rootwait ${mtdparts};bootz ${loadaddr} - ${fdtaddr};fi
|
||||
console=ttyS0,115200
|
||||
ethact=egiga0
|
||||
fdtaddr=0x800000
|
||||
fdtdir=/boot/dtbs
|
||||
fdtfile=kirkwood-nsa325.dtb
|
||||
ipaddr=10.10.10.3
|
||||
loadaddr=0x810000
|
||||
loadfdt=echo loading ${fdtdir}/${fdtfile} ...; load ${devtype} ${bootpart} ${fdtaddr} ${fdtdir}/${fdtfile}
|
||||
loadimage=load ${devtype} ${bootpart} ${loadaddr} ${bootdir}/${bootfilez} || load ${devtype} ${bootpart} ${loadaddr} ${bootdir}/${bootfilem}
|
||||
loadrd=load ${devtype} ${bootpart} ${rdaddr} ${bootdir}/${rdfile}
|
||||
mainargs=setenv bootargs console=${console} ${mtdparts} root=${root} rw rootwait ${optargs} ${ncargs}
|
||||
mountubi=ubi part rootfs; ubifsmount ubi0:rootfs
|
||||
mtdids=nand0=orion_nand
|
||||
mtdparts=mtdparts=orion_nand:1M(u-boot),-(rootfs)
|
||||
ncip=10.10.10.5
|
||||
ncipk=10.10.10.4
|
||||
netconsole=on
|
||||
preboot=if env exists netconsole && test ${netconsole} = on; then if ping ${ncip}; then setenv stdin nc; setenv stdout nc; setenv stderr nc; version; if env exists ncargsusr; then echo ncargs has been defined by user; setenv ncargs ${ncargsusr}; else setenv ncargs ignore_loglevel netconsole=6665@${ipaddr}/eth0,6666@${ncipk}/; fi; fi; else echo Netconsole has been turned off.; echo To turn it on, set netconsole variable to on.; setenv stdin; setenv stdout; setenv stderr; setenv ncargs; fi
|
||||
rdaddr=0x1100000
|
||||
rdfile=initramfs-linux.img
|
||||
startboot=usb start; ide reset; for devtype in usb ide; do setenv devnum 0; while ${devtype} dev ${devnum}; do echo ${devtype} found on device ${devnum}; setenv bootpart ${devnum}:1; echo Checking for: ${bootdir}/uEnv.txt ...; if test -e ${devtype} ${bootpart} ${bootdir}/uEnv.txt; then load ${devtype} ${bootpart} ${loadaddr} ${bootdir}/uEnv.txt; env import -t ${loadaddr} ${filesize}; echo Loaded environment from ${bootdir}/uEnv.txt; echo Checking if uenvcmd is set ...; if test -n ${uenvcmd}; then echo Running uenvcmd ...; run uenvcmd; fi; fi; if run loadimage; then if env exists root; then echo root has been defined by user; else part uuid ${devtype} ${bootpart} uuid; setenv root PARTUUID=${uuid}; fi; run mainargs; if run loadfdt; then if run loadrd; then bootz ${loadaddr} ${rdaddr}:${filesize} ${fdtaddr}; else bootz ${loadaddr} - ${fdtaddr}; fi; else if run loadrd; then echo Booting uImage with initrd; bootm ${loadaddr} ${rdaddr}:${filesize}; else bootm ${loadaddr}; fi; fi; else echo No kernel found; fi; setexpr devnum ${devnum} + 1; done; done;
|
|
@ -1,43 +0,0 @@
|
|||
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
|
||||
}
|
|
@ -1,26 +0,0 @@
|
|||
bootcmd=run startboot;run bootubi
|
||||
bootdir=/boot
|
||||
bootfilem=uImage
|
||||
bootfilez=zImage
|
||||
bootubi=echo Trying to boot from NAND ...;if run mountubi; then ubifsload ${loadaddr} /boot/zImage;ubifsload ${fdtaddr} /boot/dtbs/${fdtfile};ubifsumount; setenv bootargs console=${console} ubi.mtd=1 root=ubi0:rootfs ro rootfstype=ubifs rootwait ${mtdparts};bootz ${loadaddr} - ${fdtaddr};fi
|
||||
console=ttyS0,115200
|
||||
ethact=egiga0
|
||||
fdtaddr=0x800000
|
||||
fdtdir=/boot/dtbs
|
||||
fdtfile=kirkwood-pogo_e02.dtb
|
||||
ipaddr=10.10.10.3
|
||||
loadaddr=0x810000
|
||||
loadfdt=echo loading ${fdtdir}/${fdtfile} ...; load ${devtype} ${bootpart} ${fdtaddr} ${fdtdir}/${fdtfile}
|
||||
loadimage=load ${devtype} ${bootpart} ${loadaddr} ${bootdir}/${bootfilez} || load ${devtype} ${bootpart} ${loadaddr} ${bootdir}/${bootfilem}
|
||||
loadrd=load ${devtype} ${bootpart} ${rdaddr} ${bootdir}/${rdfile}
|
||||
mainargs=setenv bootargs console=${console} ${mtdparts} root=${root} rw rootwait ${optargs} ${ncargs}
|
||||
mountubi=ubi part rootfs; ubifsmount ubi0:rootfs
|
||||
mtdids=nand0=orion_nand
|
||||
mtdparts=mtdparts=orion_nand:1M(u-boot),-(rootfs)
|
||||
ncip=10.10.10.5
|
||||
ncipk=10.10.10.4
|
||||
netconsole=on
|
||||
preboot=if env exists netconsole && test ${netconsole} = on; then if ping ${ncip}; then setenv stdin nc; setenv stdout nc; setenv stderr nc; version; if env exists ncargsusr; then echo ncargs has been defined by user; setenv ncargs ${ncargsusr}; else setenv ncargs ignore_loglevel netconsole=6665@${ipaddr}/eth0,6666@${ncipk}/; fi; fi; else echo Netconsole has been turned off.; echo To turn it on, set netconsole variable to on.; setenv stdin; setenv stdout; setenv stderr; setenv ncargs; fi
|
||||
rdaddr=0x1100000
|
||||
rdfile=initramfs-linux.img
|
||||
startboot=usb start; for devtype in usb ; do setenv devnum 0; while ${devtype} dev ${devnum}; do echo ${devtype} found on device ${devnum}; setenv bootpart ${devnum}:1; echo Checking for: ${bootdir}/uEnv.txt ...; if test -e ${devtype} ${bootpart} ${bootdir}/uEnv.txt; then load ${devtype} ${bootpart} ${loadaddr} ${bootdir}/uEnv.txt; env import -t ${loadaddr} ${filesize}; echo Loaded environment from ${bootdir}/uEnv.txt; echo Checking if uenvcmd is set ...; if test -n ${uenvcmd}; then echo Running uenvcmd ...; run uenvcmd; fi; fi; if run loadimage; then if env exists root; then echo root has been defined by user; else part uuid ${devtype} ${bootpart} uuid; setenv root PARTUUID=${uuid}; fi; run mainargs; if run loadfdt; then if run loadrd; then bootz ${loadaddr} ${rdaddr}:${filesize} ${fdtaddr}; else bootz ${loadaddr} - ${fdtaddr}; fi; else if run loadrd; then echo Booting uImage with initrd; bootm ${loadaddr} ${rdaddr}:${filesize}; else bootm ${loadaddr}; fi; fi; else echo No kernel found; fi; setexpr devnum ${devnum} + 1; done; done;
|
|
@ -1,46 +0,0 @@
|
|||
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
|
||||
mac=$(blparam | grep ethaddr | cut -d= -f2)
|
||||
if [[ $mac == '' ]]; then
|
||||
echo '>> Error: Could not find MAC address from current U-Boot.'
|
||||
return
|
||||
fi
|
||||
fi
|
||||
# flash U-Boot
|
||||
flash_erase /dev/mtd0 0 4
|
||||
flash_erase /dev/mtd0 0xc0000 1
|
||||
nandwrite /dev/mtd0 /boot/uboot-pogoplugv4.kwb
|
||||
nandwrite -s 0xc0000 /dev/mtd0 /boot/uboot-pogoplugv4.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-pogoplugv4."
|
||||
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
|
||||
}
|
|
@ -1,26 +0,0 @@
|
|||
bootcmd=run startboot;run bootubi
|
||||
bootdir=/boot
|
||||
bootfilem=uImage
|
||||
bootfilez=zImage
|
||||
bootubi=echo Trying to boot from NAND ...;if run mountubi; then ubifsload ${loadaddr} /boot/zImage;ubifsload ${fdtaddr} /boot/dtbs/kirkwood-pogoplugv4.dtb; ubifsumount; setenv bootargs console=${console} ubi.mtd=1 root=ubi0:rootfs ro rootfstype=ubifs rootwait ${mtdparts};bootz ${loadaddr} - ${fdtaddr};fi
|
||||
console=ttyS0,115200
|
||||
ethact=egiga0
|
||||
fdtaddr=0x800000
|
||||
fdtdir=/boot/dtbs
|
||||
fdtfile=kirkwood-pogoplug-series-4.dtb
|
||||
ipaddr=10.10.10.3
|
||||
loadaddr=0x810000
|
||||
loadfdt=echo loading ${fdtdir}/${fdtfile} ...; load ${devtype} ${bootpart} ${fdtaddr} ${fdtdir}/${fdtfile}
|
||||
loadimage=load ${devtype} ${bootpart} ${loadaddr} ${bootdir}/${bootfilez} || load ${devtype} ${bootpart} ${loadaddr} ${bootdir}/${bootfilem}
|
||||
loadrd=load ${devtype} ${bootpart} ${rdaddr} ${bootdir}/${rdfile}
|
||||
mainargs=setenv bootargs console=${console} ${mtdparts} root=${root} rw rootwait ${optargs} ${ncargs}
|
||||
mountubi=ubi part rootfs; ubifsmount ubi0:rootfs
|
||||
mtdids=nand0=orion_nand
|
||||
mtdparts=mtdparts=orion_nand:1M(u-boot),-(rootfs)
|
||||
ncip=10.10.10.5
|
||||
ncipk=10.10.10.4
|
||||
netconsole=on
|
||||
preboot=if env exists netconsole && test ${netconsole} = on; then if ping ${ncip}; then setenv stdin nc; setenv stdout nc; setenv stderr nc; version; if env exists ncargsusr; then echo ncargs has been defined by user; setenv ncargs ${ncargsusr}; else setenv ncargs ignore_loglevel netconsole=6665@${ipaddr}/eth0,6666@${ncipk}/; fi; fi; else echo Netconsole has been turned off.; echo To turn it on, set netconsole variable to on.; setenv stdin; setenv stdout; setenv stderr; setenv ncargs; fi
|
||||
rdaddr=0x1100000
|
||||
rdfile=initramfs-linux.img
|
||||
startboot=usb start; ide reset; for devtype in mmc usb ide; do setenv devnum 0; while ${devtype} dev ${devnum}; do echo ${devtype} found on device ${devnum}; setenv bootpart ${devnum}:1; echo Checking for: ${bootdir}/uEnv.txt ...; if test -e ${devtype} ${bootpart} ${bootdir}/uEnv.txt; then load ${devtype} ${bootpart} ${loadaddr} ${bootdir}/uEnv.txt; env import -t ${loadaddr} ${filesize}; echo Loaded environment from ${bootdir}/uEnv.txt; echo Checking if uenvcmd is set ...; if test -n ${uenvcmd}; then echo Running uenvcmd ...; run uenvcmd; fi; fi; if run loadimage; then if env exists root; then echo root has been defined by user; else part uuid ${devtype} ${bootpart} uuid; setenv root PARTUUID=${uuid}; fi; run mainargs; if run loadfdt; then if run loadrd; then bootz ${loadaddr} ${rdaddr}:${filesize} ${fdtaddr}; else bootz ${loadaddr} - ${fdtaddr}; fi; else if run loadrd; then echo Booting uImage with initrd; bootm ${loadaddr} ${rdaddr}:${filesize}; else bootm ${loadaddr}; fi; fi; else echo No kernel found; fi; setexpr devnum ${devnum} + 1; done; done;
|
|
@ -1,43 +0,0 @@
|
|||
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-sheevaplug.kwb
|
||||
nandwrite -s 0xc0000 /dev/mtd0 /boot/uboot-sheevaplug.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-sheevaplug."
|
||||
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
|
||||
}
|
|
@ -1,26 +0,0 @@
|
|||
bootcmd=run startboot;run bootubi
|
||||
bootdir=/boot
|
||||
bootfilem=uImage
|
||||
bootfilez=zImage
|
||||
bootubi=echo Trying to boot from NAND ...;if run mountubi; then ubifsload ${loadaddr} /boot/zImage;ubifsload ${fdtaddr} /boot/dtbs/${fdtfile};ubifsumount; setenv bootargs console=${console} ubi.mtd=1 root=ubi0:rootfs ro rootfstype=ubifs rootwait ${mtdparts};bootz ${loadaddr} - ${fdtaddr};fi
|
||||
console=ttyS0,115200
|
||||
ethact=egiga0
|
||||
fdtaddr=0x800000
|
||||
fdtdir=/boot/dtbs
|
||||
fdtfile=kirkwood-sheevaplug-esata.dtb
|
||||
ipaddr=10.10.10.3
|
||||
loadaddr=0x810000
|
||||
loadfdt=echo loading ${fdtdir}/${fdtfile} ...; load ${devtype} ${bootpart} ${fdtaddr} ${fdtdir}/${fdtfile}
|
||||
loadimage=load ${devtype} ${bootpart} ${loadaddr} ${bootdir}/${bootfilez} || load ${devtype} ${bootpart} ${loadaddr} ${bootdir}/${bootfilem}
|
||||
loadrd=load ${devtype} ${bootpart} ${rdaddr} ${bootdir}/${rdfile}
|
||||
mainargs=setenv bootargs console=${console} ${mtdparts} root=${root} rw rootwait ${optargs} ${ncargs}
|
||||
mountubi=ubi part rootfs; ubifsmount ubi0:rootfs
|
||||
mtdids=nand0=orion_nand
|
||||
mtdparts=mtdparts=orion_nand:1M(u-boot),-(rootfs)
|
||||
ncip=10.10.10.5
|
||||
ncipk=10.10.10.4
|
||||
netconsole=on
|
||||
preboot=if env exists netconsole && test ${netconsole} = on; then if ping ${ncip}; then setenv stdin nc; setenv stdout nc; setenv stderr nc; version; if env exists ncargsusr; then echo ncargs has been defined by user; setenv ncargs ${ncargsusr}; else setenv ncargs ignore_loglevel netconsole=6665@${ipaddr}/eth0,6666@${ncipk}/; fi; fi; else echo Netconsole has been turned off.; echo To turn it on, set netconsole variable to on.; setenv stdin; setenv stdout; setenv stderr; setenv ncargs; fi
|
||||
rdaddr=0x1100000
|
||||
rdfile=initramfs-linux.img
|
||||
startboot=usb start; ide reset; for devtype in mmc usb ide; do setenv devnum 0; while ${devtype} dev ${devnum}; do echo ${devtype} found on device ${devnum}; setenv bootpart ${devnum}:1; echo Checking for: ${bootdir}/uEnv.txt ...; if test -e ${devtype} ${bootpart} ${bootdir}/uEnv.txt; then load ${devtype} ${bootpart} ${loadaddr} ${bootdir}/uEnv.txt; env import -t ${loadaddr} ${filesize}; echo Loaded environment from ${bootdir}/uEnv.txt; echo Checking if uenvcmd is set ...; if test -n ${uenvcmd}; then echo Running uenvcmd ...; run uenvcmd; fi; fi; if run loadimage; then if env exists root; then echo root has been defined by user; else part uuid ${devtype} ${bootpart} uuid; setenv root PARTUUID=${uuid}; fi; run mainargs; if run loadfdt; then if run loadrd; then bootz ${loadaddr} ${rdaddr}:${filesize} ${fdtaddr}; else bootz ${loadaddr} - ${fdtaddr}; fi; else if run loadrd; then echo Booting uImage with initrd; bootm ${loadaddr} ${rdaddr}:${filesize}; else bootm ${loadaddr}; fi; fi; else echo No kernel found; fi; setexpr devnum ${devnum} + 1; done; done;
|
Loading…
Reference in a new issue