added alarm/uboot-wandboard

This commit is contained in:
Kevin Mihelich 2013-07-26 01:34:52 +00:00
parent de1d890c3a
commit fd7ec2d828
3 changed files with 163 additions and 0 deletions

View file

@ -0,0 +1,64 @@
# U-Boot: Wandboard
# Maintainer: Kevin Mihelich <kevin@archlinuxarm.org>
buildarch=4
pkgbase=uboot-wandboard
pkgname=('uboot-wandboard-solo' 'uboot-wandboard-dual' 'uboot-wandboard-quad')
pkgver=2013.07
pkgrel=1
arch=('armv7h')
url="http://git.denx.de/u-boot.git/"
license=('GPL')
makedepends=('git')
source=("uboot::git://git.denx.de/u-boot.git#tag=v${pkgver}"
'alarm.patch')
md5sums=('SKIP'
'a242f12cf03259bbea4193baea0f9d15')
prepare() {
cd uboot
patch -p1 -i "${srcdir}"/alarm.patch
rm -rf .git
}
build() {
cd uboot
unset CFLAGS
unset CXXFLAGS
for i in solo dl quad; do
make distclean
make wandboard_${i}_config
make
mv u-boot.imx u-boot-${i}.imx
done
}
package_uboot-wandboard-solo() {
pkgdesc="U-Boot for Wandboard Solo"
conflicts=('uboot-wandboard-dual' 'uboot-wandboard-quad')
install=${pkgbase}.install
mkdir -p "${pkgdir}"/boot
cp uboot/u-boot-solo.imx "${pkgdir}"/boot/u-boot.imx
}
package_uboot-wandboard-dual() {
pkgdesc="U-Boot for Wandboard Dual"
conflicts=('uboot-wandboard-solo' 'uboot-wandboard-quad')
install=${pkgbase}.install
mkdir -p "${pkgdir}"/boot
cp uboot/u-boot-dl.imx "${pkgdir}"/boot/u-boot.imx
}
package_uboot-wandboard-quad() {
pkgdesc="U-Boot for Wandboard Quad"
conflicts=('uboot-wandboard-solo' 'uboot-wandboard-dual')
install=${pkgbase}.install
mkdir -p "${pkgdir}"/boot
cp uboot/u-boot-quad.imx "${pkgdir}"/boot/u-boot.imx
}

View file

@ -0,0 +1,77 @@
diff -urN a/include/configs/wandboard.h b/include/configs/wandboard.h
--- a/include/configs/wandboard.h 2013-07-25 18:18:02.185623052 -0600
+++ b/include/configs/wandboard.h 2013-07-25 18:49:02.460474904 -0600
@@ -51,7 +51,7 @@
#define CONFIG_CMD_BMODE
#define CONFIG_CMD_SETEXPR
-#define CONFIG_BOOTDELAY 5
+#define CONFIG_BOOTDELAY 1
#define CONFIG_SYS_MEMTEST_START 0x10000000
#define CONFIG_SYS_MEMTEST_END (CONFIG_SYS_MEMTEST_START + 500 * SZ_1M)
@@ -70,6 +70,8 @@
#define CONFIG_BOUNCE_BUFFER
#define CONFIG_CMD_EXT2
#define CONFIG_CMD_FAT
+#define CONFIG_CMD_EXT4
+#define CONFIG_CMD_FS_GENERIC
#define CONFIG_DOS_PARTITION
/* Ethernet Configuration */
@@ -102,16 +104,18 @@
#define CONFIG_IPUV3_CLK 260000000
#if defined(CONFIG_MX6DL)
-#define CONFIG_DEFAULT_FDT_FILE "imx6dl-wandboard.dtb"
+#define CONFIG_DEFAULT_FDT_FILE "/boot/dtbs/imx6dl-wandboard.dtb"
#elif defined(CONFIG_MX6Q)
-#define CONFIG_DEFAULT_FDT_FILE "imx6q-wandboard.dtb"
+#define CONFIG_DEFAULT_FDT_FILE "/boot/dtbs/imx6q-wandboard.dtb"
#elif defined(CONFIG_MX6S)
-#define CONFIG_DEFAULT_FDT_FILE "imx6s-wandboard.dtb"
+#define CONFIG_DEFAULT_FDT_FILE "/boot/dtbs/imx6s-wandboard.dtb"
#endif
+#define CONFIG_IDENT_STRING " Arch Linux ARM"
+
#define CONFIG_EXTRA_ENV_SETTINGS \
- "script=boot.scr\0" \
- "uimage=uImage\0" \
+ "script=/boot/boot.scr\0" \
+ "uimage=/boot/uImage\0" \
"console=ttymxc0\0" \
"fdt_high=0xffffffff\0" \
"initrd_high=0xffffffff\0" \
@@ -121,7 +125,7 @@
"ip_dyn=yes\0" \
"mmcdev=" __stringify(CONFIG_SYS_MMC_ENV_DEV) "\0" \
"mmcpart=1\0" \
- "mmcroot=/dev/mmcblk0p2 rootwait rw\0" \
+ "mmcroot=/dev/mmcblk0p1 rootwait rw\0" \
"update_sd_firmware_filename=u-boot.imx\0" \
"update_sd_firmware=" \
"if test ${ip_dyn} = yes; then " \
@@ -139,11 +143,11 @@
"mmcargs=setenv bootargs console=${console},${baudrate} " \
"root=${mmcroot}\0" \
"loadbootscript=" \
- "fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \
+ "load mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \
"bootscript=echo Running bootscript from mmc ...; " \
"source\0" \
- "loaduimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${uimage}\0" \
- "loadfdt=fatload mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}\0" \
+ "loaduimage=load mmc ${mmcdev}:${mmcpart} ${loadaddr} ${uimage}\0" \
+ "loadfdt=load mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}\0" \
"mmcboot=echo Booting from mmc ...; " \
"run mmcargs; " \
"if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
@@ -237,6 +241,7 @@
#define CONFIG_OF_LIBFDT
#define CONFIG_CMD_BOOTZ
+#define CONFIG_SUPPORT_RAW_INITRD
#ifndef CONFIG_SYS_DCACHE_OFF
#define CONFIG_CMD_CACHE

View file

@ -0,0 +1,22 @@
flash_uboot() {
echo "A new U-Boot version needs to be flashed onto /dev/mmcblk0p1."
echo "Do this now? [y|N]"
read -r shouldwe
if [[ $shouldwe =~ ^([yY][eE][sS]|[yY])$ ]]; then
dd if=/boot/u-boot.imx of=/dev/mmcblk0 bs=512 seek=2
else
echo "You can do this later by running:"
echo "# dd if=/boot/u-boot.imx of=/dev/mmcblk0 bs=512 seek=2"
fi
}
## arg 1: the new package version
post_install() {
flash_uboot
}
## arg 1: the new package version
## arg 2: the old package version
post_upgrade() {
flash_uboot
}