Bug#884003: FDT overlay support

2018-01-25 Thread Andre Heider

On 21/01/18 00:52, Vagrant Cascadian wrote:

On 2018-01-20, Vagrant Cascadian wrote:

On 2017-12-12, Andre Heider wrote:

Subject: [PATCH 05/10] bootscr.uboot-generic: support multiple prefixes to
  load from
Subject: [PATCH 06/10] beaglebone: clean up boot script


I might try to rework 5-6 with a slightly different approach.


Merged and pushed these too.


Nice, thanks!


Subject: [PATCH 07/10] Introduce user variable OVERLAYS
Subject: [PATCH 08/10] Add a hook to bootscr.uboot-generic for post fdt
  loading tasks
Subject: [PATCH 09/10] Introduce fdt overlay support
Subject: [PATCH 10/10] beaglebone: enable fdt overlay support


You said you had some changes to make to this, please re-submit the
updated remaining patches against current git master.


Yes, I'll do just that ;)

Regards,
Andre



Bug#884003: FDT overlay support

2018-01-20 Thread Vagrant Cascadian
On 2017-12-12, Andre Heider wrote:
> Subject: [PATCH 06/10] beaglebone: clean up boot script
>
> Use $fk_image_locations and distro compatible variable names, get rid
> of the duplicated code from bootscr.uboot-generic, and use that script
> additionally instead.
>
> Signed-off-by: Andre Heider 
> ---
>  bootscript/armhf/bootscr.beaglebone | 49 
> +
>  db/all.db   |  4 +--
>  2 files changed, 8 insertions(+), 45 deletions(-)
>
> diff --git a/bootscript/armhf/bootscr.beaglebone 
> b/bootscript/armhf/bootscr.beaglebone
> index edc1cd0..f04532d 100644
> --- a/bootscript/armhf/bootscr.beaglebone
> +++ b/bootscript/armhf/bootscr.beaglebone
...
> -if test "${devnum}" = ""
> -then
> -  setenv partition ${bootpart}
> -elif test "${distro_bootpart}" = ""
> -then
> -  # use partition provided by bootpart
> -  setenv partition ${devnum}:${bootpart}
> -else
> -  # use partition provided by distro_bootpart
> -  setenv partition ${devnum}:${distro_bootpart}
> +if test -z "${devtype}"; then
> +  setenv devtype "mmc"
>  fi
...
> +if test -z "${devnum}"; then
> +  setenv devnum ${bootpart}
>  fi

I just realized that the handling of bootpart is incorrect here...

Before distro_bootcmd support was added, bootpart sometimes contained
both a device number and a the partition:

  bootpart=0:1

Then, distro_bootcmd support was added, and it changed to:

  bootpart=1

But that broke legacy scripts, so distro_bootpart was added:

  distro_bootpart=1

This will result in this expanding incorrectly:

  load ${devtype} ${devnum}:${partition} 

To render as this in the legacy case:

  load mmc 0:1:0:1 


I haven't figured out in u-boot's shell how to extract parts of
variables, and we're dealing with legacy versions of
u-boot... so... hrm.

This is a similar problem with the legacy u-boot-sunxi support in the
bootscr.sunxi with the "partition" variable.

Supporting legacy u-boot variables is a tangled mess, but u-boot is
definitely something people might be hesitant to update, at risk of
bricking a system.


live well,
  vagrant


signature.asc
Description: PGP signature


Bug#884003: FDT overlay support

2018-01-20 Thread Vagrant Cascadian
On 2018-01-20, Vagrant Cascadian wrote:
> On 2017-12-12, Andre Heider wrote:
>> Subject: [PATCH 05/10] bootscr.uboot-generic: support multiple prefixes to
>>  load from
>> Subject: [PATCH 06/10] beaglebone: clean up boot script
>
> I might try to rework 5-6 with a slightly different approach.

Merged and pushed these too.


>> Subject: [PATCH 07/10] Introduce user variable OVERLAYS
>> Subject: [PATCH 08/10] Add a hook to bootscr.uboot-generic for post fdt
>>  loading tasks
>> Subject: [PATCH 09/10] Introduce fdt overlay support
>> Subject: [PATCH 10/10] beaglebone: enable fdt overlay support

You said you had some changes to make to this, please re-submit the
updated remaining patches against current git master.


live well,
  vagrant


signature.asc
Description: PGP signature


Bug#884003: FDT overlay support

2018-01-20 Thread Vagrant Cascadian
On 2017-12-12, Andre Heider wrote:
> I added the ability to concatenate multiple scripts/snippets for the 
> final boot script.

> Subject: [PATCH 01/10] bootscr.uboot-generic: quote bootargs
> Subject: [PATCH 02/10] Allow compiling scripts from $tmpdir
> Subject: [PATCH 03/10] Add support for multiple scripts sources
> Subject: [PATCH 04/10] odroid-u3: clean up boot script

I've merged patches 1-4 into git so far, implementing multiple boot
scripts and cleaning up the odroid boot script.

Of course, those were the easiest to merge... :)


> Subject: [PATCH 05/10] bootscr.uboot-generic: support multiple prefixes to
>  load from
> Subject: [PATCH 06/10] beaglebone: clean up boot script

I might try to rework 5-6 with a slightly different approach.


> Subject: [PATCH 07/10] Introduce user variable OVERLAYS
> Subject: [PATCH 08/10] Add a hook to bootscr.uboot-generic for post fdt
>  loading tasks
> Subject: [PATCH 09/10] Introduce fdt overlay support
> Subject: [PATCH 10/10] beaglebone: enable fdt overlay support

And reworking 5-6 may affect these, will explore that when I get
there...


live well,
  vagrant


signature.asc
Description: PGP signature


Bug#884003: FDT overlay support

2017-12-20 Thread Andre Heider

Hi Vagrant,

On 20/12/17 22:32, Vagrant Cascadian wrote:

On 2017-12-12, Andre Heider wrote:

I added the ability to concatenate multiple scripts/snippets for the
final boot script.
The new overlay handling snippet is supposed to be
used with this. But the feature itself also allows nice cleanups,
demonstrated on odroid-u3 and beaglebone (and there're quite some more
cleanups possible).


I very much like the idea of this; so many of the boot scripts
copy-and-paste a lot of code between them, which makes maintenence more
difficult as well as implementing features and changes across all the
boot scripts...


Yeah, the copypasta is the first thing I noticed after git cloning. I 
tried to make the overlay support universal. So the less duplication 
there is, the easier it'll get to reuse it.



Unfortunately, I haven't had a chance to do more than a very cursory
glance at your patches yet. Made some comments in-line on some of the
individual patches below.


Thanks for the first glance! There's no need to hurry, especially with 
xmas around the corner.



To test this, you need:
- u-boot with CONFIG_OF_LIBFDT_OVERLAY
- base dtb with symbols (-@)


Would the symbols (-@) be harmful to enable in Debian's kernels by
default?


That's the big question. I looked around and found 3 cases where 
distros/downstreams enable symbols, see [1], [2] and [3]. But those 3 
are in a different boat than debian: It's just per family of SoC.


I'm not sure if anything breaks if debian would enable it for its armhf 
multi platform build. I'm currently trying to find out with a solution 
appropriate for the upstream kernel [4], but I'm not sure if that pans out.



Is it feasible to use dtc to extract the .dts, rebuild it with -@, and
then use that .dtb instead... or does it need more information from the
original device tree(s)?


That's not going to work, without -@ the "__symbols__" node is missing. 
Without that an overlay can not reference e.g. the alias 'spi0'. You 
need the original dts to include these.



- your own overlays, again with symbols, in /boot/dtbs/overlays


Are there some very basic example overlays that would be feasible to just test 
that
this feature is working?

I don't have much experience with overlays, but have a beagleboneblack
and a CHIP that in theory support this, and some devices I can attach
that require overlays...

Will try to test myself sometime in the coming weeks.


Since I used a boneblack too, you can find my basic overlays attached. 
I'm not a device tree expert, so they might not be correct, but they're 
good enough to test this and see the results (especially since commit [5]).



From: Andre Heider 
Date: Tue, 12 Dec 2017 09:23:37 +0100
Subject: [PATCH 01/10] bootscr.uboot-generic: quote bootargs

Signed-off-by: Andre Heider 
---
  bootscript/all/bootscr.uboot-generic | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/bootscript/all/bootscr.uboot-generic 
b/bootscript/all/bootscr.uboot-generic
index db4066a..bcf6e96 100644
--- a/bootscript/all/bootscr.uboot-generic
+++ b/bootscript/all/bootscr.uboot-generic
@@ -25,7 +25,7 @@ if test -n "${console}"; then
setenv bootargs "${bootargs} console=${console}"
  fi
  
-setenv bootargs @@LINUX_KERNEL_CMDLINE_DEFAULTS@@ ${bootargs} @@LINUX_KERNEL_CMDLINE@@

+setenv bootargs "@@LINUX_KERNEL_CMDLINE_DEFAULTS@@ ${bootargs} 
@@LINUX_KERNEL_CMDLINE@@"
  @@UBOOT_ENV_EXTRA@@
  
  if test -z "${fk_kvers}"; then


Why is this needed?


It's not, I did that just to be consistent (see 3 lines above). Patch 
can be dropped if you disagree.



From: Andre Heider 
Date: Tue, 12 Dec 2017 09:25:26 +0100
Subject: [PATCH 05/10] bootscr.uboot-generic: support multiple prefixes to
  load from

Allow custom boot scripts to set $fk_image_locations as a list of
directories to load boot files from.

If unset, $prefix will be the used - which is sufficient for all recent
u-boot versions.

This allows the clean up of various custom boot scripts. Code borrowed
form the sunxi script.

Signed-off-by: Andre Heider 
---
  bootscript/all/bootscr.uboot-generic | 38 +---
  1 file changed, 27 insertions(+), 11 deletions(-)

diff --git a/bootscript/all/bootscr.uboot-generic 
b/bootscript/all/bootscr.uboot-generic
index bcf6e96..509efe7 100644
--- a/bootscript/all/bootscr.uboot-generic
+++ b/bootscript/all/bootscr.uboot-generic
@@ -48,14 +48,30 @@ else
setenv partition ${distro_bootpart}
  fi
  
-load ${devtype} ${devnum}:${partition} ${kernel_addr_r} ${prefix}vmlinuz-${fk_kvers} \

-&& load ${devtype} ${devnum}:${partition} ${fdt_addr_r} ${prefix}${fdtpath} \
-&& load ${devtype} ${devnum}:${partition} ${ramdisk_addr_r} 
${prefix}initrd.img-${fk_kvers} \
-&& echo "Booting Debian ${fk_kvers} from ${devtype} ${devnum}:${partition}..." 
\
-&& bootz ${kernel_addr_r} ${ramdisk_addr_r}:${filesize} ${fdt_addr_r}
-
-load ${devtype} 

Bug#884003: FDT overlay support

2017-12-20 Thread Vagrant Cascadian
On 2017-12-12, Andre Heider wrote:
> Attached a patch series with an implementation.

Thanks for the patches!


> I added the ability to concatenate multiple scripts/snippets for the 
> final boot script.
> The new overlay handling snippet is supposed to be 
> used with this. But the feature itself also allows nice cleanups, 
> demonstrated on odroid-u3 and beaglebone (and there're quite some more 
> cleanups possible).

I very much like the idea of this; so many of the boot scripts
copy-and-paste a lot of code between them, which makes maintenence more
difficult as well as implementing features and changes across all the
boot scripts...

Unfortunately, I haven't had a chance to do more than a very cursory
glance at your patches yet. Made some comments in-line on some of the
individual patches below.


> To test this, you need:
> - u-boot with CONFIG_OF_LIBFDT_OVERLAY
> - base dtb with symbols (-@)

Would the symbols (-@) be harmful to enable in Debian's kernels by
default?

Is it feasible to use dtc to extract the .dts, rebuild it with -@, and
then use that .dtb instead... or does it need more information from the
original device tree(s)?


> - your own overlays, again with symbols, in /boot/dtbs/overlays

Are there some very basic example overlays that would be feasible to just test 
that
this feature is working?

I don't have much experience with overlays, but have a beagleboneblack
and a CHIP that in theory support this, and some devices I can attach
that require overlays...

Will try to test myself sometime in the coming weeks.


> With e.g. foo.dtb and bar.dtb in /boot/dtbs/overlays you can then set 
> either set $fk_overlays on the u-boot prompt or OVERLAYS in 
> /etc/defaults/flash-kernel to "foo bar".
>
> Testing on beaglebone looks promising so far ;)

This is great!


> From efaadbd96967674f2fb82eb530dd447a6b5c65ba Mon Sep 17 00:00:00 2001
> From: Andre Heider 
> Date: Tue, 12 Dec 2017 09:23:37 +0100
> Subject: [PATCH 01/10] bootscr.uboot-generic: quote bootargs
>
> Signed-off-by: Andre Heider 
> ---
>  bootscript/all/bootscr.uboot-generic | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/bootscript/all/bootscr.uboot-generic 
> b/bootscript/all/bootscr.uboot-generic
> index db4066a..bcf6e96 100644
> --- a/bootscript/all/bootscr.uboot-generic
> +++ b/bootscript/all/bootscr.uboot-generic
> @@ -25,7 +25,7 @@ if test -n "${console}"; then
>setenv bootargs "${bootargs} console=${console}"
>  fi
>  
> -setenv bootargs @@LINUX_KERNEL_CMDLINE_DEFAULTS@@ ${bootargs} 
> @@LINUX_KERNEL_CMDLINE@@
> +setenv bootargs "@@LINUX_KERNEL_CMDLINE_DEFAULTS@@ ${bootargs} 
> @@LINUX_KERNEL_CMDLINE@@"
>  @@UBOOT_ENV_EXTRA@@
>  
>  if test -z "${fk_kvers}"; then

Why is this needed?


> From 8dd287741e23ea06c6a8e480ab1f24689d36bf9b Mon Sep 17 00:00:00 2001
> From: Andre Heider 
> Date: Tue, 12 Dec 2017 08:18:12 +0100
> Subject: [PATCH 03/10] Add support for multiple scripts sources
>
> Allow multiple entries in 'U-Boot-Script-Name' and concatenate them
> as the final boot script.
>
> Signed-off-by: Andre Heider 
> ---
>  functions | 6 +-
>  1 file changed, 5 insertions(+), 1 deletion(-)
...
> From 132dfdeb0e9a5a396ee543ee1386cb750929846f Mon Sep 17 00:00:00 2001
> From: Andre Heider 
> Date: Tue, 12 Dec 2017 09:12:28 +0100
> Subject: [PATCH 04/10] odroid-u3: clean up boot script
>
> bootscr.odroid first sets some compatibility variables and then contains
> a full copy of bootscr.uboot-generic.
>
> Get rid of the copy and use the multiple scripts feature instead. This
> results in the very same boot script.
>
> Signed-off-by: Andre Heider 
> ---
>  bootscript/armhf/bootscr.odroid | 63 
> -
>  db/all.db   |  2 +-
>  2 files changed, 1 insertion(+), 64 deletions(-)

Love these!


> From b29052bfe4deaf359635347e1e0fc559059067e9 Mon Sep 17 00:00:00 2001
> From: Andre Heider 
> Date: Tue, 12 Dec 2017 09:25:26 +0100
> Subject: [PATCH 05/10] bootscr.uboot-generic: support multiple prefixes to
>  load from
>
> Allow custom boot scripts to set $fk_image_locations as a list of
> directories to load boot files from.
>
> If unset, $prefix will be the used - which is sufficient for all recent
> u-boot versions.
>
> This allows the clean up of various custom boot scripts. Code borrowed
> form the sunxi script.
>
> Signed-off-by: Andre Heider 
> ---
>  bootscript/all/bootscr.uboot-generic | 38 
> +---
>  1 file changed, 27 insertions(+), 11 deletions(-)
>
> diff --git a/bootscript/all/bootscr.uboot-generic 
> b/bootscript/all/bootscr.uboot-generic
> index bcf6e96..509efe7 100644
> --- a/bootscript/all/bootscr.uboot-generic
> +++ b/bootscript/all/bootscr.uboot-generic
> @@ -48,14 +48,30 @@ else
>setenv partition ${distro_bootpart}
>  fi
>  
> -load 

Bug#884003: FDT overlay support

2017-12-18 Thread Andre Heider

The patches need a bit more work.

But before I do that, I'd like some feedback if this would be 
desirable/acceptable at all.


Let me know what you think,
Andre



Bug#884003: FDT overlay support

2017-12-12 Thread Andre Heider

Attached a patch series with an implementation.

I added the ability to concatenate multiple scripts/snippets for the 
final boot script. The new overlay handling snippet is supposed to be 
used with this. But the feature itself also allows nice cleanups, 
demonstrated on odroid-u3 and beaglebone (and there're quite some more 
cleanups possible).


To test this, you need:
- u-boot with CONFIG_OF_LIBFDT_OVERLAY
- base dtb with symbols (-@)
- your own overlays, again with symbols, in /boot/dtbs/overlays

With e.g. foo.dtb and bar.dtb in /boot/dtbs/overlays you can then set 
either set $fk_overlays on the u-boot prompt or OVERLAYS in 
/etc/defaults/flash-kernel to "foo bar".


Testing on beaglebone looks promising so far ;)
>From efaadbd96967674f2fb82eb530dd447a6b5c65ba Mon Sep 17 00:00:00 2001
From: Andre Heider 
Date: Tue, 12 Dec 2017 09:23:37 +0100
Subject: [PATCH 01/10] bootscr.uboot-generic: quote bootargs

Signed-off-by: Andre Heider 
---
 bootscript/all/bootscr.uboot-generic | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/bootscript/all/bootscr.uboot-generic b/bootscript/all/bootscr.uboot-generic
index db4066a..bcf6e96 100644
--- a/bootscript/all/bootscr.uboot-generic
+++ b/bootscript/all/bootscr.uboot-generic
@@ -25,7 +25,7 @@ if test -n "${console}"; then
   setenv bootargs "${bootargs} console=${console}"
 fi
 
-setenv bootargs @@LINUX_KERNEL_CMDLINE_DEFAULTS@@ ${bootargs} @@LINUX_KERNEL_CMDLINE@@
+setenv bootargs "@@LINUX_KERNEL_CMDLINE_DEFAULTS@@ ${bootargs} @@LINUX_KERNEL_CMDLINE@@"
 @@UBOOT_ENV_EXTRA@@
 
 if test -z "${fk_kvers}"; then
-- 
2.15.1

>From 8f3c0450c778901ba93a8dd8a918820f92d662d5 Mon Sep 17 00:00:00 2001
From: Andre Heider 
Date: Tue, 12 Dec 2017 08:16:26 +0100
Subject: [PATCH 02/10] Allow compiling scripts from $tmpdir

Append a suffix to the temporary file to ensure source != target

Signed-off-by: Andre Heider 
---
 functions | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/functions b/functions
index b2ae5be..ad53277 100644
--- a/functions
+++ b/functions
@@ -456,7 +456,7 @@ mkimage_script() {
 	local sdata="$3"
 	local script="$4"
 
-	local tdata="$tmpdir/$(basename $sdata)"
+	local tdata="$tmpdir/$(basename $sdata).out"
 
 	local ubootenv="$(mktemp --tmpdir=$tmpdir)"
 	gen_ubootenv > $ubootenv
-- 
2.15.1

>From 8dd287741e23ea06c6a8e480ab1f24689d36bf9b Mon Sep 17 00:00:00 2001
From: Andre Heider 
Date: Tue, 12 Dec 2017 08:18:12 +0100
Subject: [PATCH 03/10] Add support for multiple scripts sources

Allow multiple entries in 'U-Boot-Script-Name' and concatenate them
as the final boot script.

Signed-off-by: Andre Heider 
---
 functions | 6 +-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/functions b/functions
index ad53277..885413e 100644
--- a/functions
+++ b/functions
@@ -948,7 +948,11 @@ case "$method" in
 		fi
 		if [ -n "$boot_script_path" ]; then
 			boot_script_path="$boot_mnt_dir/$boot_script_path"
-			boot_script="$BOOTSCRIPTS_DIR/$usname"
+			boot_script="$tmpdir/bootscript"
+			for script in $usname ; do
+echo "\n#\n# flash-kernel: $script\n#\n" >> "$boot_script"
+cat "$BOOTSCRIPTS_DIR/$script" >> "$boot_script"
+			done
 			mkimage_script "$usaddr" "boot script" "$boot_script" \
 "$tmpdir/boot.scr"
 			boot_script="$tmpdir/boot.scr"
-- 
2.15.1

>From 132dfdeb0e9a5a396ee543ee1386cb750929846f Mon Sep 17 00:00:00 2001
From: Andre Heider 
Date: Tue, 12 Dec 2017 09:12:28 +0100
Subject: [PATCH 04/10] odroid-u3: clean up boot script

bootscr.odroid first sets some compatibility variables and then contains
a full copy of bootscr.uboot-generic.

Get rid of the copy and use the multiple scripts feature instead. This
results in the very same boot script.

Signed-off-by: Andre Heider 
---
 bootscript/armhf/bootscr.odroid | 63 -
 db/all.db   |  2 +-
 2 files changed, 1 insertion(+), 64 deletions(-)

diff --git a/bootscript/armhf/bootscr.odroid b/bootscript/armhf/bootscr.odroid
index b66aafc..7a46f6c 100644
--- a/bootscript/armhf/bootscr.odroid
+++ b/bootscript/armhf/bootscr.odroid
@@ -18,66 +18,3 @@ fi
 if test -z "${ramdisk_addr_r}" ; then
   setenv ramdisk_addr_r ${initrdaddr}
 fi
-
-# Bootscript using the new unified bootcmd handling
-# introduced with u-boot v2014.10, and patched into
-# the debian odroid target since 2016.03+dfsg1-5.
-#
-# Expects to be called with the following environment variables set:
-#
-#  devtype  e.g. mmc/scsi etc
-#  devnum   The device number of the given type
-#  bootpart The partition containing the boot files
-#  distro_bootpart  The partition containing the boot files
-#   (introduced in u-boot mainline 2016.01)
-#  prefix   Prefix within the boot partiion to the boot files
-#  

Bug#884003: FDT overlay support

2017-12-10 Thread Andre Heider

Source: flash-kernel
Severity: wishlist

Recent u-boot versions support fdt overlays. It can load a base dtb, 
apply various overlays to it, and pass the final device tree to the kernel.


To be able to use such overlays:
1) u-boot has to be compiled with CONFIG_OF_LIBFDT_OVERLAY
2) the base dtb has to be compiled with "-@" / "--symbols"
3) all overlays have to be compiled with "-@" / "--symbols"

1: already given for debian's u-boot for ti's beagle bone black, which 
is what I tested this on

2: not the default for the kernel dtb files, I used [1] as a quick hack
3: this should just be the user's responsibility for now (until there's 
a centralized repository or something debian could just package)


With the quick boot script [2] I can then successfully boot 
debian's kernel with applied overlays of my choosing.


That's great, especially since it's way to painful to just enable basic 
stuff like spi. Now we "just" need a way for flash-kernel to support it ;)


One way could be:
- overlays need to be in /boot/dtbs/overlays
- user sets a list of overlays in /etc/defaults/flash-kernel
  like "OVERLAYS=am335x-bone-black-disable-video 
am335x-bone-black-disable-audio am335x-bone-black-spidev0 
am335x-bone-black-spidev1"

- flash-kernel passes the list of overlays to it's u-boot boot script
- the boot script loads and applies all requested overlays

[1]
diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib
index 04b5633df1cf..e339d40c02d1 100644
--- a/scripts/Makefile.lib
+++ b/scripts/Makefile.lib
@@ -308,7 +308,7 @@ $(obj)/%.dtb.S: $(obj)/%.dtb
 quiet_cmd_dtc = DTC $@
 cmd_dtc = mkdir -p $(dir ${dtc-tmp}) ; \
$(CPP) $(dtc_cpp_flags) -x assembler-with-cpp -o $(dtc-tmp) $< ; \
-   $(DTC) -O dtb -o $@ -b 0 \
+   $(DTC) -@ -O dtb -o $@ -b 0 \
$(addprefix -i,$(dir $<) $(DTC_INCLUDE)) $(DTC_FLAGS) \
-d $(depfile).dtc.tmp $(dtc-tmp) ; \
cat $(depfile).pre.tmp $(depfile).dtc.tmp > $(depfile)

[2]
load mmc 1 $fdt_addr_r am335x-boneblack.dtb
fdt addr $fdt_addr_r
fdt resize 8192
load mmc 1 $ramdisk_addr_r am335x-bone-black-disable-video.dtb
fdt apply $ramdisk_addr_r
load mmc 1 $ramdisk_addr_r am335x-bone-black-disable-audio.dtb
fdt apply $ramdisk_addr_r
load mmc 1 $ramdisk_addr_r am335x-bone-black-spidev0.dtb
fdt apply $ramdisk_addr_r
load mmc 1 $ramdisk_addr_r am335x-bone-black-spidev1.dtb
fdt apply $ramdisk_addr_r
...