Dependencies for ext4.ko and jffs2.ko

Post new topic   Reply to topic    DD-WRT Forum Index -> Broadcom SoC based Hardware
Author Message
bqq100
DD-WRT Novice


Joined: 10 Jan 2016
Posts: 14

PostPosted: Mon May 07, 2018 0:19    Post subject: Dependencies for ext4.ko and jffs2.ko Reply with quote
I am trying to convert from a 2.6 build to a 3.x build for my E4200 (mainly to get VAP support). However I have found that the 3.x builds for the E4200 do not include any of the filesystem kernel modules (ext2/3/4, fat, vfat, jffs2, etc).

I have extracted the ext4.ko file from the "big" build and copied it over to /tmp, but insmod ext4.ko throws a bunch of Unknown symbol errors. I'm pretty sure that one of the kernel modules I need is mdcache.ko, but that also throws some Unknown symbol errors.

Does anyone know which (and in what order) kernel module dependencies I need to load for the filesystem modules? I am mostly interested in ext3 (or ext4) and jffs.

Here are the exact builds I am working with:
dd-wrt.v24-33679_NEWD-2_K2.6_big-nv60k.bin (Current 2.6 build where ext3/jffs work, but VAP does not)
dd-wrt.v24-33772_NEWD-2_K3.x_mega-e4200.bin (3.x build I am trying to upgrade to)
dd-wrt.v24-33772_NEWD-2_K3.x_big.bin (3.x build that I am extracting the kernel modules from)

Thanks in advance!
Sponsor
bqq100
DD-WRT Novice


Joined: 10 Jan 2016
Posts: 14

PostPosted: Mon May 07, 2018 3:21    Post subject: Reply with quote
Ok, so I made some progress. If found the modules.dep and modules.order files that list the dependencies and order that they are loaded in.

Unfortunately mbcache.ko shows no dependencies, and I am still getting the following errors:
Code:
mbcache: Unknown symbol register_shrinker (err 0)
mbcache: Unknown symbol unregister_shrinker (err 0)
mbcache: Unknown symbol sysctl_vfs_cache_pressure (err 0)


I just downloaded the source code, and at least register and unregister_shrinker are defined in vmscan.c which looks like it should be compiled into the kernel (linux/universal/linux-3.10/mm/Makefile). I don't see any config settings that would cause it not to be compiled into the kernel so I have no idea why I can't load this module Sad
mwchang
DD-WRT Guru


Joined: 26 Mar 2013
Posts: 1855
Location: Hung Hom, Hong Kong

PostPosted: Mon May 07, 2018 16:20    Post subject: Re: Dependencies for ext4.ko and jffs2.ko Reply with quote
bqq100 wrote:
I have extracted the ext4.ko file from the "big" build and copied it over to /tmp, but insmod ext4.ko throws a bunch of Unknown symbol errors. I'm pretty sure that one of the kernel modules I need is mdcache.ko, but that also throws some Unknown symbol errors.

Does anyone know which (and in what order) kernel module dependencies I need to load for the filesystem modules? I am mostly interested in ext3 (or ext4) and jffs.

I just found that there was no "depmod" command in DD-WRT. And modprobe doesn't support "--show-depends" option. Smile

When you compile a kernel and its kernel modules *.ko, you need to have at least GCC and GNU Make...

https://help.ubuntu.com/community/Kernel/Compile

https://www.google.com/search?q=compile+dd-wrt+kernel
https://www.google.com/search?q=compile+linux+kernel

DD-WRT and ext4?
https://www.dd-wrt.com/phpBB2/viewtopic.php?p=1037495


_________________
Router: Asus RT-N18U (rev. A1)

Drink, Blink, Stretch! Live long and prosper! May the Force and farces be with you!

Facebook: https://www.facebook.com/changmanwai
Website: https://sites.google.com/site/changmw
SETI@Home profile: http://setiathome.berkeley.edu/view_profile.php?userid=211832
GitHub: https://github.com/changmw/changmw
bqq100
DD-WRT Novice


Joined: 10 Jan 2016
Posts: 14

PostPosted: Wed May 09, 2018 3:12    Post subject: Re: Dependencies for ext4.ko and jffs2.ko Reply with quote
mwchang wrote:

I just found that there was no "depmod" command in DD-WRT. And modprobe doesn't support "--show-depends" option. Smile

When you compile a kernel and its kernel modules *.ko, you need to have at least GCC and GNU Make...

https://help.ubuntu.com/community/Kernel/Compile

https://www.google.com/search?q=compile+dd-wrt+kernel
https://www.google.com/search?q=compile+linux+kernel

DD-WRT and ext4?
https://www.dd-wrt.com/phpBB2/viewtopic.php?p=1037495



Thanks, but at this point I am not trying to compile these modules myself (plus I would also need the proper toolchain).

At the end of the day I just want to be able to run optware packages I have installed (like sshd) and none of the workarounds I have tried work Mad
mwchang
DD-WRT Guru


Joined: 26 Mar 2013
Posts: 1855
Location: Hung Hom, Hong Kong

PostPosted: Wed May 09, 2018 3:21    Post subject: Re: Dependencies for ext4.ko and jffs2.ko Reply with quote
bqq100 wrote:
At the end of the day I just want to be able to run optware packages I have installed (like sshd) and none of the workarounds I have tried work Mad

For that, I found these 2 links interesting.

https://dd-wrt.com/wiki/index.php/OTRW2_(Optware_the_right_way_Take_2)
https://www.dd-wrt.com/wiki/index.php/Installing_Entware

_________________
Router: Asus RT-N18U (rev. A1)

Drink, Blink, Stretch! Live long and prosper! May the Force and farces be with you!

Facebook: https://www.facebook.com/changmanwai
Website: https://sites.google.com/site/changmw
SETI@Home profile: http://setiathome.berkeley.edu/view_profile.php?userid=211832
GitHub: https://github.com/changmw/changmw
bqq100
DD-WRT Novice


Joined: 10 Jan 2016
Posts: 14

PostPosted: Wed May 09, 2018 3:34    Post subject: Re: Dependencies for ext4.ko and jffs2.ko Reply with quote
mwchang wrote:

For that, I found these 2 links interesting.

https://dd-wrt.com/wiki/index.php/OTRW2_(Optware_the_right_way_Take_2)
https://www.dd-wrt.com/wiki/index.php/Installing_Entware


Yes, I have already followed those steps on my 2.6 kernel build and it works without issue.

The problem is that the 3.# kernel builds do not include support for ext2/3/4 filesystems which are documented in those instructions.
mwchang
DD-WRT Guru


Joined: 26 Mar 2013
Posts: 1855
Location: Hung Hom, Hong Kong

PostPosted: Wed May 09, 2018 3:42    Post subject: Re: Dependencies for ext4.ko and jffs2.ko Reply with quote
bqq100 wrote:
Yes, I have already followed those steps on my 2.6 kernel build and it works without issue.

The problem is that the 3.# kernel builds do not include support for ext2/3/4 filesystems which are documented in those instructions.

ext4 is a kernel module as far as I know. You need to enable and compile that kernel module when building the kernel.

So I did an experiment in the DD-WRT for my Asus RT-N18U:
Code:

root@DD-WRT:~# modprobe ext4
root@DD-WRT:~# lsmod
Module                  Size  Used by
ext4                  295263  0
jbd2                   41014  1 ext4
....
root@DD-WRT:~# rmmod ext4

_________________
Router: Asus RT-N18U (rev. A1)

Drink, Blink, Stretch! Live long and prosper! May the Force and farces be with you!

Facebook: https://www.facebook.com/changmanwai
Website: https://sites.google.com/site/changmw
SETI@Home profile: http://setiathome.berkeley.edu/view_profile.php?userid=211832
GitHub: https://github.com/changmw/changmw
Display posts from previous:    Page 1 of 1
Post new topic   Reply to topic    DD-WRT Forum Index -> Broadcom SoC based Hardware All times are GMT

Navigation

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum