mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Enrico Joerns <ejo@pengutronix.de>
To: Yegor Yefremov <yegorslists@googlemail.com>
Cc: barebox <barebox@lists.infradead.org>
Subject: Re: [PATCH 4/5] Add filetype and detection for squashfs images
Date: Thu, 6 Oct 2016 16:10:36 +0200	[thread overview]
Message-ID: <7945e859-d844-9c44-f776-87e35ffc27e3@pengutronix.de> (raw)
In-Reply-To: <CAGm1_kvFujU0QcCdmREtbRfU7J_vQgMnJvs9k=dpR3PQ=9+_6g@mail.gmail.com>

Hi Yegor,

On 10/06/2016 03:55 PM, Yegor Yefremov wrote:
> On Tue, Oct 4, 2016 at 12:10 PM, Enrico Jorns <ejo@pengutronix.de> wrote:
>> This adds `filetype_squashfs` to the list of known filetypes and adds a
>> detection for squashfs files to file_detect_type(). This currently
>> matches on the `hsqs` start sequence of an image file.
>>
>> Additionally, the newly introduced filetype is registered as the type of
>> the squashfs_driver which allows, for example, to mount squashfs without
>> the need to specify a type parameter.
>>
>> This changes enable booting a squashfs with the simple `boot` command
>> pointing to the location (device) that holds the squashfs.
>>
>> Note that booting with blspec is limited as the current squashfs driver
>> is not capable of handling symbolic links.
>
> Glad to see SquashFS will be used not only by myself :-)

glad to see that, too ;)

> Could you explain how one can write a rootfs.sqaushfs to a ubiblock
> from Linux and then what steps are needed in barebox?
>
> So far I've only found this info about ubiblock:
> http://www.linux-mtd.infradead.org/doc/ubi.html#L_ubiblock, but it
> doesn't say much.

Yes, the informations provided are a bit sparse..

> My actions were:
>
> ubiattach -p /dev/mtd5
> ubiblock --create /dev/ubi0_0
> ubiupdatevol /dev/ubi0_0 rootfs.squashfs
>
> Can I mount /dev/ubi0_0 via mount? If yes, what parameters I should use?

The above commands look pretty similar to what I did. Mounting the 
ubiblock device does work too, with a little pitfall, mount will be 
confused by having a read-only file system but nobody told it before.
So you must do

   mount -o ro /dev/ubiblock0_0 /mnt/test

> How can I mount this volume in barebox step-by-step?

Using it in barebox is pretty easy, as the ubiblock layer is not 
required there:

   ubiattach /dev/nand0.root
   ubiupdatevol /dev/nand0.root.ubi.ubivolname rootfs.squashfs
   mkdir /mnt/test
   mount /dev/nand0.root.ubi.ubivolname /mnt/test


To boot via bootspec form a ubi containing a squashfs, you simply need to

   boot /dev/nand0.root.ubi.ubivolname


Hope that helps.


Best regards, Enrico

-- 
Pengutronix e.K.                           | Enrico Jörns                |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-5080 |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  reply	other threads:[~2016-10-06 14:11 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-04 10:10 [PATCH 0/5] Extend squashfs support Enrico Jorns
2016-10-04 10:10 ` [PATCH 1/5] fs: squashfs: port lzo compression support from kernel Enrico Jorns
2016-10-04 19:34   ` Sascha Hauer
2016-10-12  6:26     ` Yegor Yefremov
2016-10-04 10:10 ` [PATCH 2/5] fs: squashfs: port lz4 " Enrico Jorns
2016-10-04 10:10 ` [PATCH 3/5] fs: squashfs: port zlib " Enrico Jorns
2016-10-04 19:40   ` Sascha Hauer
2016-10-21  6:04     ` Yegor Yefremov
2016-10-21  6:53       ` Sascha Hauer
2016-10-04 10:10 ` [PATCH 4/5] Add filetype and detection for squashfs images Enrico Jorns
2016-10-06 13:55   ` Yegor Yefremov
2016-10-06 14:10     ` Enrico Joerns [this message]
2016-10-07 12:08       ` Yegor Yefremov
2016-10-04 10:10 ` [PATCH 5/5] fs: squashfs: append linux rootarg for ubi volume Enrico Jorns

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=7945e859-d844-9c44-f776-87e35ffc27e3@pengutronix.de \
    --to=ejo@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --cc=yegorslists@googlemail.com \
    /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