hi, i have compiled my kernel with modules, when i launch mini2440 i must do insmod mymodule, its possible to do definitively this in mini2440 ? how do i do ? thanks.
mini2440 kernel modules insmod
Hi, yes if you would like to use your module you need to insmod it. Or compile it directly to kernel is another option.
Hi Andromeda,
How did u create the modules and compile it into kernel
can u list out the steps briefly because I tried to create a driver for
GPIOs and compiled it with kernel but I am getting kernel panic
well here are the steps I followed
(NOTE to whom so ever: THIS IS LENGTHY POST please understand I'm not
Hijacking this post kindly co-operate)
(Please look at my attachment files mini2440_gpiob.c uploaded in this
post).
1.I downloaded the kernel source from
http://www.friendlyarm.net/dl.php?file=linux-2.6.32.2-mini2440_20100609.tgz
2.Untarred it in Documents Folder
3.In this path /root/Documents/linux-2.6.32.2/drivers/char/mini2440_gpiob.c
for accessing GPIO line from the 34-pin Expansion header
I created the file mini2440_gpiob.c on the same line as mini2440_leds.c
well and after that I edited the Kconfig file and the added these lines
below
config GPIOB_MINI2440
tristate "34 GPIOs Support for Mini2440 GPIO LEDs"
depends on MACH_MINI2440
default y if MACH_MINI2440
help
This option enables support for LEDs connected to 34 GPIO lines
on Mini2440 boards.
and after that I entered the path and /root/Documents/linux-2.6.32.2
and enterd the following commands
1. CROSS_COMPILE=arm-none-linux-gnueabi- ARCH=arm make mini2440_defconfig
created .config file
2. CROSS_COMPILE=arm-none-linux-gnueabi- ARCH=arm make menuconfig
select the driver which I created in device drivers in char drivers
section
3. CROSS_COMPILE=arm-none-linux-gnueabi- ARCH=arm make uImage
after some time after compilation I got the uImage and zImage created in
this path
/root/Documents/linux-2.6.32.2/arch/arm/boot/
and I ported the kernel Image zImage onto the board from this location
when the board is switched on in NOR position and and press option K
and in the host machine( Ubuntu linux) used the tool ./s3c2410_boot_usb
to copy the zImage kernel
and after porting it to board , reboot it with NAND switched position
and then I'm getting Kernel Panic
If any body has successfully created drivers for another hardware apart
from the pre-built in drivers that came with the kernel source
and are able to boot the mini2440 board successfully
please guide me how to do it
Thanks in advance,
regards,
ARMTRY.
Despite of fact that IOCTL function doesn't use correct IOCTL numbers I build it like module and when insmod it I have no troubles with panic or kernel oops. Maybe you do something wrong during kernel image building? Could you please post panic what you get? Did you copy to NAND uImage?
Hi open-nandra,
I used zImage and copied it to NAND , and please see the
attached file a screen shot and the driver gpiob which I created shows
during bootup as gpiob is initialised
and can u please tell me or show me a example of how to do it as module
becuase I tried that but have a problem with header files and GPIO
libraries which require <reg-gpio.h>
Hi open-nandra,
I have a question regarding the ioctl , u mean to say that
if we use it incorrectly it will cause kernel panic is it ?
because I only added on mini2440_gpiob.c same as mini2440_leds.c and edited
Kconfig and Makefile as required
Please Acknowledfge,
Thanks in advance,
ARMtry
Hi, you have problem with mounting rootfs. So your module doesn't do kernel panic. What rootfs you're trying to mount?
Hi Open-nandra,
I'm trying to mount the root_qtopia-128M.img ( yaffs) which
came along with the DVD , and when I tried to use a different kernel Image
(zImage_T35) then I'm able to boot the board properly with the same root-fs
and when I tried to copy the kernel that I installed the drivers and
compiled then I get the problem kernel panic
did u try ( or can you please check thru my file) to add my
mini2440_gpiob.c in the kernel and edit the kconfig and makefile and
re-compile to get a new zImage and try to port it to the NAND flash using
the supervivi boot loader.
Thanks in advance,
ARMTRY.
Well you should check if you have yaffs functionality build-in your kernel which you try to compile.
Hi Open-nandra,
I am using linux-2.6.32 and root fs which comes along with
the DVD from Friendly arm and while compiling kernel I did select yaffs
option in Filesystems well ( I ported the root fs as per manual that says
to port root fs by pressing option b in bios ( when board boots up in NOR
position)
Thanks in advance,
ARMtry.
Not sure if you have u-boot installed on your NAND flash. If yes check if you have correct bootargs options for rootfs. You should start new thread as this is not a problem with your driver but problem with rootfs mounting.

