From: Hans de Goede <hdegoede@redhat.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [RFC/PATCH] sunxi: Populate the default environment for sunxi-based systems
Date: Mon, 11 Aug 2014 18:22:09 +0200 [thread overview]
Message-ID: <53E8EDB1.9090206@redhat.com> (raw)
In-Reply-To: <1407704459-22942-1-git-send-email-merker@debian.org>
Hi,
On 08/10/2014 11:00 PM, Karsten Merker wrote:
> Hello,
>
> in the following email you can find a patch to populate the
> default environment for sunxi-based systems about which I would
> apprechiate your opinion.
>
> With the current progress in mainlining sunxi platform support,
> mainline u-boot will probably soon be able to replace
> u-boot-sunxi (https://github.com/linux-sunxi/u-boot-sunxi) for
> many use cases. Currently the default environment in mainline
> u-boot for sunxi-based systems is rather bare; the only
> predefined variable is bootm_size (which is required for proper
> initrd- and dtb-relocation). U-boot-sunxi predefines a set of
> environment variables which are commonly used by existing boot
> scripts and also offers a predefined bootcmd for automatic search
> and execution of bootscripts. I think that to facilitate using
> mainline u-boot as a drop-in replacement for u-boot-sunxi,
> mainline u-boot should provide similar defaults.
>
> The original environment in u-boot-sunxi was written for an older
> u-boot release and does not make use of modern u-boot features
> (e.g. it uses hardcoded filesystem-specific load commands), so
> just copying the environment 1:1 to mainline u-boot does not make
> sense IMHO. My patch tries to implement the minimum required for
> autobooting existing boot scripts with more modern u-boot functions.
>
> In addition to that, the patch defines some standard environment
> variables which are commonly defined on other u-boot platforms,
> but which have not been defined by u-boot-sunxi, in particular
> kernel_addr_r, ramdisk_addr_r and fdt_addr_r. Debian supports a
> wide range of armhf system and tries to unify support for the
> different platforms as good as possible. Having the same
> predefined variables with (platform-specific) load addresses on
> all platforms would help us a lot with regard to generic boot
> scripts and simplified user documentation.
>
> Regarding the actual values for the various load addresses I am
> not in all cases perfectly sure about the best variant.
> Following is the reasoning for my choices:
>
> - fdt_addr_r
>
> U-boot-sunxi loads the FEX binary (Allwinner's proprietary
> hardware description format for their android kernels, i.e.
> a file functionally roughly equivalent to a dtb) to address
> 0x43000000, so I guess using the same for the dtb makes
> sense.
>
> - scriptaddr
>
> has historically been expected to be 0x44000000; some old boot
> scripts assume this address.
>
> - kernel_addr_r and ramdisk_addr_r
>
> Allwinner has historically loaded their kernels to 0x48000000
> (system specific kernels with all drivers compiled in, no initrd).
>
> Debian has been using 0x46000000 for the kernel and 0x48000000
> for the initrd. These values work well in practice, so I have
> used them in the patch, but if there are reasons to change them,
> I am happy to do so.
>
> Comments welcome :-).
Thanks for this patch, but this does the same as a series
I've already pending, see:
https://github.com/jwrdegoede/u-boot-sunxi/commits/next
I've not yet send a pull-request for this because it uses the new
generic $bootcmd support:
https://github.com/jwrdegoede/u-boot-sunxi/commit/34e421a155c83c52f6e6edb2594458af27ef7517
This commit has just been merged by Tom Rini, so right now
these patches are good to go. I'll send a pull-request for them
soon.
Let me know if somehow these patches won't work for Debian. One of the
goals of the generic $bootcmd support is that distributions can just
drop an extlinux.conf in the boot partition, and then u-boot will
automatically find it and do the right thing.
Regards,
Hans
next prev parent reply other threads:[~2014-08-11 16:22 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-10 21:00 [U-Boot] [RFC/PATCH] sunxi: Populate the default environment for sunxi-based systems Karsten Merker
2014-08-10 21:00 ` [U-Boot] [RFC/PATCH 1/1] " Karsten Merker
2014-08-11 16:22 ` Hans de Goede [this message]
2014-08-11 20:13 ` [U-Boot] [RFC/PATCH] " Karsten Merker
2014-08-18 16:54 ` Ian Campbell
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=53E8EDB1.9090206@redhat.com \
--to=hdegoede@redhat.com \
--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