* bootm crash - bad uimage?
@ 2016-02-22 15:31 Philippe Leduc
2016-02-23 8:05 ` Sascha Hauer
0 siblings, 1 reply; 6+ messages in thread
From: Philippe Leduc @ 2016-02-22 15:31 UTC (permalink / raw)
To: barebox
Hello,
Since the commit 0a37e22d638acf1b2c7c6e6ab83b6a3272b0a11c, I can't
boot my image anymore.
It seems that os_part is a null pointer and simple_strtoul crash on it
(in bootm_load_os). I workaround the problem by forcing the value to 0
if os_part if null, but I guess that it is a bad solution.
Is this a due to a bad usage of the mkimage utility?
best regards,
--
Philippe LEDUC
ledphilippe@gmail.com
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: bootm crash - bad uimage?
2016-02-22 15:31 bootm crash - bad uimage? Philippe Leduc
@ 2016-02-23 8:05 ` Sascha Hauer
2016-02-23 12:00 ` Philippe Leduc
0 siblings, 1 reply; 6+ messages in thread
From: Sascha Hauer @ 2016-02-23 8:05 UTC (permalink / raw)
To: Philippe Leduc; +Cc: barebox
Hi Philippe,
On Mon, Feb 22, 2016 at 04:31:18PM +0100, Philippe Leduc wrote:
> Hello,
>
> Since the commit 0a37e22d638acf1b2c7c6e6ab83b6a3272b0a11c, I can't
> boot my image anymore.
> It seems that os_part is a null pointer and simple_strtoul crash on it
> (in bootm_load_os). I workaround the problem by forcing the value to 0
> if os_part if null, but I guess that it is a bad solution.
> Is this a due to a bad usage of the mkimage utility?
Probably not. Is this fixed by this commit?
commit 1a180cd3b6e5c067c68f3e09f7e15e5b18af9761
Author: Lucas Stach <l.stach@pengutronix.de>
Date: Fri Feb 12 17:58:23 2016 +0100
bootm: parse initrd and oftree into correct struct members
The code parsing the oftree and initrd file names is clearly wrong,
leading to bootm not loading oftree or initrd files any more.
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
--
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: bootm crash - bad uimage?
2016-02-23 8:05 ` Sascha Hauer
@ 2016-02-23 12:00 ` Philippe Leduc
2016-02-25 9:30 ` Holger Schurig
0 siblings, 1 reply; 6+ messages in thread
From: Philippe Leduc @ 2016-02-23 12:00 UTC (permalink / raw)
To: Sascha Hauer; +Cc: barebox
This commit doesn't seem to fix the problem (in fact it was already
applied when I saw the crash).
Note: I am using mkimage to create bootable image of a real-time OS
(PikeOS). There is no initrd or dtc at this step for now: I guess it
is like loading an old Linux kernel without userspace.
I do not want to bother you with a specific use case if this is the
root of the problem.
Best regards,
Philippe LEDUC
ledphilippe@gmail.com
2016-02-23 9:05 GMT+01:00 Sascha Hauer <s.hauer@pengutronix.de>:
> Hi Philippe,
>
> On Mon, Feb 22, 2016 at 04:31:18PM +0100, Philippe Leduc wrote:
>> Hello,
>>
>> Since the commit 0a37e22d638acf1b2c7c6e6ab83b6a3272b0a11c, I can't
>> boot my image anymore.
>> It seems that os_part is a null pointer and simple_strtoul crash on it
>> (in bootm_load_os). I workaround the problem by forcing the value to 0
>> if os_part if null, but I guess that it is a bad solution.
>> Is this a due to a bad usage of the mkimage utility?
>
> Probably not. Is this fixed by this commit?
>
> commit 1a180cd3b6e5c067c68f3e09f7e15e5b18af9761
> Author: Lucas Stach <l.stach@pengutronix.de>
> Date: Fri Feb 12 17:58:23 2016 +0100
>
> bootm: parse initrd and oftree into correct struct members
>
> The code parsing the oftree and initrd file names is clearly wrong,
> leading to bootm not loading oftree or initrd files any more.
>
> Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
>
> --
> 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: bootm crash - bad uimage?
2016-02-23 12:00 ` Philippe Leduc
@ 2016-02-25 9:30 ` Holger Schurig
2016-02-25 9:50 ` Philippe Leduc
0 siblings, 1 reply; 6+ messages in thread
From: Holger Schurig @ 2016-02-25 9:30 UTC (permalink / raw)
To: Philippe Leduc; +Cc: barebox
Philippe Leduc <ledphilippe@gmail.com> writes:
> Note: I am using mkimage to create bootable image of a real-time OS
> (PikeOS). There is no initrd or dtc at this step for now: I guess it
> is like loading an old Linux kernel without userspace.
So if you don't have an initrd, do you need uImage at all? You can boot
a bootable image directly
I use Linux without an initrd and don't bother with an uImage at all. I
have my kernel on the SD-CARD or eMMC in /boot/vmlinuz, just like on any
other (x86) Linux box.
Here is my env/boot/emmc script. I use "boot", not "bootm", but AFAIK boot uses
bootm under the hood.
global linux.bootargs.dyn.root="root=/dev/mmcblk0p${global.boot.partition} rootwait ro"
global bootm.image=/emmc/boot/vmlinuz
detect mmc3
mkdir -p /emmc
mount /dev/mmc3.0 /emmc
I have similar scripts for SD-Card and USB.
The kernel is installed using the normal Linux mechanism:
make -C ${KERNEL_DIR} ARCH=arm INSTALL_PATH=${IMAGE_DIR}/boot zinstall
maybe PikeOS has something equivalent. The result is:
$ file image/boot/vmlinuz-4.4.2
image/boot/vmlinuz-4.4.2: Linux kernel ARM boot executable zImage (little-endian)
As you see, I boot directly into the vmlinuz ... and I don't use
Barebox' CONFIG_DEFAULT_ENVIRONMENT_GENERIC_NEW, too.
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: bootm crash - bad uimage?
2016-02-25 9:30 ` Holger Schurig
@ 2016-02-25 9:50 ` Philippe Leduc
2016-02-26 9:22 ` Philippe Leduc
0 siblings, 1 reply; 6+ messages in thread
From: Philippe Leduc @ 2016-02-25 9:50 UTC (permalink / raw)
To: Holger Schurig; +Cc: barebox
Hi,
> So if you don't have an initrd, do you need uImage at all? You can boot
a bootable image directly
Well, I do it this way because it was working I guess^^' but I tink
your proposition is the right think to do!
Thank you for the tip and the details, I'll check that and I'll give
you a feedback ASAP :)
Best regards,
--
Philippe LEDUC
ledphilippe@gmail.com
2016-02-25 10:30 GMT+01:00 Holger Schurig <holgerschurig@gmail.com>:
> Philippe Leduc <ledphilippe@gmail.com> writes:
>
>> Note: I am using mkimage to create bootable image of a real-time OS
>> (PikeOS). There is no initrd or dtc at this step for now: I guess it
>> is like loading an old Linux kernel without userspace.
>
> So if you don't have an initrd, do you need uImage at all? You can boot
> a bootable image directly
>
> I use Linux without an initrd and don't bother with an uImage at all. I
> have my kernel on the SD-CARD or eMMC in /boot/vmlinuz, just like on any
> other (x86) Linux box.
>
> Here is my env/boot/emmc script. I use "boot", not "bootm", but AFAIK boot uses
> bootm under the hood.
>
> global linux.bootargs.dyn.root="root=/dev/mmcblk0p${global.boot.partition} rootwait ro"
> global bootm.image=/emmc/boot/vmlinuz
> detect mmc3
> mkdir -p /emmc
> mount /dev/mmc3.0 /emmc
>
> I have similar scripts for SD-Card and USB.
>
>
> The kernel is installed using the normal Linux mechanism:
>
> make -C ${KERNEL_DIR} ARCH=arm INSTALL_PATH=${IMAGE_DIR}/boot zinstall
>
> maybe PikeOS has something equivalent. The result is:
>
> $ file image/boot/vmlinuz-4.4.2
> image/boot/vmlinuz-4.4.2: Linux kernel ARM boot executable zImage (little-endian)
>
>
>
> As you see, I boot directly into the vmlinuz ... and I don't use
> Barebox' CONFIG_DEFAULT_ENVIRONMENT_GENERIC_NEW, too.
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: bootm crash - bad uimage?
2016-02-25 9:50 ` Philippe Leduc
@ 2016-02-26 9:22 ` Philippe Leduc
0 siblings, 0 replies; 6+ messages in thread
From: Philippe Leduc @ 2016-02-26 9:22 UTC (permalink / raw)
To: Holger Schurig; +Cc: barebox
Hi,
I managed to boot a 'raw' image. It is quite straightforward in fact.
Here is what I do:
addpart /dev/mem 0x10000000@0x10020000(sys)
uncompress raw.boot /dev/mem.sys
go 0x10020000
Thank you for your help :)
--
Philippe LEDUC
ledphilippe@gmail.com
2016-02-25 10:50 GMT+01:00 Philippe Leduc <ledphilippe@gmail.com>:
> Hi,
>
>> So if you don't have an initrd, do you need uImage at all? You can boot
> a bootable image directly
> Well, I do it this way because it was working I guess^^' but I tink
> your proposition is the right think to do!
>
> Thank you for the tip and the details, I'll check that and I'll give
> you a feedback ASAP :)
>
> Best regards,
>
> --
> Philippe LEDUC
> ledphilippe@gmail.com
>
>
> 2016-02-25 10:30 GMT+01:00 Holger Schurig <holgerschurig@gmail.com>:
>> Philippe Leduc <ledphilippe@gmail.com> writes:
>>
>>> Note: I am using mkimage to create bootable image of a real-time OS
>>> (PikeOS). There is no initrd or dtc at this step for now: I guess it
>>> is like loading an old Linux kernel without userspace.
>>
>> So if you don't have an initrd, do you need uImage at all? You can boot
>> a bootable image directly
>>
>> I use Linux without an initrd and don't bother with an uImage at all. I
>> have my kernel on the SD-CARD or eMMC in /boot/vmlinuz, just like on any
>> other (x86) Linux box.
>>
>> Here is my env/boot/emmc script. I use "boot", not "bootm", but AFAIK boot uses
>> bootm under the hood.
>>
>> global linux.bootargs.dyn.root="root=/dev/mmcblk0p${global.boot.partition} rootwait ro"
>> global bootm.image=/emmc/boot/vmlinuz
>> detect mmc3
>> mkdir -p /emmc
>> mount /dev/mmc3.0 /emmc
>>
>> I have similar scripts for SD-Card and USB.
>>
>>
>> The kernel is installed using the normal Linux mechanism:
>>
>> make -C ${KERNEL_DIR} ARCH=arm INSTALL_PATH=${IMAGE_DIR}/boot zinstall
>>
>> maybe PikeOS has something equivalent. The result is:
>>
>> $ file image/boot/vmlinuz-4.4.2
>> image/boot/vmlinuz-4.4.2: Linux kernel ARM boot executable zImage (little-endian)
>>
>>
>>
>> As you see, I boot directly into the vmlinuz ... and I don't use
>> Barebox' CONFIG_DEFAULT_ENVIRONMENT_GENERIC_NEW, too.
_______________________________________________
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-02-26 9:23 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-02-22 15:31 bootm crash - bad uimage? Philippe Leduc
2016-02-23 8:05 ` Sascha Hauer
2016-02-23 12:00 ` Philippe Leduc
2016-02-25 9:30 ` Holger Schurig
2016-02-25 9:50 ` Philippe Leduc
2016-02-26 9:22 ` Philippe Leduc
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox