* Re: Fwd: boot kernel with append device tree
[not found] ` <CAOTEMUQt95XDorid8sj9FHkpCpUJYnqNeRbBU+33aLYz2oM+gw@mail.gmail.com>
@ 2016-11-07 7:49 ` Sascha Hauer
2016-11-07 8:25 ` Alex Vazquez
0 siblings, 1 reply; 6+ messages in thread
From: Sascha Hauer @ 2016-11-07 7:49 UTC (permalink / raw)
To: Alex Vazquez; +Cc: barebox
Hi Alex,
Added the list to Cc
Please configure your mailer to send plain text, then the server won't
reject your mails.
On Fri, Nov 04, 2016 at 01:10:30PM +0100, Alex Vazquez wrote:
> Hi, all!
> I have create a zImage with the device tree appended.
> I have removed oftree_loc in the configuration file.
> My problem is when I try to launch the kernel, it indicates that it has
> the device tree added but fails to boot.
>
> barebox:/# boot
> booting kernel from /dev/[1]nand0.kernel.bb
> Loading ARM Linux zImage '/dev/[2]nand0.kernel.bb'
> zImage: concatenated oftree detected
> commandline: console=ttyS0,115200 rw ip=none ...
> arch_number: 0
>
> If I don't removed oftree_loc in the configuration file. Load oftree
> (nand) and boot fine.
>
> barebox:/# boot
> booting kernel from /dev/[3]nand0.kernel.bb
> Loading ARM Linux zImage '/dev/[4]nand0.kernel.bb'
> zImage: concatenated oftree detected
> Loading devicetree from '/dev/[5]nand0.oftree.bb'
> commandline: console=ttyS0,115200 rw ip=none ...
> Booting Linux on physical CPU 0x0
>
> Do I have to configure something more in Barebox?
Which version are you using. Is it something older?
> Thanks!
> Regards!
> P.D
> I have enabled CONFIG_ARM_APPENDED_DTB and I create the new zimage with
> (cat zImage <filename>.dtb > zImage_w_dtb )
> P.D.2.
> I have a little problem and i can't send email to list.
>
> Delivery to the following recipient failed permanently:
> [6]barebox@lists.infradead.org
> Technical details of permanent failure:
> Google tried to deliver your message, but it was rejected by the server
> for the recipient domain [7]lists.infradead.org by
> [8]bombadil.infradead.org. [2001:1868:205::9].
> The error that the other server returned was:
> 550-Mailing lists do not accept HTML mail. See
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Sascha
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Fwd: boot kernel with append device tree
2016-11-07 7:49 ` Fwd: boot kernel with append device tree Sascha Hauer
@ 2016-11-07 8:25 ` Alex Vazquez
2016-11-07 9:48 ` Sascha Hauer
0 siblings, 1 reply; 6+ messages in thread
From: Alex Vazquez @ 2016-11-07 8:25 UTC (permalink / raw)
To: Sascha Hauer; +Cc: barebox
Hi Sasha!
> Which version are you using. Is it something older?
I am using barebox-2016.03.0
Regards!
2016-11-07 8:49 GMT+01:00 Sascha Hauer <s.hauer@pengutronix.de>:
> Hi Alex,
>
> Added the list to Cc
>
> Please configure your mailer to send plain text, then the server won't
> reject your mails.
>
> On Fri, Nov 04, 2016 at 01:10:30PM +0100, Alex Vazquez wrote:
>> Hi, all!
>> I have create a zImage with the device tree appended.
>> I have removed oftree_loc in the configuration file.
>> My problem is when I try to launch the kernel, it indicates that it has
>> the device tree added but fails to boot.
>>
>> barebox:/# boot
>> booting kernel from /dev/[1]nand0.kernel.bb
>> Loading ARM Linux zImage '/dev/[2]nand0.kernel.bb'
>> zImage: concatenated oftree detected
>> commandline: console=ttyS0,115200 rw ip=none ...
>> arch_number: 0
>>
>> If I don't removed oftree_loc in the configuration file. Load oftree
>> (nand) and boot fine.
>>
>> barebox:/# boot
>> booting kernel from /dev/[3]nand0.kernel.bb
>> Loading ARM Linux zImage '/dev/[4]nand0.kernel.bb'
>> zImage: concatenated oftree detected
>> Loading devicetree from '/dev/[5]nand0.oftree.bb'
>> commandline: console=ttyS0,115200 rw ip=none ...
>> Booting Linux on physical CPU 0x0
>>
>> Do I have to configure something more in Barebox?
>
> Which version are you using. Is it something older?
>
>> Thanks!
>> Regards!
>> P.D
>> I have enabled CONFIG_ARM_APPENDED_DTB and I create the new zimage with
>> (cat zImage <filename>.dtb > zImage_w_dtb )
>> P.D.2.
>> I have a little problem and i can't send email to list.
>>
>> Delivery to the following recipient failed permanently:
>> [6]barebox@lists.infradead.org
>> Technical details of permanent failure:
>> Google tried to deliver your message, but it was rejected by the server
>> for the recipient domain [7]lists.infradead.org by
>> [8]bombadil.infradead.org. [2001:1868:205::9].
>> The error that the other server returned was:
>> 550-Mailing lists do not accept HTML mail. See
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>
> Sascha
>
> --
> Pengutronix e.K. | |
> Industrial Linux Solutions | http://www.pengutronix.de/ |
> Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
> Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Fwd: boot kernel with append device tree
2016-11-07 8:25 ` Alex Vazquez
@ 2016-11-07 9:48 ` Sascha Hauer
2016-11-07 11:01 ` Alex Vazquez
0 siblings, 1 reply; 6+ messages in thread
From: Sascha Hauer @ 2016-11-07 9:48 UTC (permalink / raw)
To: Alex Vazquez; +Cc: barebox
On Mon, Nov 07, 2016 at 09:25:41AM +0100, Alex Vazquez wrote:
> Hi Sasha!
>
> > Which version are you using. Is it something older?
>
> I am using barebox-2016.03.0
>
>
> Regards!
>
> 2016-11-07 8:49 GMT+01:00 Sascha Hauer <s.hauer@pengutronix.de>:
> > Hi Alex,
> >
> > Added the list to Cc
> >
> > Please configure your mailer to send plain text, then the server won't
> > reject your mails.
> >
> > On Fri, Nov 04, 2016 at 01:10:30PM +0100, Alex Vazquez wrote:
> >> Hi, all!
> >> I have create a zImage with the device tree appended.
> >> I have removed oftree_loc in the configuration file.
> >> My problem is when I try to launch the kernel, it indicates that it has
> >> the device tree added but fails to boot.
> >>
> >> barebox:/# boot
> >> booting kernel from /dev/[1]nand0.kernel.bb
> >> Loading ARM Linux zImage '/dev/[2]nand0.kernel.bb'
> >> zImage: concatenated oftree detected
> >> commandline: console=ttyS0,115200 rw ip=none ...
> >> arch_number: 0
> >>
> >> If I don't removed oftree_loc in the configuration file. Load oftree
> >> (nand) and boot fine.
> >>
> >> barebox:/# boot
> >> booting kernel from /dev/[3]nand0.kernel.bb
> >> Loading ARM Linux zImage '/dev/[4]nand0.kernel.bb'
> >> zImage: concatenated oftree detected
> >> Loading devicetree from '/dev/[5]nand0.oftree.bb'
> >> commandline: console=ttyS0,115200 rw ip=none ...
> >> Booting Linux on physical CPU 0x0
Is CONFIG_OFTREE enabled in your build?
Sascha
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Fwd: boot kernel with append device tree
2016-11-07 9:48 ` Sascha Hauer
@ 2016-11-07 11:01 ` Alex Vazquez
2016-11-08 7:29 ` Sascha Hauer
0 siblings, 1 reply; 6+ messages in thread
From: Alex Vazquez @ 2016-11-07 11:01 UTC (permalink / raw)
To: Sascha Hauer; +Cc: barebox
> Is CONFIG_OFTREE enabled in your build?
Yes.
2016-11-07 10:48 GMT+01:00 Sascha Hauer <s.hauer@pengutronix.de>:
> On Mon, Nov 07, 2016 at 09:25:41AM +0100, Alex Vazquez wrote:
>> Hi Sasha!
>>
>> > Which version are you using. Is it something older?
>>
>> I am using barebox-2016.03.0
>>
>>
>> Regards!
>>
>> 2016-11-07 8:49 GMT+01:00 Sascha Hauer <s.hauer@pengutronix.de>:
>> > Hi Alex,
>> >
>> > Added the list to Cc
>> >
>> > Please configure your mailer to send plain text, then the server won't
>> > reject your mails.
>> >
>> > On Fri, Nov 04, 2016 at 01:10:30PM +0100, Alex Vazquez wrote:
>> >> Hi, all!
>> >> I have create a zImage with the device tree appended.
>> >> I have removed oftree_loc in the configuration file.
>> >> My problem is when I try to launch the kernel, it indicates that it has
>> >> the device tree added but fails to boot.
>> >>
>> >> barebox:/# boot
>> >> booting kernel from /dev/[1]nand0.kernel.bb
>> >> Loading ARM Linux zImage '/dev/[2]nand0.kernel.bb'
>> >> zImage: concatenated oftree detected
>> >> commandline: console=ttyS0,115200 rw ip=none ...
>> >> arch_number: 0
>> >>
>> >> If I don't removed oftree_loc in the configuration file. Load oftree
>> >> (nand) and boot fine.
>> >>
>> >> barebox:/# boot
>> >> booting kernel from /dev/[3]nand0.kernel.bb
>> >> Loading ARM Linux zImage '/dev/[4]nand0.kernel.bb'
>> >> zImage: concatenated oftree detected
>> >> Loading devicetree from '/dev/[5]nand0.oftree.bb'
>> >> commandline: console=ttyS0,115200 rw ip=none ...
>> >> Booting Linux on physical CPU 0x0
>
>
> Is CONFIG_OFTREE enabled in your build?
>
> Sascha
>
>
> --
> Pengutronix e.K. | |
> Industrial Linux Solutions | http://www.pengutronix.de/ |
> Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
> Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Fwd: boot kernel with append device tree
2016-11-07 11:01 ` Alex Vazquez
@ 2016-11-08 7:29 ` Sascha Hauer
2016-11-09 8:41 ` Alex Vazquez
0 siblings, 1 reply; 6+ messages in thread
From: Sascha Hauer @ 2016-11-08 7:29 UTC (permalink / raw)
To: Alex Vazquez; +Cc: barebox
On Mon, Nov 07, 2016 at 12:01:25PM +0100, Alex Vazquez wrote:
> > Is CONFIG_OFTREE enabled in your build?
> Yes.
Ok, could you please try the following patch? Another possibility would
be to disable CONFIG_OFTREE, but it would be good if you could test the
patch anyway since the same bug is still present in current master.
Sascha
----------------------------------8<--------------------------------
From 500e5f87f9943958fa4662e29261a0abb4df24d9 Mon Sep 17 00:00:00 2001
From: Sascha Hauer <s.hauer@pengutronix.de>
Date: Tue, 8 Nov 2016 08:23:17 +0100
Subject: [PATCH] ARM: Fix appended device tree when CONFIG_OFTREE is enabled
When CONFIG_OFTREE is enabled the appended device tree is unflattened
and put into data->of_root_node, but there it is never used again.
To actually use the appended device tree put it into data->oftree
instead.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
arch/arm/lib/bootm.c | 13 +++++++++++--
1 file changed, 11 insertions(+), 2 deletions(-)
diff --git a/arch/arm/lib/bootm.c b/arch/arm/lib/bootm.c
index 28b4f4a..8977d08 100644
--- a/arch/arm/lib/bootm.c
+++ b/arch/arm/lib/bootm.c
@@ -244,12 +244,21 @@ static int do_bootz_linux_fdt(int fd, struct image_data *data)
}
if (IS_BUILTIN(CONFIG_OFTREE)) {
- data->of_root_node = of_unflatten_dtb(oftree);
- if (!data->of_root_node) {
+ struct device_node *root;
+
+ root = of_unflatten_dtb(oftree);
+ if (!root) {
pr_err("unable to unflatten devicetree\n");
ret = -EINVAL;
goto err_free;
}
+ data->oftree = of_get_fixed_tree(root);
+ if (!data->oftree) {
+ pr_err("Unable to get fixed tree\n");
+ ret = -EINVAL;
+ goto err_free;
+ }
+
free(oftree);
} else {
data->oftree = oftree;
--
2.10.1
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Fwd: boot kernel with append device tree
2016-11-08 7:29 ` Sascha Hauer
@ 2016-11-09 8:41 ` Alex Vazquez
0 siblings, 0 replies; 6+ messages in thread
From: Alex Vazquez @ 2016-11-09 8:41 UTC (permalink / raw)
To: Sascha Hauer; +Cc: barebox
Hi Sascha!
I have tested the patch with the version (2016.03.0) and now it works correctly.
Thanks!
Regards!
2016-11-08 8:29 GMT+01:00 Sascha Hauer <s.hauer@pengutronix.de>:
> On Mon, Nov 07, 2016 at 12:01:25PM +0100, Alex Vazquez wrote:
>> > Is CONFIG_OFTREE enabled in your build?
>> Yes.
>
> Ok, could you please try the following patch? Another possibility would
> be to disable CONFIG_OFTREE, but it would be good if you could test the
> patch anyway since the same bug is still present in current master.
>
> Sascha
>
> ----------------------------------8<--------------------------------
>
> From 500e5f87f9943958fa4662e29261a0abb4df24d9 Mon Sep 17 00:00:00 2001
> From: Sascha Hauer <s.hauer@pengutronix.de>
> Date: Tue, 8 Nov 2016 08:23:17 +0100
> Subject: [PATCH] ARM: Fix appended device tree when CONFIG_OFTREE is enabled
>
> When CONFIG_OFTREE is enabled the appended device tree is unflattened
> and put into data->of_root_node, but there it is never used again.
> To actually use the appended device tree put it into data->oftree
> instead.
>
> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
> ---
> arch/arm/lib/bootm.c | 13 +++++++++++--
> 1 file changed, 11 insertions(+), 2 deletions(-)
>
> diff --git a/arch/arm/lib/bootm.c b/arch/arm/lib/bootm.c
> index 28b4f4a..8977d08 100644
> --- a/arch/arm/lib/bootm.c
> +++ b/arch/arm/lib/bootm.c
> @@ -244,12 +244,21 @@ static int do_bootz_linux_fdt(int fd, struct image_data *data)
> }
>
> if (IS_BUILTIN(CONFIG_OFTREE)) {
> - data->of_root_node = of_unflatten_dtb(oftree);
> - if (!data->of_root_node) {
> + struct device_node *root;
> +
> + root = of_unflatten_dtb(oftree);
> + if (!root) {
> pr_err("unable to unflatten devicetree\n");
> ret = -EINVAL;
> goto err_free;
> }
> + data->oftree = of_get_fixed_tree(root);
> + if (!data->oftree) {
> + pr_err("Unable to get fixed tree\n");
> + ret = -EINVAL;
> + goto err_free;
> + }
> +
> free(oftree);
> } else {
> data->oftree = oftree;
> --
> 2.10.1
>
> --
> Pengutronix e.K. | |
> Industrial Linux Solutions | http://www.pengutronix.de/ |
> Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
> Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2016-11-09 8:41 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <CAOTEMUR=FtB_Ox++XPvomyHXsk5Jcm7CG7aEM6WmN++t0211Aw@mail.gmail.com>
[not found] ` <CAOTEMUQt95XDorid8sj9FHkpCpUJYnqNeRbBU+33aLYz2oM+gw@mail.gmail.com>
2016-11-07 7:49 ` Fwd: boot kernel with append device tree Sascha Hauer
2016-11-07 8:25 ` Alex Vazquez
2016-11-07 9:48 ` Sascha Hauer
2016-11-07 11:01 ` Alex Vazquez
2016-11-08 7:29 ` Sascha Hauer
2016-11-09 8:41 ` Alex Vazquez
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox