Power & Source of Big Ideas

NanoPi M2A Custom Kernel Won't Load Modules

Moderators: chensy, FATechsupport

Hello all,
I've successfully compiled a custom kernel based on the default 4418 hdmi config file.
I have the uImage file and have also compiled all the external modules. I did this on the board itself, not on my PC host.

I copied the new uImage to the /boot directory and made a back up of the original one.
The board boots fine with this except that the external modules don't load automatically, therefore I have no wifi acces and other things are probably missing. I can switch back to the original uImage and reboot everything will be Ok again.

I wonder what's the formal procedure to update the Kernel after compilation with the uImage style. So that everything is referenced correctly internally.

Are we supposed to do make install and make install_modules, or even make firmware_install (???) anyways for this embedded 'uImage' configuration?
This last part of the process is not very clear, if some Kernel Guru could clarify I would be very grateful.

Note that the only difference on my my kernel is that I made the UVC webcam driver be an external module ("M") so I can operate multiple webcams simultaneously.

Thanks for any help out there!
*I'm writing this from the board itself, on an hdmi tv, how awesome is that.
Hi,

To compile and install kernel/modules just follow these steps :

1- Environment

Code: Select all

export PATH=/opt/sysroots/friendlyARM/toolchain/4.9.3/bin:$PATH
export GCC_COLORS=auto
export PATH_SD_BOOT="/media/$USER/boot"
export PATH_SD_ROOTFS="/media/$USER/rootfs"
export MAKE="make CROSS_COMPILE=arm-linux- INSTALL_MOD_PATH=$PATH_SD_ROOTFS"

2- Build

Code: Select all

$MAKE uImage
$MAKE modules

3- Install

Code: Select all

sudo chown -R $USER $PATH_SD_BOOT
cp arch/arm/boot/uImage $PATH_SD_BOOT
sudo chown -R $USER $PATH_SD_ROOTFS/lib/
$MAKE modules_install INSTALL_MOD_PATH=$PATH_SD_ROOTFS
sync


For wifi module, be careful, you need some files provided with the original module folder (on target). I posted about this topic (http://www.friendlyarm.com/Forum/viewtopic.php?f=17&t=1010) , maybe it can help you.

If you have problems after this, I think a dmesg log can help us to find root cause.
Thank you very much for your reply GoblE, makes sense.
I think you are right about the extra files needed for the modules to be automatically loaded. Thankfully I have saved images I can get those from if necessary.
I've just been a little bit caught up but I will try this again this week and post back.

Thanks again! this forum is not dead after all lol.

Who is online

In total there is 1 user online :: 0 registered, 0 hidden and 1 guest (based on users active over the past 5 minutes)
Most users ever online was 2865 on Sun Nov 10, 2019 5:27 am

Users browsing this forum: No registered users and 1 guest