[U-Boot] [U-Boot,6/6] Pine64: rename defconfig

Hans de Goede hdegoede at redhat.com
Sun May 15 12:30:12 CEST 2016


On 04-05-16 23:15, Andre Przywara wrote:
> Rename the defconfig file for the Pine64 from pine64_plus_defconfig to
> pine64_defconfig.
> The differences between the two versions (more RAM and a different
> Ethernet PHY) don't justify two board versions, so lets stick with the
> generic name and try to differentiate between the versions at runtime
> if this is needed later.
> Signed-off-by: Andre Przywara <andre.przywara at arm.com>

So further down the thread there is some good discussion on

I would prefer to keep the name as is (and matching the dts name)
for now until this is sorted out.

As for the auto-detect discussion I'm all in favor of doing
auto-detect and having only one pine64 target in u-boot.

But I'm against the idea to pass the u-boot dtb into the kernel.

People will typically only install u-boot once and then get
kernel upgrades, including major version updates (Fedora does
this within a release, Debian on dist-upgrade) from their
distro, so we really want to stick with using the
dtb from the fdtdir entry in extlinux.conf

The way this sofar works for sunxi boards is that the chosen
entry in extlinux.conf sets the fdtdir and then u-boot determines
the dtb name to use, since it knows which board it is booting

So when we do autodetection, the thing todo would be for the
autodetect code to update the fdtfile environment variable
to be one of: "sun50i-a64-pine64-plus", "sun50i-a64-pine64",
"sun50i-a64-pine64-other-variant" (*).

And then upon booting u-boot will load $fdtdir/$fdtfile.

Let me give one example where this will be beneficial over
using a u-boot supplied dtb:

1) User installs u-boot today, using boot0 and other closed
bits + say Fedora 24.
2) In the future we add support for the csi camera
3) User gets newer kernel from Fedora, this comes with
an updated "sun50i-a64-pine64-plus.dtb" which includes the
necessary changes to enable the csi interface, csi interface
just works.

If u-boot where to supply the dtb, then the user would also
need to update u-boot, which is not part of the standard
yum / dnf / apt-get update process. Same for later enabling
hdmi output support, audio in/out, etc.

Note I'm not advocating to have different dtb-s, all sunxi
boards use the same dts files in u-boot and the kernel,
but the _kernel_ is considered the canonical source, and
for u-boot we simply sync the included dts files with the
kernel every now and then.

As an added advantage this keeps the ABI part of the dtb
between u-boot and the kernel really small, it basically
is just the $fdtfile name. Which means that if we mess up
some bindings we can chose to change them, we try to avoid
this but always using the dtb file bundled with the kernel
allows this.

The main argument for always using the dtb file bundled with
the kernel is to always get the latest new features (think
extended hw support) and bugfixes, without the user needing
to update the bootlader (which is something which is not
done automatically by the distro, unlike the kernel).



*) Note we will likely need something more then just that, since
e.g. some variants have an emmc and others do not and this is
relevant for u-boot itself

> ---
>  configs/pine64_defconfig      | 20 ++++++++++++++++++++
>  configs/pine64_plus_defconfig | 20 --------------------
>  2 files changed, 20 insertions(+), 20 deletions(-)
>  create mode 100644 configs/pine64_defconfig
>  delete mode 100644 configs/pine64_plus_defconfig
> diff --git a/configs/pine64_defconfig b/configs/pine64_defconfig
> new file mode 100644
> index 0000000..0977334
> --- /dev/null
> +++ b/configs/pine64_defconfig
> @@ -0,0 +1,20 @@
> +CONFIG_DRAM_ZQ=3881915
> +# CONFIG_VIDEO is not set
> +CONFIG_DEFAULT_DEVICE_TREE="sun50i-a64-pine64-plus"
> +# CONFIG_CMD_IMLS is not set
> +# CONFIG_CMD_FLASH is not set
> +# CONFIG_CMD_FPGA is not set
> diff --git a/configs/pine64_plus_defconfig b/configs/pine64_plus_defconfig
> deleted file mode 100644
> index 0977334..0000000
> --- a/configs/pine64_plus_defconfig
> +++ /dev/null
> @@ -1,20 +0,0 @@
> -CONFIG_DRAM_ZQ=3881915
> -# CONFIG_VIDEO is not set
> -CONFIG_DEFAULT_DEVICE_TREE="sun50i-a64-pine64-plus"
> -# CONFIG_CMD_IMLS is not set
> -# CONFIG_CMD_FLASH is not set
> -# CONFIG_CMD_FPGA is not set

More information about the U-Boot mailing list