mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Falco Hyfing <hyfinglists@gmail.com>
To: barebox@lists.infradead.org
Subject: Re: squashfs: corrupted kernel image when booting/reading from squashfs
Date: Fri, 3 Feb 2017 12:24:47 +0100	[thread overview]
Message-ID: <CAChPQeBZ0Qgb3a7bk_dJpUf74EB3PNZ9uTY7cVoJJBVt=d=WyA@mail.gmail.com> (raw)
In-Reply-To: <CAChPQeC3-EsvZ2s35qcVZL=gusSJf1FKivKjB=LR8LHR1F3POA@mail.gmail.com>

 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

       reply	other threads:[~2017-02-03 11:26 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CAChPQeC3-EsvZ2s35qcVZL=gusSJf1FKivKjB=LR8LHR1F3POA@mail.gmail.com>
2017-02-03 11:24 ` Falco Hyfing [this message]
2017-02-04 11:35   ` Ulrich Ölmann
2017-02-07 12:25     ` Falco Hyfing

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAChPQeBZ0Qgb3a7bk_dJpUf74EB3PNZ9uTY7cVoJJBVt=d=WyA@mail.gmail.com' \
    --to=hyfinglists@gmail.com \
    --cc=barebox@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox