[opensuse-arm] Request For Comment: new GRUB_DEVICETREE_FILE option for grub2
Hello all! I'm testing openSUSE (and SLES) on ARM64 servers and I ran into an issue with the default DT integrated into the UEFI of my server (this problem is investigated by Matthias Brugger). To workaround my problem, I had to load a custom DT using the 'devicetree' option of grub2. But the main problem is that I didn't find a way to add it properly in the grub.cfg file without hacking the file (which is very bad)! So, I've made a small patch to add a new option called GRUB_DEVICETREE_FILE in /etc/default/grub file. I also compiled a new grub2 version with this patch and tested it successfully on my servers (https://build.opensuse.org/package/show/home:ldevulde:branches:Base:System/g...). I opened a bug/fate on the official grub bugtracker (https://savannah.gnu.org/bugs/?48358) but it seems to have low activity... I plan to submit my change to the official openSUSE grub2 version but it could interesting to have some feedback before :-) PS: I know that a 'dtb' option exists in the kernel for loading a custom DT from efi but I wasn't able to make it work. And I think it's easier and more cleaner to use the grub2 option. Regards, Loic
Hi Loic, Am 12.07.2016 um 14:56 schrieb LOIC DEVULDER:
I'm testing openSUSE (and SLES) on ARM64 servers and I ran into an issue with the default DT integrated into the UEFI of my server (this problem is investigated by Matthias Brugger). To workaround my problem, I had to load a custom DT using the 'devicetree' option of grub2. But the main problem is that I didn't find a way to add it properly in the grub.cfg file without hacking the file (which is very bad)!
So, I've made a small patch to add a new option called GRUB_DEVICETREE_FILE in /etc/default/grub file. I also compiled a new grub2 version with this patch and tested it successfully on my servers (https://build.opensuse.org/package/show/home:ldevulde:branches:Base:System/g...).
Cool patch! I ran into the same limitation myself previously and resorted to duplicating a menu entry into custom.cfg. However, for the more frequent use case, a vanilla .dtb file specified via "devicetree" may be lacking firmware-supplied dynamic information. That brings up an unrelated thought: Alex, is there any chance that GRUB2 can cycle back through EFI to U-Boot and influence which fdt gets loaded based on menu selection? What I am thinking of is Raspberry Pi 2 with 4.1.19 vs. 4.6+ .dtb and switching between the two via GRUB being too complicated. I had thought about adding generating a devicetree line for grub.cfg but unlike extlinux GRUB doesn't have a dtbdir command apparently, so it always needs the full filename, not just the dir to search in. Is there an EFI callback when GRUB or Linux accesses the table the first time and do we have access to any efivars or the like to know what it's up to? :) Cheers, Andreas -- SUSE Linux GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany GF: Felix Imendörffer, Jane Smithard, Graham Norton HRB 21284 (AG Nürnberg) -- To unsubscribe, e-mail: opensuse-arm+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-arm+owner@opensuse.org
Cool patch! I ran into the same limitation myself previously and resorted to duplicating a menu entry into custom.cfg. Thanks! And I sees that I'm not alone in my pain :-p
However, for the more frequent use case, a vanilla .dtb file specified via "devicetree" may be lacking firmware-supplied dynamic information.
For some hardware yes (it's not the case for mine). Do you think it could accepted in the official openSUSE version? I'm not sure for official grub2 because of the non-response of a lot of request in the bugtracker at this time. For now I think it could be better than nothing :-) But, of course, if the changes you suggest can be done it could be a flexible way to do this than a static dtb file. Regards, Loic -- To unsubscribe, e-mail: opensuse-arm+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-arm+owner@opensuse.org
Hello all, FYI, I have open a fate for this: https://features.opensuse.org/321095 Regards, Loic ________________________________________ De : LOIC DEVULDER - U329683 Envoyé : mercredi 13 juillet 2016 15:20 À : Andreas Färber; Alexander Graf Cc : openSUSE ARM ML Objet : RE: [opensuse-arm] Request For Comment: new GRUB_DEVICETREE_FILE option for grub2
Cool patch! I ran into the same limitation myself previously and resorted to duplicating a menu entry into custom.cfg. Thanks! And I sees that I'm not alone in my pain :-p
However, for the more frequent use case, a vanilla .dtb file specified via "devicetree" may be lacking firmware-supplied dynamic information.
For some hardware yes (it's not the case for mine). Do you think it could accepted in the official openSUSE version? I'm not sure for official grub2 because of the non-response of a lot of request in the bugtracker at this time. For now I think it could be better than nothing :-) But, of course, if the changes you suggest can be done it could be a flexible way to do this than a static dtb file. Regards, Loic -- To unsubscribe, e-mail: opensuse-arm+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-arm+owner@opensuse.org
participants (2)
-
Andreas Färber
-
LOIC DEVULDER