From: Karsten Merker <merker@debian.org>
To: u-boot@lists.denx.de
Subject: [U-Boot] [RFC/PATCH] sunxi: Populate the default environment for sunxi-based systems
Date: Sun, 10 Aug 2014 23:00:58 +0200 [thread overview]
Message-ID: <1407704459-22942-1-git-send-email-merker@debian.org> (raw)
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 :-).
Regards,
Karsten
--
1.7.10.4
next reply other threads:[~2014-08-10 21:00 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-10 21:00 Karsten Merker [this message]
2014-08-10 21:00 ` [U-Boot] [RFC/PATCH 1/1] sunxi: Populate the default environment for sunxi-based systems Karsten Merker
2014-08-11 16:22 ` [U-Boot] [RFC/PATCH] " Hans de Goede
2014-08-11 20:13 ` 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=1407704459-22942-1-git-send-email-merker@debian.org \
--to=merker@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