From: Vagrant Cascadian <vagrant@debian.org>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v3] arm: mx5: Add support for USB armory board
Date: Tue, 24 Mar 2015 16:25:34 -0700 [thread overview]
Message-ID: <87oaniou4x.fsf@aikidev.net> (raw)
In-Reply-To: <1427203612-19822-1-git-send-email-andrej@inversepath.com>
On 2015-03-24, andrej at inversepath.com wrote:
> Add support for Inverse Path USB armory board, an open source
> flash-drive sized computer based on Freescale i.MX53 SoC.
Thanks!
Unfortunately, this fails to build with numerous errors such as:
CC arch/arm/lib/asm-offsets.s
In file included from include/config.h:6:0,
from /?BUILDDIR?/u-boot-2015.04~rc4+dfsg1/include/common.h:18,
from /?BUILDDIR?/u-boot-2015.04~rc4+dfsg1/lib/asm-offsets.c:15:
/?BUILDDIR?/u-boot-2015.04~rc4+dfsg1/include/configs/usbarmory.h:86:0: warning: "CONFIG_BOOTCOMMAND" redefined
#define CONFIG_BOOTCOMMAND \
^
In file included from /?BUILDDIR?/u-boot-2015.04~rc4+dfsg1/include/configs/usbarmory.h:27:0,
from include/config.h:6,
from /?BUILDDIR?/u-boot-2015.04~rc4+dfsg1/include/common.h:18,
from /?BUILDDIR?/u-boot-2015.04~rc4+dfsg1/lib/asm-offsets.c:15:
/?BUILDDIR?/u-boot-2015.04~rc4+dfsg1/include/config_distro_bootcmd.h:232:0: note: this is the location of the previous definition
#define CONFIG_BOOTCOMMAND "run distro_bootcmd"
^
It is caused by including config_distro_bootcmd.h too early, and
config_distro_bootcmd.h defines CONFIG_BOOTCOMMAND before it is set in
include/configs/usbarmory.h.
The include for config_distro_bootcmd.h should be *after*
CONFIG_BOOTCOMMAND and BOOT_TARGET_DEVICES are defined, at least. There
are also other conditionals that may be impacted but are more subtle.
So here's a tested trivial patch to fix that:
Index: u-boot/include/configs/usbarmory.h
===================================================================
--- u-boot.orig/include/configs/usbarmory.h
+++ u-boot/include/configs/usbarmory.h
@@ -24,7 +24,6 @@
#include <config_cmd_default.h>
#include <config_distro_defaults.h>
-#include <config_distro_bootcmd.h>
/* U-Boot commands */
#define CONFIG_CMD_MEMTEST
@@ -92,6 +91,8 @@
#define BOOT_TARGET_DEVICES(func) \
func(MMC, mmc, 0)
+#include <config_distro_bootcmd.h>
+
#define MEM_LAYOUT_ENV_SETTINGS \
"kernel_addr_r=0x70800000\0" \
"fdt_addr_r=0x71000000\0" \
I'd like to propose only setting bootargs when the default action is
kicking in to allow for a different root device, or root device
discovery from an initramfs, or boot scripts, etc... Something along
these lines (untested):
Index: u-boot/include/configs/usbarmory.h
===================================================================
--- u-boot.orig/include/configs/usbarmory.h
+++ u-boot/include/configs/usbarmory.h
@@ -80,10 +80,9 @@
#define CONFIG_SYS_TEXT_BASE 0x77800000
#define CONFIG_SYS_LOAD_ADDR CONFIG_LOADADDR
#define CONFIG_HOSTNAME usbarmory
-#define CONFIG_BOOTARGS \
- "console=ttymxc0,115200 root=/dev/mmcblk0p1 rootwait rw"
#define CONFIG_BOOTCOMMAND \
"run distro_bootcmd; " \
+ "setenv bootargs console=${console} ${bootargs_default}; " \
"ext2load mmc 0:1 ${kernel_addr_r} /boot/uImage; " \
"ext2load mmc 0:1 ${fdt_addr_r} /boot/${fdtfile}; " \
"bootm ${kernel_addr_r} - ${fdt_addr_r}"
@@ -102,6 +101,7 @@
#define CONFIG_EXTRA_ENV_SETTINGS \
MEM_LAYOUT_ENV_SETTINGS \
+ "bootargs_default=root=/dev/mmcblk0p1 rootwait rw\0" \
"fdtfile=imx53-usbarmory.dtb\0" \
"console=ttymxc0,115200\0" \
BOOTENV
live well,
vagrant
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 818 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20150324/5abfd308/attachment.sig>
next prev parent reply other threads:[~2015-03-24 23:25 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-24 13:26 [U-Boot] [PATCH v3] arm: mx5: Add support for USB armory board andrej at inversepath.com
2015-03-24 23:25 ` Vagrant Cascadian [this message]
2015-03-25 1:04 ` Chris Kuethe
2015-03-25 8:48 ` Stefano Babic
2015-03-25 20:24 ` Vagrant Cascadian
2015-03-26 7:42 ` Stefano Babic
2015-03-25 20:45 ` Andrej Rosano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87oaniou4x.fsf@aikidev.net \
--to=vagrant@debian.org \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox