* Re: squashfs: corrupted kernel image when booting/reading from squashfs
[not found] <CAChPQeC3-EsvZ2s35qcVZL=gusSJf1FKivKjB=LR8LHR1F3POA@mail.gmail.com>
@ 2017-02-03 11:24 ` Falco Hyfing
2017-02-04 11:35 ` Ulrich Ölmann
0 siblings, 1 reply; 3+ messages in thread
From: Falco Hyfing @ 2017-02-03 11:24 UTC (permalink / raw)
To: barebox
Hallo,
I try to boot a kernel-fit.itb from squashfs (xz compressed) volume
while the same kernel-fit.itb is bootable from a fat volume:
barebox> / bootm /boot2/boot/kernel-fit.itb
unflatten: Unknown tag 0x6569AD3A
unable to handle paging request at address 0xfffffff2
pc : [<8fe2bad2>] lr : [<8fe07ad7>]
sp : 8ffefd70 ip : 00000008 fp : 00000000
r10: 00000000 r9 : 00000001 r8 : 8fe56072
r7 : 00000000 r6 : ffffffea r5 : ffffffea r4 : ffffffea
r3 : 8fea05fc r2 : 87f7d9c0 r1 : 00000000 r0 : ffffffea
Flags: NzCv IRQs off FIQs on Mode SVC_32
[<8fe2bad2>] (of_delete_node+0x12/0xb4) from [<8fe07ad7>]
(fit_open+0x13b/0x184)
[<8fe07ad7>] (fit_open+0x13b/0x184) from [<8fe027a9>] (bootm_boot+0xa9/0x2c4)
[<8fe027a9>] (bootm_boot+0xa9/0x2c4) from [<8fe2dadf>] (do_bootm+0xb3/0xe8)
[<8fe2dadf>] (do_bootm+0xb3/0xe8) from [<8fe02ae9>] (execute_command+0x21/0x48)
[<8fe02ae9>] (execute_command+0x21/0x48) from [<8fe06f6b>]
(run_list_real+0x53f/0x5fc)
[<8fe06f6b>] (run_list_real+0x53f/0x5fc) from [<8fe068fd>]
(parse_stream_outer+0xc9/0x158)
[<8fe068fd>] (parse_stream_outer+0xc9/0x158) from [<8fe071eb>]
(run_shell+0x33/0x60)
[<8fe071eb>] (run_shell+0x33/0x60) from [<8fe00965>] (start_barebox+0x6d/0x98)
[<8fe00965>] (start_barebox+0x6d/0x98) from [<8fe526ab>]
(barebox_non_pbl_start+0xcf/0xec)
[<8fe526ab>] (barebox_non_pbl_start+0xcf/0xec) from [<8fe00005>]
(__bare_init_start+0x1/0xc)
[<8fe53dc5>] (unwind_backtrace+0x1/0x58) from [<8fe00b8d>] (panic+0x1d/0x34)
[<8fe00b8d>] (panic+0x1d/0x34) from [<8fe5246d>] (do_exception+0xd/0x10)
[<8fe5246d>] (do_exception+0xd/0x10) from [<8fe524cd>]
(do_data_abort+0x21/0x2c)
[<8fe524cd>] (do_data_abort+0x21/0x2c) from [<8fe51f74>] (do_abort_6+0x48/0x54)
barebox 2017.01.0 #1 Thu Feb 2 16:31:33 CET 2017
-------------------------
barebox> / bootm /boot/kernel-fit.itb
FIT: '/boot/kernel-fit.itb': Simple image with single Linux kernel and FDT blob
FIT: configuration 'conf210@1': Boot Linux kernel with FDT blob (210)
FIT: image 'kernel@1': 'Vanilla Linux kernel'
FIT: /images/kernel@1/hash@1: hash OK
FIT: /images/kernel@1/hash@2: hash OK
FIT: image 'fdt210@1': 'Flattened Device Tree blob (210)'
FIT: /images/fdt210@1/hash@1: hash OK
FIT: /images/fdt210@1/hash@2: hash OK
Loading open firmware Device Tree flattened Binary '/boot/kernel-fit.itb'
commandline: root=/dev/mmcblk0p2 rootwait=1 console=ttyO0,115200n8
---------------------------
The MD5 hashes show different values in barebox although in Linux
both match the hash from the fat volume :
barebox> / mount
none on / type ramfs
none on /dev type devfs
/dev/mmc0.0 on /boot1 type fat
/dev/mmc0.1 on /boot2 type squashfs
/dev/nand0.UBI.ubi.rootfs on /boot3 type squashfs
barebox> / md5sum /boot1/kernel-fit.itb
e349817146ae23d3f7e8f5ca2628b429 /boot1/kernel-fit.itb 0x00000000
... 0xffffffffffffffff
barebox> / md5sum /boot2/boot/kernel-fit.itb
e95b956361c15b583562c0e287794629 /boot2/boot/kernel-fit.itb
0x00000000 ... 0xffffffffffffffff
barebox> / md5sum /boot3/boot/kernel-fit.itb
e95b956361c15b583562c0e287794629 /boot3/boot/kernel-fit.itb
0x00000000 ... 0xffffffffffffffff
The mksquashfs execution:
mksquashfs openwrt/build_dir/target-arm_xscale_musl-1.1.15_eabi/root-baltosopenwrt/build_dir/target-arm_xscale_musl-1.1.15_eabi/linux-baltos/root.squashfs
-root-owned -noappend -comp xz b 256k -p '/dev d 755 0 0' -p
'/dev/console c 600 0 0 5 1' -processors 1
Pseudo file "/dev" exists in source filesystem
"openwrt/build_dir/target-arm_xscale_musl-1.1.15_eabi/root-baltos/dev".
Ignoring, exclude it (-e/-ef) to override.
Parallel mksquashfs: Using 1 processor
Creating 4.0 filesystem on
openwrt/build_dir/target-arm_xscale_musl-1.1.15_eabi/linux-baltos/root.squashfs,
block size 262144.
^M[===============================================================/]
638/638 100%
Exportable Squashfs 4.0 filesystem, xz compressed, data block size 262144
¦···compressed data, compressed metadata, compressed fragments,
compressed xattrs
¦···duplicates are removed
Filesystem size 6832.94 Kbytes (6.67 Mbytes)
¦···57.72% of uncompressed filesystem size (11838.93 Kbytes)
Inode table size 6444 bytes (6.29 Kbytes)
¦···21.76% of uncompressed inode table size (29619 bytes)
Directory table size 8450 bytes (8.25 Kbytes)
¦···47.49% of uncompressed directory table size (17792 bytes)
Number of duplicate files found 9
Number of inodes 891
Number of files 616
Number of fragments 17
Number of symbolic links 175
Number of device nodes 1
Number of fifo nodes 0
Number of socket nodes 0
Number of directories 99
Number of ids (unique uids + gids) 1
Number of uids 1
¦···root (0)
Number of gids 1
¦···root (0)
----------------------------
What could be the problem?
What should I try next?
Best wishes,
Falco Hyfing
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: squashfs: corrupted kernel image when booting/reading from squashfs
2017-02-03 11:24 ` squashfs: corrupted kernel image when booting/reading from squashfs Falco Hyfing
@ 2017-02-04 11:35 ` Ulrich Ölmann
2017-02-07 12:25 ` Falco Hyfing
0 siblings, 1 reply; 3+ messages in thread
From: Ulrich Ölmann @ 2017-02-04 11:35 UTC (permalink / raw)
To: barebox
Hi Falco,
On Fri, Feb 03, 2017 at 12:24:47PM +0100, Falco Hyfing wrote:
> I try to boot a kernel-fit.itb from squashfs (xz compressed) volume while the
> same kernel-fit.itb is bootable from a fat volume:
currently barebox' squashfs driver seems to be broken if not used with lzo
compression: the symptom is barebox only reading the first squashfs block
correctly.
I looked into this some months ago, but did not manage to find and fix the bug
in reasonable time. As the barebox driver has been ported from the linux kernel,
the latter is a working reference to look at when debugging.
So you are welcome to hack on it and send patches. :)
Best regards
Ulrich
--
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] 3+ messages in thread
* Re: squashfs: corrupted kernel image when booting/reading from squashfs
2017-02-04 11:35 ` Ulrich Ölmann
@ 2017-02-07 12:25 ` Falco Hyfing
0 siblings, 0 replies; 3+ messages in thread
From: Falco Hyfing @ 2017-02-07 12:25 UTC (permalink / raw)
To: barebox
Hi,
I've found what causes my problems with the squashfs volume. The
standard block size using mksquashfs is 128KiB, but OpenWrt's default
is 256KiB (-b 256k) causing the failure:
mksquashfs openwrt/build_dir/target-arm_xscale_musl-1.1.15_eabi/root-baltosopenwrt/build_dir/target-arm_xscale_musl-1.1.15_eabi/linux-baltos/root.squashfs
-root-owned -noappend -comp xz -b 256k -p '/dev d 755 0 0' -p
'/dev/console c 600 0 0 5 1' -processors 1
Setting -b 128k works.
Also OpenWrt uses bcj filters (-Xbcj arm) for xz which don't work
either. I had commented out this option earlier.
Best wishes,
Falco Hyfing
On Sat, Feb 4, 2017 at 12:35 PM, Ulrich Ölmann <u.oelmann@pengutronix.de> wrote:
> Hi Falco,
>
> On Fri, Feb 03, 2017 at 12:24:47PM +0100, Falco Hyfing wrote:
>> I try to boot a kernel-fit.itb from squashfs (xz compressed) volume while the
>> same kernel-fit.itb is bootable from a fat volume:
>
> currently barebox' squashfs driver seems to be broken if not used with lzo
> compression: the symptom is barebox only reading the first squashfs block
> correctly.
>
> I looked into this some months ago, but did not manage to find and fix the bug
> in reasonable time. As the barebox driver has been ported from the linux kernel,
> the latter is a working reference to look at when debugging.
>
> So you are welcome to hack on it and send patches. :)
>
> Best regards
> Ulrich
> --
> 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
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-02-07 12:26 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <CAChPQeC3-EsvZ2s35qcVZL=gusSJf1FKivKjB=LR8LHR1F3POA@mail.gmail.com>
2017-02-03 11:24 ` squashfs: corrupted kernel image when booting/reading from squashfs Falco Hyfing
2017-02-04 11:35 ` Ulrich Ölmann
2017-02-07 12:25 ` Falco Hyfing
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox