mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2024-11-08 22:45:43 +00:00
Add uboot-cubietruck package
* Update to 2014.01 * use combined `u-boot-sunxi-with-spl.bin`
This commit is contained in:
parent
68d5bdbcea
commit
8b4d94f33a
5 changed files with 1459 additions and 57 deletions
|
@ -4,20 +4,23 @@
|
|||
buildarch=4
|
||||
|
||||
pkgbase=uboot-sunxi
|
||||
pkgname=('uboot-cubieboard2')
|
||||
pkgver=2013.07
|
||||
pkgrel=4
|
||||
pkgname=('uboot-cubieboard2' 'uboot-cubietruck')
|
||||
pkgver=2014.01
|
||||
pkgrel=1
|
||||
arch=('armv7h')
|
||||
url="https://github.com/linux-sunxi/u-boot-sunxi/tree/sunxi-current"
|
||||
license=('GPL')
|
||||
makedepends=('sunxi-tools')
|
||||
_commit=29689232f8a4d1640e551ef433176b81cecfa9c7
|
||||
_commit=660aa6fd9e1c25baabfcf4dfce42381547f5f59b
|
||||
source=("https://github.com/linux-sunxi/u-boot-sunxi/archive/${_commit}.tar.gz"
|
||||
'alarm.patch'
|
||||
'cubieboard2.fex' 'cubieboard2.env')
|
||||
md5sums=('7612f5c721a2804a36b41ba33925be02'
|
||||
'8b95ce286b84f52928bc0b4b07edd00a'
|
||||
'cubieboard2.fex' 'cubieboard2.env'
|
||||
'cubietruck.fex' 'cubietruck.env')
|
||||
md5sums=('019e2a420fa9d9a5e24aaf9cd8de2104'
|
||||
'f2f60fca0d93ef62c6a95c4f3254a829'
|
||||
'7423919c2ead208c5a04756edb6b948c'
|
||||
'd41d8cd98f00b204e9800998ecf8427e'
|
||||
'c898ab1b57f474d620f5704b2a53d87c'
|
||||
'd41d8cd98f00b204e9800998ecf8427e')
|
||||
|
||||
prepare() {
|
||||
|
@ -27,16 +30,16 @@ prepare() {
|
|||
|
||||
build() {
|
||||
cd u-boot-sunxi-${_commit}
|
||||
|
||||
|
||||
unset CFLAGS
|
||||
unset CXXFLAGS
|
||||
unset LDFLAGS
|
||||
|
||||
for i in Cubieboard2; do
|
||||
mkdir bin_${i}
|
||||
|
||||
for i in Cubieboard2 Cubietruck; do
|
||||
mkdir ../bin_${i}
|
||||
make distclean
|
||||
make ${i}
|
||||
mv u-boot.bin spl/sunxi-spl.bin bin_${i}
|
||||
mv u-boot-sunxi-with-spl.bin ../bin_${i}
|
||||
done
|
||||
}
|
||||
|
||||
|
@ -45,8 +48,19 @@ package_uboot-cubieboard2() {
|
|||
install=${pkgbase}.install
|
||||
|
||||
mkdir -p "${pkgdir}"/boot
|
||||
cp u-boot-sunxi-${_commit}/bin_Cubieboard2/{u-boot.bin,sunxi-spl.bin} "${pkgdir}"/boot
|
||||
cp bin_Cubieboard2/u-boot-sunxi-with-spl.bin "${pkgdir}"/boot
|
||||
|
||||
fex2bin cubieboard2.fex "${pkgdir}"/boot/script.bin
|
||||
cp cubieboard2.env "${pkgdir}"/boot/uEnv.txt
|
||||
}
|
||||
|
||||
package_uboot-cubietruck() {
|
||||
pkgdesc="U-Boot for Cubietruck"
|
||||
install=${pkgbase}.install
|
||||
|
||||
mkdir -p "${pkgdir}"/boot
|
||||
cp bin_Cubietruck/u-boot-sunxi-with-spl.bin "${pkgdir}"/boot
|
||||
|
||||
fex2bin cubietruck.fex "${pkgdir}"/boot/script.bin
|
||||
cp cubietruck.env "${pkgdir}"/boot/uEnv.txt
|
||||
}
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
diff -urN a/include/configs/sunxi-common.h b/include/configs/sunxi-common.h
|
||||
--- a/include/configs/sunxi-common.h 2013-07-26 07:45:03.000000000 -0600
|
||||
+++ b/include/configs/sunxi-common.h 2013-07-30 21:50:31.691055539 -0600
|
||||
@@ -148,7 +148,7 @@
|
||||
diff --git a/include/configs/sunxi-common.h b/include/configs/sunxi-common.h
|
||||
index a0c41ac..e9a94f6 100644
|
||||
--- a/include/configs/sunxi-common.h
|
||||
+++ b/include/configs/sunxi-common.h
|
||||
@@ -157,7 +157,7 @@
|
||||
#define CONFIG_SYS_NO_FLASH
|
||||
|
||||
#define CONFIG_SYS_MONITOR_LEN (512 << 10) /* 512 KiB */
|
||||
|
@ -10,67 +11,54 @@ diff -urN a/include/configs/sunxi-common.h b/include/configs/sunxi-common.h
|
|||
|
||||
#define CONFIG_ENV_OFFSET (544 << 10) /* (8 + 24 + 512) KiB */
|
||||
#define CONFIG_ENV_SIZE (128 << 10) /* 128 KiB */
|
||||
@@ -191,13 +191,7 @@
|
||||
"device=mmc\0" \
|
||||
"partition=0:1\0" \
|
||||
"setargs=" \
|
||||
- "if test -z \\\\\"$root\\\\\"; then"\
|
||||
- " if test \\\\\"$bootpath\\\\\" = \"boot/\"; then"\
|
||||
- " root=\"/dev/mmcblk0p1 rootwait\";"\
|
||||
- " else" \
|
||||
- " root=\"/dev/mmcblk0p2 rootwait\";"\
|
||||
- " fi;"\
|
||||
- " fi;"\
|
||||
+ " root=\"/dev/mmcblk0p1 rw rootwait\";"\
|
||||
" setenv bootargs console=${console} root=${root}" \
|
||||
" loglevel=${loglevel} ${panicarg} ${extraargs}" \
|
||||
"\0" \
|
||||
@@ -205,38 +199,20 @@
|
||||
"bootenv=uEnv.txt\0" \
|
||||
@@ -215,38 +215,28 @@
|
||||
"bootscr=boot.scr\0" \
|
||||
"script=script.bin\0" \
|
||||
"loadbootscr=" \
|
||||
- "fatload $device $partition $scriptaddr ${bootscr}" \
|
||||
+ "load $device $partition $scriptaddr boot/${bootscr}" \
|
||||
" || " \
|
||||
- " || " \
|
||||
- "ext2load $device $partition $scriptaddr boot/${bootscr}" \
|
||||
- " ||" \
|
||||
+ "load $device $partition $scriptaddr boot/${bootscr}" \
|
||||
" ||" \
|
||||
- "ext2load $device $partition $scriptaddr ${bootscr}" \
|
||||
+ "load $device $partition $scriptaddr ${bootscr}" \
|
||||
"\0" \
|
||||
"loadbootenv=" \
|
||||
- "fatload $device $partition $scriptaddr ${bootenv}" \
|
||||
- " || " \
|
||||
- "ext2load $device $partition $scriptaddr boot/${bootenv}" \
|
||||
+ "load $device $partition $scriptaddr boot/${bootenv}" \
|
||||
" || " \
|
||||
- "ext2load $device $partition $scriptaddr boot/${bootenv}" \
|
||||
- " || " \
|
||||
- "ext2load $device $partition $scriptaddr ${bootenv}" \
|
||||
+ "load $device $partition $scriptaddr ${bootenv}" \
|
||||
"\0" \
|
||||
"loadkernel=" \
|
||||
"if "\
|
||||
- "bootpath=/boot/" \
|
||||
- " && " \
|
||||
- "ext2load $device $partition 0x43000000 ${bootpath}script.bin" \
|
||||
"bootpath=/boot/" \
|
||||
" && " \
|
||||
- "ext2load $device $partition 0x43000000 ${bootpath}${script}" \
|
||||
- " && " \
|
||||
- "ext2load $device $partition 0x48000000 ${bootpath}${kernel}" \
|
||||
- ";then true; elif " \
|
||||
- "bootpath=/" \
|
||||
- " && " \
|
||||
- "fatload $device $partition 0x43000000 script.bin" \
|
||||
- " && " \
|
||||
- "fatload $device $partition 0x43000000 ${script}" \
|
||||
+ "load $device $partition 0x43000000 ${bootpath}${script}" \
|
||||
" && " \
|
||||
- "fatload $device $partition 0x48000000 ${kernel}" \
|
||||
- ";then true; elif " \
|
||||
- "bootpath=/" \
|
||||
- " && " \
|
||||
- "ext2load $device $partition 0x43000000 ${bootpath}script.bin" \
|
||||
+ "load $device $partition 0x43000000 /boot/script.bin" \
|
||||
+ "load $device $partition 0x48000000 ${bootpath}${kernel}" \
|
||||
";then true; elif " \
|
||||
"bootpath=/" \
|
||||
" && " \
|
||||
- "ext2load $device $partition 0x43000000 ${bootpath}${script}" \
|
||||
+ "load $device $partition 0x43000000 ${bootpath}${script}" \
|
||||
" && " \
|
||||
- "ext2load $device $partition 0x48000000 ${bootpath}${kernel}" \
|
||||
+ "load $device $partition 0x48000000 /boot/${kernel}" \
|
||||
+ "load $device $partition 0x48000000 ${bootpath}${kernel}" \
|
||||
";then true; else "\
|
||||
"false" \
|
||||
";fi" \
|
||||
@@ -262,7 +238,7 @@
|
||||
@@ -272,7 +262,7 @@
|
||||
"\0" \
|
||||
""
|
||||
|
||||
|
@ -79,11 +67,11 @@ diff -urN a/include/configs/sunxi-common.h b/include/configs/sunxi-common.h
|
|||
#define CONFIG_SYS_BOOT_GET_CMDLINE
|
||||
#define CONFIG_AUTO_COMPLETE
|
||||
|
||||
@@ -277,6 +253,7 @@
|
||||
@@ -287,6 +277,7 @@
|
||||
#define CONFIG_FAT_WRITE /* enable write access */
|
||||
#define CONFIG_CMD_EXT2 /* with this we can access ext2 bootfs */
|
||||
#define CONFIG_CMD_EXT4 /* with this we can access ext4 bootfs */
|
||||
+#define CONFIG_CMD_FS_GENERIC
|
||||
#define CONFIG_CMD_ZFS /* with this we can access ZFS bootfs */
|
||||
|
||||
#define CONFIG_SPL_FRAMEWORK
|
||||
#define CONFIG_SPL_LIBCOMMON_SUPPORT
|
||||
|
|
0
alarm/uboot-sunxi/cubietruck.env
Normal file
0
alarm/uboot-sunxi/cubietruck.env
Normal file
1402
alarm/uboot-sunxi/cubietruck.fex
Normal file
1402
alarm/uboot-sunxi/cubietruck.fex
Normal file
File diff suppressed because it is too large
Load diff
|
@ -3,12 +3,10 @@ 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/sunxi-spl.bin of=/dev/mmcblk0 bs=1024 seek=8
|
||||
dd if=/boot/u-boot.bin of=/dev/mmcblk0 bs=1024 seek=32
|
||||
dd if=/boot/u-boot-sunxi-with-spl.bin of=/dev/mmcblk0 bs=1024 seek=8
|
||||
else
|
||||
echo "You can do this later by running:"
|
||||
echo "# dd if=/boot/sunxi-spl.bin of=/dev/mmcblk0 bs=1024 seek=8"
|
||||
echo "# dd if=/boot/u-boot.bin of=/dev/mmcblk0 bs=1024 seek=32"
|
||||
echo "# dd if=/boot/u-boot-sunxi-with-spl.bin of=/dev/mmcblk0 bs=1024 seek=8"
|
||||
fi
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue