alarm/uboot-pine64 to 2017.07-1

This commit is contained in:
Kevin Mihelich 2017-08-20 02:07:04 +00:00
parent 950acea73f
commit b93a751c98
5 changed files with 53 additions and 68 deletions

View file

@ -0,0 +1,25 @@
From d17076c50ab71a73443bbabbc24d06064e7c7572 Mon Sep 17 00:00:00 2001
From: Kevin Mihelich <kevin@archlinuxarm.org>
Date: Sat, 19 Aug 2017 15:28:38 -0600
Subject: [PATCH] ATF: set -fno-stack-protector
---
Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Makefile b/Makefile
index 87c307de..acc5791b 100644
--- a/Makefile
+++ b/Makefile
@@ -231,7 +231,7 @@ CFLAGS += -nostdinc -pedantic -ffreestanding -Wall \
-Werror -Wmissing-include-dirs \
-mgeneral-regs-only -std=c99 -c -Os \
${DEFINES} ${INCLUDES}
-CFLAGS += -ffunction-sections -fdata-sections
+CFLAGS += -ffunction-sections -fdata-sections -fno-stack-protector
LDFLAGS += --fatal-warnings -O1
LDFLAGS += --gc-sections
LDFLAGS += $(if $(shell $(LD) -v --fix-cortex-a53-843419 > /dev/null 2>&1 && echo 1),--fix-cortex-a53-843419)
--
2.14.1

View file

@ -1,33 +0,0 @@
From cf3d184596e03706f5320a378c2517ad3fe33a34 Mon Sep 17 00:00:00 2001
From: Kevin Mihelich <kevin@archlinuxarm.org>
Date: Tue, 12 Apr 2016 21:08:56 -0600
Subject: [PATCH] arch linux arm modifications
---
include/configs/sunxi-common.h | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/include/configs/sunxi-common.h b/include/configs/sunxi-common.h
index 8f11eb9..2a22831 100644
--- a/include/configs/sunxi-common.h
+++ b/include/configs/sunxi-common.h
@@ -174,7 +174,7 @@
#define CONFIG_SYS_NO_FLASH
#define CONFIG_SYS_MONITOR_LEN (768 << 10) /* 768 KiB */
-#define CONFIG_IDENT_STRING " Allwinner Technology"
+#define CONFIG_IDENT_STRING " Arch Linux ARM"
#define CONFIG_DISPLAY_BOARDINFO
#define CONFIG_ENV_OFFSET (544 << 10) /* (8 + 24 + 512) KiB */
@@ -518,7 +518,6 @@ extern int soft_i2c_gpio_scl;
CONSOLE_ENV_SETTINGS \
MEM_LAYOUT_ENV_SETTINGS \
DFU_ALT_INFO_RAM \
- "fdtfile=" CONFIG_DEFAULT_DEVICE_TREE ".dtb\0" \
"console=ttyS0,115200\0" \
BOOTCMD_SUNXI_COMPAT \
BOOTENV
--
2.7.2

View file

@ -4,49 +4,45 @@
buildarch=8
pkgname=uboot-pine64
pkgver=2016.05rc1
pkgver=2017.07
pkgrel=1
pkgdesc="U-Boot for Pine64"
arch=('armv7h')
arch=('aarch64')
url='http://www.denx.de/wiki/U-Boot/WebHome'
license=('GPL')
backup=('boot/boot.txt' 'boot/boot.scr')
makedepends=('bc' 'dtc' 'git')
install=${pkgname}.install
source=("ftp://ftp.denx.de/pub/u-boot/u-boot-${pkgver/rc/-rc}.tar.bz2"
'0001-arch-linux-arm-modifications.patch'
'https://archlinuxarm.org/builder/src/pine/bl31.bin'
'https://archlinuxarm.org/builder/src/pine/boot0.bin'
'https://archlinuxarm.org/builder/src/pine/pine64_image.c'
'https://archlinuxarm.org/builder/src/pine/scp.bin'
'git+https://github.com/apritzel/arm-trusted-firmware.git#branch=allwinner'
'0001-ATF-set-fno-stack-protector.patch'
'boot.txt'
'mkscr')
md5sums=('aa190afb64ae4f59d1a02d351e4ceedd'
'77cad572cf8d40a7c9c0c6a1dccd1ccf'
'7af966e1c846879b511d73210cc8147f'
'cbad13361ebef9b9e0897e1d42c69ba7'
'4c2b592d3bece0cbf118c9eee3cd1b8a'
'9130de1a9cac42cc0ab8697dcb7b3ae5'
'6400a8b8a70816865429404f24aafdef'
md5sums=('b74741e7a9ad1cf9a5bfa87302b80f2b'
'SKIP'
'1d3b375fa978f3297d0fd3316f89e68a'
'c3fef77aee64903f806c4f4357e5a2ab'
'021623a04afd29ac3f368977140cfbfd')
prepare() {
cd u-boot-${pkgver/rc/-rc}
git apply ../0001-arch-linux-arm-modifications.patch
cd arm-trusted-firmware
git apply ../0001-ATF-set-fno-stack-protector.patch
}
build() {
cd u-boot-${pkgver/rc/-rc}
unset CFLAGS CXXFLAGS CPPFLAGS LDFLAGS
unset CFLAGS
unset CXXFLAGS
unset CPPFLAGS
cd arm-trusted-firmware
make distclean
make PLAT=sun50iw1p1 DEBUG=1 bl31
cp build/sun50iw1p1/debug/bl31.bin ../u-boot-${pkgver/rc/-rc}
cd ../u-boot-${pkgver/rc/-rc}
make distclean
make pine64_plus_defconfig
make EXTRAVERSION=-${pkgrel}
gcc ../pine64_image.c -o pine64_image
echo 'CONFIG_IDENT_STRING=" Arch Linux ARM"' >> .config
make -j1 EXTRAVERSION=-${pkgrel}
}
package() {
@ -54,11 +50,7 @@ package() {
mkdir -p "${pkgdir}"/boot
cat ../bl31.bin u-boot.bin > bl31uboot.bin
./pine64_image ../scp.bin bl31uboot.bin u-boot.img
cp ../boot0.bin u-boot.img ../boot.txt "${pkgdir}"/boot
sed -i 's|@@FDTFILE@@|allwinner/sun50i-a64-pine64-plus.dtb|' "${pkgdir}"/boot/boot.txt
cat spl/sunxi-spl.bin u-boot.itb > u-boot-sunxi-with-spl.bin
cp ../boot.txt ../mkscr u-boot-sunxi-with-spl.bin "${pkgdir}"/boot
tools/mkimage -A arm -O linux -T script -C none -n "U-Boot boot script" -d "${pkgdir}"/boot/boot.txt "${pkgdir}"/boot/boot.scr
}

View file

@ -1,6 +1,9 @@
# After modifying, run ./mkscr
# Set root partition to the second partition of boot device
part uuid ${devtype} ${devnum}:${bootpart} uuid
setenv bootargs console=${console} root=PARTUUID=${uuid} rw rootwait
setenv fdtfile @@FDTFILE@@
if load ${devtype} ${devnum}:${bootpart} ${kernel_addr_r} /boot/Image; then
if load ${devtype} ${devnum}:${bootpart} ${fdt_addr_r} /boot/dtbs/${fdtfile}; then

View file

@ -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/boot0.bin of=/dev/mmcblk0 seek=16
dd if=/boot/u-boot.img of=/dev/mmcblk0 seek=80
dd if=/boot/u-boot-sunxi-with-spl.bin of=/dev/mmcblk0 bs=8k seek=1
else
echo "You can do this later by running:"
echo "# dd if=/boot/boot0.bin of=/dev/mmcblk0 seek=16"
echo "# dd if=/boot/u-boot.img of=/dev/mmcblk0 seek=80"
echo "# dd if=/boot/u-boot-sunxi-with-spl.bin of=/dev/mmcblk0 bs=8k seek=1"
fi
}