Hi Ralph, the use of global variable ROOT_DEV is not guarded properly in the patch auto-creating a ubiblock though this code needs to be prevented from running when built as a module. Please try rebuilding with the patch attached, if it resolves the issue I'll commit a proper fix for that on LEDE's source.git
Cheers Daniel On Fri, Aug 26, 2016 at 11:46:05AM +0200, Ralph Sennhauser wrote: > On Thu, 25 Aug 2016 12:53:41 +0200 > Ralph Sennhauser <ralph.sennhau...@gmail.com> wrote: > > > Hi Zoltan, > > > > On Thu, 25 Aug 2016 07:40:56 +0200 > > Zoltan HERPAI <wigy...@uid0.hu> wrote: > > > > > Daniel Golle wrote: > > > > On Wed, Aug 24, 2016 at 11:28:40PM +0200, Zoltan HERPAI wrote: > > > > > > > >> Ralph Sennhauser wrote: > > > >> > > > >>> I use kmod-ubi for creating a block device from the squasfs > > > >>> using module parameters as there is no busybox ubiblock applet > > > >>> yet. If ubi is made available as module so obvioulsy should > > > >>> ubifs. > > > >>> > > > >>> This completes the addition of kmod-fs-squashfs in commit > > > >>> 5163389b9c3b302a0d53df9a70294da5cbc08ada > > > >>> > > > >>> -- > > > >>> V2: kmod-ubifs -> kmod-fs-ubifs in commit message > > > >>> > > > >> Hi Ralph, > > > >> > > > >> With this configuration, these packages will try to get built on > > > >> targets where UBI support is not available, and failing those > > > >> builds due to the missing UBI config symbols. Can you try to make > > > >> these packages depend on the ubifs feature ? > > > >> > > > > > > > > Well, I reckon on most if not all targets with 'ubifs' feature > > > > set, UBI and UBIFS is built-in the kernel anyway... > > > > > > > True - there still are a couple config variables need to be taken > > > care of. > > > > > > -w- > > > > > > > Slipped my mind that there are config updates needed for targets not > > yet enabling ubi/ubifs. Will send a fixed series later. > > > > Thanks to you and Daniel for the review. > > > > Cheers > > Ralph > > While it shouldn't be an issue to build those packages for any targets > this is currently broken due to CONFIG_MTD_ROOTFS_ROOT_DEV=y. Unsetting > allows to build for x86 for example, i.e get past modposts ROOT_DEV > unset! for ubi.ko > > Haven't had a chance to look into how to tackle this issue. Fixing the > openwrt patches (which are supposed to be dropped ;)) or making > CONFIG_MTD_ROOTFS_ROOT_DEV opt-in or a third solution I haven't thought > up yet. > > Anyway just adding the missing config symbols isn't enough. > > Cheers > Ralph
diff --git a/target/linux/generic/patches-3.18/491-ubi-auto-create-ubiblock-device-for-rootfs.patch b/target/linux/generic/patches-3.18/491-ubi-auto-create-ubiblock-device-for-rootfs.patch index b152fba..044af6f 100644 --- a/target/linux/generic/patches-3.18/491-ubi-auto-create-ubiblock-device-for-rootfs.patch +++ b/target/linux/generic/patches-3.18/491-ubi-auto-create-ubiblock-device-for-rootfs.patch @@ -61,7 +61,7 @@ Signed-off-by: Daniel Golle <dan...@makrotopia.org> goto err_remove; + /* auto-attach "rootfs" volume if existing and non-ubifs */ -+ if (config_enabled(CONFIG_MTD_ROOTFS_ROOT_DEV)) ++ if (config_enabled(CONFIG_MTD_ROOTFS_ROOT_DEV) && !config_enabled(CONFIG_MTD_UBI_MODULE)) + ubiblock_create_auto_rootfs(); + /* diff --git a/target/linux/generic/patches-4.1/491-ubi-auto-create-ubiblock-device-for-rootfs.patch b/target/linux/generic/patches-4.1/491-ubi-auto-create-ubiblock-device-for-rootfs.patch index 433d77b..3fc8ae6 100644 --- a/target/linux/generic/patches-4.1/491-ubi-auto-create-ubiblock-device-for-rootfs.patch +++ b/target/linux/generic/patches-4.1/491-ubi-auto-create-ubiblock-device-for-rootfs.patch @@ -61,7 +61,7 @@ Signed-off-by: Daniel Golle <dan...@makrotopia.org> ubiblock_create_from_param(); + /* auto-attach "rootfs" volume if existing and non-ubifs */ -+ if (config_enabled(CONFIG_MTD_ROOTFS_ROOT_DEV)) ++ if (config_enabled(CONFIG_MTD_ROOTFS_ROOT_DEV) && !config_enabled(CONFIG_MTD_UBI_MODULE)) + ubiblock_create_auto_rootfs(); + /* diff --git a/target/linux/generic/patches-4.4/491-ubi-auto-create-ubiblock-device-for-rootfs.patch b/target/linux/generic/patches-4.4/491-ubi-auto-create-ubiblock-device-for-rootfs.patch index da31112..736cde0 100644 --- a/target/linux/generic/patches-4.4/491-ubi-auto-create-ubiblock-device-for-rootfs.patch +++ b/target/linux/generic/patches-4.4/491-ubi-auto-create-ubiblock-device-for-rootfs.patch @@ -61,7 +61,7 @@ Signed-off-by: Daniel Golle <dan...@makrotopia.org> ubiblock_create_from_param(); + /* auto-attach "rootfs" volume if existing and non-ubifs */ -+ if (config_enabled(CONFIG_MTD_ROOTFS_ROOT_DEV)) ++ if (config_enabled(CONFIG_MTD_ROOTFS_ROOT_DEV) && !config_enabled(CONFIG_MTD_UBI_MODULE)) + ubiblock_create_auto_rootfs(); + /*
_______________________________________________ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel