[1/1] Odroid XU4: Hardkernel new board support

Message ID 1517655722-20132-1-git-send-email-pct@crookies.net
State Changes Requested
Headers show
Series
  • [1/1] Odroid XU4: Hardkernel new board support
Related show

Commit Message

Pierre Crokaert Feb. 3, 2018, 11:02 a.m.
This patch provides support for the board Odroid XU4
This version is using the latest 4.9 kernel released by Hardkernel,
and the current u-boot 2017.05 also from Hardkernel.
The support was implemented based on comments about Andi's patch (https://patchwork.ozlabs.org/patch/640695/).

Signed-off-by: Pierre CROKAERT <pct@crookies.net>
---
 board/hardkernel/odroidxu4/boot.cmd                | 10 +++
 board/hardkernel/odroidxu4/boot.ini                |  5 ++
 board/hardkernel/odroidxu4/genimage.cfg            | 28 ++++++++
 .../odroidxu4/genimage_bootloader_fragment.cfg     | 29 +++++++++
 board/hardkernel/odroidxu4/post-image.sh           | 50 ++++++++++++++
 board/hardkernel/odroidxu4/readme.txt              | 76 ++++++++++++++++++++++
 configs/odroidxu4_defconfig                        | 28 ++++++++
 7 files changed, 226 insertions(+)
 create mode 100644 board/hardkernel/odroidxu4/boot.cmd
 create mode 100644 board/hardkernel/odroidxu4/boot.ini
 create mode 100644 board/hardkernel/odroidxu4/genimage.cfg
 create mode 100644 board/hardkernel/odroidxu4/genimage_bootloader_fragment.cfg
 create mode 100755 board/hardkernel/odroidxu4/post-image.sh
 create mode 100644 board/hardkernel/odroidxu4/readme.txt
 create mode 100644 configs/odroidxu4_defconfig

Comments

Thomas Petazzoni Feb. 14, 2018, 9:41 p.m. | #1
Hello Pierre,

On Sat,  3 Feb 2018 12:02:02 +0100, Pierre CROKAERT wrote:
> This patch provides support for the board Odroid XU4
> This version is using the latest 4.9 kernel released by Hardkernel,
> and the current u-boot 2017.05 also from Hardkernel.
> The support was implemented based on comments about Andi's patch (https://patchwork.ozlabs.org/patch/640695/).
> 
> Signed-off-by: Pierre CROKAERT <pct@crookies.net>

Thanks for working on this topic. However, there are still a few things
that I don't understand and/or that don't feel correct.

> diff --git a/board/hardkernel/odroidxu4/boot.cmd b/board/hardkernel/odroidxu4/boot.cmd
> new file mode 100644
> index 0000000..2fb4c16
> --- /dev/null
> +++ b/board/hardkernel/odroidxu4/boot.cmd
> @@ -0,0 +1,10 @@
> +setenv kernelname zImage;
> +setenv boot_kernel "setenv bootargs \"${console} root=/dev/mmcblk${mmcrootdev}p${mmcrootpart} rootfstype=${rootfstype} rootwait ${opts}\";
> +load mmc ${mmcbootdev}:${mmcbootpart} 0x40007FC0 '${kernelname}';
> +if load mmc ${mmcbootdev}:${mmcbootpart} 40800000 ${fdtfile}; then
> +	bootz 0x40007FC0 - 40800000;
> +else
> +	echo Warning! Booting without DTB: '${fdtfile}'!;
> +	bootz 0x40007FC0 -;
> +fi;"

Is this condition really needed? Aren't you always going to boot with a
DTB ?

> +run boot_kernel;
> \ No newline at end of file

Nit: please add a new line here.

> diff --git a/board/hardkernel/odroidxu4/genimage_bootloader_fragment.cfg b/board/hardkernel/odroidxu4/genimage_bootloader_fragment.cfg
> new file mode 100644
> index 0000000..a8e8379
> --- /dev/null
> +++ b/board/hardkernel/odroidxu4/genimage_bootloader_fragment.cfg

I don't see this file being used anywhere. Why isn't this done in
genimage.cfg itself ?

> diff --git a/board/hardkernel/odroidxu4/post-image.sh b/board/hardkernel/odroidxu4/post-image.sh
> new file mode 100755
> index 0000000..1722c4b
> --- /dev/null
> +++ b/board/hardkernel/odroidxu4/post-image.sh
> @@ -0,0 +1,50 @@
> +#!/bin/sh
> +
> +BOARD_DIR="$(dirname $0)"
> +GENIMAGE_CFG="${BOARD_DIR}/genimage.cfg"
> +GENIMAGE_TMP="${BUILD_DIR}/genimage.tmp"
> +
> +cp ${BOARD_DIR}/boot.ini ${BINARIES_DIR}/
> +
> +rm -rf "${GENIMAGE_TMP}"
> +
> +genimage                           \
> +	--rootpath "${TARGET_DIR}"     \
> +	--tmppath "${GENIMAGE_TMP}"    \
> +	--inputpath "${BINARIES_DIR}"  \
> +	--outputpath "${BINARIES_DIR}" \
> +	--config "${GENIMAGE_CFG}"
> +
> +#dd if=${BINARIES_DIR}/u-boot.bin of=${BINARIES_DIR}/sdcard.img bs=1 count=442 conv=sync,notrunc
> +#dd if=${BINARIES_DIR}/u-boot.bin of=${BINARIES_DIR}/sdcard.img bs=512 skip=1 seek=1 conv=fsync,notrunc

Those lines are commented, they should be removed.

> +
> +signed_bl1_position=0
> +bl2_position=30
> +uboot_position=62
> +tzsw_position=1502
> +device="${BINARIES_DIR}/sdcard.img"
> +uboot="${BINARIES_DIR}/u-boot-dtb.bin"
> +
> +env_position=2015
> +
> +#<BL1 fusing>
> +echo "BL1 fusing"
> +dd if=${BINARIES_DIR}/bl1.bin.hardkernel of=$device seek=$signed_bl1_position conv=fsync,notrunc
> +
> +#<BL2 fusing>
> +echo "BL2 fusing"
> +dd if=${BINARIES_DIR}/bl2.bin.hardkernel.720k_uboot of=$device seek=$bl2_position conv=fsync,notrunc
> +
> +#<u-boot fusing>
> +echo "u-boot fusing"
> +dd if=$uboot of=$device seek=$uboot_position conv=fsync,notrunc
> +
> +#<TrustZone S/W fusing>
> +echo "TrustZone S/W fusing"
> +dd if=${BINARIES_DIR}/tzsw.bin.hardkernel of=$device seek=$tzsw_position conv=fsync,notrunc
> +
> +#<u-boot env erase>
> +echo "u-boot env erase..."
> +dd if=/dev/zero of=$device seek=$env_position bs=512 count=32 conv=fsync,notrunc

Why are you doing all those dd invocations here instead of using a
genimage configuration file that will put all those images at the right
offset in the SD card image ?

> diff --git a/board/hardkernel/odroidxu4/readme.txt b/board/hardkernel/odroidxu4/readme.txt
> new file mode 100644
> index 0000000..24a0184
> --- /dev/null
> +++ b/board/hardkernel/odroidxu4/readme.txt
> @@ -0,0 +1,76 @@
> +Odroid XU-4 board with Samsung Exynos 5422 SoC
> +
> +Introduction
> +------------
> +
> +The Odroid XU 4 board is developed and shipped by Hrdkernel (hardkernel.com). It
> +uses the Samsung Exynos 5422 Soc.
> +
> +Odroid boot process
> +-------------------
> +
> +The odroid boot process requires three stages of boot plus trust zone:
> +
> +    boot level 1
> +
> +        |
> +        V
> +
> +    boot level 2
> +
> +        |
> +        V
> +
> +     u-boot
> +
> +and they need to be raw copied to the SD card in the following order:
> +
> +    +----------------+----------------+
> +    | boot level 1   | 1 block        |
> +    +----------------+----------------+
> +    | boot level 2   | 31 block       |
> +    +----------------+----------------+
> +    | u-boot         | 63 block       |
> +    +----------------+----------------+
> +    | trust zone     | 2111 block     |
> +    +----------------+----------------+
> +    | boot partition | 4096 block     |
> +    +----------------+----------------+

Are those "1 block", "31 block", etc. information the offset or the
size of each part ?

Do we really need this explained in the readme.txt, if the genimage.cfg
file already documents that ?

Thanks!

Thomas
Pierre Crokaert Feb. 15, 2018, 9:36 a.m. | #2
Hello Thomas,

Thank you for the quick feedback. My reply in the text:

2018-02-14 22:41 GMT+01:00 Thomas Petazzoni <thomas.petazzoni@bootlin.com>:

> Hello Pierre,
>
> On Sat,  3 Feb 2018 12:02:02 +0100, Pierre CROKAERT wrote:
> > This patch provides support for the board Odroid XU4
> > This version is using the latest 4.9 kernel released by Hardkernel,
> > and the current u-boot 2017.05 also from Hardkernel.
> > The support was implemented based on comments about Andi's patch (
> https://patchwork.ozlabs.org/patch/640695/).
> >
> > Signed-off-by: Pierre CROKAERT <pct@crookies.net>
>
> Thanks for working on this topic. However, there are still a few things
> that I don't understand and/or that don't feel correct.
>
> > diff --git a/board/hardkernel/odroidxu4/boot.cmd
> b/board/hardkernel/odroidxu4/boot.cmd
> > new file mode 100644
> > index 0000000..2fb4c16
> > --- /dev/null
> > +++ b/board/hardkernel/odroidxu4/boot.cmd
> > @@ -0,0 +1,10 @@
> > +setenv kernelname zImage;
> > +setenv boot_kernel "setenv bootargs \"${console}
> root=/dev/mmcblk${mmcrootdev}p${mmcrootpart} rootfstype=${rootfstype}
> rootwait ${opts}\";
> > +load mmc ${mmcbootdev}:${mmcbootpart} 0x40007FC0 '${kernelname}';
> > +if load mmc ${mmcbootdev}:${mmcbootpart} 40800000 ${fdtfile}; then
> > +     bootz 0x40007FC0 - 40800000;
> > +else
> > +     echo Warning! Booting without DTB: '${fdtfile}'!;
> > +     bootz 0x40007FC0 -;
> > +fi;"
>
> Is this condition really needed? Aren't you always going to boot with a
> DTB ?
>

Yes, in this buildroot context, the DTB will always be present. I can
remove these lines.
In the meantime, I have removed the boot.cmd and replaced it by a boot.ini
that is required to adjust some platform parameters (video,..). Should I
update the patch already or fix your comments first?


>
> > +run boot_kernel;
> > \ No newline at end of file
>
> Nit: please add a new line here.
>

Ok


>
> > diff --git a/board/hardkernel/odroidxu4/genimage_bootloader_fragment.cfg
> b/board/hardkernel/odroidxu4/genimage_bootloader_fragment.cfg
> > new file mode 100644
> > index 0000000..a8e8379
> > --- /dev/null
> > +++ b/board/hardkernel/odroidxu4/genimage_bootloader_fragment.cfg
>
> I don't see this file being used anywhere. Why isn't this done in
> genimage.cfg itself ?
>

This is actually not used, I have tried to put everything in the genimage
file, but I have a problem with the boot loader part.
Hardkernel provides 3 binary files via there uboot github site, the problem
is that the first 2 files actually overlap when you flash them, the second
one (bl2.bin) overlaps the first one (bl1.bin). I have described this in an
issue on github, but there is no reaction:
https://github.com/hardkernel/u-boot/issues/45
I suppose the end of bl1.bin is erased by bl2.bin and it works, but this is
black box.
Because of this overlap, genimage complains that there there is not enough
room for the first file (bl1.bin).
This is why I have used the "dd" command to flash all the bootloader files.
This  genimage_bootloader_fragment.cfg is the part that should go in the
genimage.cfg file if the blX.bin files were fixed.
Do you prefere to remove this file for now?


>
> > diff --git a/board/hardkernel/odroidxu4/post-image.sh
> b/board/hardkernel/odroidxu4/post-image.sh
> > new file mode 100755
> > index 0000000..1722c4b
> > --- /dev/null
> > +++ b/board/hardkernel/odroidxu4/post-image.sh
> > @@ -0,0 +1,50 @@
> > +#!/bin/sh
> > +
> > +BOARD_DIR="$(dirname $0)"
> > +GENIMAGE_CFG="${BOARD_DIR}/genimage.cfg"
> > +GENIMAGE_TMP="${BUILD_DIR}/genimage.tmp"
> > +
> > +cp ${BOARD_DIR}/boot.ini ${BINARIES_DIR}/
> > +
> > +rm -rf "${GENIMAGE_TMP}"
> > +
> > +genimage                           \
> > +     --rootpath "${TARGET_DIR}"     \
> > +     --tmppath "${GENIMAGE_TMP}"    \
> > +     --inputpath "${BINARIES_DIR}"  \
> > +     --outputpath "${BINARIES_DIR}" \
> > +     --config "${GENIMAGE_CFG}"
> > +
> > +#dd if=${BINARIES_DIR}/u-boot.bin of=${BINARIES_DIR}/sdcard.img bs=1
> count=442 conv=sync,notrunc
> > +#dd if=${BINARIES_DIR}/u-boot.bin of=${BINARIES_DIR}/sdcard.img bs=512
> skip=1 seek=1 conv=fsync,notrunc
>
> Those lines are commented, they should be removed.
>

Ok.


>
> > +
> > +signed_bl1_position=0
> > +bl2_position=30
> > +uboot_position=62
> > +tzsw_position=1502
> > +device="${BINARIES_DIR}/sdcard.img"
> > +uboot="${BINARIES_DIR}/u-boot-dtb.bin"
> > +
> > +env_position=2015
> > +
> > +#<BL1 fusing>
> > +echo "BL1 fusing"
> > +dd if=${BINARIES_DIR}/bl1.bin.hardkernel of=$device
> seek=$signed_bl1_position conv=fsync,notrunc
> > +
> > +#<BL2 fusing>
> > +echo "BL2 fusing"
> > +dd if=${BINARIES_DIR}/bl2.bin.hardkernel.720k_uboot of=$device
> seek=$bl2_position conv=fsync,notrunc
> > +
> > +#<u-boot fusing>
> > +echo "u-boot fusing"
> > +dd if=$uboot of=$device seek=$uboot_position conv=fsync,notrunc
> > +
> > +#<TrustZone S/W fusing>
> > +echo "TrustZone S/W fusing"
> > +dd if=${BINARIES_DIR}/tzsw.bin.hardkernel of=$device
> seek=$tzsw_position conv=fsync,notrunc
> > +
> > +#<u-boot env erase>
> > +echo "u-boot env erase..."
> > +dd if=/dev/zero of=$device seek=$env_position bs=512 count=32
> conv=fsync,notrunc
>
> Why are you doing all those dd invocations here instead of using a
> genimage configuration file that will put all those images at the right
> offset in the SD card image ?
>

Related to the bl1, bl2 files issue.


>
> > diff --git a/board/hardkernel/odroidxu4/readme.txt
> b/board/hardkernel/odroidxu4/readme.txt
> > new file mode 100644
> > index 0000000..24a0184
> > --- /dev/null
> > +++ b/board/hardkernel/odroidxu4/readme.txt
> > @@ -0,0 +1,76 @@
> > +Odroid XU-4 board with Samsung Exynos 5422 SoC
> > +
> > +Introduction
> > +------------
> > +
> > +The Odroid XU 4 board is developed and shipped by Hrdkernel (
> hardkernel.com). It
> > +uses the Samsung Exynos 5422 Soc.
> > +
> > +Odroid boot process
> > +-------------------
> > +
> > +The odroid boot process requires three stages of boot plus trust zone:
> > +
> > +    boot level 1
> > +
> > +        |
> > +        V
> > +
> > +    boot level 2
> > +
> > +        |
> > +        V
> > +
> > +     u-boot
> > +
> > +and they need to be raw copied to the SD card in the following order:
> > +
> > +    +----------------+----------------+
> > +    | boot level 1   | 1 block        |
> > +    +----------------+----------------+
> > +    | boot level 2   | 31 block       |
> > +    +----------------+----------------+
> > +    | u-boot         | 63 block       |
> > +    +----------------+----------------+
> > +    | trust zone     | 2111 block     |
> > +    +----------------+----------------+
> > +    | boot partition | 4096 block     |
> > +    +----------------+----------------+
>
> Are those "1 block", "31 block", etc. information the offset or the
> size of each part ?
>
> Do we really need this explained in the readme.txt, if the genimage.cfg
> file already documents that ?
>

Right, this could be removed, it is historical but useless.


>
> Thanks!
>
> Thomas
> --
> Thomas Petazzoni, CTO, Bootlin (formerly Free Electrons)
> Embedded Linux and Kernel engineering
> http://bootlin.com
>
<div dir="ltr">Hello Thomas,<div><br></div><div>Thank you for the quick feedback. My reply in the text:<br><div class="gmail_extra"><br><div class="gmail_quote">2018-02-14 22:41 GMT+01:00 Thomas Petazzoni <span dir="ltr">&lt;<a href="mailto:thomas.petazzoni@bootlin.com" target="_blank">thomas.petazzoni@bootlin.com</a>&gt;</span>:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hello Pierre,<br>
<br>
On Sat,  3 Feb 2018 12:02:02 +0100, Pierre CROKAERT wrote:<br>
&gt; This patch provides support for the board Odroid XU4<br>
&gt; This version is using the latest 4.9 kernel released by Hardkernel,<br>
&gt; and the current u-boot 2017.05 also from Hardkernel.<br>
&gt; The support was implemented based on comments about Andi&#39;s patch (<a href="https://patchwork.ozlabs.org/patch/640695/" rel="noreferrer" target="_blank">https://patchwork.ozlabs.org/<wbr>patch/640695/</a>).<br>
&gt;<br>
&gt; Signed-off-by: Pierre CROKAERT &lt;<a href="mailto:pct@crookies.net">pct@crookies.net</a>&gt;<br>
<br>
Thanks for working on this topic. However, there are still a few things<br>
that I don&#39;t understand and/or that don&#39;t feel correct.<br>
<br>
&gt; diff --git a/board/hardkernel/odroidxu4/<wbr>boot.cmd b/board/hardkernel/odroidxu4/<wbr>boot.cmd<br>
&gt; new file mode 100644<br>
&gt; index 0000000..2fb4c16<br>
&gt; --- /dev/null<br>
&gt; +++ b/board/hardkernel/odroidxu4/<wbr>boot.cmd<br>
&gt; @@ -0,0 +1,10 @@<br>
&gt; +setenv kernelname zImage;<br>
&gt; +setenv boot_kernel &quot;setenv bootargs \&quot;${console} root=/dev/mmcblk${mmcrootdev}<wbr>p${mmcrootpart} rootfstype=${rootfstype} rootwait ${opts}\&quot;;<br>
&gt; +load mmc ${mmcbootdev}:${mmcbootpart} 0x40007FC0 &#39;${kernelname}&#39;;<br>
&gt; +if load mmc ${mmcbootdev}:${mmcbootpart} 40800000 ${fdtfile}; then<br>
&gt; +     bootz 0x40007FC0 - 40800000;<br>
&gt; +else<br>
&gt; +     echo Warning! Booting without DTB: &#39;${fdtfile}&#39;!;<br>
&gt; +     bootz 0x40007FC0 -;<br>
&gt; +fi;&quot;<br>
<br>
Is this condition really needed? Aren&#39;t you always going to boot with a<br>
DTB ?<br></blockquote><div><br></div><div>Yes, in this buildroot context, the DTB will always be present. I can remove these lines.</div><div>In the meantime, I have removed the boot.cmd and replaced it by a boot.ini that is required to adjust some platform parameters (video,..). Should I update the patch already or fix your comments first?</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
&gt; +run boot_kernel;<br>
&gt; \ No newline at end of file<br>
<br>
Nit: please add a new line here.<br></blockquote><div><br></div><div>Ok</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
&gt; diff --git a/board/hardkernel/odroidxu4/<wbr>genimage_bootloader_fragment.<wbr>cfg b/board/hardkernel/odroidxu4/<wbr>genimage_bootloader_fragment.<wbr>cfg<br>
&gt; new file mode 100644<br>
&gt; index 0000000..a8e8379<br>
&gt; --- /dev/null<br>
&gt; +++ b/board/hardkernel/odroidxu4/<wbr>genimage_bootloader_fragment.<wbr>cfg<br>
<br>
I don&#39;t see this file being used anywhere. Why isn&#39;t this done in<br>
genimage.cfg itself ?<br></blockquote><div> </div><div>This is actually not used, I have tried to put everything in the genimage file, but I have a problem with the boot loader part.</div><div>Hardkernel provides 3 binary files via there uboot github site, the problem is that the first 2 files actually overlap when you flash them, the second one (bl2.bin) overlaps the first one (bl1.bin). I have described this in an issue on github, but there is no reaction: <a href="https://github.com/hardkernel/u-boot/issues/45">https://github.com/hardkernel/u-boot/issues/45</a></div><div>I suppose the end of bl1.bin is erased by bl2.bin and it works, but this is black box.</div><div>Because of this overlap, genimage complains that there there is not enough room for the first file (bl1.bin).</div><div>This is why I have used the &quot;dd&quot; command to flash all the bootloader files. </div><div>This  <span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">genimage_bootloader_fragment.</span><wbr style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial"><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">cfg is the part that should go in the genimage.cfg file if the blX.bin files were fixed.</span></div><div><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">Do you prefere to remove this file for now? </span></div><div>  </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
&gt; diff --git a/board/hardkernel/odroidxu4/<wbr>post-image.sh b/board/hardkernel/odroidxu4/<wbr>post-image.sh<br>
&gt; new file mode 100755<br>
&gt; index 0000000..1722c4b<br>
&gt; --- /dev/null<br>
&gt; +++ b/board/hardkernel/odroidxu4/<wbr>post-image.sh<br>
&gt; @@ -0,0 +1,50 @@<br>
&gt; +#!/bin/sh<br>
&gt; +<br>
&gt; +BOARD_DIR=&quot;$(dirname $0)&quot;<br>
&gt; +GENIMAGE_CFG=&quot;${BOARD_DIR}/<wbr>genimage.cfg&quot;<br>
&gt; +GENIMAGE_TMP=&quot;${BUILD_DIR}/<wbr>genimage.tmp&quot;<br>
&gt; +<br>
&gt; +cp ${BOARD_DIR}/boot.ini ${BINARIES_DIR}/<br>
&gt; +<br>
&gt; +rm -rf &quot;${GENIMAGE_TMP}&quot;<br>
&gt; +<br>
&gt; +genimage                           \<br>
&gt; +     --rootpath &quot;${TARGET_DIR}&quot;     \<br>
&gt; +     --tmppath &quot;${GENIMAGE_TMP}&quot;    \<br>
&gt; +     --inputpath &quot;${BINARIES_DIR}&quot;  \<br>
&gt; +     --outputpath &quot;${BINARIES_DIR}&quot; \<br>
&gt; +     --config &quot;${GENIMAGE_CFG}&quot;<br>
&gt; +<br>
&gt; +#dd if=${BINARIES_DIR}/u-boot.bin of=${BINARIES_DIR}/sdcard.img bs=1 count=442 conv=sync,notrunc<br>
&gt; +#dd if=${BINARIES_DIR}/u-boot.bin of=${BINARIES_DIR}/sdcard.img bs=512 skip=1 seek=1 conv=fsync,notrunc<br>
<br>
Those lines are commented, they should be removed.<br></blockquote><div><br></div><div>Ok.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
&gt; +<br>
&gt; +signed_bl1_position=0<br>
&gt; +bl2_position=30<br>
&gt; +uboot_position=62<br>
&gt; +tzsw_position=1502<br>
&gt; +device=&quot;${BINARIES_DIR}/<wbr>sdcard.img&quot;<br>
&gt; +uboot=&quot;${BINARIES_DIR}/u-<wbr>boot-dtb.bin&quot;<br>
&gt; +<br>
&gt; +env_position=2015<br>
&gt; +<br>
&gt; +#&lt;BL1 fusing&gt;<br>
&gt; +echo &quot;BL1 fusing&quot;<br>
&gt; +dd if=${BINARIES_DIR}/bl1.bin.<wbr>hardkernel of=$device seek=$signed_bl1_position conv=fsync,notrunc<br>
&gt; +<br>
&gt; +#&lt;BL2 fusing&gt;<br>
&gt; +echo &quot;BL2 fusing&quot;<br>
&gt; +dd if=${BINARIES_DIR}/bl2.bin.<wbr>hardkernel.720k_uboot of=$device seek=$bl2_position conv=fsync,notrunc<br>
&gt; +<br>
&gt; +#&lt;u-boot fusing&gt;<br>
&gt; +echo &quot;u-boot fusing&quot;<br>
&gt; +dd if=$uboot of=$device seek=$uboot_position conv=fsync,notrunc<br>
&gt; +<br>
&gt; +#&lt;TrustZone S/W fusing&gt;<br>
&gt; +echo &quot;TrustZone S/W fusing&quot;<br>
&gt; +dd if=${BINARIES_DIR}/tzsw.bin.<wbr>hardkernel of=$device seek=$tzsw_position conv=fsync,notrunc<br>
&gt; +<br>
&gt; +#&lt;u-boot env erase&gt;<br>
&gt; +echo &quot;u-boot env erase...&quot;<br>
&gt; +dd if=/dev/zero of=$device seek=$env_position bs=512 count=32 conv=fsync,notrunc<br>
<br>
Why are you doing all those dd invocations here instead of using a<br>
genimage configuration file that will put all those images at the right<br>
offset in the SD card image ?<br></blockquote><div><br></div><div>Related to the bl1, bl2 files issue.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
&gt; diff --git a/board/hardkernel/odroidxu4/<wbr>readme.txt b/board/hardkernel/odroidxu4/<wbr>readme.txt<br>
&gt; new file mode 100644<br>
&gt; index 0000000..24a0184<br>
&gt; --- /dev/null<br>
&gt; +++ b/board/hardkernel/odroidxu4/<wbr>readme.txt<br>
&gt; @@ -0,0 +1,76 @@<br>
&gt; +Odroid XU-4 board with Samsung Exynos 5422 SoC<br>
&gt; +<br>
&gt; +Introduction<br>
&gt; +------------<br>
&gt; +<br>
&gt; +The Odroid XU 4 board is developed and shipped by Hrdkernel (<a href="http://hardkernel.com" rel="noreferrer" target="_blank">hardkernel.com</a>). It<br>
&gt; +uses the Samsung Exynos 5422 Soc.<br>
&gt; +<br>
&gt; +Odroid boot process<br>
&gt; +-------------------<br>
&gt; +<br>
&gt; +The odroid boot process requires three stages of boot plus trust zone:<br>
&gt; +<br>
&gt; +    boot level 1<br>
&gt; +<br>
&gt; +        |<br>
&gt; +        V<br>
&gt; +<br>
&gt; +    boot level 2<br>
&gt; +<br>
&gt; +        |<br>
&gt; +        V<br>
&gt; +<br>
&gt; +     u-boot<br>
&gt; +<br>
&gt; +and they need to be raw copied to the SD card in the following order:<br>
&gt; +<br>
&gt; +    +----------------+------------<wbr>----+<br>
&gt; +    | boot level 1   | 1 block        |<br>
&gt; +    +----------------+------------<wbr>----+<br>
&gt; +    | boot level 2   | 31 block       |<br>
&gt; +    +----------------+------------<wbr>----+<br>
&gt; +    | u-boot         | 63 block       |<br>
&gt; +    +----------------+------------<wbr>----+<br>
&gt; +    | trust zone     | 2111 block     |<br>
&gt; +    +----------------+------------<wbr>----+<br>
&gt; +    | boot partition | 4096 block     |<br>
&gt; +    +----------------+------------<wbr>----+<br>
<br>
Are those &quot;1 block&quot;, &quot;31 block&quot;, etc. information the offset or the<br>
size of each part ?<br>
<br>
Do we really need this explained in the readme.txt, if the genimage.cfg<br>
file already documents that ?<br></blockquote><div><br></div><div>Right, this could be removed, it is historical but useless.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
Thanks!<br>
<span class="gmail-HOEnZb"><font color="#888888"><br>
Thomas<br>
--<br>
Thomas Petazzoni, CTO, Bootlin (formerly Free Electrons)<br>
Embedded Linux and Kernel engineering<br>
<a href="http://bootlin.com" rel="noreferrer" target="_blank">http://bootlin.com</a><br>
</font></span></blockquote></div><br></div></div></div>
Thomas Petazzoni Feb. 15, 2018, 9:51 a.m. | #3
Hello,

On Thu, 15 Feb 2018 10:36:11 +0100, Pierre Crokaert wrote:

> > Is this condition really needed? Aren't you always going to boot with a
> > DTB ?
> 
> Yes, in this buildroot context, the DTB will always be present. I can
> remove these lines.
> In the meantime, I have removed the boot.cmd and replaced it by a boot.ini
> that is required to adjust some platform parameters (video,..). Should I
> update the patch already or fix your comments first?

It would be better to fix all comments.

> This is actually not used, I have tried to put everything in the genimage
> file, but I have a problem with the boot loader part.
> Hardkernel provides 3 binary files via there uboot github site, the problem
> is that the first 2 files actually overlap when you flash them, the second
> one (bl2.bin) overlaps the first one (bl1.bin). I have described this in an
> issue on github, but there is no reaction:
> https://github.com/hardkernel/u-boot/issues/45
> I suppose the end of bl1.bin is erased by bl2.bin and it works, but this is
> black box.
> Because of this overlap, genimage complains that there there is not enough
> room for the first file (bl1.bin).
> This is why I have used the "dd" command to flash all the bootloader files.
> This  genimage_bootloader_fragment.cfg is the part that should go in the
> genimage.cfg file if the blX.bin files were fixed.
> Do you prefere to remove this file for now?

OK, I understand the problem (it would have been good to explain it in
the commit log!). Since you say that overwriting bl1.bin with bl2 works
fine, then what I suggest is that in your post-build script, you do
something like this:

	truncate -s 15360 $(BINARIES_DIR)/bl1.bin

Then, you can use genimage correctly for everything, including the
bootloader parts. Of course, please add a comment above this "truncate"
line which explains the problem, and points to
https://github.com/hardkernel/u-boot/issues/45.

Thanks!

Thomas
Pierre Crokaert Feb. 24, 2018, 5:06 p.m. | #4
Hello Thomas,

I have posted an update including all the changes requested (also using
only genimage).
Just needed to do an additional validation and the "truncate" command works.
The patch is here: https://patchwork.ozlabs.org/patch/874005/
REM: I don't know exactly when/how to send a new patch in response to a
discussed patch so maybe I do something wrong, just tell me if it's the
case.

Pierre

2018-02-15 10:51 GMT+01:00 Thomas Petazzoni <thomas.petazzoni@bootlin.com>:

> Hello,
>
> On Thu, 15 Feb 2018 10:36:11 +0100, Pierre Crokaert wrote:
>
> > > Is this condition really needed? Aren't you always going to boot with a
> > > DTB ?
> >
> > Yes, in this buildroot context, the DTB will always be present. I can
> > remove these lines.
> > In the meantime, I have removed the boot.cmd and replaced it by a
> boot.ini
> > that is required to adjust some platform parameters (video,..). Should I
> > update the patch already or fix your comments first?
>
> It would be better to fix all comments.
>
> > This is actually not used, I have tried to put everything in the genimage
> > file, but I have a problem with the boot loader part.
> > Hardkernel provides 3 binary files via there uboot github site, the
> problem
> > is that the first 2 files actually overlap when you flash them, the
> second
> > one (bl2.bin) overlaps the first one (bl1.bin). I have described this in
> an
> > issue on github, but there is no reaction:
> > https://github.com/hardkernel/u-boot/issues/45
> > I suppose the end of bl1.bin is erased by bl2.bin and it works, but this
> is
> > black box.
> > Because of this overlap, genimage complains that there there is not
> enough
> > room for the first file (bl1.bin).
> > This is why I have used the "dd" command to flash all the bootloader
> files.
> > This  genimage_bootloader_fragment.cfg is the part that should go in the
> > genimage.cfg file if the blX.bin files were fixed.
> > Do you prefere to remove this file for now?
>
> OK, I understand the problem (it would have been good to explain it in
> the commit log!). Since you say that overwriting bl1.bin with bl2 works
> fine, then what I suggest is that in your post-build script, you do
> something like this:
>
>         truncate -s 15360 $(BINARIES_DIR)/bl1.bin
>
> Then, you can use genimage correctly for everything, including the
> bootloader parts. Of course, please add a comment above this "truncate"
> line which explains the problem, and points to
> https://github.com/hardkernel/u-boot/issues/45.
>
> Thanks!
>
> Thomas
> --
> Thomas Petazzoni, CTO, Bootlin (formerly Free Electrons)
> Embedded Linux and Kernel engineering
> http://bootlin.com
>
<div dir="ltr">Hello Thomas,<div><br></div><div>I have posted an update including all the changes requested (also using only genimage).</div><div>Just needed to do an additional validation and the &quot;truncate&quot; command works.</div><div>The patch is here: <a href="https://patchwork.ozlabs.org/patch/874005/">https://patchwork.ozlabs.org/patch/874005/</a></div><div>REM: I don&#39;t know exactly when/how to send a new patch in response to a discussed patch so maybe I do something wrong, just tell me if it&#39;s the case.</div><div><br></div><div>Pierre</div></div><div class="gmail_extra"><br><div class="gmail_quote">2018-02-15 10:51 GMT+01:00 Thomas Petazzoni <span dir="ltr">&lt;<a href="mailto:thomas.petazzoni@bootlin.com" target="_blank">thomas.petazzoni@bootlin.com</a>&gt;</span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello,<br>
<br>
On Thu, 15 Feb 2018 10:36:11 +0100, Pierre Crokaert wrote:<br>
<br>
&gt; &gt; Is this condition really needed? Aren&#39;t you always going to boot with a<br>
&gt; &gt; DTB ?<br>
&gt;<br>
&gt; Yes, in this buildroot context, the DTB will always be present. I can<br>
&gt; remove these lines.<br>
&gt; In the meantime, I have removed the boot.cmd and replaced it by a boot.ini<br>
&gt; that is required to adjust some platform parameters (video,..). Should I<br>
&gt; update the patch already or fix your comments first?<br>
<br>
It would be better to fix all comments.<br>
<br>
&gt; This is actually not used, I have tried to put everything in the genimage<br>
&gt; file, but I have a problem with the boot loader part.<br>
&gt; Hardkernel provides 3 binary files via there uboot github site, the problem<br>
&gt; is that the first 2 files actually overlap when you flash them, the second<br>
&gt; one (bl2.bin) overlaps the first one (bl1.bin). I have described this in an<br>
&gt; issue on github, but there is no reaction:<br>
&gt; <a href="https://github.com/hardkernel/u-boot/issues/45" rel="noreferrer" target="_blank">https://github.com/hardkernel/<wbr>u-boot/issues/45</a><br>
&gt; I suppose the end of bl1.bin is erased by bl2.bin and it works, but this is<br>
&gt; black box.<br>
&gt; Because of this overlap, genimage complains that there there is not enough<br>
&gt; room for the first file (bl1.bin).<br>
&gt; This is why I have used the &quot;dd&quot; command to flash all the bootloader files.<br>
&gt; This  genimage_bootloader_fragment.<wbr>cfg is the part that should go in the<br>
&gt; genimage.cfg file if the blX.bin files were fixed.<br>
&gt; Do you prefere to remove this file for now?<br>
<br>
OK, I understand the problem (it would have been good to explain it in<br>
the commit log!). Since you say that overwriting bl1.bin with bl2 works<br>
fine, then what I suggest is that in your post-build script, you do<br>
something like this:<br>
<br>
        truncate -s 15360 $(BINARIES_DIR)/bl1.bin<br>
<br>
Then, you can use genimage correctly for everything, including the<br>
bootloader parts. Of course, please add a comment above this &quot;truncate&quot;<br>
line which explains the problem, and points to<br>
<a href="https://github.com/hardkernel/u-boot/issues/45" rel="noreferrer" target="_blank">https://github.com/hardkernel/<wbr>u-boot/issues/45</a>.<br>
<br>
Thanks!<br>
<span class="HOEnZb"><font color="#888888"><br>
Thomas<br>
--<br>
Thomas Petazzoni, CTO, Bootlin (formerly Free Electrons)<br>
Embedded Linux and Kernel engineering<br>
<a href="http://bootlin.com" rel="noreferrer" target="_blank">http://bootlin.com</a><br>
</font></span></blockquote></div><br></div>

Patch

diff --git a/board/hardkernel/odroidxu4/boot.cmd b/board/hardkernel/odroidxu4/boot.cmd
new file mode 100644
index 0000000..2fb4c16
--- /dev/null
+++ b/board/hardkernel/odroidxu4/boot.cmd
@@ -0,0 +1,10 @@ 
+setenv kernelname zImage;
+setenv boot_kernel "setenv bootargs \"${console} root=/dev/mmcblk${mmcrootdev}p${mmcrootpart} rootfstype=${rootfstype} rootwait ${opts}\";
+load mmc ${mmcbootdev}:${mmcbootpart} 0x40007FC0 '${kernelname}';
+if load mmc ${mmcbootdev}:${mmcbootpart} 40800000 ${fdtfile}; then
+	bootz 0x40007FC0 - 40800000;
+else
+	echo Warning! Booting without DTB: '${fdtfile}'!;
+	bootz 0x40007FC0 -;
+fi;"
+run boot_kernel;
\ No newline at end of file
diff --git a/board/hardkernel/odroidxu4/boot.ini b/board/hardkernel/odroidxu4/boot.ini
new file mode 100644
index 0000000..8a83a1a
--- /dev/null
+++ b/board/hardkernel/odroidxu4/boot.ini
@@ -0,0 +1,5 @@ 
+ODROIDXU-UBOOT-CONFIG
+ 
+load mmc 0:1 0x44000000 'boot.scr'
+source 0x44000000
+
diff --git a/board/hardkernel/odroidxu4/genimage.cfg b/board/hardkernel/odroidxu4/genimage.cfg
new file mode 100644
index 0000000..13d71cc
--- /dev/null
+++ b/board/hardkernel/odroidxu4/genimage.cfg
@@ -0,0 +1,28 @@ 
+image boot.vfat {
+	vfat {
+		files = {
+			"boot.ini",
+			"boot.scr",
+			"zImage",
+			"exynos5422-odroidxu4.dtb"
+		}
+	}
+	size = 129M
+}
+
+image sdcard.img {
+	hdimage {
+	}
+
+	partition vfat {
+		partition-type = 0xC
+		image = "boot.vfat"
+		offset = 2097152
+	}
+
+	partition rootfs {
+		partition-type = 0x83
+		image = "rootfs.ext4"
+		size = 1024M
+	}
+}
diff --git a/board/hardkernel/odroidxu4/genimage_bootloader_fragment.cfg b/board/hardkernel/odroidxu4/genimage_bootloader_fragment.cfg
new file mode 100644
index 0000000..a8e8379
--- /dev/null
+++ b/board/hardkernel/odroidxu4/genimage_bootloader_fragment.cfg
@@ -0,0 +1,29 @@ 
+	partition bl1 {
+		in-partition-table = "no"
+		image = "bl1.bin.hardkernel"
+		offset = 512
+		size = 15358
+	}
+
+	partition bl2 {
+		in-partition-table = "no"
+		image = "bl2.bin.hardkernel.720k_uboot"
+		offset = 15872
+		size = 16384
+	}
+
+	partition u-boot {
+		in-partition-table = "no"
+		image = "u-boot-dtb.bin"
+		offset = 32256
+		size = 720k
+	}
+
+	partition tzsw {
+		in-partition-table = "no"
+		image = "tzsw.bin.hardkernel"
+		offset = 769536
+		size = 256k
+	}
+
+
diff --git a/board/hardkernel/odroidxu4/post-image.sh b/board/hardkernel/odroidxu4/post-image.sh
new file mode 100755
index 0000000..1722c4b
--- /dev/null
+++ b/board/hardkernel/odroidxu4/post-image.sh
@@ -0,0 +1,50 @@ 
+#!/bin/sh
+
+BOARD_DIR="$(dirname $0)"
+GENIMAGE_CFG="${BOARD_DIR}/genimage.cfg"
+GENIMAGE_TMP="${BUILD_DIR}/genimage.tmp"
+
+cp ${BOARD_DIR}/boot.ini ${BINARIES_DIR}/
+
+rm -rf "${GENIMAGE_TMP}"
+
+genimage                           \
+	--rootpath "${TARGET_DIR}"     \
+	--tmppath "${GENIMAGE_TMP}"    \
+	--inputpath "${BINARIES_DIR}"  \
+	--outputpath "${BINARIES_DIR}" \
+	--config "${GENIMAGE_CFG}"
+
+#dd if=${BINARIES_DIR}/u-boot.bin of=${BINARIES_DIR}/sdcard.img bs=1 count=442 conv=sync,notrunc
+#dd if=${BINARIES_DIR}/u-boot.bin of=${BINARIES_DIR}/sdcard.img bs=512 skip=1 seek=1 conv=fsync,notrunc
+
+signed_bl1_position=0
+bl2_position=30
+uboot_position=62
+tzsw_position=1502
+device="${BINARIES_DIR}/sdcard.img"
+uboot="${BINARIES_DIR}/u-boot-dtb.bin"
+
+env_position=2015
+
+#<BL1 fusing>
+echo "BL1 fusing"
+dd if=${BINARIES_DIR}/bl1.bin.hardkernel of=$device seek=$signed_bl1_position conv=fsync,notrunc
+
+#<BL2 fusing>
+echo "BL2 fusing"
+dd if=${BINARIES_DIR}/bl2.bin.hardkernel.720k_uboot of=$device seek=$bl2_position conv=fsync,notrunc
+
+#<u-boot fusing>
+echo "u-boot fusing"
+dd if=$uboot of=$device seek=$uboot_position conv=fsync,notrunc
+
+#<TrustZone S/W fusing>
+echo "TrustZone S/W fusing"
+dd if=${BINARIES_DIR}/tzsw.bin.hardkernel of=$device seek=$tzsw_position conv=fsync,notrunc
+
+#<u-boot env erase>
+echo "u-boot env erase..."
+dd if=/dev/zero of=$device seek=$env_position bs=512 count=32 conv=fsync,notrunc
+
+
diff --git a/board/hardkernel/odroidxu4/readme.txt b/board/hardkernel/odroidxu4/readme.txt
new file mode 100644
index 0000000..24a0184
--- /dev/null
+++ b/board/hardkernel/odroidxu4/readme.txt
@@ -0,0 +1,76 @@ 
+Odroid XU-4 board with Samsung Exynos 5422 SoC
+
+Introduction
+------------
+
+The Odroid XU 4 board is developed and shipped by Hrdkernel (hardkernel.com). It
+uses the Samsung Exynos 5422 Soc.
+
+Odroid boot process
+-------------------
+
+The odroid boot process requires three stages of boot plus trust zone:
+
+    boot level 1
+
+        |
+        V
+
+    boot level 2
+
+        |
+        V
+
+     u-boot
+
+and they need to be raw copied to the SD card in the following order:
+
+    +----------------+----------------+
+    | boot level 1   | 1 block        |
+    +----------------+----------------+
+    | boot level 2   | 31 block       |
+    +----------------+----------------+
+    | u-boot         | 63 block       |
+    +----------------+----------------+
+    | trust zone     | 2111 block     |
+    +----------------+----------------+
+    | boot partition | 4096 block     |
+    +----------------+----------------+
+    | rootfs         |                |
+    +----------------+----------------+
+
+
+How to build it
+===============
+
+  $ make odroidxu4_defconfig
+
+Then you can edit the build options using
+
+  $ make menuconfig
+
+Compile all and build rootfs image:
+
+  $ make
+
+Note: you will need to have access to the network, since Buildroot will
+download the packages' sources.
+
+Result of the build
+-------------------
+
+After building, you should obtain all output files in output/images/
+
+
+How to write the SD card or eMMC
+================================
+
+Once the build process is finished you will have an image called "sdcard.img"
+in the output/images/ directory.
+
+Copy the bootable "sdcard.img" onto an SD card or eMMC with "dd":
+
+  $ sudo dd if=output/images/sdcard.img of=/dev/sdX
+
+Insert the SDcard into your ODROID-XU4, and power it up. Your new system
+should come up now.
diff --git a/configs/odroidxu4_defconfig b/configs/odroidxu4_defconfig
new file mode 100644
index 0000000..9feef3e
--- /dev/null
+++ b/configs/odroidxu4_defconfig
@@ -0,0 +1,28 @@ 
+BR2_arm=y
+BR2_cortex_a7=y
+BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_9=y
+BR2_ROOTFS_POST_IMAGE_SCRIPT="board/hardkernel/odroidxu4/post-image.sh"
+BR2_LINUX_KERNEL=y
+BR2_LINUX_KERNEL_CUSTOM_TARBALL=y
+BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="https://github.com/hardkernel/linux/archive/jenkins-deb_kernel_5422_4.9-73.tar.gz"
+BR2_LINUX_KERNEL_DEFCONFIG="odroidxu4"
+BR2_LINUX_KERNEL_DTS_SUPPORT=y
+BR2_LINUX_KERNEL_INTREE_DTS_NAME="exynos5422-odroidxu4"
+BR2_LINUX_KERNEL_INSTALL_TARGET=y
+BR2_TARGET_ROOTFS_EXT2=y
+BR2_TARGET_ROOTFS_EXT2_4=y
+BR2_TARGET_ROOTFS_EXT2_SIZE="1024M"
+# BR2_TARGET_ROOTFS_TAR is not set
+BR2_TARGET_UBOOT=y
+BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y
+BR2_TARGET_UBOOT_CUSTOM_GIT=y
+BR2_TARGET_UBOOT_CUSTOM_REPO_URL="https://github.com/hardkernel/u-boot.git"
+BR2_TARGET_UBOOT_CUSTOM_REPO_VERSION="88af53fbcef8386cb4d5f04c19f4b2bcb69e90ca"
+BR2_TARGET_UBOOT_BOARD_DEFCONFIG="odroid-xu4"
+BR2_TARGET_UBOOT_NEEDS_DTC=y
+BR2_TARGET_UBOOT_FORMAT_DTB_BIN=y
+BR2_TARGET_UBOOT_SPL=y
+BR2_TARGET_UBOOT_SPL_NAME="sd_fuse/bl1.bin.hardkernel sd_fuse/bl2.bin.hardkernel.720k_uboot sd_fuse/tzsw.bin.hardkernel "
+BR2_TARGET_UBOOT_BOOT_SCRIPT=y
+BR2_TARGET_UBOOT_BOOT_SCRIPT_SOURCE="board/hardkernel/odroidxu4/boot.cmd"
+BR2_PACKAGE_HOST_GENIMAGE=y