-
Notifications
You must be signed in to change notification settings - Fork 291
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Multiple device trees for OSTree deploying #1900
Comments
We do have the same problem and currently carry a rather hakish patch which copies all device tree's in the given source dir. However, checksum is not accounted for currently. I was thinking about this a bit more, and I think the best way to implement this would be to only support the new deployment model (in Further, I would suggest to use the folder name currently in use in the Fedora ARM port: With the new deployment format, we would just check if the currently supported location for a single file at If the folder is found, we would deploy the complete folder to @wmanley @cgwalters thoughts? If that sounds somewhat sane, I can create a pull request implementing this. |
Add support for a devicetree directory at /usr/lib/modules/$kver/dtb/. In ARM world a general purpose distribution often suppports multiple boards with a single operating system. However, OSTree currently only supports a single device tree, which does not allow to use the same OSTree on different ARM machines. In this scenario typically the boot loader selects the effective device tree. This adds device tree directory support for the new boot artefact location under /usr/lib/modules. If the file `devicetree` does not exist, then the folder dtb will be checked. All devicetrees are hashed into the deployment hash. This makes sure that even a single devicetree change leads to a new deployment and hence can be rolled back. The loader configuration has a new key "devicetreepath" which contains the path where devicetrees are stored. This is also written to the U-Boot variable "fdt_path". The boot loader is expected to use this path to load a particular machines device tree from. Closes: ostreedev#1900 Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
Add support for a devicetree directory at /usr/lib/modules/$kver/dtb/. In ARM world a general purpose distribution often suppports multiple boards with a single operating system. However, OSTree currently only supports a single device tree, which does not allow to use the same OSTree on different ARM machines. In this scenario typically the boot loader selects the effective device tree. This adds device tree directory support for the new boot artefact location under /usr/lib/modules. If the file `devicetree` does not exist, then the folder dtb will be checked. All devicetrees are hashed into the deployment hash. This makes sure that even a single devicetree change leads to a new deployment and hence can be rolled back. The loader configuration has a new key "devicetreepath" which contains the path where devicetrees are stored. This is also written to the U-Boot variable "fdt_path". The boot loader is expected to use this path to load a particular machines device tree from. Closes: ostreedev#1900 Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
Add support for a devicetree directory at /usr/lib/modules/$kver/dtb/. In ARM world a general purpose distribution often suppports multiple boards with a single operating system. However, OSTree currently only supports a single device tree, which does not allow to use the same OSTree on different ARM machines. In this scenario typically the boot loader selects the effective device tree. This adds device tree directory support for the new boot artefact location under /usr/lib/modules. If the file `devicetree` does not exist, then the folder dtb will be checked. All devicetrees are hashed into the deployment hash. This makes sure that even a single devicetree change leads to a new deployment and hence can be rolled back. The loader configuration has a new key "devicetreepath" which contains the path where devicetrees are stored. This is also written to the U-Boot variable "fdt_path". The boot loader is expected to use this path to load a particular machines device tree from. Closes: ostreedev#1900 Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
Add support for a devicetree directory at /usr/lib/modules/$kver/dtb/. In ARM world a general purpose distribution often suppports multiple boards with a single operating system. However, OSTree currently only supports a single device tree, which does not allow to use the same OSTree on different ARM machines. In this scenario typically the boot loader selects the effective device tree. This adds device tree directory support for the new boot artefact location under /usr/lib/modules. If the file `devicetree` does not exist, then the folder dtb will be checked. All devicetrees are hashed into the deployment hash. This makes sure that even a single devicetree change leads to a new deployment and hence can be rolled back. The loader configuration has a new key "devicetreepath" which contains the path where devicetrees are stored. This is also written to the U-Boot variable "fdt_path". The boot loader is expected to use this path to load a particular machines device tree from. Closes: ostreedev#1900 Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
Add support for a devicetree directory at /usr/lib/modules/$kver/dtb/. In ARM world a general purpose distribution often suppports multiple boards with a single operating system. However, OSTree currently only supports a single device tree, which does not allow to use the same OSTree on different ARM machines. In this scenario typically the boot loader selects the effective device tree. This adds device tree directory support for the new boot artefact location under /usr/lib/modules. If the file `devicetree` does not exist, then the folder dtb will be checked. All devicetrees are hashed into the deployment hash. This makes sure that even a single devicetree change leads to a new deployment and hence can be rolled back. The loader configuration has a new key "devicetreepath" which contains the path where devicetrees are stored. This is also written to the U-Boot variable "fdt_path". The boot loader is expected to use this path to load a particular machines device tree from. Closes: ostreedev#1900 Signed-off-by: Stefan Agner <stefan.agner@toradex.com> Rediff for https://phabricator.endlessm.com/T29416 Upstream: ostreedev#2001 https://phabricator.endlessm.com/T29416
Add support for a devicetree directory at /usr/lib/modules/$kver/dtb/. In ARM world a general purpose distribution often suppports multiple boards with a single operating system. However, OSTree currently only supports a single device tree, which does not allow to use the same OSTree on different ARM machines. In this scenario typically the boot loader selects the effective device tree. This adds device tree directory support for the new boot artefact location under /usr/lib/modules. If the file `devicetree` does not exist, then the folder dtb will be checked. All devicetrees are hashed into the deployment hash. This makes sure that even a single devicetree change leads to a new deployment and hence can be rolled back. The loader configuration has a new key "devicetreepath" which contains the path where devicetrees are stored. This is also written to the U-Boot variable "fdt_path". The boot loader is expected to use this path to load a particular machines device tree from. Closes: ostreedev#1900 Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
Add support for a devicetree directory at /usr/lib/modules/$kver/dtb/. In ARM world a general purpose distribution often suppports multiple boards with a single operating system. However, OSTree currently only supports a single device tree, which does not allow to use the same OSTree on different ARM machines. In this scenario typically the boot loader selects the effective device tree. This adds device tree directory support for the new boot artefact location under /usr/lib/modules. If the file `devicetree` does not exist, then the folder dtb will be checked. All devicetrees are hashed into the deployment hash. This makes sure that even a single devicetree change leads to a new deployment and hence can be rolled back. The loader configuration has a new key "devicetreepath" which contains the path where devicetrees are stored. This is also written to the U-Boot variable "fdtdir". The boot loader is expected to use this path to load a particular machines device tree from. Closes: ostreedev#1900 Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
Add support for a devicetree directory at /usr/lib/modules/$kver/dtb/. In ARM world a general purpose distribution often suppports multiple boards with a single operating system. However, OSTree currently only supports a single device tree, which does not allow to use the same OSTree on different ARM machines. In this scenario typically the boot loader selects the effective device tree. This adds device tree directory support for the new boot artefact location under /usr/lib/modules. If the file `devicetree` does not exist, then the folder dtb will be checked. All devicetrees are hashed into the deployment hash. This makes sure that even a single devicetree change leads to a new deployment and hence can be rolled back. The loader configuration has a new key "devicetreepath" which contains the path where devicetrees are stored. This is also written to the U-Boot variable "fdtdir". The boot loader is expected to use this path to load a particular machines device tree from. Closes: ostreedev#1900 Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
Thanks to William's effort. OSTree supports a device tree file for a single model of hardware since commit 720e2ec "Add support for devicetree files alongside the kernel and initramfs".
However, there are lots of embedded systems and single board computers in the world. Each of them has a specified device tree.
According to current mechanism, if we have "n" models of hardware, then we have "n" device trees and have to build "n" ostrees for installation and updating. This will be a big release management problem for common distributions.
Actually, this issue is already recognized by William of the existing functionality:
#1411
"It may be useful to extend device-tree support in a number ways in the future. Device trees depend on many details of the hardware they support. This makes them unlike kernels, which may support many different hardware variants as long as the instruction-set matches. This means that a ostree tree created with a device-tree in this manner will only boot on a single model of hardware. This is sufficient for my purposes, but may not be for others'."
This problem is particularly relevant now as Linux & Mesa mainline support for ARM boards is so much better than before, e.g. RPi, Rockchip, Amlogic. And as the list the names of all the different RPi3 device trees so that it's clear that the existing ostree implementation doesn't really work even if you only want to make a "Raspberry Pi 3" image.
The device tree source list of Raspberry Pi 3 in Linux mainline kernel:
arch/arm64/boot/dts/broadcom/bcm2837-rpi-3-a-plus.dts
arch/arm64/boot/dts/broadcom/bcm2837-rpi-3-b.dts
arch/arm64/boot/dts/broadcom/bcm2837-rpi-3-b-plus.dts
arch/arm64/boot/dts/broadcom/bcm2837-rpi-cm3-io3.dts
Besides, the device tree is closely linked to the kernel version, and should be updated whenever the kernel is updated. For example, Arch Linux ARM and Fedora aarch64 install the entire tree of built device trees directly alongside the kernel & initramfs, and then rely on the boot loader (u-boot) to select the right device tree
at boot time.
What is the best way forward to solving this limitation?
Perhaps the entire device tree folder hierarchy should be deployed
The text was updated successfully, but these errors were encountered: