* [Buildroot] dtb or dtsi ?
@ 2014-06-24 9:22 bruce bushby
2014-06-24 9:36 ` Thomas De Schampheleire
0 siblings, 1 reply; 4+ messages in thread
From: bruce bushby @ 2014-06-24 9:22 UTC (permalink / raw)
To: buildroot
Hi
Apologies if these are junior/lazy questions....but I've been struggling
for 5 days now :(
What is the difference between "dtb" and "dtsi"?
I find that buildroot appends ".dtb" to the name defined by:
BR2_LINUX_KERNEL_INTREE_DTS_NAME
rather then append "dtsi" ...what am I missing?
I feel I should be using
BR2_LINUX_KERNEL_INTREE_DTS_NAME="sun7i-a20.dtsi"
make[1]: Entering directory
`/disk/software/drone/buildroot/output/build/linux-a497c3ba1d97fc69c1e78e7b96435ba8c2cb42ee'
make[2]: *** No rule to make target `arch/arm/boot/dts/sun7i-a20.dtb'.
Stop.
make[1]: *** [sun7i-a20.dtb] Error 2
....Do I still need "fex" if i am using "dts"?
Running a find through an egrep shows a wild combination of dtb & dts files
together with various combinations of "d.pre.tmp"
[bruce at core buildroot]$ find . -name "*sun7i*" | egrep -i
"fex|dtb|dts|defconfig"
./output/images/sun7i-a20-olinuxino-micro.dtb
./output/build/linux-a497c3ba1d97fc69c1e78e7b96435ba8c2cb42ee/arch/arm/boot/dts/sun7i-a20-i12-tvbox.dts
./output/build/linux-a497c3ba1d97fc69c1e78e7b96435ba8c2cb42ee/arch/arm/boot/dts/sun7i-a20-olinuxino-micro.dtb
./output/build/linux-a497c3ba1d97fc69c1e78e7b96435ba8c2cb42ee/arch/arm/boot/dts/.sun7i-a20-olinuxino-micro.dtb.cmd
./output/build/linux-a497c3ba1d97fc69c1e78e7b96435ba8c2cb42ee/arch/arm/boot/dts/sun7i-a20-cubieboard2.dts
./output/build/linux-a497c3ba1d97fc69c1e78e7b96435ba8c2cb42ee/arch/arm/boot/dts/sun7i-a20-olinuxino-micro.dts
./output/build/linux-a497c3ba1d97fc69c1e78e7b96435ba8c2cb42ee/arch/arm/boot/dts/.sun7i-a20-olinuxino-micro.dtb.d.dtc.tmp
./output/build/linux-a497c3ba1d97fc69c1e78e7b96435ba8c2cb42ee/arch/arm/boot/dts/sun7i-a20-cubietruck.dts
./output/build/linux-a497c3ba1d97fc69c1e78e7b96435ba8c2cb42ee/arch/arm/boot/dts/.sun7i-a20-olinuxino-micro.dtb.dts.tmp
./output/build/linux-a497c3ba1d97fc69c1e78e7b96435ba8c2cb42ee/arch/arm/boot/dts/sun7i-a20.dtsi
./output/build/linux-a497c3ba1d97fc69c1e78e7b96435ba8c2cb42ee/arch/arm/boot/dts/.sun7i-a20-olinuxino-micro.dtb.d.pre.tmp
./output/build/linux-headers-3.15.1/arch/arm/boot/dts/sun7i-a20-cubieboard2.dts
./output/build/linux-headers-3.15.1/arch/arm/boot/dts/sun7i-a20-olinuxino-micro.dts
./output/build/linux-headers-3.15.1/arch/arm/boot/dts/sun7i-a20-cubietruck.dts
./output/build/linux-headers-3.15.1/arch/arm/boot/dts/sun7i-a20.dtsi
[bruce at core buildroot]$
Any ideas how I force buildroot to use my custom kernel for the kernel
headers? So far I've tried:
BR2_KERNEL_HEADERS_SNAP=y
BR2_LINUX_KERNEL_SAME_AS_HEADERS=y
Thanks
Bruce
My a20-som_defconfig:
(I copied cubieboard2_defconfig, thank you Carlo Caione!!!)
# Architecture
BR2_arm=y
BR2_cortex_a7=y
# System configuration
BR2_TARGET_GENERIC_HOSTNAME="A20-SOM"
BR2_TARGET_GENERIC_ISSUE="Welcome to A20-SOM"
BR2_TARGET_GENERIC_GETTY=y
BR2_TARGET_GENERIC_GETTY_PORT="ttyS0"
BR2_ROOTFS_POST_IMAGE_SCRIPT="board/olimex/a20-som/post-build.sh"
# Toolchain
BR2_STRIP_sstrip=n
BR2_GCC_VERSION_4_9_X=y
BR2_TOOLCHAIN_BUILDROOT_LARGEFILE=y
BR2_TOOLCHAIN_BUILDROOT_INET_IPV6=n
# Additional tools
BR2_PACKAGE_HOST_SUNXI_TOOLS=y
BR2_PACKAGE_HOST_UBOOT_TOOLS=y
BR2_PACKAGE_SUNXI_TOOLS=y
BR2_PACKAGE_SUNXI_BOARDS=y
BR2_PACKAGE_SUNXI_BOARDS_FEX_FILE="a20/a20-olinuxino_micro.fex"
# Kernel headers
#BR2_LINUX_KERNEL_SAME_AS_HEADERS=y
#BR2_KERNEL_HEADERS_SNAP=y
# Kernel (master: 3.16.0 rc2)
BR2_LINUX_KERNEL=y
BR2_LINUX_KERNEL_VERSION="master"
BR2_LINUX_KERNEL_CUSTOM_GIT=y
BR2_LINUX_KERNEL_CUSTOM_REPO_URL="https://github.com/torvalds/linux.git"
BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION="a497c3ba1d97fc69c1e78e7b96435ba8c2cb42ee"
BR2_LINUX_KERNEL_PATCH="board/olimex/a20-som/kernel-patches/"
BR2_LINUX_KERNEL_DEFCONFIG="sunxi"
BR2_LINUX_KERNEL_UIMAGE_LOADADDR="0x40008000"
BR2_LINUX_KERNEL_APPENDED_UIMAGE=y
BR2_LINUX_KERNEL_APPENDED_DTB=y
BR2_LINUX_KERNEL_USE_INTREE_DTS=y
BR2_LINUX_KERNEL_INTREE_DTS_NAME="sun7i-a20-olinuxino-micro"
#BR2_LINUX_KERNEL_INTREE_DTS_NAME="sun7i-a20"
# Bootloaders (sunxi-next uboot provides PSCI for SMP )
BR2_TARGET_UBOOT=y
BR2_TARGET_UBOOT_BOARDNAME="Cubieboard2"
BR2_TARGET_UBOOT_CUSTOM_GIT=y
BR2_TARGET_UBOOT_VERSION="sunxi-next"
BR2_TARGET_UBOOT_CUSTOM_REPO_URL="
https://github.com/jwrdegoede/u-boot-sunxi.git"
BR2_TARGET_UBOOT_CUSTOM_REPO_VERSION="257ae94e88ff27dbd92018f17cd22b16b585e67d"
BR2_TARGET_UBOOT_FORMAT_BIN=y
BR2_TARGET_UBOOT_SPL=y
BR2_TARGET_UBOOT_SPL_NAME="u-boot-sunxi-with-spl.bin"
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20140624/fe7fc9bb/attachment.html>
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Buildroot] dtb or dtsi ?
2014-06-24 9:22 [Buildroot] dtb or dtsi ? bruce bushby
@ 2014-06-24 9:36 ` Thomas De Schampheleire
2014-06-24 20:29 ` Thomas Petazzoni
2014-06-24 20:47 ` bruce bushby
0 siblings, 2 replies; 4+ messages in thread
From: Thomas De Schampheleire @ 2014-06-24 9:36 UTC (permalink / raw)
To: buildroot
Hi Bruce,
On Tue, Jun 24, 2014 at 11:22 AM, bruce bushby <bruce.bushby@gmail.com> wrote:
> Hi
>
>
> Apologies if these are junior/lazy questions....but I've been struggling for
> 5 days now :(
>
> What is the difference between "dtb" and "dtsi"?
>
dtb = device tree blob
dts = device tree source
dtsi = like dts, but I think the 'i' is to indicate that this file is
supposed to be included in another dts(i) file.
The dtb is the compiled version of the dts(i).
>
> I find that buildroot appends ".dtb" to the name defined by:
> BR2_LINUX_KERNEL_INTREE_DTS_NAME
>
> rather then append "dtsi" ...what am I missing?
>
>
> I feel I should be using
> BR2_LINUX_KERNEL_INTREE_DTS_NAME="sun7i-a20.dtsi"
You should set a 'dts' file here, not dtsi. The dtsi is supposed to be
included from a toplevel dts file, and there exist make rules to
convert dts->dtb but not dtsi->dtb.
Note: the compilation step is done by dtc (device tree compiler).
>
>
> make[1]: Entering directory
> `/disk/software/drone/buildroot/output/build/linux-a497c3ba1d97fc69c1e78e7b96435ba8c2cb42ee'
> make[2]: *** No rule to make target `arch/arm/boot/dts/sun7i-a20.dtb'.
> Stop.
> make[1]: *** [sun7i-a20.dtb] Error 2
>
>
>
You should find/create the proper .dts file instead, then this step will work.
> ....Do I still need "fex" if i am using "dts"?
I suppose not. According to wikipedia fex is a proprietary alternative
to device trees, and so you shouldn't need both. I haven't worked with
fex nor allwinner before.
Best regards,
Thomas
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Buildroot] dtb or dtsi ?
2014-06-24 9:36 ` Thomas De Schampheleire
@ 2014-06-24 20:29 ` Thomas Petazzoni
2014-06-24 20:47 ` bruce bushby
1 sibling, 0 replies; 4+ messages in thread
From: Thomas Petazzoni @ 2014-06-24 20:29 UTC (permalink / raw)
To: buildroot
Bruce, Thomas,
On Tue, 24 Jun 2014 11:36:29 +0200, Thomas De Schampheleire wrote:
> > Apologies if these are junior/lazy questions....but I've been struggling for
> > 5 days now :(
> >
> > What is the difference between "dtb" and "dtsi"?
> >
>
> dtb = device tree blob
> dts = device tree source
> dtsi = like dts, but I think the 'i' is to indicate that this file is
> supposed to be included in another dts(i) file.
Correct, "dtsi" stands for Device Tree Source Include.
> The dtb is the compiled version of the dts(i).
Of a .dts. In general, .dtsi files are never used directly to build
a .dtb, instead it's a .dts (which potentially includes one or
several .dtsi) that is compiled into a .dtb.
> > I feel I should be using
> > BR2_LINUX_KERNEL_INTREE_DTS_NAME="sun7i-a20.dtsi"
>
> You should set a 'dts' file here, not dtsi. The dtsi is supposed to be
> included from a toplevel dts file, and there exist make rules to
> convert dts->dtb but not dtsi->dtb.
> Note: the compilation step is done by dtc (device tree compiler).
Generally speaking:
.dtsi => description of the processor/SoC hardware
.dts => description of a board hardware
(there are some exceptions to this rule, but that's the general
principle).
So indeed, using "sun7i-a20.dtsi" as the name for a Device Tree to be
used to boot a system doesn't make sense, because sun7i-a20 is a
processor/SoC, it's not a board. And there's no way to boot a kernel on
just a processor, you have to have a board around it on which the
processor/SoC and a bunch of other useful components such as some RAM,
flash and others are soldered.
> > ....Do I still need "fex" if i am using "dts"?
>
> I suppose not. According to wikipedia fex is a proprietary alternative
> to device trees, and so you shouldn't need both. I haven't worked with
> fex nor allwinner before.
Actually, it depends which kernel you're using. If you're using the
non-mainline kernel from the linux-sunxi folks (I think it's based on
3.4 currently), then you have to use fex. If you use a modern mainline
kernel (which has support for a number of features of the Allwinner
SoCs), then you must use a Device Tree.
Bruce, the most essential information is missing from your e-mail: on
which board do you want to run this system? If you tell us the
model/name of your board, we should fairly easily be able to tell you
which Device Tree to use. Here are the Allwinner A20 boards currently
supported in the linux mainline (as of 3.16-rc) :
$ ls -1 arch/arm/boot/dts/sun7i-a20*.dts
arch/arm/boot/dts/sun7i-a20-cubieboard2.dts
arch/arm/boot/dts/sun7i-a20-cubietruck.dts
arch/arm/boot/dts/sun7i-a20-i12-tvbox.dts
arch/arm/boot/dts/sun7i-a20-olinuxino-micro.dts
If you want to have a Buildroot configuration for one of these boards,
use:
* 'sunxi' as the name of the defconfig to use for the kernel
configuration
* one of 'sun7i-a20-cubieboard2', 'sun7i-a20-cubietruck',
'sun7i-a20-i12-tvbox' or 'sun7i-a20-olinuxino-micro' for the Device
Tree file name.
Best regards,
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Buildroot] dtb or dtsi ?
2014-06-24 9:36 ` Thomas De Schampheleire
2014-06-24 20:29 ` Thomas Petazzoni
@ 2014-06-24 20:47 ` bruce bushby
1 sibling, 0 replies; 4+ messages in thread
From: bruce bushby @ 2014-06-24 20:47 UTC (permalink / raw)
To: buildroot
Hi Thomas
Thank you for the explanation, makes a lot more sense now. It is as you say:
./output/build/linux-a497c3ba1d97fc69c1e78e7b96435ba8c2cb42ee/arch/arm/boot/dts/sun7i-a20-cubietruck.dts:/include/
"sun7i-a20.dtsi"
./output/build/linux-a497c3ba1d97fc69c1e78e7b96435ba8c2cb42ee/arch/arm/boot/dts/sun7i-a20-cubietruck.dts:/include/
"sunxi-common-regulators.dtsi"
the dts files include the dtsi files.
I looked a little closer at my error:
.... No rule to make target `arch/arm/boot/dts/sun7i-a20.dtb'
One look in the "dts" Makefile further explained things:
[bruce at core buildroot]$ cat
./output/build/linux-a497c3ba1d97fc69c1e78e7b96435ba8c2cb42ee/arch/arm/boot/dts/Makefile
| egrep "sun7|cub"
sun4i-a10-cubieboard.dtb \
sun7i-a20-cubieboard2.dtb \
sun7i-a20-cubietruck.dtb \
sun7i-a20-i12-tvbox.dtb \
sun7i-a20-olinuxino-micro.dtb
dove-cubox.dtb \
[bruce at core buildroot]$
Cheers
Bruce
On Tue, Jun 24, 2014 at 10:36 AM, Thomas De Schampheleire <
patrickdepinguin@gmail.com> wrote:
> Hi Bruce,
>
> On Tue, Jun 24, 2014 at 11:22 AM, bruce bushby <bruce.bushby@gmail.com>
> wrote:
> > Hi
> >
> >
> > Apologies if these are junior/lazy questions....but I've been struggling
> for
> > 5 days now :(
> >
> > What is the difference between "dtb" and "dtsi"?
> >
>
> dtb = device tree blob
> dts = device tree source
> dtsi = like dts, but I think the 'i' is to indicate that this file is
> supposed to be included in another dts(i) file.
>
> The dtb is the compiled version of the dts(i).
>
> >
> > I find that buildroot appends ".dtb" to the name defined by:
> > BR2_LINUX_KERNEL_INTREE_DTS_NAME
> >
> > rather then append "dtsi" ...what am I missing?
> >
> >
> > I feel I should be using
> > BR2_LINUX_KERNEL_INTREE_DTS_NAME="sun7i-a20.dtsi"
>
> You should set a 'dts' file here, not dtsi. The dtsi is supposed to be
> included from a toplevel dts file, and there exist make rules to
> convert dts->dtb but not dtsi->dtb.
> Note: the compilation step is done by dtc (device tree compiler).
>
> >
> >
> > make[1]: Entering directory
> >
> `/disk/software/drone/buildroot/output/build/linux-a497c3ba1d97fc69c1e78e7b96435ba8c2cb42ee'
> > make[2]: *** No rule to make target `arch/arm/boot/dts/sun7i-a20.dtb'.
> > Stop.
> > make[1]: *** [sun7i-a20.dtb] Error 2
> >
> >
> >
>
> You should find/create the proper .dts file instead, then this step will
> work.
>
>
> > ....Do I still need "fex" if i am using "dts"?
>
> I suppose not. According to wikipedia fex is a proprietary alternative
> to device trees, and so you shouldn't need both. I haven't worked with
> fex nor allwinner before.
>
>
>
> Best regards,
> Thomas
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20140624/bf2b2851/attachment.html>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-06-24 20:47 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-06-24 9:22 [Buildroot] dtb or dtsi ? bruce bushby
2014-06-24 9:36 ` Thomas De Schampheleire
2014-06-24 20:29 ` Thomas Petazzoni
2014-06-24 20:47 ` bruce bushby
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox