Le 4 nov. 2015 12:03 PM, "Fu Wei" <fu....@linaro.org> a écrit : > > Hi Vladimir, > > > On 4 November 2015 at 18:47, Vladimir 'phcoder' Serbinenko > <phco...@gmail.com> wrote: > > > > Le 4 nov. 2015 10:48 AM, "Fu Wei" <fu....@linaro.org> a écrit : > >> > >> Hi Vladimir, > >> > >> Great thanks for your help :-) > >> > >> > >> On 4 November 2015 at 02:07, Vladimir 'phcoder' Serbinenko > >> <phco...@gmail.com> wrote: > >> > > >> > Le 3 nov. 2015 9:56 AM, <fu....@linaro.org> a écrit : > >> >> > >> >> From: Fu Wei <fu....@linaro.org> > >> >> > >> >> This patch goes with commit: > >> >> 4d0cb755387d6f109b901386ed4d3d475df239fe > >> >> arm64: Move FDT functions to separate module > >> >> > >> >> linux and xen_boot modules can't work without this patch. > >> >> > >> >> Signed-off-by: Fu Wei <fu....@linaro.org> > >> >> --- > >> >> grub-core/Makefile.core.def | 1 + > >> >> grub-core/loader/arm64/fdt.c | 5 +++++ > >> >> 2 files changed, 6 insertions(+) > >> >> > >> >> diff --git a/grub-core/Makefile.core.def b/grub-core/Makefile.core.def > >> >> index 2ef10d1..3ea4e49 100644 > >> >> --- a/grub-core/Makefile.core.def > >> >> +++ b/grub-core/Makefile.core.def > >> >> @@ -1674,6 +1674,7 @@ module = { > >> >> module = { > >> >> name = fdt; > >> >> arm64 = loader/arm64/fdt.c; > >> >> + fdt = lib/fdt.c; > >> >> enable = arm64; > >> >> }; > >> >> > >> > Please don't add same file to 2 different modules. Remove it from Linux > >> > module > >> > >> AFAIK, for now , only arm and arm64 are using lib/fdt.c > >> So please allow me to separate all the fdt code from > >> loader/arm/linux.c; just like arm64. > >> > > I don't think it's necessary at this point. Is xen_boot going to be > > available for 32-bit arm as well? > > No, it's only about fdt code, if I don't add > fdt = lib/fdt.c; > in fdt module, linux and xen_boot support won't work, once you > execute linux and xen_boot command on arm64, grub will crashdown. > At least I have tested this on ARMv8 Foundation model > > Did you try? Or maybe I did tests in the wrong way? If so, please correct me. > I understand your problem. I just mean than you should also change fdt = lib/fdt.c in linux module to arm = lib/fdt.c > Great thanks for your feedback :-) > > >> This patch may become a patchset :-) > >> > >> >> diff --git a/grub-core/loader/arm64/fdt.c > >> >> b/grub-core/loader/arm64/fdt.c > >> >> index 5202c14..d160ca0 100644 > >> >> --- a/grub-core/loader/arm64/fdt.c > >> >> +++ b/grub-core/loader/arm64/fdt.c > >> >> @@ -25,6 +25,10 @@ > >> >> #include <grub/file.h> > >> >> #include <grub/efi/efi.h> > >> >> > >> >> +GRUB_MOD_LICENSE ("GPLv3+"); > >> >> + > >> >> +static grub_dl_t my_mod; > >> >> + > >> > What's the reason for my_mod? > >> > >> this is for grub_dl_unref and grub_dl_ref. but I forgot to check this > >> again for this, sorry, > >> will add this later > >> > > Forget dl_ref and dl_unref. Linux module having a function reference is > > already good enough > > OK, will delete it > > >> >> static void *loaded_fdt; > >> >> static void *fdt; > >> >> > >> >> @@ -177,6 +181,7 @@ GRUB_MOD_INIT (fdt) > >> >> cmd_devicetree = > >> >> grub_register_command ("devicetree", grub_cmd_devicetree, 0, > >> >> N_("Load DTB file.")); > >> >> + my_mod = mod; > >> >> } > >> >> > >> >> GRUB_MOD_FINI (fdt) > >> >> -- > >> >> 2.4.3 > >> >> > >> > >> > >> > >> -- > >> Best regards, > >> > >> Fu Wei > >> Software Engineer > >> Red Hat Software (Beijing) Co.,Ltd.Shanghai Branch > >> Ph: +86 21 61221326(direct) > >> Ph: +86 186 2020 4684 (mobile) > >> Room 1512, Regus One Corporate Avenue,Level 15, > >> One Corporate Avenue,222 Hubin Road,Huangpu District, > >> Shanghai,China 200021 > > > > -- > Best regards, > > Fu Wei > Software Engineer > Red Hat Software (Beijing) Co.,Ltd.Shanghai Branch > Ph: +86 21 61221326(direct) > Ph: +86 186 2020 4684 (mobile) > Room 1512, Regus One Corporate Avenue,Level 15, > One Corporate Avenue,222 Hubin Road,Huangpu District, > Shanghai,China 200021
_______________________________________________ Grub-devel mailing list Grub-devel@gnu.org https://lists.gnu.org/mailman/listinfo/grub-devel