[LEDE-DEV] mission impossible!! add ubifs

Daniel Golle daniel at makrotopia.org
Tue Aug 23 02:40:36 PDT 2016


On Tue, Aug 23, 2016 at 11:10:11AM +0200, Kenneth Johansson wrote:
> On 2016-08-23 07:31, Daniel Golle wrote:
> > 
> > > even this do not currently work. there is no UBI support of any kind for
> > > mt7621 and adding it was what I was asking about.
> > There are already devices using UBI on MT7621, just no method to flash
> > UBI using the 'factory'/stock method due to lacking UBI support in
> > the vendor-supplied U-Boot. UBI support is enabled on targets by
> > setting the 'nand' feature, see target/linux/ramips/mt7621/target.mk
> > You may also have a look at
> 
> So I did a fresh clone. configured for mt7621. added this patch to be able
> to select ubi image generation.

You will need to add 'ubifs' to target/linux/ramips/mt7621/target.mk
rather than target/linux/ramips/Makefile.
You also need to specify the device-specific parameters which are
passed to mkfs.ubifs, e.g. something like
UBIFS_OPTS = -m 2048 -e 124KiB -c 4096

Making a mystery out of what you are trying to achieve doesn't help.
Especially not if I got the subtle feeling that you are trying to do
it in a very wrong way -- in the end, you are paid to build some
firmware for a device we'll later on have to live with and cope with
your image-building hacks. I know, uniqueness and originality are high
values in contemporary society. However, nobody is going to appreciate
very unique firmware image formats (unless you are selling security by
obscurity). Especially, please have a look at how it works for the
many other devices which use NAND flash and thus UBI(FS). It's really
not that different from what you want to do, I guess (but don't know,
because you are not telling anyone what you are trying to do).

So please have a look at ipq806x, lantiq and oxnas image building and
sysupgrade script, all you are looking for can be found there.

Also, you may have a look at target/linux/imx6/image/Makefile (I'm not
saying it's a good example if you are building something new, but we
had to deal with designs similar to what you are trying in the past...



Cheers


Daniel


> 
> diff --git a/target/linux/ramips/Makefile b/target/linux/ramips/Makefile
> index b4ccaf6..a5e67b8 100644
> --- a/target/linux/ramips/Makefile
> +++ b/target/linux/ramips/Makefile
> @@ -10,7 +10,7 @@ ARCH:=mipsel
>  BOARD:=ramips
>  BOARDNAME:=MediaTek Ralink MIPS
>  SUBTARGETS:=rt305x mt7620 mt7621 mt7628 mt7688 rt3883 rt288x
> -FEATURES:=squashfs gpio mips16
> +FEATURES:=squashfs gpio mips16 ubifs
>  MAINTAINER:=John Crispin <john at phrozen.org>
> 
>  KERNEL_PATCHVER:=4.4
> 
> 
> 
> then I build and I fail on this.
> 
> 
> /home/kenjo/proj/inteno/lede/staging_dir/host/bin/mkfs.ubifs --space-fixup
> --force-compr=zlib  --squash-uids -o /home/kenjo/proj/inteno/lede/build_dir/target-mipsel_1004kc_musl-1.1.15/linux-ramips_mt7621/root.ubifs
> -d /home/kenjo/proj/inteno/lede/build_dir/target-mipsel_1004kc_musl-1.1.15/root-ramips
> Error: min. I/O unit was not specified (use -h for help)
> /home/kenjo/proj/inteno/lede/include/image.mk:312: recipe for target '/home/kenjo/proj/inteno/lede/build_dir/target-mipsel_1004kc_musl-1.1.15/linux-ramips_mt7621/root.ubifs'
> failed
> 
> so its not building. there is no ubi option string anywhere in
> target/linux/ramips/ so it looks like its some type of default setting.



More information about the Lede-dev mailing list