alarm/uboot-udoo to 2014.04-1

This commit is contained in:
Kevin Mihelich 2014-05-18 23:26:47 +00:00
parent 06537be077
commit 00a3b4c78b
2 changed files with 103 additions and 146 deletions

View file

@ -5,40 +5,37 @@ buildarch=4
pkgbase=uboot-udoo
pkgname=('uboot-udoo-dual' 'uboot-udoo-quad')
pkgver=2013.10
pkgrel=2
pkgver=2014.04
pkgrel=1
arch=('armv7h')
url="https://github.com/UDOOboard/U-Boot_Unico-2013"
url="http://git.denx.de/u-boot.git/"
license=('GPL')
makedepends=('git')
option=('!strip')
source=("uboot::git+https://github.com/UDOOboard/U-Boot_Unico-2013.git"
source=("ftp://ftp.denx.de/pub/u-boot/u-boot-${pkgver}.tar.bz2"
'http://raw.github.com/eewiki/u-boot-patches/master/v${pkgver}/0001-udoo-uEnv.txt-bootz-n-fixes.patch'
'alarm.patch')
md5sums=('SKIP'
'6a7b2c125b8ff29fa47d1dd6cbd61f7f')
md5sums=('6d2116d1385a66e9a59742caa9d62a54'
'd796b672643d92f6b43b4ba74e8a244f'
'119804f59c0b392c70bcdc67dc220ae0')
prepare() {
cd uboot
patch -p1 -i "${srcdir}"/alarm.patch
rm -rf .git
cd u-boot-${pkgver}
patch -p1 -i ../0001-udoo-uEnv.txt-bootz-n-fixes.patch
patch -p1 -i ../alarm.patch
}
build() {
cd uboot
cd u-boot-${pkgver}
unset CFLAGS CXXFLAGS LDFLAGS
# Dual
make distclean
make udoo_dl_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.imx u-boot-dual.imx
# Quad
make distclean
make udoo_quad_config
make DDR_SIZE=2 DDR_TYPE=1 BOARD_TYPE=UDOO CPU_TYPE=QUAD OS_TYPE=LINUX ENV_DEVICE=ENV_MMC
mv u-boot.imx u-boot-quad.imx
mkdir bins
for i in dl quad; do
make distclean
make udoo_${i}_config
make
mv u-boot.imx bins/u-boot-${i}.imx
done
}
package_uboot-udoo-dual() {
@ -47,7 +44,7 @@ package_uboot-udoo-dual() {
install=${pkgbase}.install
mkdir -p "${pkgdir}"/boot
cp uboot/u-boot-dual.imx "${pkgdir}"/boot/u-boot.imx
cp u-boot-${pkgver}/bins/u-boot-dl.imx "${pkgdir}"/boot/u-boot.imx
}
package_uboot-udoo-quad() {
@ -56,5 +53,8 @@ package_uboot-udoo-quad() {
install=${pkgbase}.install
mkdir -p "${pkgdir}"/boot
cp uboot/u-boot-quad.imx "${pkgdir}"/boot/u-boot.imx
cp u-boot-${pkgver}/bins/u-boot-quad.imx "${pkgdir}"/boot/u-boot.imx
}
md5sums=('6d2116d1385a66e9a59742caa9d62a54'
'9a9e4247a28d6eb936746be68a2c524e'
'51ca2a4f726bd02943d10c4d91ef07be')

View file

@ -1,148 +1,105 @@
diff -urN a/include/configs/udoo.h b/include/configs/udoo.h
--- a/include/configs/udoo.h 2014-05-18 11:32:41.255898800 -0600
+++ b/include/configs/udoo.h 2014-05-18 11:34:20.295534234 -0600
@@ -118,102 +118,72 @@
#define CONFIG_GENERIC_MMC
#define CONFIG_BOUNCE_BUFFER
#define CONFIG_CMD_EXT2
+#define CONFIG_CMD_EXT4
+#define CONFIG_CMD_FS_GENERIC
#define CONFIG_CMD_FAT
--- a/include/configs/udoo.h 2014-05-18 16:50:00.204581579 -0600
+++ b/include/configs/udoo.h 2014-05-18 17:03:48.701528254 -0600
@@ -37,8 +37,8 @@
/* SATA Configs */
+#ifdef CONFIG_MX6Q
#define CONFIG_CMD_SATA
-#ifdef CONFIG_CMD_SATA
#define CONFIG_DWC_AHSATA
#define CONFIG_SYS_SATA_MAX_DEVICE 1
#define CONFIG_DWC_AHSATA_PORT_ID 0
@@ -98,7 +98,13 @@
#define CONFIG_CMD_FS_GENERIC
#define CONFIG_DOS_PARTITION
+#define CONFIG_IDENT_STRING " Arch Linux ARM"
+
+#if defined(CONFIG_MX6Q)
+#ifdef CONFIG_MX6Q
#define CONFIG_DEFAULT_FDT_FILE "imx6q-udoo.dtb"
+#else
+#define CONFIG_DEFAULT_FDT_FILE "imx6dl-udoo.dtb"
+#endif
#define CONFIG_EXTRA_ENV_SETTINGS \
- "script=boot.scr\0" \
"uimage=/boot/uImage\0" \
+ "zimage=/boot/zImage\0" \
"console=ttymxc1\0" \
"splashpos=m,m\0" \
"fdt_high=0xffffffff\0" \
"initrd_high=0xffffffff\0" \
- "fdt_file=" CONFIG_DEFAULT_FDT_FILE "\0" \
+ "fdt_file=/boot/dtbs/" CONFIG_DEFAULT_FDT_FILE "\0" \
"fdt_addr=0x11000000\0" \
- "boot_fdt=try\0" \
"script=boot.scr\0" \
@@ -112,11 +118,11 @@
"boot_fdt=try\0" \
"ip_dyn=yes\0" \
"hdmi_patch=\0" \
"optargs=\0" \
- "video=\0" \
+ "video=mxcfb0:dev=hdmi,1920x1080M@60,bpp=32\0" \
+ "memory=mem=1024M\0" \
"mmcdev=0\0" \
"mmcpart=1\0" \
"mmcroot=/dev/mmcblk0p1 rootwait rw\0" \
- "update_sd_firmware_filename=u-boot.imx\0" \
- "update_sd_firmware=" \
- "if test ${ip_dyn} = yes; then " \
- "setenv get_cmd dhcp; " \
- "else " \
- "setenv get_cmd tftp; " \
- "fi; " \
- "if mmc dev ${mmcdev}; then " \
- "if ${get_cmd} ${update_sd_firmware_filename}; then " \
- "setexpr fw_sz ${filesize} / 0x200; " \
- "setexpr fw_sz ${fw_sz} + 1; " \
- "mmc write ${loadaddr} 0x2 ${fw_sz}; " \
- "fi; " \
- "fi\0" \
- "mmcroot=/dev/mmcblk0p2 ro\0" \
- "mmcrootfstype=ext4 rootwait\0" \
+ "mmcroot=/dev/mmcblk0p1 rw rootwait\0" \
"update_sd_firmware_filename=u-boot.imx\0" \
"update_sd_firmware=" \
"if test ${ip_dyn} = yes; then " \
@@ -134,35 +140,24 @@
"mmcargs=setenv bootargs console=${console},${baudrate} " \
"root=${mmcroot} " \
"${hdmi_patch} " \
+ "${memory} " \
"fbmem=24M video=mxcfb0:dev=hdmi,1920x1080M@60,bpp=32\0" \
- "loadbootscript=" \
- "ext2load mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \
- "bootscript=echo Running bootscript from mmc ...; " \
- "source\0" \
- "loaduimage=ext2load mmc ${mmcdev}:${mmcpart} ${loadaddr} ${uimage}\0" \
- "loadfdt=ext2load mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}\0" \
- "mmcboot=echo Booting from mmc ...; " \
"${optargs} " \
"root=${mmcroot} " \
- "rootfstype=${mmcrootfstype} " \
+ "${memory} " \
"video=${video}\0" \
- "loadbootenv=load mmc ${mmcdev}:${mmcpart} ${loadaddr} uEnv.txt\0" \
+ "loadbootenv=load mmc ${mmcdev}:${mmcpart} ${loadaddr} /boot/uEnv.txt\0" \
+ "importbootenv=echo Importing environment from mmc (uEnv.txt)...; " \
+ "env import -t $loadaddr $filesize\0" \
+ "loaduimage=load mmc ${mmcdev}:${mmcpart} ${loadaddr} ${uimage}\0" \
+ "loadzimage=load mmc ${mmcdev}:${mmcpart} ${loadaddr} ${zimage}\0" \
+ "loadfdt=load mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}\0" \
"importbootenv=echo Importing environment from mmc (uEnv.txt)...; " \
"env import -t $loadaddr $filesize\0" \
"loadbootscript=" \
"fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \
"bootscript=echo Running bootscript from mmc ...; " \
"source\0" \
- "loadimage=load mmc ${mmcdev}:${mmcpart} ${loadaddr} zImage\0" \
- "loadzimage=load mmc ${mmcdev}:${mmcpart} ${loadaddr} zImage\0" \
- "loadfdt=load mmc ${mmcdev}:${mmcpart} ${fdt_addr} /dtbs/${fdt_file}\0" \
- "mmcboot=echo Booting from mmc ...; " \
+ "loaduimage=load mmc ${mmcdev}:${mmcpart} ${loadaddr} /boot/uImage\0" \
+ "loadzimage=load mmc ${mmcdev}:${mmcpart} ${loadaddr} /boot/zImage\0" \
+ "loadfdt=load mmc ${mmcdev}:${mmcpart} ${fdt_addr} /boot/dtbs/${fdt_file}\0" \
+ "mmcbootm=echo Booting from mmc ...; " \
"run mmcargs; " \
- "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
- "if run loadfdt; then " \
- "bootm ${loadaddr} - ${fdt_addr}; " \
- "else " \
- "if test ${boot_fdt} = try; then " \
- "bootm; " \
- "else " \
- "echo WARN: Cannot load the DT; " \
- "fi; " \
- "fi; " \
- "else " \
- "bootm; " \
- "fi;\0" \
- "netargs=setenv bootargs console=${console},${baudrate} " \
- "root=/dev/nfs " \
- "${hdmi_patch} " \
- "ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp\0" \
- "netboot=echo Booting from net ...; " \
- "run netargs; " \
- "if test ${ip_dyn} = yes; then " \
- "setenv get_cmd dhcp; " \
- "else " \
- "setenv get_cmd tftp; " \
- "fi; " \
- "${get_cmd} ${uimage}; " \
- "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
- "if ${get_cmd} ${fdt_addr} ${fdt_file}; then " \
- "bootm ${loadaddr} - ${fdt_addr}; " \
- "else " \
- "if test ${boot_fdt} = try; then " \
- "bootm; " \
- "else " \
- "echo WARN: Cannot load the DT; " \
- "fi; " \
- "fi; " \
- "else " \
- "bootm; " \
- "fi;\0"
+ "bootm ${loadaddr};\0" \
+ "run mmcargs; " \
+ "bootm ${loadaddr};\0" \
+ "mmcbootz=echo Booting from mmc ...; " \
+ "run mmcargs; " \
+ "bootz ${loadaddr} - ${fdt_addr};\0"
#define CONFIG_BOOTCOMMAND \
- "mmc dev ${mmcdev}; if mmc rescan; then " \
- "if run loadbootscript; then " \
- "run bootscript; " \
- "else " \
- "if run loaduimage; then " \
- "run mmcboot; " \
- "else run netboot; " \
- "fi; " \
- "fi; " \
- "else run netboot; fi"
+ "mmc dev ${mmcdev}; if mmc rescan; then " \
+ "if run loadbootenv; then " \
+ "run importbootenv;" \
+ "fi;" \
+ "echo Checking if uenvcmd is set ...;" \
+ "if test -n $uenvcmd; then " \
+ "echo Running uenvcmd ...;" \
+ "run uenvcmd;" \
+ "fi;" \
"run mmcargs; " \
"bootz ${loadaddr} - ${fdt_addr};\0" \
- "mmcbootdefault=echo Booting from mmc ...; " \
- "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
- "if run loadfdt; then " \
- "bootz ${loadaddr} - ${fdt_addr}; " \
- "else " \
- "if test ${boot_fdt} = try; then " \
- "bootz ${loadaddr}; " \
- "else " \
- "echo WARN: Cannot load the DT; " \
- "fi; " \
- "fi; " \
- "else " \
- "bootz ${loadaddr}; " \
- "fi;\0" \
"netargs=setenv bootargs console=${console},${baudrate} " \
"root=/dev/nfs " \
"ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp\0" \
@@ -200,10 +195,14 @@
"echo Running uenvcmd ...;" \
"run uenvcmd;" \
"fi;" \
- "echo Running default loadimage ...;" \
- "if run loadimage; then " \
+ "echo Running default loaduimage ...;" \
+ "if run loaduimage; then " \
+ "run mmcbootm;" \
+ "fi;" \
+ "echo Running default loadzimage ...;" \
+ "if run loadzimage; then " \
+ "run loadfdt;" \
"run loadfdt;" \
- "run mmcboot;" \
+ "run mmcbootz;" \
+ "fi;" \
+ "fi;"
"fi;" \
"fi;"
/* Miscellaneous configurable options */
#define CONFIG_SYS_LONGHELP