mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2024-11-08 22:45:43 +00:00
alarm/uboot-beaglebone to 2014.07-1
This commit is contained in:
parent
c841107c80
commit
5d1906937d
3 changed files with 172 additions and 18 deletions
|
@ -4,28 +4,27 @@
|
||||||
buildarch=4
|
buildarch=4
|
||||||
|
|
||||||
pkgname=uboot-beaglebone
|
pkgname=uboot-beaglebone
|
||||||
pkgver=2013.07
|
pkgver=2014.07
|
||||||
pkgrel=1
|
pkgrel=1
|
||||||
pkgdesc="U-Boot for Beaglebone and Beaglebone Black"
|
pkgdesc="U-Boot for Beaglebone and Beaglebone Black"
|
||||||
arch=('armv7h')
|
arch=('armv7h')
|
||||||
url="http://git.denx.de/u-boot.git/"
|
url="http://git.denx.de/u-boot.git/"
|
||||||
license=('GPL')
|
license=('GPL')
|
||||||
makedepends=('git')
|
makedepends=('bc')
|
||||||
source=("git://git.denx.de/u-boot.git#tag=v${pkgver}"
|
source=("ftp://ftp.denx.de/pub/u-boot/u-boot-${pkgver}.tar.bz2"
|
||||||
'https://raw.github.com/eewiki/u-boot-patches/master/v2013.07/0001-am335x_evm-uEnv.txt-bootz-n-fixes.patch'
|
'alarm.patch'
|
||||||
'uEnv.txt')
|
'uEnv.txt')
|
||||||
md5sums=('SKIP'
|
md5sums=('36d4bad687edcafa396fee607e505d4e'
|
||||||
'dbc20ae3e48ae69fc2bbd35b96a6663e'
|
'0d63da3d66218452d3e3d7c69d078ad8'
|
||||||
'd811e78f6df4bda2cc916be699f1c750')
|
'ccb79775b81654e16fca18825c7f2506')
|
||||||
|
|
||||||
prepare() {
|
prepare() {
|
||||||
cd u-boot
|
cd u-boot-${pkgver}
|
||||||
patch -p1 -i "${srcdir}"/0001-am335x_evm-uEnv.txt-bootz-n-fixes.patch
|
patch -p1 -i ../alarm.patch
|
||||||
rm -rf .git
|
|
||||||
}
|
}
|
||||||
|
|
||||||
build() {
|
build() {
|
||||||
cd u-boot
|
cd u-boot-${pkgver}
|
||||||
|
|
||||||
unset CFLAGS
|
unset CFLAGS
|
||||||
unset CXXFLAGS
|
unset CXXFLAGS
|
||||||
|
@ -36,7 +35,7 @@ build() {
|
||||||
}
|
}
|
||||||
|
|
||||||
package() {
|
package() {
|
||||||
cd u-boot
|
cd u-boot-${pkgver}
|
||||||
mkdir -p "${pkgdir}"/boot
|
mkdir -p "${pkgdir}"/boot
|
||||||
cp MLO u-boot.img "${srcdir}"/uEnv.txt "${pkgdir}"/boot
|
cp MLO u-boot.img "${srcdir}"/uEnv.txt "${pkgdir}"/boot
|
||||||
}
|
}
|
||||||
|
|
161
alarm/uboot-beaglebone/alarm.patch
Normal file
161
alarm/uboot-beaglebone/alarm.patch
Normal file
|
@ -0,0 +1,161 @@
|
||||||
|
diff -urN a/include/configs/am335x_evm.h b/include/configs/am335x_evm.h
|
||||||
|
--- a/include/configs/am335x_evm.h 2014-07-14 11:16:45.000000000 -0600
|
||||||
|
+++ b/include/configs/am335x_evm.h 2014-08-10 12:31:08.383560239 -0600
|
||||||
|
@@ -17,6 +17,7 @@
|
||||||
|
#define __CONFIG_AM335X_EVM_H
|
||||||
|
|
||||||
|
#include <configs/ti_am335x_common.h>
|
||||||
|
+#define CONFIG_SUPPORT_RAW_INITRD
|
||||||
|
|
||||||
|
#ifndef CONFIG_SPL_BUILD
|
||||||
|
# define CONFIG_FIT
|
||||||
|
@@ -74,6 +75,8 @@
|
||||||
|
|
||||||
|
#define CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG
|
||||||
|
|
||||||
|
+#define CONFIG_IDENT_STRING " Arch Linux ARM"
|
||||||
|
+
|
||||||
|
#ifndef CONFIG_SPL_BUILD
|
||||||
|
#define CONFIG_EXTRA_ENV_SETTINGS \
|
||||||
|
DEFAULT_LINUX_BOOT_ENV \
|
||||||
|
@@ -81,15 +84,17 @@
|
||||||
|
"bootpart=0:2\0" \
|
||||||
|
"bootdir=/boot\0" \
|
||||||
|
"bootfile=zImage\0" \
|
||||||
|
+ "fdtdir=/boot/dtbs\0" \
|
||||||
|
"fdtfile=undefined\0" \
|
||||||
|
+ "rdfile=initramfs-linux.img\0" \
|
||||||
|
"console=ttyO0,115200n8\0" \
|
||||||
|
"partitions=" \
|
||||||
|
"uuid_disk=${uuid_gpt_disk};" \
|
||||||
|
"name=rootfs,start=2MiB,size=-,uuid=${uuid_gpt_rootfs}\0" \
|
||||||
|
"optargs=\0" \
|
||||||
|
"mmcdev=0\0" \
|
||||||
|
- "mmcroot=/dev/mmcblk0p2 ro\0" \
|
||||||
|
- "mmcrootfstype=ext4 rootwait\0" \
|
||||||
|
+ "mmcroot=/dev/mmcblk0p2\0" \
|
||||||
|
+ "mmcrootextra=rw fixrtc rootwait\0" \
|
||||||
|
"rootpath=/export/rootfs\0" \
|
||||||
|
"nfsopts=nolock\0" \
|
||||||
|
"static_ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}" \
|
||||||
|
@@ -98,8 +103,7 @@
|
||||||
|
"ramrootfstype=ext2\0" \
|
||||||
|
"mmcargs=setenv bootargs console=${console} " \
|
||||||
|
"${optargs} " \
|
||||||
|
- "root=${mmcroot} " \
|
||||||
|
- "rootfstype=${mmcrootfstype}\0" \
|
||||||
|
+ "root=${mmcroot} ${mmcrootextra}\0" \
|
||||||
|
"spiroot=/dev/mtdblock4 rw\0" \
|
||||||
|
"spirootfstype=jffs2\0" \
|
||||||
|
"spisrcaddr=0xe0000\0" \
|
||||||
|
@@ -122,37 +126,43 @@
|
||||||
|
"${optargs} " \
|
||||||
|
"root=${ramroot} " \
|
||||||
|
"rootfstype=${ramrootfstype}\0" \
|
||||||
|
- "loadramdisk=load mmc ${mmcdev} ${rdaddr} ramdisk.gz\0" \
|
||||||
|
+ "loadramdisk=load mmc ${bootpart} ${rdaddr} ${bootdir}/${rdfile}\0" \
|
||||||
|
"loadimage=load mmc ${bootpart} ${loadaddr} ${bootdir}/${bootfile}\0" \
|
||||||
|
- "loadfdt=load mmc ${bootpart} ${fdtaddr} ${bootdir}/${fdtfile}\0" \
|
||||||
|
- "mmcloados=run mmcargs; " \
|
||||||
|
- "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
|
||||||
|
- "if run loadfdt; then " \
|
||||||
|
- "bootz ${loadaddr} - ${fdtaddr}; " \
|
||||||
|
- "else " \
|
||||||
|
- "if test ${boot_fdt} = try; then " \
|
||||||
|
- "bootz; " \
|
||||||
|
- "else " \
|
||||||
|
- "echo WARN: Cannot load the DT; " \
|
||||||
|
- "fi; " \
|
||||||
|
- "fi; " \
|
||||||
|
- "else " \
|
||||||
|
- "bootz; " \
|
||||||
|
- "fi;\0" \
|
||||||
|
+ "loadfdt=load mmc ${bootpart} ${fdtaddr} ${fdtdir}/${fdtfile}\0" \
|
||||||
|
"mmcboot=mmc dev ${mmcdev}; " \
|
||||||
|
"if mmc rescan; then " \
|
||||||
|
+ "gpio set 54;" \
|
||||||
|
"echo SD/MMC found on device ${mmcdev};" \
|
||||||
|
"if run loadbootenv; then " \
|
||||||
|
+ "gpio set 55;" \
|
||||||
|
"echo Loaded environment from ${bootenv};" \
|
||||||
|
"run importbootenv;" \
|
||||||
|
"fi;" \
|
||||||
|
+ "if test -n $cape; then " \
|
||||||
|
+ "if test -e mmc ${bootpart} ${fdtdir}/$fdtbase-$cape.dtb; then " \
|
||||||
|
+ "setenv fdtfile $fdtbase-$cape.dtb; " \
|
||||||
|
+ "fi; " \
|
||||||
|
+ "echo using: $fdtfile...; " \
|
||||||
|
+ "fi; " \
|
||||||
|
+ "echo Checking if uenvcmd is set ...;" \
|
||||||
|
"if test -n $uenvcmd; then " \
|
||||||
|
+ "gpio set 56; " \
|
||||||
|
"echo Running uenvcmd ...;" \
|
||||||
|
"run uenvcmd;" \
|
||||||
|
"fi;" \
|
||||||
|
"if run loadimage; then " \
|
||||||
|
- "run mmcloados;" \
|
||||||
|
+ "if run loadfdt; then " \
|
||||||
|
+ "run mmcargs;" \
|
||||||
|
+ "if run loadramdisk; then " \
|
||||||
|
+ "bootz ${loadaddr} ${rdaddr} ${fdtaddr};" \
|
||||||
|
+ "else " \
|
||||||
|
+ "bootz ${loadaddr} - ${fdtaddr};" \
|
||||||
|
+ "fi;" \
|
||||||
|
+ "else " \
|
||||||
|
+ "echo Kernel found, but no device tree found;" \
|
||||||
|
+ "fi;" \
|
||||||
|
"fi;" \
|
||||||
|
+ "echo No kernel found;"\
|
||||||
|
"fi;\0" \
|
||||||
|
"spiboot=echo Booting from spi ...; " \
|
||||||
|
"run spiargs; " \
|
||||||
|
@@ -169,28 +179,44 @@
|
||||||
|
"ramboot=echo Booting from ramdisk ...; " \
|
||||||
|
"run ramargs; " \
|
||||||
|
"bootz ${loadaddr} ${rdaddr} ${fdtaddr}\0" \
|
||||||
|
- "findfdt="\
|
||||||
|
+ "findfdt=" \
|
||||||
|
"if test $board_name = A335BONE; then " \
|
||||||
|
- "setenv fdtfile am335x-bone.dtb; fi; " \
|
||||||
|
+ "setenv fdtfile am335x-bone.dtb; setenv fdtbase am335x-bone; fi; " \
|
||||||
|
"if test $board_name = A335BNLT; then " \
|
||||||
|
- "setenv fdtfile am335x-boneblack.dtb; fi; " \
|
||||||
|
+ "setenv fdtfile am335x-boneblack.dtb; setenv fdtbase am335x-boneblack; fi; " \
|
||||||
|
"if test $board_name = A33515BB; then " \
|
||||||
|
"setenv fdtfile am335x-evm.dtb; fi; " \
|
||||||
|
"if test $board_name = A335X_SK; then " \
|
||||||
|
"setenv fdtfile am335x-evmsk.dtb; fi; " \
|
||||||
|
"if test $fdtfile = undefined; then " \
|
||||||
|
"echo WARNING: Could not determine device tree to use; fi; \0" \
|
||||||
|
+ "findmmc=" \
|
||||||
|
+ "if test $board_name = A335BNLT; then " \
|
||||||
|
+ "setenv mmc1 1;" \
|
||||||
|
+ "mmc dev 0;" \
|
||||||
|
+ "if mmc rescan; then " \
|
||||||
|
+ "setenv mmc0 1;" \
|
||||||
|
+ "else " \
|
||||||
|
+ "setenv mmc0 0;" \
|
||||||
|
+ "fi;" \
|
||||||
|
+ "fi;\0" \
|
||||||
|
NANDARGS \
|
||||||
|
DFUARGS
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define CONFIG_BOOTCOMMAND \
|
||||||
|
+ "gpio set 53; " \
|
||||||
|
+ "i2c mw 0x24 1 0x3e; " \
|
||||||
|
+ "run findmmc; " \
|
||||||
|
"run findfdt; " \
|
||||||
|
"run mmcboot;" \
|
||||||
|
+ "gpio clear 56; " \
|
||||||
|
+ "gpio clear 55; " \
|
||||||
|
+ "gpio clear 54; " \
|
||||||
|
"setenv mmcdev 1; " \
|
||||||
|
"setenv bootpart 1:2; " \
|
||||||
|
- "run mmcboot;" \
|
||||||
|
- "run nandboot;"
|
||||||
|
+ "if test $mmc0 = 1; then setenv mmcroot /dev/mmcblk1p2; fi; " \
|
||||||
|
+ "run mmcboot;"
|
||||||
|
|
||||||
|
/* NS16550 Configuration */
|
||||||
|
#define CONFIG_SYS_NS16550_COM1 0x44e09000 /* Base EVM has UART0 */
|
|
@ -1,7 +1 @@
|
||||||
uenvcmd=run findmmc1; run findmmc0; if run loaduimage; then run loadfdt; run mmcboot; fi;
|
|
||||||
findmmc1=if test $board_name = A335BNLT; then setenv mmc1 1; else setenv mmc1 0; fi
|
|
||||||
findmmc0=setenv mmcdev 0; mmc dev ${mmcdev}; if mmc rescan; then setenv mmc0 1; else setenv mmc0 0; fi
|
|
||||||
mmcroot=/dev/mmcblk0p2 rw
|
|
||||||
loadfdt=ext4load mmc ${mmcdev}:2 ${fdtaddr} /boot/dtbs/${fdtfile}
|
|
||||||
loaduimage=if ext4load mmc 0:2 ${loadaddr} /boot/zImage; then setenv mmcdev 0; else setenv mmcdev 1; if test $mmc0 = 1; then setenv mmcroot /dev/mmcblk1p2 rw; fi; ext4load mmc 1:2 ${loadaddr} /boot/zImage; fi
|
|
||||||
optargs=coherent_pool=1M
|
optargs=coherent_pool=1M
|
||||||
|
|
Loading…
Reference in a new issue