On Mon, Mar 21, 2011 at 03:25:16AM -0600, Grant Likely wrote:
- Add packaging of .dtb files into linux-image-linaro-* packages.
Loic and I discussed putting them under /lib/dtb/`uname -r`/, but thinking about it more, it might make more sense to share the modules directory and use /lib/modules/`uname -r`/dtbs. The dtc tool needed
As the .dtb files will be naturally generated in the same kernel folder as kernel image sits, why do not we ship .dtb in the same folder as kernel image /boot?
to build the .dtbs is included with the kernel tree.
- Add relevant dtb files to boot partition in linaro-image tools
The .dtb files will be generated and shipped with unique name, which comes from .dts file name. But I intend to use the generic name, maybe something like board.dtb along with l-m-c, just like we use zImage and u-boot for all platforms in boot partition, so that l-m-c does not need to encode platform specific dtb filename.
Thoughts?
On Fri, Apr 01, 2011, Shawn Guo wrote:
As the .dtb files will be naturally generated in the same kernel folder as kernel image sits, why do not we ship .dtb in the same folder as kernel image /boot?
You could say the same of kernel modules; problem is that there might be many .dtbs and that would clutter /boot IMHO. So I think /lib is more sensible, but I'm open to hear good arguments!
The .dtb files will be generated and shipped with unique name, which comes from .dts file name. But I intend to use the generic name, maybe something like board.dtb along with l-m-c, just like we use zImage and u-boot for all platforms in boot partition, so that l-m-c does not need to encode platform specific dtb filename.
I don't think this would work in the upstream kernel or kernel packaging: the same linux-image.deb will provide support for multiple boards, for instance linux-image-mx51 supports for efikamx, efikasb, mx51evk, so the package needs to ship three .dtb files.
However, it will likely be needed to copy this dtb in a place where u-boot can read it, for instance in the boot partition probably as an u-boot image: uDeviceTree just like uImage, uInitrd etc.; I don't care too strongly about the name.
On Thu, Mar 31, 2011 at 11:41 AM, Loïc Minier loic.minier@linaro.org wrote:
On Fri, Apr 01, 2011, Shawn Guo wrote:
As the .dtb files will be naturally generated in the same kernel folder as kernel image sits, why do not we ship .dtb in the same folder as kernel image /boot?
Version numbers. If two kernel packages are installed, that means two sets of .dtb files. At the very least they would need to be in a subdirectory that encodes the 'uname -r' value.
You could say the same of kernel modules; problem is that there might be many .dtbs and that would clutter /boot IMHO. So I think /lib is more sensible, but I'm open to hear good arguments!
The .dtb files will be generated and shipped with unique name, which comes from .dts file name. But I intend to use the generic name, maybe something like board.dtb along with l-m-c, just like we use zImage and u-boot for all platforms in boot partition, so that l-m-c does not need to encode platform specific dtb filename.
I don't think this would work in the upstream kernel or kernel packaging: the same linux-image.deb will provide support for multiple boards, for instance linux-image-mx51 supports for efikamx, efikasb, mx51evk, so the package needs to ship three .dtb files.
right.
However, it will likely be needed to copy this dtb in a place where u-boot can read it, for instance in the boot partition probably as an u-boot image: uDeviceTree just like uImage, uInitrd etc.; I don't care too strongly about the name.
Yes; the .dtb for the specific board needs to be in the right place for u-boot to find it.
g.
On Thu, Mar 31, 2011, Grant Likely wrote:
As the .dtb files will be naturally generated in the same kernel folder as kernel image sits, why do not we ship .dtb in the same folder as kernel image /boot?
Version numbers. If two kernel packages are installed, that means two sets of .dtb files. At the very least they would need to be in a subdirectory that encodes the 'uname -r' value.
Version numbers aren't a problem in /boot though; we already deal with one vmlinuz-`uname -r` file per kernel in /boot (and abi-*, config-*, initrd.img-*, System.map-*, vmcoreinfo-*).
On Thu, 2011-03-31 at 19:41 +0200, Loïc Minier wrote: [...]
However, it will likely be needed to copy this dtb in a place where u-boot can read it, for instance in the boot partition probably as an u-boot image: uDeviceTree just like uImage, uInitrd etc.; I don't care too strongly about the name.
I would suggest we don't use a 'u' prefix for the name of the device tree file as it doesn't have a U-Boot header, though its not really that important.
On Thu, Mar 31, 2011 at 07:41:53PM +0200, Loïc Minier wrote:
On Fri, Apr 01, 2011, Shawn Guo wrote:
As the .dtb files will be naturally generated in the same kernel folder as kernel image sits, why do not we ship .dtb in the same folder as kernel image /boot?
You could say the same of kernel modules; problem is that there might
Let me be more specific. We currently run 'make ARCH=arm mx51-babbage.dtb' to get mx51-babbage.dtb right in folder arch/arm/boot, which happens to where zImage sits. My point is since .dtb file is born in the same location as zImage and needs to be on boot partition just like zImage, we can get .dtb along with zImage during the packaging process. I do not think kernel modules are built out in where zImage sits and need to be on boot partition.
be many .dtbs and that would clutter /boot IMHO. So I think /lib is
With folder /boot/dtbs?
more sensible, but I'm open to hear good arguments!
The .dtb files will be generated and shipped with unique name, which comes from .dts file name. But I intend to use the generic name, maybe something like board.dtb along with l-m-c, just like we use zImage and u-boot for all platforms in boot partition, so that l-m-c does not need to encode platform specific dtb filename.
I don't think this would work in the upstream kernel or kernel
We use platform specific filename anyway in kernel.
packaging: the same linux-image.deb will provide support for multiple boards, for instance linux-image-mx51 supports for efikamx, efikasb, mx51evk, so the package needs to ship three .dtb files.
Ah, I forgot this. Then we need to carry on platform specific filename in l-m-c till we copy them into boot partition, where should have only one dtb file, and generic filename should work.
However, it will likely be needed to copy this dtb in a place where u-boot can read it, for instance in the boot partition probably as an u-boot image: uDeviceTree just like uImage, uInitrd etc.; I don't care too strongly about the name.
I will go 'board.dtb' if no one really cares :)
On Fri, Apr 01, 2011, Shawn Guo wrote:
With folder /boot/dtbs?
I don't really like "dtbs" because it limits to storing exactly dtb files; if it's "device-tree" it's more generic and could be used for other things like dts if needed.
I don't think it's impossible to put it in /boot; I'll let Grant argue for /boot versus /lib.
I don't know how other platforms do this, but certainly there must be prior art on powerpc or other arches which we might build on?