mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2024-11-08 22:45:43 +00:00
alarm/uboot-udoo to 2013.10-1, fixes #793
This commit is contained in:
parent
1c27a373f3
commit
ac6849e491
4 changed files with 154 additions and 5879 deletions
|
@ -5,23 +5,20 @@ buildarch=4
|
|||
|
||||
pkgbase=uboot-udoo
|
||||
pkgname=('uboot-udoo-dual' 'uboot-udoo-quad')
|
||||
pkgver=2009.08
|
||||
pkgrel=2
|
||||
pkgver=2013.10
|
||||
pkgrel=1
|
||||
arch=('armv7h')
|
||||
url="http://git.denx.de/u-boot.git/"
|
||||
url="https://github.com/UDOOboard/U-Boot_Unico-2013"
|
||||
license=('GPL')
|
||||
makedepends=('git')
|
||||
option=('!strip')
|
||||
source=("uboot::git+https://github.com/UDOOboard/U-Boot_Unico.git"
|
||||
'ext4.patch'
|
||||
source=("uboot::git+https://github.com/UDOOboard/U-Boot_Unico-2013.git"
|
||||
'alarm.patch')
|
||||
md5sums=('SKIP'
|
||||
'a53b7e683b293ea36945a4d45502ca88'
|
||||
'1ff033040c597830951d7d11e487761c')
|
||||
'330f9fa3963708dc8e70a86415d00d73')
|
||||
|
||||
prepare() {
|
||||
cd uboot
|
||||
patch -p1 -i "${srcdir}"/ext4.patch
|
||||
patch -p1 -i "${srcdir}"/alarm.patch
|
||||
rm -rf .git
|
||||
}
|
||||
|
@ -29,20 +26,19 @@ prepare() {
|
|||
build() {
|
||||
cd uboot
|
||||
|
||||
unset CFLAGS
|
||||
unset CXXFLAGS
|
||||
unset CFLAGS CXXFLAGS LDFLAGS
|
||||
|
||||
# Dual
|
||||
make distclean
|
||||
make mx6dl_udoo_config
|
||||
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.bin u-boot-dual.imx
|
||||
mv u-boot.imx u-boot-dual.imx
|
||||
|
||||
# Quad
|
||||
make distclean
|
||||
make mx6q_udoo_config
|
||||
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.bin u-boot-quad.imx
|
||||
mv u-boot.imx u-boot-quad.imx
|
||||
}
|
||||
|
||||
package_uboot-udoo-dual() {
|
||||
|
@ -51,7 +47,7 @@ package_uboot-udoo-dual() {
|
|||
install=${pkgbase}.install
|
||||
|
||||
mkdir -p "${pkgdir}"/boot
|
||||
cp uboot/u-boot-dual.imx "${pkgdir}"/boot/u-boot.bin
|
||||
cp uboot/u-boot-dual.imx "${pkgdir}"/boot/u-boot.imx
|
||||
}
|
||||
|
||||
package_uboot-udoo-quad() {
|
||||
|
@ -60,5 +56,5 @@ package_uboot-udoo-quad() {
|
|||
install=${pkgbase}.install
|
||||
|
||||
mkdir -p "${pkgdir}"/boot
|
||||
cp uboot/u-boot-quad.imx "${pkgdir}"/boot/u-boot.bin
|
||||
cp uboot/u-boot-quad.imx "${pkgdir}"/boot/u-boot.imx
|
||||
}
|
||||
|
|
|
@ -1,94 +1,144 @@
|
|||
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-23 14:24:58.258132950 -0700
|
||||
@@ -174,30 +174,23 @@
|
||||
#ifdef UDOO_LINUX
|
||||
#define CONFIG_LOADADDR 0x10800000
|
||||
#define CONFIG_RD_LOADADDR (0x10800000 + 0x300000)
|
||||
diff -urN a/include/configs/udoo.h b/include/configs/udoo.h
|
||||
--- a/include/configs/udoo.h 2014-04-06 13:29:26.927572479 -0600
|
||||
+++ b/include/configs/udoo.h 2014-04-06 14:00:46.383454580 -0600
|
||||
@@ -118,102 +118,68 @@
|
||||
#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
|
||||
#define CONFIG_DOS_PARTITION
|
||||
|
||||
+#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" \
|
||||
- "memory=mem=768M\0" \
|
||||
- "bootdev=mmc dev 2; ext2load mmc 2:1\0" \
|
||||
+ "loadaddr=0x10800000\0" \
|
||||
+ "uimage=/boot/uImage\0" \
|
||||
+ "script=/boot/boot.scr\0" \
|
||||
+ "memory=mem=1024M\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-23 14:25:12.943070804 -0700
|
||||
@@ -164,38 +164,30 @@
|
||||
#endif
|
||||
+
|
||||
#define CONFIG_DEFAULT_FDT_FILE "imx6q-udoo.dtb"
|
||||
|
||||
#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" \
|
||||
- "memory=mem=768M\0" \
|
||||
- "bootdev=mmc dev 2; ext2load mmc 2:1\0" \
|
||||
+ "loadaddr=0x10800000\0" \
|
||||
+ "uimage=/boot/uImage\0" \
|
||||
+ "script=/boot/boot.scr\0" \
|
||||
+ "memory=mem=1024M\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_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" \
|
||||
"ip_dyn=yes\0" \
|
||||
"hdmi_patch=\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" \
|
||||
"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 ...; " \
|
||||
+ "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" \
|
||||
+ "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" \
|
||||
+ "mmcbootz=echo Booting from mmc ...; " \
|
||||
+ "run mmcargs; " \
|
||||
+ "bootz ${loadaddr} - ${fdt_addr};\0"
|
||||
|
||||
-
|
||||
#define CONFIG_ARP_TIMEOUT 200UL
|
||||
#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;" \
|
||||
+ "echo Running default loaduimage ...;" \
|
||||
+ "if run loaduimage; then " \
|
||||
+ "run mmcbootm;" \
|
||||
+ "fi;" \
|
||||
+ "echo Running default loadzimage ...;" \
|
||||
+ "if run loadzimage; then " \
|
||||
+ "run loadfdt;" \
|
||||
+ "run mmcbootz;" \
|
||||
+ "fi;" \
|
||||
+ "fi;"
|
||||
|
||||
/*
|
||||
/* Miscellaneous configurable options */
|
||||
#define CONFIG_SYS_LONGHELP
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -3,11 +3,11 @@ flash_uboot() {
|
|||
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
|
||||
dd if=/boot/u-boot.imx of=/dev/mmcblk0 bs=512 seek=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"
|
||||
echo "# dd if=/boot/u-boot.imx of=/dev/mmcblk0 bs=512 seek=2"
|
||||
fi
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue