Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Yann E. MORIN <yann.morin.1998@free.fr>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 2/5] board/raspberrypi: install Device Tree
Date: Wed, 18 Mar 2015 23:44:38 +0100	[thread overview]
Message-ID: <20150318224438.GB4578@free.fr> (raw)
In-Reply-To: <1426632719-4807-3-git-send-email-vivien.didelot@savoirfairelinux.com>

Vivien, All,

On 2015-03-17 18:51 -0400, Vivien Didelot spake thusly:
> Add a post-image script to Raspberry Pi configs with a Device Tree
> (raspberrypi_dt and raspberrypi2), which calls the mkknlimg tool on the
> resulting zImage kernel, in order to install the Device Tree as
> described in the board readme file.

No, it is not "installing" the device tree. It merely appends a marker
at the end of the kernel image.

That marker instructs the RPi bootloader that the kernel is Device Tree
aware, and thus the bootloader will load the device tree blobs; if the
marker is missing, the bootloader will not load a device tree blob, and
will pass ATAGS.

Regards,
Yann E. MORIN.

> Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
> ---
>  board/raspberrypi/post-image.sh  | 7 +++++++
>  configs/raspberrypi2_defconfig   | 1 +
>  configs/raspberrypi_dt_defconfig | 1 +
>  3 files changed, 9 insertions(+)
>  create mode 100755 board/raspberrypi/post-image.sh
> 
> diff --git a/board/raspberrypi/post-image.sh b/board/raspberrypi/post-image.sh
> new file mode 100755
> index 0000000..0d6f265
> --- /dev/null
> +++ b/board/raspberrypi/post-image.sh
> @@ -0,0 +1,7 @@
> +#!/bin/bash
> +
> +set -e
> +
> +# Call mkknlimg to install the Device Tree
> +"${HOST_DIR}/usr/bin/mkknlimg" "${BINARIES_DIR}/zImage" "${BINARIES_DIR}/zImage-dt"
> +mv "${BINARIES_DIR}/zImage-dt" "${BINARIES_DIR}/zImage"
> diff --git a/configs/raspberrypi2_defconfig b/configs/raspberrypi2_defconfig
> index b523a4a..3543307 100644
> --- a/configs/raspberrypi2_defconfig
> +++ b/configs/raspberrypi2_defconfig
> @@ -23,3 +23,4 @@ BR2_LINUX_KERNEL_ZIMAGE=y
>  # Install the DTB files, as the RPi2 uses the Device Tree
>  BR2_PACKAGE_RPI_FIRMWARE=y
>  BR2_PACKAGE_RPI_FIRMWARE_INSTALL_DTBS=y
> +BR2_ROOTFS_POST_IMAGE_SCRIPT="board/raspberrypi2/post-image.sh"
> diff --git a/configs/raspberrypi_dt_defconfig b/configs/raspberrypi_dt_defconfig
> index ca62084..0c203bf 100644
> --- a/configs/raspberrypi_dt_defconfig
> +++ b/configs/raspberrypi_dt_defconfig
> @@ -20,3 +20,4 @@ BR2_LINUX_KERNEL_ZIMAGE=y
>  # Install the DTB files
>  BR2_PACKAGE_RPI_FIRMWARE=y
>  BR2_PACKAGE_RPI_FIRMWARE_INSTALL_DTBS=y
> +BR2_ROOTFS_POST_IMAGE_SCRIPT="board/raspberrypi/post-image.sh"
> -- 
> 2.3.3
> 
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

  reply	other threads:[~2015-03-18 22:44 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-17 22:51 [Buildroot] [PATCH 0/5] media image generation Vivien Didelot
2015-03-17 22:51 ` [Buildroot] [PATCH 1/5] Makefile: add " Vivien Didelot
2015-03-19  0:04   ` Yann E. MORIN
2015-03-19  8:27     ` Thomas Petazzoni
2015-03-19  8:44       ` Yann E. MORIN
2015-03-19  9:19         ` Thomas Petazzoni
2015-03-19 17:37           ` Vivien Didelot
2015-03-19 18:25             ` Yann E. MORIN
2015-03-19 20:31               ` Vivien Didelot
2015-03-19 22:46                 ` Arnout Vandecappelle
2015-03-19 22:05     ` Arnout Vandecappelle
2015-03-17 22:51 ` [Buildroot] [PATCH 2/5] board/raspberrypi: install Device Tree Vivien Didelot
2015-03-18 22:44   ` Yann E. MORIN [this message]
2015-03-18 23:05     ` Vivien Didelot
2015-03-17 22:51 ` [Buildroot] [PATCH 3/5] board/raspberrypi: add a genimage config Vivien Didelot
2015-03-17 22:51 ` [Buildroot] [PATCH 4/5] board/beaglebone: " Vivien Didelot
2015-03-17 22:51 ` [Buildroot] [PATCH 5/5] board/wandboard: " Vivien Didelot
2015-03-19 22:57 ` [Buildroot] [PATCH 0/5] media image generation Arnout Vandecappelle
2015-03-20  0:52   ` Vivien Didelot

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=20150318224438.GB4578@free.fr \
    --to=yann.morin.1998@free.fr \
    --cc=buildroot@busybox.net \
    /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