lkml.org 
[lkml]   [2018]   [Nov]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] Make JFFS2 endianness configurable
On Fri, Nov 02, 2018 at 09:15:06PM +0100, Richard Weinberger wrote:
> On Fri, Nov 2, 2018 at 3:04 PM Daniel Walker <danielwa@cisco.com> wrote:
> > Do you have any thought on how to implement it ? I was think abstracting the
> > endian functions in the nodelist.h
>
> Yes, see what UFS does.
>
> > static inline jint16_t cpu_to_je16(jint16_t x) {
> > if (check_big_endian()) {
> > return cpu_to_be16(x);
> > } else if (check_little_endian()) {
> > return cpu_to_le16(x);
> > }
> > }
> >
> > but how would you setup the checking ?
>
> Make it a mount option and store the endianness mode in the super block.

It's actually a mkfs option currently. I'm not sure how that factors in,

from the mkfs.jffs2 man page,

-l, --little-endian
Create a little-endian JFFS2 image. Default is to make an image with the same endianness as the host.

-b, --big-endian
Create a big-endian JFFS2 image. Default is to make an image with the same endianness as the host.


Daniel

\
 
 \ /
  Last update: 2018-11-02 22:15    [W:0.071 / U:1.600 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site