alarm/uboot-pine64 to 2018.03-1

This commit is contained in:
Kevin Mihelich 2018-04-03 00:31:29 +00:00
parent a7f6de0d71
commit 14f3bb140e
5 changed files with 193 additions and 6 deletions

View File

@ -0,0 +1,34 @@
From d8636c9831fe1836ab2f929a3c0719f1a6ee1851 Mon Sep 17 00:00:00 2001
From: Andre Przywara <andre.przywara@arm.com>
Date: Wed, 14 Mar 2018 01:57:05 +0000
Subject: [PATCH 1/3] sunxi: disable direct MMC environment
Since the dawn of time for the Allwinner support in mainline U-Boot
we store the environment to the SD card and write directly at
544KB from the beginning of the device. This leads to problems when
the U-Boot proper image grows beyond 504KB and eventually overlaps.
With one release of having the environment preferably in a FAT
partition, let's now turn off the MMC variant fallback, so we get back
all the space we need to implement features.
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Acked-by: Maxime Ripard <maxime.ripard@bootlin.com>
---
env/Kconfig | 1 -
1 file changed, 1 deletion(-)
diff --git a/env/Kconfig b/env/Kconfig
index a3c6298273..0c1e928f13 100644
--- a/env/Kconfig
+++ b/env/Kconfig
@@ -152,7 +152,6 @@ config ENV_IS_IN_MMC
bool "Environment in an MMC device"
depends on !CHAIN_OF_TRUST
depends on MMC
- default y if ARCH_SUNXI
default y if ARCH_EXYNOS4
default y if MX6SX || MX7D
default y if TEGRA30 || TEGRA124
--
2.16.3

View File

@ -0,0 +1,96 @@
From 0061e430c9105b63d92ce26696b1577651ab1185 Mon Sep 17 00:00:00 2001
From: Andre Przywara <andre.przywara@arm.com>
Date: Wed, 14 Mar 2018 01:57:06 +0000
Subject: [PATCH 2/3] sunxi: revert disabling of features
In January some commits were introduced to mitigate the U-Boot image
size issues we encountered on sunxi builds.
Now with the MMC environment removed we can bring them back, as we
practically don't have a size limit anymore.
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Acked-by: Maxime Ripard <maxime.ripard@bootlin.com>
---
cmd/Kconfig | 5 -----
drivers/video/Kconfig | 2 --
lib/Kconfig | 1 -
3 files changed, 8 deletions(-)
diff --git a/cmd/Kconfig b/cmd/Kconfig
index 136836d146..27086df09b 100644
--- a/cmd/Kconfig
+++ b/cmd/Kconfig
@@ -426,7 +426,6 @@ menu "Memory commands"
config CMD_CRC32
bool "crc32"
select HASH
- default n if ARCH_SUNXI
default y
help
Compute CRC32.
@@ -568,7 +567,6 @@ config CMD_LZMADEC
config CMD_UNZIP
bool "unzip"
- default n if ARCH_SUNXI
default y if CMD_BOOTI
help
Uncompress a zip-compressed memory region.
@@ -780,14 +778,12 @@ config CMD_I2C
config CMD_LOADB
bool "loadb"
- default n if ARCH_SUNXI
default y
help
Load a binary file over serial line.
config CMD_LOADS
bool "loads"
- default n if ARCH_SUNXI
default y
help
Load an S-Record file over serial line
@@ -1187,7 +1183,6 @@ config CMD_GETTIME
# TODO: rename to CMD_SLEEP
config CMD_MISC
bool "sleep"
- default n if ARCH_SUNXI
default y
help
Delay execution for some time
diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig
index 2fc0defcd0..45a105db06 100644
--- a/drivers/video/Kconfig
+++ b/drivers/video/Kconfig
@@ -38,7 +38,6 @@ config BACKLIGHT_GPIO
config VIDEO_BPP8
bool "Support 8-bit-per-pixel displays"
depends on DM_VIDEO
- default n if ARCH_SUNXI
default y if DM_VIDEO
help
Support drawing text and bitmaps onto a 8-bit-per-pixel display.
@@ -49,7 +48,6 @@ config VIDEO_BPP8
config VIDEO_BPP16
bool "Support 16-bit-per-pixel displays"
depends on DM_VIDEO
- default n if ARCH_SUNXI
default y if DM_VIDEO
help
Support drawing text and bitmaps onto a 16-bit-per-pixel display.
diff --git a/lib/Kconfig b/lib/Kconfig
index 4fd41c4282..ab581f172f 100644
--- a/lib/Kconfig
+++ b/lib/Kconfig
@@ -66,7 +66,6 @@ config PANIC_HANG
config REGEX
bool "Enable regular expression support"
- default n if ARCH_SUNXI
default y if NET
help
If this variable is defined, U-Boot is linked against the
--
2.16.3

View File

@ -0,0 +1,45 @@
From b31e38ce376b506130b1792f413fb49809fa191d Mon Sep 17 00:00:00 2001
From: Kevin Mihelich <kevin@archlinuxarm.org>
Date: Sat, 31 Mar 2018 21:52:00 -0600
Subject: [PATCH 3/3] Set board name for Pine64
Signed-off-by: Kevin Mihelich <kevin@archlinuxarm.org>
---
board/sunxi/board.c | 9 +++++++++
include/configs/sunxi-common.h | 2 ++
2 files changed, 11 insertions(+)
diff --git a/board/sunxi/board.c b/board/sunxi/board.c
index e08e22f30c..a222d5c4c2 100644
--- a/board/sunxi/board.c
+++ b/board/sunxi/board.c
@@ -254,6 +254,15 @@ int board_init(void)
return soft_i2c_board_init();
}
+int board_late_init(void)
+{
+ if (gd->ram_size > 512 * 1024 * 1024)
+ env_set("board_name", "pine64-plus");
+ else
+ env_set("board_name", "pine64");
+ return 0;
+}
+
int dram_init(void)
{
gd->ram_size = get_ram_size((long *)PHYS_SDRAM_0, PHYS_SDRAM_0_SIZE);
diff --git a/include/configs/sunxi-common.h b/include/configs/sunxi-common.h
index e4e7c22778..8d1200b8f4 100644
--- a/include/configs/sunxi-common.h
+++ b/include/configs/sunxi-common.h
@@ -527,4 +527,6 @@ extern int soft_i2c_gpio_scl;
#define CONFIG_EXTRA_ENV_SETTINGS
#endif
+#define CONFIG_BOARD_LATE_INIT
+
#endif /* _SUNXI_COMMON_CONFIG_H */
--
2.16.3

View File

@ -4,28 +4,39 @@
buildarch=8
pkgname=uboot-pine64
pkgver=2017.07
pkgver=2018.03
pkgrel=1
pkgdesc="U-Boot for Pine64"
arch=('aarch64')
url='http://www.denx.de/wiki/U-Boot/WebHome'
license=('GPL')
backup=('boot/boot.txt' 'boot/boot.scr')
makedepends=('bc' 'dtc' 'git')
makedepends=('bc' 'git' 'python' 'swig' 'dtc145')
install=${pkgname}.install
source=("ftp://ftp.denx.de/pub/u-boot/u-boot-${pkgver/rc/-rc}.tar.bz2"
'git+https://github.com/apritzel/arm-trusted-firmware.git#branch=allwinner'
'0001-sunxi-disable-direct-MMC-environment.patch'
'0002-sunxi-revert-disabling-of-features.patch'
'0003-Set-board-name-for-Pine64.patch'
'0001-ATF-set-fno-stack-protector.patch'
'boot.txt'
'mkscr')
md5sums=('b74741e7a9ad1cf9a5bfa87302b80f2b'
md5sums=('02922bdf0ee003fe25bfc32749ffdeab'
'SKIP'
'f7c8d23581c1f8b4343e39a05305552f'
'8452738859843d26e5763a4fc5797bda'
'e6f1ffcb18361c238e5127d84f9bc9f8'
'1d3b375fa978f3297d0fd3316f89e68a'
'c3fef77aee64903f806c4f4357e5a2ab'
'b523aea0f8fda4edc6846b7e7294f76e'
'021623a04afd29ac3f368977140cfbfd')
prepare() {
cd arm-trusted-firmware
cd u-boot-${pkgver/rc/-rc}
git apply ../0001-sunxi-disable-direct-MMC-environment.patch
git apply ../0002-sunxi-revert-disabling-of-features.patch
git apply ../0003-Set-board-name-for-Pine64.patch
cd ../arm-trusted-firmware
git apply ../0001-ATF-set-fno-stack-protector.patch
}
@ -42,7 +53,7 @@ build() {
make distclean
make pine64_plus_defconfig
echo 'CONFIG_IDENT_STRING=" Arch Linux ARM"' >> .config
make -j1 EXTRAVERSION=-${pkgrel}
make EXTRAVERSION=-${pkgrel}
}
package() {

View File

@ -6,6 +6,7 @@ part uuid ${devtype} ${devnum}:${bootpart} uuid
setenv bootargs console=${console} root=PARTUUID=${uuid} rw rootwait
if load ${devtype} ${devnum}:${bootpart} ${kernel_addr_r} /boot/Image; then
setenv fdtfile allwinner/sun50i-a64-${board_name}.dtb
if load ${devtype} ${devnum}:${bootpart} ${fdt_addr_r} /boot/dtbs/${fdtfile}; then
if load ${devtype} ${devnum}:${bootpart} ${ramdisk_addr_r} /boot/initramfs-linux.img; then
booti ${kernel_addr_r} ${ramdisk_addr_r}:${filesize} ${fdt_addr_r};