On Sat, May 28, 2016 at 11:07 PM, Vagrant Cascadian <vagr...@debian.org> wrote:
>> The patch also includes a packaging patch that fixes the distro
>> bootcmd support, and also some minor fixes for extlinux and pxeboot
>> support (which I'm also forwarding upstream).
>
> Please get those patches upstream. Though at a quick glance, the changes
> seem mostly reasonable. A few comments below...

Env size change is now a backport, and finally had time to send the
other fixes I had (just missing the fixed bootcmd_mmc0 change, trying
to play with mbr/gpt first).

Attached you can find the new version of the patch, tested by booting
the system from the sdcard.

> As Martin mentioned, we should probably split this into a separate
> package, such as u-boot-qcom.

Done.

Thanks,
-- 
Ricardo Salveti de Araujo
From 62d3c60d91c651e8414205e6986e0f6bee5cebc3 Mon Sep 17 00:00:00 2001
From: Ricardo Salveti <rsalv...@rsalveti.net>
Date: Sun, 3 Jul 2016 13:44:48 -0300
Subject: [PATCH] Enable support for dragonboard410c

Signed-off-by: Ricardo Salveti <rsalv...@rsalveti.net>
---
 debian/control                                     | 14 +++++++++
 ...ard410c-Increase-default-environment-size.patch | 31 ++++++++++++++++++++
 ...410c-adding-missing-default-addr-for-scri.patch | 29 ++++++++++++++++++
 ...gonboard410c-prefer-sdcard-boot-over-emmc.patch | 34 ++++++++++++++++++++++
 debian/patches/series                              |  4 +++
 debian/targets                                     |  3 ++
 debian/u-boot-qcom.install                         |  2 ++
 debian/u-boot-qcom.lintian-overrides               | 14 +++++++++
 8 files changed, 131 insertions(+)
 create mode 100644 debian/patches/qcom/dragonboard410c-Increase-default-environment-size.patch
 create mode 100644 debian/patches/qcom/dragonboard410c-adding-missing-default-addr-for-scri.patch
 create mode 100644 debian/patches/qcom/dragonboard410c-prefer-sdcard-boot-over-emmc.patch
 create mode 100755 debian/u-boot-qcom.install
 create mode 100644 debian/u-boot-qcom.lintian-overrides

diff --git a/debian/control b/debian/control
index 6e2d3ee..19629b9 100644
--- a/debian/control
+++ b/debian/control
@@ -38,6 +38,20 @@ Description: A boot loader for imx systems
  This package includes boot loaders for various imx platforms.
  ${uboot:platforms}
 
+Package: u-boot-qcom
+Architecture: arm64
+Multi-Arch: same
+Depends: ${misc:Depends}
+Description: A boot loader for qcom systems
+ Das U-Boot is a cross-platform bootloader for embedded systems,
+ used as the default boot loader by several board vendors.  It is
+ intended to be easy to port and to debug, and runs on many
+ supported architectures, including PPC, ARM, MIPS, x86, m68k,
+ NIOS, and Microblaze.
+ .
+ This package includes boot loaders for various qcom platforms.
+ ${uboot:platforms}
+
 Package: u-boot-tegra
 Architecture: armhf arm64
 Multi-Arch: same
diff --git a/debian/patches/qcom/dragonboard410c-Increase-default-environment-size.patch b/debian/patches/qcom/dragonboard410c-Increase-default-environment-size.patch
new file mode 100644
index 0000000..ae016cd
--- /dev/null
+++ b/debian/patches/qcom/dragonboard410c-Increase-default-environment-size.patch
@@ -0,0 +1,31 @@
+From 333463d6698b9e7b8a36c7fd3bd5887c34e5cd71 Mon Sep 17 00:00:00 2001
+From: Mateusz Kulikowski <mateusz.kulikow...@gmail.com>
+Date: Sun, 19 Jun 2016 23:05:32 +0200
+Subject: [PATCH] dragonboard410c: Increase default environment size.
+
+Due to changes in distro environment, ENV_SIZE limit was reached on Dragonboard.
+This patch increases environment size to 8KiB.
+
+Patch from upstream.
+
+Signed-off-by: Mateusz Kulikowski <mateusz.kulikow...@gmail.com>
+---
+ include/configs/dragonboard410c.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/include/configs/dragonboard410c.h b/include/configs/dragonboard410c.h
+index d32889d..4b00922 100644
+--- a/include/configs/dragonboard410c.h
++++ b/include/configs/dragonboard410c.h
+@@ -129,7 +129,7 @@ REFLASH(dragonboard/u-boot.img, 8)\
+ 	BOOTENV
+ 
+ #define CONFIG_ENV_IS_NOWHERE
+-#define CONFIG_ENV_SIZE			0x1000
++#define CONFIG_ENV_SIZE			0x2000
+ #define CONFIG_ENV_VARS_UBOOT_CONFIG
+ #define CONFIG_SYS_NO_FLASH
+ 
+-- 
+2.7.4
+
diff --git a/debian/patches/qcom/dragonboard410c-adding-missing-default-addr-for-scri.patch b/debian/patches/qcom/dragonboard410c-adding-missing-default-addr-for-scri.patch
new file mode 100644
index 0000000..5dc2066
--- /dev/null
+++ b/debian/patches/qcom/dragonboard410c-adding-missing-default-addr-for-scri.patch
@@ -0,0 +1,29 @@
+From: Ricardo Salveti <rsalv...@rsalveti.net>
+Date: Sun, 3 Jul 2016 14:15:16 -0300
+Subject: [PATCH] dragonboard410c: adding missing default addr for script and
+ pxe boot
+
+Cc: Mateusz Kulikowski <mateusz.kulikow...@gmail.com>
+Signed-off-by: Ricardo Salveti <rsalv...@rsalveti.net>
+
+Forwarded: yes
+---
+ include/configs/dragonboard410c.h | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/include/configs/dragonboard410c.h b/include/configs/dragonboard410c.h
+index 74a827d..1dbe219 100644
+--- a/include/configs/dragonboard410c.h
++++ b/include/configs/dragonboard410c.h
+@@ -126,6 +126,8 @@ REFLASH(dragonboard/u-boot.img, 8)\
+ 	"fdtfile=apq8016-sbc.dtb\0" \
+ 	"fdt_addr_r=0x83000000\0"\
+ 	"ramdisk_addr_r=0x84000000\0"\
++	"scriptaddr=0x90000000\0"\
++	"pxefile_addr_r=0x90100000\0"\
+ 	BOOTENV
+ 
+ #define CONFIG_ENV_IS_NOWHERE
+-- 
+2.7.4
+
diff --git a/debian/patches/qcom/dragonboard410c-prefer-sdcard-boot-over-emmc.patch b/debian/patches/qcom/dragonboard410c-prefer-sdcard-boot-over-emmc.patch
new file mode 100644
index 0000000..7b7c2b8
--- /dev/null
+++ b/debian/patches/qcom/dragonboard410c-prefer-sdcard-boot-over-emmc.patch
@@ -0,0 +1,34 @@
+From: Ricardo Salveti <rsalv...@rsalveti.net>
+Date: Sun, 3 Jul 2016 13:51:31 -0300
+Subject: [PATCH] dragonboard410c: prefer sdcard boot over emmc
+
+Make the external devices the preferred ones when booting the system
+(usb is already the first option). This allows users to easily boot
+custom distributions without requiring them to reflash/customize u-boot.
+
+Cc: Mateusz Kulikowski <mateusz.kulikow...@gmail.com>
+Signed-off-by: Ricardo Salveti <rsalv...@rsalveti.net>
+
+Forwarded: yes
+
+---
+ include/configs/dragonboard410c.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/include/configs/dragonboard410c.h b/include/configs/dragonboard410c.h
+index 4b00922..74a827d 100644
+--- a/include/configs/dragonboard410c.h
++++ b/include/configs/dragonboard410c.h
+@@ -84,8 +84,8 @@
+ 
+ #define BOOT_TARGET_DEVICES(func) \
+ 	func(USB, usb, 0) \
+-	func(MMC, mmc, 0) \
+ 	func(MMC, mmc, 1) \
++	func(MMC, mmc, 0) \
+ 	func(DHCP, dhcp, na)
+ 
+ #include <config_distro_bootcmd.h>
+-- 
+2.7.4
+
diff --git a/debian/patches/series b/debian/patches/series
index 70d817e..077cfde 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -29,3 +29,7 @@ am57xx/omap5_distro_bootcmd
 imx_private_libgcc
 
 odroid/0001-Convert-odroid-to-use-distro_bootcmd.patch
+
+qcom/dragonboard410c-Increase-default-environment-size.patch
+qcom/dragonboard410c-prefer-sdcard-boot-over-emmc.patch
+qcom/dragonboard410c-adding-missing-default-addr-for-scri.patch
diff --git a/debian/targets b/debian/targets
index 71a06bf..51eded5 100644
--- a/debian/targets
+++ b/debian/targets
@@ -163,3 +163,6 @@ mips	-		qemu_mips	u-boot.bin
 sh4	-		r2dplus		u-boot.bin
 
 sh4	-		sh7785lcr_32bit	u-boot.bin
+
+# Ricardo Salveti <rsalv...@rsalveti.net>
+arm64	qcom		dragonboard410c	u-boot.bin
diff --git a/debian/u-boot-qcom.install b/debian/u-boot-qcom.install
new file mode 100755
index 0000000..0ff7e5b
--- /dev/null
+++ b/debian/u-boot-qcom.install
@@ -0,0 +1,2 @@
+#!/bin/sh
+debian/bin/u-boot-install-targets qcom
diff --git a/debian/u-boot-qcom.lintian-overrides b/debian/u-boot-qcom.lintian-overrides
new file mode 100644
index 0000000..56ec017
--- /dev/null
+++ b/debian/u-boot-qcom.lintian-overrides
@@ -0,0 +1,14 @@
+
+# There are no file conflicts across architectures for u-boot, as each
+# target is only installed on a single architecture. In theory, some
+# targets could be built on multiple architectures, but could instead install
+# the package for the architecture needed.
+u-boot-qcom [arm64]: arch-dependent-file-not-in-arch-specific-directory usr/lib/u-boot/dragonboard410c/uboot.elf
+
+# These bootloaders need to be statically linked.
+u-boot-qcom [arm64]: statically-linked-binary usr/lib/u-boot/dragonboard410c/uboot.elf
+
+u-boot-qcom: description-synopsis-starts-with-article
+
+# Synopsys is the name of a company, not a misspelling.
+u-boot-qcom: spelling-error-in-copyright Synopsys Synopsis
-- 
2.7.4

Reply via email to