Add uboot-cubietruck package

* Update to 2014.01
* use combined `u-boot-sunxi-with-spl.bin`
This commit is contained in:
Mikkel Oscar Lyderik 2014-03-15 13:19:48 +01:00
parent 68d5bdbcea
commit 8b4d94f33a
5 changed files with 1459 additions and 57 deletions

View file

@ -4,20 +4,23 @@
buildarch=4 buildarch=4
pkgbase=uboot-sunxi pkgbase=uboot-sunxi
pkgname=('uboot-cubieboard2') pkgname=('uboot-cubieboard2' 'uboot-cubietruck')
pkgver=2013.07 pkgver=2014.01
pkgrel=4 pkgrel=1
arch=('armv7h') arch=('armv7h')
url="https://github.com/linux-sunxi/u-boot-sunxi/tree/sunxi-current" url="https://github.com/linux-sunxi/u-boot-sunxi/tree/sunxi-current"
license=('GPL') license=('GPL')
makedepends=('sunxi-tools') makedepends=('sunxi-tools')
_commit=29689232f8a4d1640e551ef433176b81cecfa9c7 _commit=660aa6fd9e1c25baabfcf4dfce42381547f5f59b
source=("https://github.com/linux-sunxi/u-boot-sunxi/archive/${_commit}.tar.gz" source=("https://github.com/linux-sunxi/u-boot-sunxi/archive/${_commit}.tar.gz"
'alarm.patch' 'alarm.patch'
'cubieboard2.fex' 'cubieboard2.env') 'cubieboard2.fex' 'cubieboard2.env'
md5sums=('7612f5c721a2804a36b41ba33925be02' 'cubietruck.fex' 'cubietruck.env')
'8b95ce286b84f52928bc0b4b07edd00a' md5sums=('019e2a420fa9d9a5e24aaf9cd8de2104'
'f2f60fca0d93ef62c6a95c4f3254a829'
'7423919c2ead208c5a04756edb6b948c' '7423919c2ead208c5a04756edb6b948c'
'd41d8cd98f00b204e9800998ecf8427e'
'c898ab1b57f474d620f5704b2a53d87c'
'd41d8cd98f00b204e9800998ecf8427e') 'd41d8cd98f00b204e9800998ecf8427e')
prepare() { prepare() {
@ -32,11 +35,11 @@ build() {
unset CXXFLAGS unset CXXFLAGS
unset LDFLAGS unset LDFLAGS
for i in Cubieboard2; do for i in Cubieboard2 Cubietruck; do
mkdir bin_${i} mkdir ../bin_${i}
make distclean make distclean
make ${i} make ${i}
mv u-boot.bin spl/sunxi-spl.bin bin_${i} mv u-boot-sunxi-with-spl.bin ../bin_${i}
done done
} }
@ -45,8 +48,19 @@ package_uboot-cubieboard2() {
install=${pkgbase}.install install=${pkgbase}.install
mkdir -p "${pkgdir}"/boot 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 fex2bin cubieboard2.fex "${pkgdir}"/boot/script.bin
cp cubieboard2.env "${pkgdir}"/boot/uEnv.txt 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
}

View file

@ -1,7 +1,8 @@
diff -urN a/include/configs/sunxi-common.h b/include/configs/sunxi-common.h diff --git 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 index a0c41ac..e9a94f6 100644
+++ b/include/configs/sunxi-common.h 2013-07-30 21:50:31.691055539 -0600 --- a/include/configs/sunxi-common.h
@@ -148,7 +148,7 @@ +++ b/include/configs/sunxi-common.h
@@ -157,7 +157,7 @@
#define CONFIG_SYS_NO_FLASH #define CONFIG_SYS_NO_FLASH
#define CONFIG_SYS_MONITOR_LEN (512 << 10) /* 512 KiB */ #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_OFFSET (544 << 10) /* (8 + 24 + 512) KiB */
#define CONFIG_ENV_SIZE (128 << 10) /* 128 KiB */ #define CONFIG_ENV_SIZE (128 << 10) /* 128 KiB */
@@ -191,13 +191,7 @@ @@ -215,38 +215,28 @@
"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" \
"bootscr=boot.scr\0" \ "bootscr=boot.scr\0" \
"script=script.bin\0" \
"loadbootscr=" \ "loadbootscr=" \
- "fatload $device $partition $scriptaddr ${bootscr}" \ - "fatload $device $partition $scriptaddr ${bootscr}" \
+ "load $device $partition $scriptaddr boot/${bootscr}" \ - " || " \
" || " \
- "ext2load $device $partition $scriptaddr boot/${bootscr}" \ - "ext2load $device $partition $scriptaddr boot/${bootscr}" \
- " ||" \ + "load $device $partition $scriptaddr boot/${bootscr}" \
" ||" \
- "ext2load $device $partition $scriptaddr ${bootscr}" \ - "ext2load $device $partition $scriptaddr ${bootscr}" \
+ "load $device $partition $scriptaddr ${bootscr}" \ + "load $device $partition $scriptaddr ${bootscr}" \
"\0" \ "\0" \
"loadbootenv=" \ "loadbootenv=" \
- "fatload $device $partition $scriptaddr ${bootenv}" \ - "fatload $device $partition $scriptaddr ${bootenv}" \
- " || " \
- "ext2load $device $partition $scriptaddr boot/${bootenv}" \
+ "load $device $partition $scriptaddr boot/${bootenv}" \ + "load $device $partition $scriptaddr boot/${bootenv}" \
" || " \ " || " \
- "ext2load $device $partition $scriptaddr boot/${bootenv}" \
- " || " \
- "ext2load $device $partition $scriptaddr ${bootenv}" \ - "ext2load $device $partition $scriptaddr ${bootenv}" \
+ "load $device $partition $scriptaddr ${bootenv}" \ + "load $device $partition $scriptaddr ${bootenv}" \
"\0" \ "\0" \
"loadkernel=" \ "loadkernel=" \
"if "\ "if "\
- "bootpath=/boot/" \ "bootpath=/boot/" \
- " && " \ " && " \
- "ext2load $device $partition 0x43000000 ${bootpath}script.bin" \ - "ext2load $device $partition 0x43000000 ${bootpath}${script}" \
- " && " \ - " && " \
- "ext2load $device $partition 0x48000000 ${bootpath}${kernel}" \ - "ext2load $device $partition 0x48000000 ${bootpath}${kernel}" \
- ";then true; elif " \ - ";then true; elif " \
- "bootpath=/" \ - "bootpath=/" \
- " && " \ - " && " \
- "fatload $device $partition 0x43000000 script.bin" \ - "fatload $device $partition 0x43000000 ${script}" \
- " && " \ + "load $device $partition 0x43000000 ${bootpath}${script}" \
" && " \
- "fatload $device $partition 0x48000000 ${kernel}" \ - "fatload $device $partition 0x48000000 ${kernel}" \
- ";then true; elif " \ + "load $device $partition 0x48000000 ${bootpath}${kernel}" \
- "bootpath=/" \ ";then true; elif " \
- " && " \ "bootpath=/" \
- "ext2load $device $partition 0x43000000 ${bootpath}script.bin" \ " && " \
+ "load $device $partition 0x43000000 /boot/script.bin" \ - "ext2load $device $partition 0x43000000 ${bootpath}${script}" \
+ "load $device $partition 0x43000000 ${bootpath}${script}" \
" && " \ " && " \
- "ext2load $device $partition 0x48000000 ${bootpath}${kernel}" \ - "ext2load $device $partition 0x48000000 ${bootpath}${kernel}" \
+ "load $device $partition 0x48000000 /boot/${kernel}" \ + "load $device $partition 0x48000000 ${bootpath}${kernel}" \
";then true; else "\ ";then true; else "\
"false" \ "false" \
";fi" \ ";fi" \
@@ -262,7 +238,7 @@ @@ -272,7 +262,7 @@
"\0" \ "\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_SYS_BOOT_GET_CMDLINE
#define CONFIG_AUTO_COMPLETE #define CONFIG_AUTO_COMPLETE
@@ -277,6 +253,7 @@ @@ -287,6 +277,7 @@
#define CONFIG_FAT_WRITE /* enable write access */ #define CONFIG_FAT_WRITE /* enable write access */
#define CONFIG_CMD_EXT2 /* with this we can access ext2 bootfs */ #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_EXT4 /* with this we can access ext4 bootfs */
+#define CONFIG_CMD_FS_GENERIC +#define CONFIG_CMD_FS_GENERIC
#define CONFIG_CMD_ZFS /* with this we can access ZFS bootfs */
#define CONFIG_SPL_FRAMEWORK #define CONFIG_SPL_FRAMEWORK
#define CONFIG_SPL_LIBCOMMON_SUPPORT

View file

File diff suppressed because it is too large Load diff

View file

@ -3,12 +3,10 @@ flash_uboot() {
echo "Do you want to do this now? [y|N]" echo "Do you want to do this now? [y|N]"
read -r shouldwe read -r shouldwe
if [[ $shouldwe =~ ^([yY][eE][sS]|[yY])$ ]]; then 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-sunxi-with-spl.bin of=/dev/mmcblk0 bs=1024 seek=8
dd if=/boot/u-boot.bin of=/dev/mmcblk0 bs=1024 seek=32
else else
echo "You can do this later by running:" 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-sunxi-with-spl.bin of=/dev/mmcblk0 bs=1024 seek=8"
echo "# dd if=/boot/u-boot.bin of=/dev/mmcblk0 bs=1024 seek=32"
fi fi
} }