added alarm/uboot-udoo

This commit is contained in:
Kevin Mihelich 2013-11-23 03:57:53 +00:00
parent 18946d27b8
commit 38b39482bc
4 changed files with 5950 additions and 0 deletions

64
alarm/uboot-udoo/PKGBUILD Normal file
View file

@ -0,0 +1,64 @@
# U-Boot: UDOO
# Maintainer: Kevin Mihelich <kevin@archlinuxarm.org>
buildarch=4
pkgbase=uboot-udoo
pkgname=('uboot-udoo-dual' 'uboot-udoo-quad')
pkgver=2009.08
pkgrel=1
arch=('armv7h')
url="http://git.denx.de/u-boot.git/"
license=('GPL')
makedepends=('git')
option=('!strip')
source=("uboot::git+https://github.com/UDOOboard/U-Boot_Unico.git"
'ext4.patch'
'alarm.patch')
md5sums=('SKIP'
'a53b7e683b293ea36945a4d45502ca88'
'e6d3626d1b5e97223e600e1c486da32c')
prepare() {
cd uboot
patch -p1 -i "${srcdir}"/ext4.patch
patch -p1 -i "${srcdir}"/alarm.patch
rm -rf .git
}
build() {
cd uboot
unset CFLAGS
unset CXXFLAGS
# Dual
make distclean
make mx6dl_udoo_config
make DDR_SIZE=2 DDR_TYPE=1 BOARD_TYPE=UDOO CPU_TYPE=DUAL_LITE OS_TYPE=LINUX ENV_DEVICE=ENV_MMC
mv u-boot.bin u-boot-dual.imx
# Quad
make distclean
make mx6q_udoo_config
make DDR_SIZE=2 DDR_TYPE=1 BOARD_TYPE=UDOO CPU_TYPE=QUAD OS_TYPE=LINUX ENV_DEVICE=ENV_MMC
mv u-boot.bin u-boot-quad.imx
}
package_uboot-udoo-dual() {
pkgdesc="U-Boot for UDOO Dual"
conflicts=('uboot-udoo-quad')
install=${pkgbase}.install
mkdir -p "${pkgdir}"/boot
cp uboot/u-boot-dual.imx "${pkgdir}"/boot/u-boot.bin
}
package_uboot-udoo-quad() {
pkgdesc="U-Boot for UDOO Quad"
conflicts=('uboot-udoo-dual')
install=${pkgbase}.install
mkdir -p "${pkgdir}"/boot
cp uboot/u-boot-quad.imx "${pkgdir}"/boot/u-boot.bin
}

View file

@ -0,0 +1,92 @@
diff -urN a/include/configs/mx6dl_udoo.h b/include/configs/mx6dl_udoo.h
--- a/include/configs/mx6dl_udoo.h 2013-11-22 17:53:46.998815980 -0700
+++ b/include/configs/mx6dl_udoo.h 2013-11-22 19:06:26.841496329 -0700
@@ -174,30 +174,23 @@
#ifdef UDOO_LINUX
#define CONFIG_LOADADDR 0x10800000
#define CONFIG_RD_LOADADDR (0x10800000 + 0x300000)
+#define CONFIG_IDENT_STRING " Arch Linux ARM"
#define CONFIG_EXTRA_ENV_SETTINGS \
"netdev=eth0\0" \
"ethprime=FEC0\0" \
- "uboot=u-boot.bin\0" \
- "kernel=uImage\0" \
- "nfsroot=/opt/eldk/arm\0" \
- "bootargs_base=setenv bootargs console=ttymxc0,115200\0" \
- "bootargs_nfs=setenv bootargs ${bootargs} root=/dev/nfs ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp\0" \
- "bootcmd_net=run bootargs_base bootargs_nfs; tftpboot ${loadaddr} ${kernel}; bootm\0" \
- "bootargs_mmc=setenv bootargs ${bootargs} ip=dhcp root=/dev/mmcblk0p1 rootwait\0" \
- "bootcmd_mmc=run bootargs_base bootargs_mmc; mmc dev 3; mmc read ${loadaddr} 0x800 0x2000; bootm\0" \
"ethact=FEC0\0" \
- "bootargs=console=ttymxc0,115200 root=/dev/nfs ip=dhcp nfsroot=192.168.1.101:/opt/eldk/arm,v3,tcp\0" \
+ "loadaddr=0x10800000\0" \
+ "uimage=/boot/uImage\0" \
+ "script=/boot/boot.scr\0" \
"memory=mem=768M\0" \
- "bootdev=mmc dev 2; ext2load mmc 2:1\0" \
"root=root=/dev/mmcblk0p1\0" \
"option=rootwait rw fixrtc rootflags=barrier=1\0" \
- "setvideomode=setenv videomode video=mxcfb0:dev=hdmi,1920x1080M@60,if=RGB24\0" \
+ "videomode=video=mxcfb0:dev=hdmi,1920x1080M@60,if=RGB24\0" \
"cpu_freq=arm_freq=996\0" \
- "run_from_nfs=0\0" \
- "setbootargs_nfs=setenv bootargs console=ttymxc1,115200 root=/dev/nfs nfsroot=${ip_server}:${nfs_path}nolock,wsize=4096,rsize=4096 ip=${ip_local} ${memory} ${cpu_freq} ${videomode}\0" \
"setbootargs=setenv bootargs console=ttymxc1,115200 ${root} ${option} ${memory} ${cpu_freq} ${videomode}\0" \
- "setbootdev=setenv boot_dev ${bootdev} 10800000 /boot/uImage\0" \
- "bootcmd=run setvideomode; run setbootargs; run setbootdev; run boot_dev; bootm 10800000\0" \
+ "loadscript=if ext4load mmc 2:1 ${loadaddr} ${script}; then source ${loadaddr}; fi\0" \
+ "loaduimage=ext4load mmc 2:1 ${loadaddr} ${uimage}\0" \
+ "bootcmd=mmc dev 2; run loadscript; run setbootargs; run loaduimage; bootm ${loadaddr}\0" \
"stdin=serial\0" \
"stdout=serial\0" \
"stderr=serial\0"
diff -urN a/include/configs/mx6q_udoo.h b/include/configs/mx6q_udoo.h
--- a/include/configs/mx6q_udoo.h 2013-11-22 17:53:46.998815980 -0700
+++ b/include/configs/mx6q_udoo.h 2013-11-22 19:08:20.581014828 -0700
@@ -164,38 +164,30 @@
#endif
#ifdef UDOO_LINUX
+#define CONFIG_IDENT_STRING " Arch Linux ARM"
#define CONFIG_LOADADDR 0x10800000
#define CONFIG_RD_LOADADDR (0x10800000 + 0x300000)
#define CONFIG_EXTRA_ENV_SETTINGS \
"netdev=eth0\0" \
"ethprime=FEC0\0" \
- "uboot=u-boot.bin\0" \
- "kernel=uImage\0" \
- "nfsroot=/opt/eldk/arm\0" \
- "bootargs_base=setenv bootargs console=ttymxc0,115200\0" \
- "bootargs_nfs=setenv bootargs ${bootargs} root=/dev/nfs ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp\0" \
- "bootcmd_net=run bootargs_base bootargs_nfs; tftpboot ${loadaddr} ${kernel}; bootm\0" \
- "bootargs_mmc=setenv bootargs ${bootargs} ip=dhcp root=/dev/mmcblk0p1 rootwait\0" \
- "bootcmd_mmc=run bootargs_base bootargs_mmc; mmc dev 3; mmc read ${loadaddr} 0x800 0x2000; bootm\0" \
"ethact=FEC0\0" \
- "bootargs=console=ttymxc0,115200 root=/dev/nfs ip=dhcp nfsroot=192.168.1.101:/opt/eldk/arm,v3,tcp\0" \
+ "loadaddr=0x10800000\0" \
+ "uimage=/boot/uImage\0" \
+ "script=/boot/boot.scr\0" \
"memory=mem=768M\0" \
- "bootdev=mmc dev 2; ext2load mmc 2:1\0" \
"root=root=/dev/mmcblk0p1\0" \
"option=rootwait rw fixrtc rootflags=barrier=1\0" \
- "setvideomode=setenv videomode video=mxcfb0:dev=hdmi,1920x1080M@60,if=RGB24\0" \
+ "videomode=video=mxcfb0:dev=hdmi,1920x1080M@60,if=RGB24\0" \
"cpu_freq=arm_freq=996\0" \
- "run_from_nfs=0\0" \
- "setbootargs_nfs=setenv bootargs console=ttymxc1,115200 root=/dev/nfs nfsroot=${ip_server}:${nfs_path}nolock,wsize=4096,rsize=4096 ip=${ip_local} ${memory} ${cpu_freq} ${videomode}\0" \
"setbootargs=setenv bootargs console=ttymxc1,115200 ${root} ${option} ${memory} ${cpu_freq} ${videomode}\0" \
- "setbootdev=setenv boot_dev ${bootdev} 10800000 /boot/uImage\0" \
- "bootcmd=run setvideomode; run setbootargs; run setbootdev; run boot_dev; bootm 10800000\0" \
+ "loadscript=if ext4load mmc 2:1 ${loadaddr} ${script}; then source ${loadaddr}; fi\0" \
+ "loaduimage=ext4load mmc 2:1 ${loadaddr} ${uimage}\0" \
+ "bootcmd=mmc dev 2; run loadscript; run setbootargs; run loaduimage; bootm ${loadaddr}\0" \
"stdin=serial\0" \
"stdout=serial\0" \
"stderr=serial\0"
#endif
-
#define CONFIG_ARP_TIMEOUT 200UL
/*

5771
alarm/uboot-udoo/ext4.patch Normal file

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,23 @@
flash_uboot() {
echo "A new U-Boot version needs to be flashed onto /dev/mmcblk0."
echo "Do you want to do this now? [y|N]"
read -r shouldwe
if [[ $shouldwe =~ ^([yY][eE][sS]|[yY])$ ]]; then
dd if=/boot/u-boot.bin of=/dev/mmcblk0 bs=512 seek=2 skip=2
sync
else
echo "You can do this later by running:"
echo "# dd if=/boot/u-boot.bin of=/dev/mmcblk0 bs=512 seek=2 skip=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
}