kernel problems

jazzd
Hi,
I have a little problem. I'm trying to compile the kernel sources from this
page. The compiling seems to work well, the zImage has 1.9Mb just like the
default ones. When I install the zImage on the mini2440 it boots and hangs
after uncompressing the kernel. It works for any default kernel. Do you
have to do anything fancy after compiling? Basically I'm not really wanting
to recompile the kernel: I just want to get rid of that ugly bootlogo. I
would be very pleased if someone has a solution or is able to supply me
with a default compiled kernel without the boot logo disabled. Thanks in
advance!

mgalemin
Hi jazzd, 

Try to use uImage instead of zImage. Just convert your compiled zImage
using next command:

mkimage -A arm -O linux -T kernel -C none -a 0x30008000 -e 0x30008000 -d
path_to_your_zimage/zImage path_save_uimage_to/uImage

jazzd
hmmmmm but isnt this a uboot image then? I dont use uboot atm, why do I
have to use uboot? I'm just trying to compile the kernel source from this
page as default and get it running.

mgalemin
Sorry, I misunderstood you. Please describe all your steps for compiling
and loading your kernel. Thanks.

jazzd
everything was done with the default toolchain, the default kernel on this
page
(http://www.friendlyarm.net/dl.php?file=linux-2.6.29-mini2440_20090708.tgz):

1. created config file: 
CROSS_COMPILE=arm-linux ARCH=arm make O=../kernel-bin/ mini2440_defconfig
2. CROSS_COMPILE=arm-linux- ARCH=arm make O=../kernel-bin/
3.located zImage (it is slighty larger than the default files...)
4. started DNW
5. load zImage into RAM
6. boot from RAM
7. It goes up to:
Uncompressing Linux… OK, booting the kernel
and hangs :(

Same when I try download kernel in vivi. I've read about this problem here
but the solution is to install uboot! But WHY? I just want to change ONE
THING in the default kernel and then simply carry on. Any Ideas?

mgalemin
Well, I compiled and loaded kernel from
http://www.friendlyarm.net/dl.php?file=linux-2.6.29-mini2440_20090708.tgz
and everything is ok. 
My algorithm:

1. Download and untar kernel
2. mkdir -p ../kernel-bin
3. cp config_mini2440_t35 ./arch/arm/configs/mini2440_defconfig
4. CROSS_COMPILE=arm-linux- ARCH=arm make O=../kernel-bin/
mini2440_defconfig
5. CROSS_COMPILE=arm-linux- ARCH=arm make O=../kernel-bin/
6. picocom -b 115200 /dev/ttyUSB0 --send-cmd "sx -vv"
7. param set xmodem_timeout 100000000
8. load ram 0x30008000 2019992 x
9. ctrl-a, ctrl-s and type path to your zImage
10. boot ram

As a result:

Supervivi> boot ram
Copy linux kernel from 0x00060000 to 0x30008000, size = 0x00200000 ... done
zImage magic = 0x016f2818
Setup linux parameters at 0x30000100
linux command line is: "noinitrd root=/dev/mtdblock2 init=/linuxrc
console=ttySAC0"
MACH_TYPE = 1999
NOW, Booting Linux......
Uncompressing
Linux...........................................................................
........................................................
done, booting the kernel.
Linux version 2.6.29.4-FriendlyARM (root@R51e) (gcc version 4.3.3 (GCC) )
#1 Sun Oct 18 13:31:41 EEST 2009
CPU: ARM920T [41129200] revision 0 (ARMv4T), cr=c0007177
CPU: VIVT data cache, VIVT instruction cache
Machine: FriendlyARM Mini2440 development board
ATAG_INITRD is deprecated; please update your bootloader.
Memory policy: ECC disabled, Data cache writeback
CPU S3C2440A (id 0x32440001)

mgalemin
Update:

I used Supervivi bootloader, NOR/NAND switch was in the 'NOR' state.

jazzd
This is really weird. The only real difference I can see is that you have
your kernel partition at a different place and your MACH_TYPE is different.


Can you send me your compiled zImage? I would like to try if it caused by
the zImage or the configuration on the mini2440. Also why did you compile
the t35 config? Most mini2440 have an N35? 

If you have the time send me your zImage to mekar (at) jazzd . de

thanks, I really want to get this working now :(!

jazzd
haha I got it working, I set the MACH_TYPE to 1999 and it works! Now
somebody explain this to me!

jazzd
Okay it looks like the problem was really only caused by the MACH_TYPE
thing, I found the machine type list and this is okay now, my kernel is
booting, my logo works so I'm quite happy :). There is still one thing I
dont understand, have a look at my kernel log:

TCP cubic registered
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
lib80211: common routines for IEEE802.11 drivers
s3c2410-rtc s3c2410-rtc: setting system clock to 2005-06-20 14:07:24 UTC
(1119276444)
yaffs: dev is 32505858 name is "mtdblock2"
yaffs: passed flags ""
yaffs: Attempting MTD mount on 31.2, "mtdblock2"
yaffs_read_super: isCheckpointed 0
VFS: Mounted root (yaffs filesystem) on device 31:2.
Freeing init memory: 172K
mount: mounting none on /tmp failed: No such file or directory
/etc/rc.d/init.d/netd: line 16: /usr/sbin/inetd: not found
/etc/rc.d/init.d/httpd: line 16: /usr/sbin/boa: not found
/etc/rc.d/init.d/leds: line 16: /usr/bin/led-player: not found
Try to bring eth0 interface up......eth0: link down
Done

It's unable to find the binary files. They are there of course and the
default kernel uses them. Still my other application is being run and
works. what's wrong there? seems like its unable to mount....

mgalemin
I used t35 config file because I have Mini2440 with LCD Type "LCDT35". You
can read about your LCD type on back side of LCD PCB.

What about MACH_TYPE you can look into /arch/arm/tools/mach-types.

Well, as for rootfs mounting you should dig into /etc/fstab or /etc/inittab
or something else. In general you can mount rootfs from your PC  using nfs.
This is very comfortable on debug stage as you can manipulate onboard linux
by changing rootfs on server.

X11
Hi jazzd,
I have exactly the same problem than you. I am not able to load the kernel.
I read yours posts and noticed that you succeed to load the kernel with a
new MACH_TYPE = 1999.
I checked my kernel and it is 782 . Would you please explain to me how you
changed this MACH_TYPE?

Thanks

jazzd
sorry for the delay! You must set the mach_type in your kernel (well it is
set when you compile it, but you must know what the number is). Take this
number and run the board in NOR mode to get the vivi menu. Press s for set
boot parameters. If you press v now to view the table there should be
mach_type set to some number. Press s to set it and enter the number, save
and try to boot again.

spaccabbomm
Hi, i have the same problem, but i cant find out how to set in the kernel
config the mach_type.
may you help me?
Thank you

saurabh ambulkar
i m using qemu for emulating mini2440 ,
using this site instructions....
http://gnufiish.org/trac/wiki/Qemu

but kernel is not loading 
i m using qtopia128M.img and u-boot.bin from

http://www.friendlyarm.net/downloads

Also i ve converted zImage to uImage 
the qemu hangs with  following

TERMINAL OUTPUT:
==============================================================
root@saurabh-desktop:~/mini2440/mini2440# ./mini2440_start.sh 
Starting in .
./../arm-softmmu/qemu-system-arm -M mini2440 -drive
file=./root_qtopia-128M_20090718.img,snapshot=on -serial stdio -kernel
./uImage_35 -mtdblock ./u-boot.bin -show-cursor -usb -usbdevice keyboard
-usbdevice mouse -net nic,vlan=0 -net tap,vlan=0,ifname=tap0 -monitor
telnet::5555,server,nowait
S3C: CLK=240 HCLK=240 PCLK=240 UCLK=57
QEMU: ee24c08_init
DM9000: INIT QEMU MAC : 52:54:00:12:34:56
QEMU mini2440_reset: loaded default u-boot from NAND
QEMU mini2440_reset: loaded override u-boot (size 0)
QEMU mini2440_reset: loaded ./uImage_35 (size 1ede00)
s3c_clkpwr_write: processor powered off
s3c_clkpwr_write: SPECIAL mode on
================================================================
if anybody knows what to do?

Novice
Hi all, I have some problems tahn you have.
My Mini2440 card stops the next:
'Uncompressing Linux....... ...done, booting the kernel.'
I have format NAND for Flash by press 'x' in supervivi, then I have
downloaded the vivi(v selection, supervivi-128M version 2009 07 29)
and after that I have downloaded linux kernel.
And before that I have done next steps:

1. Download and untar kernel
2. mkdir -p ../kernel-bin
3. cp config_mini2440_t35 ./arch/arm/configs/mini2440_defconfig
4. CROSS_COMPILE=arm-linux- ARCH=arm make O=../kernel-bin/
mini2440_defconfig
5. CROSS_COMPILE=arm-linux- ARCH=arm make O=../kernel-bin/
(I uses GTKTerm, not picocom)

All it seems go to very well(zImage is creted) but it doesn't work.
What I can do?
Can anyone help me?
I also checked the MACH_TYPE. It is 1999 what should be ok with MINI2440
card.

davef
All the tutorials that I have come across use arm-none-linux-gnueabi- not
arm-linux-.

Maybe, that is the problem??

Novice
Hi devef,
thanks for you but this is not sovle problem.  The arm-linux starting
arm-none-linux-gnueabi-gcc compiler.
I also tried to change it but result is teh same, it doesn't work.
Could anyone send to me the wroking zImage, please?  Or where I can found
it?

davef
The working zImage in on the DVD that comes with the mini2440 or on the
downloads page on this site.

http://www.friendlyarm.net/dl.php?file=linux-zImage_20090708.zip

Novice
Hi Davef, 
I have those zImage but it dosen't work.
When I have downloaded linux kernel and try to start it then next error
occurs:
'VFS: Mounted root (yaffs filesystem) on device 31:2.
Freeing init memory: 128K
Warning: unable to open an initial console.
Failed to execute /linuxrc.  Attempting defaults...
Kernel panic - not syncing: No init found.  Try passing init= option to
kernel.'

Maybe I have done some wrong way but I don't know what.
Or how I can fixed those problem? 
And I can download the 2440test_T35 program and it seems to work fine.
What I can try to do?

mso
hi jazzd,
i also had the same goal to change the bootlogo.

My problems are nearly the same.
This is what I have done

- installed arm-gcc
- extracted kernel source
- replaced ppm image
- used default config for mini2440 N35
- compiled kernel as zImage
- uploaded kernel with dnw
- changed mach_type to 1999 according to your postings

Now my kernel boots with new logo. Cool!
But:
I still have the same problem as you, booting stops with:

mount: mounting none on /tmp failed: No such file or directory

/etc/rc.d/init.d/netd: line 16: /usr/sbin/inetd: not found
/etc/rc.d/init.d/httpd: line 16: /usr/sbin/boa: not found
/etc/rc.d/init.d/leds: line 16: /usr/bin/led-player: not found
Try to bring eth0 interface up......eth0: link down
Done

My qtopia and my webservices don't start anymore.
If I upload the default kernel from the cd I have the same problem.
only if I do a system restore it works again.

What do I need to do in order to get it working again?

thanks a lot

soya
Hi everyone,
I am a newbie in compiling kernel and i read your posts and it helped me a
lot. Same thing happened to me, 
"Uncompressing Linux… OK, booting the kernel
and hangs"
I searched some sites and i enabled kernel hacking->kernel low level
debugging levels in menuconfig
but it doesnt work and my MACH type is 1999.

could anyone help me?

davef
Which kernel are you try to compile?

What happens when you compile this,
http://www.friendlyarm.net/dl.php?file=linux-2.6.32.2-mini2440_20100609.tgz
without changing anything? Using the correct config file for your
touchscreen type.

soya
hi,
Thanks for your quick reply.
I m trying to port linux 2.6.29/linux2.6.32 in mini2440 and I m not
concentrating in touch screen. My work is to port linux and i don want
touch screen stuffs. I followed these steps
1. untar the linux2.6.32 kernel
2. make menuconfig
3. exported the cross compiler path
4. make ARCH=arm CROSS_COMPILE=arm-linux-
Then ZImage created.
changed my kit to NOR mode
I used the supervivi-128 and root_quotopia128.img which was given along
with the kit 
5. [x] for erasing
Then through dnw
6. [v] supervivi
7. [k] ZImage
8. [y] root_quotopia
9  [b]
When i booted it hangs at uncompressing linux....booting kernel.

Plz help me in this

davef
Is that 2.6.32 from kernel.org?  If so, be aware that some things may not
work properly.  The only usable kernels are the one I linked to or the one
at http://repo.or.cz/w/linux-2.6/mini2440.git

If this is your first attempt I would still suggest that you try compiling
the kernel I linked to. You will have some confidence to start tweaking the
kernel for your specific needs.

Good luck,
Dave

soya
No i used the kernel as per your advice.

soya
My work is to port the linux..I compiled the kernel but it got struck..i
dont know why. I used cutecom for this and when i press b command it gets
struck. I am trying in cutecom and I am expecting output in cutecom.

I like to have your advice in this that whether I m going in correct path

davef
"My work is to port the Linux", don't know what you mean by this statement.

Have you checked the zImage file you obtained, after you compiled the
kernel?  (readelf -a) to see that is an ARM binary compiled for the ARMv4t
platform.

Maybe, have a look at this and see if there is something you have left out:
http://code.google.com/p/friendlyarm/wiki/Linux_Tutorial

Specifically,

Place in .profile on your Linux host

    * export PATH=/home/user/mini2440-bootstrap/arm-2008q3/bin:$PATH 
    * CROSS_COMPILE=arm-none-linux-gnueabi-
    * CC=”${CROSS_COMPILE}gcc –march=armv4t –mtune=arm920t”
    * export CROSS_COMPILE
    * export CC

soya
" wish u al success in tis new year"

I am really new to this..I am doing linux 2.6.32 porting which i downloaded
as per yr advice. 

When i checked the ZImage using (readelf -a command) it tells
readelf: Error: Not an ELF file - it has the wrong magic bytes at the start
readelf: Error: zImage: Failed to read file header

I just selected the system type s3c2440. I didnt changed or enabled
anything. I couldnt understand properly that link u reffered. I need your
advice to clarify that whether my configuration in menuconfig is right? or
do i need to enable anyth?
I explained the steps wat i did.
When i tried to boot the ZImage they gave along with the kit works fine..
But when i checked that working zImage using this readelf command also it
is displaying the same error

soya
This is wat I m getting when i tried to boot my linux2.6.32 zImage
...
...
Enter your selection: 
b
Copy linux kernel from 0x00060000 to 0x30008000, size = 0x00500000 ... 
done
zImage magic = 0x016f2818
Setup linux parameters at 0x300
00100
linux command line is: "noinitrd root=/dev/mtdblock3 init=/linuxrc
console=ttySAC0"
MACH_TYPE = 1999
NOW, Booting Linux......
Uncompressing
Linux...............................................................
............................................................
........................................................... done, booting
the kernel.

davef
When i checked the ZImage using (readelf -a command) it tells
readelf: Error: Not an ELF file - it has the wrong magic bytes at the start
readelf: Error: zImage: Failed to read file header
*****

Appears to be normal, mine does the same.

< I just selected the system type s3c2440. 

Where did you do this?  You should be able to compile the kernel only
needing to select the correct config file in menuconfig, ie
config_mini2440_n35 for the older NEC touchscreen.

< done, booting the kernel.  And then it locks up??

I am away for 2-3 days. So, if you are still having problems when I get
back I will double-check that my kernel compilation process as per the
tutorial really does work.

Good luck,
Dave

soya
Thanks dave. U r really very considerate.
But I ported my linux2.6.32.2 in my mini2440 atlast.

I already explained my steps and I didn think that "make ARCH=arm
CROSS_COMPILE=arm-linux- mini2440_defconfig"
I already ported linux in another board and didn use this defconfig step.

But after doing this step oly I can boot my linux in mini2440.
can u just explain wat is the default configuration they have given in
mini2440_defconfig. ?
Why I couldn port without this step?

davef
Sorry, I really don't know.  I assume is sets up some basic configuration
for the mini2440 and then when one runs config_mini2440_t35 changes are
made to mini2440_defconfig for your particular touchscreen.

Cheers,
Dave

soya
No issues..Thank u dave..

Have a nice day :-)

soya
Hi dave,
can i extract that root-quotopia-128 image which was given..

Thanks

davef
This one?
http://www.friendlyarm.net/dl.php?file=linux-root_qtopia-128M_20100108.zip

Pretty sure, I unzipped the 64M version and just loaded it in using DNW. 
That was about 6 months ago.

Dave

soya
ya that one only. .. I searched the command to unzip that img file but I
couldn get any proper way.. 
> How can i extract that .img file..?
> That root_qtopia-128 is the root file system for mini2440..right?

Thanks dave

srinivas
hi mgalemin,

after a struggle of 10 day's to compile kernel for MINI ARM2440. i read
this forum.

i fallowed your steps for compiling the kernel.
i struck here please help me.


root@srinu-laptop:~/kernel/linux-2.6.29# CROSS_COMPILE=arm-linux- ARCH=arm
make O=/home/srinu/kernel-bin/
make[1]: arm-linux-gcc: Command not found
  HOSTCC  scripts/basic/fixdep
/home/srinu/kernel/linux-2.6.29/scripts/basic/fixdep.c: In function
‘traps’:
/home/srinu/kernel/linux-2.6.29/scripts/basic/fixdep.c:377: warning:
dereferencing type-punned pointer will break strict-aliasing rules
/home/srinu/kernel/linux-2.6.29/scripts/basic/fixdep.c:379: warning:
dereferencing type-punned pointer will break strict-aliasing rules
  HOSTCC  scripts/basic/docproc
  HOSTCC  scripts/basic/hash
  GEN     /home/srinu/kernel-bin/Makefile
  HOSTCC  scripts/kconfig/conf.o
/home/srinu/kernel/linux-2.6.29/scripts/kconfig/conf.c: In function
‘conf_askvalue’:
/home/srinu/kernel/linux-2.6.29/scripts/kconfig/conf.c:105: warning:
ignoring return value of ‘fgets’, declared with attribute
warn_unused_result
/home/srinu/kernel/linux-2.6.29/scripts/kconfig/conf.c: In function
‘conf_choice’:
/home/srinu/kernel/linux-2.6.29/scripts/kconfig/conf.c:307: warning:
ignoring return value of ‘fgets’, declared with attribute
warn_unused_result
  HOSTCC  scripts/kconfig/kxgettext.o
  SHIPPED scripts/kconfig/zconf.tab.c
  SHIPPED scripts/kconfig/lex.zconf.c
  SHIPPED scripts/kconfig/zconf.hash.c
  HOSTCC  scripts/kconfig/zconf.tab.o
  HOSTLD  scripts/kconfig/conf
scripts/kconfig/conf -s arch/arm/Kconfig
***
*** You have not yet configured your kernel!
*** (missing kernel .config file)
***
*** Please run some configurator (e.g. "make oldconfig" or
*** "make menuconfig" or "make xconfig").
***
make[3]: *** [silentoldconfig] Error 1
make[2]: *** [silentoldconfig] Error 2
  CHK     include/linux/version.h
  UPD     include/linux/version.h
  Generating include/asm-arm/mach-types.h
make[1]: *** No rule to make target `include/config/auto.conf', needed by
`include/config/kernel.release'.  Stop.
make: *** [sub-make] Error 2





how to solve this issue.

please help me.

srinivas
hi,

if i do as below i am getting some issues.

please give a some solution.


root@srinu-laptop:~/kernel/linux-2.6.29#
CROSS_COMPILE=/home/srinu/arm-2008q3/bin/arm-none-linux-gnueabi- ARCH=arm
make mini2440_defconfig
arch/arm/configs/mini2440_defconfig:1446:warning: symbol value 'm' invalid
for USB_STORAGE_DATAFAB
arch/arm/configs/mini2440_defconfig:1448:warning: symbol value 'm' invalid
for USB_STORAGE_ISD200
arch/arm/configs/mini2440_defconfig:1449:warning: symbol value 'm' invalid
for USB_STORAGE_USBAT
arch/arm/configs/mini2440_defconfig:1450:warning: symbol value 'm' invalid
for USB_STORAGE_SDDR09
arch/arm/configs/mini2440_defconfig:1451:warning: symbol value 'm' invalid
for USB_STORAGE_SDDR55
arch/arm/configs/mini2440_defconfig:1452:warning: symbol value 'm' invalid
for USB_STORAGE_JUMPSHOT
arch/arm/configs/mini2440_defconfig:1453:warning: symbol value 'm' invalid
for USB_STORAGE_ALAUDA
#
# configuration written to .config
#
root@srinu-laptop:~/kernel/linux-2.6.29#
CROSS_COMPILE=/home/srinu/arm-2008q3/bin/arm-none-linux-gnueabi- ARCH=arm
make
make: arm-linux-gcc: Command not found
scripts/kconfig/conf -s arch/arm/Kconfig
make: arm-linux-gcc: Command not found
  CHK     include/linux/version.h
make[1]: `include/asm-arm/mach-types.h' is up to date.
  CHK     include/linux/utsrelease.h
  UPD     include/linux/utsrelease.h
  SYMLINK include/asm -> include/asm-arm
  CC      kernel/bounds.s
/bin/sh: arm-linux-gcc: not found
make[1]: *** [kernel/bounds.s] Error 127
make: *** [prepare0] Error 2




what is this issue?
is it because of make ?
if so how solve this?

davef
make: arm-linux-gcc: Command not found

Have you exported a path to your compiler?

prathima
I have implemented the ADC device driver using driver test application for
mini2440 using linux-2.6.29.To get the quantitative analysis of hardware
and software timers and memory space with or without drivers.what the
procedure to compile or process it to get the quantitative data of memory
space left with or without ADC driver and to get the timing data using
hardware and software timers.i m new to dis domain..so i don't have d idea
of processing it.As ADC is in-built in arm9 target board it is being done
in a static way.so whats the process to get the dynamic configurations for
linux-2.6.29 version using mini2440 board.i need the brief explanation of
how it is processed, configured and compiled using arm9(s3c2440)board
including the steps for compilation and how the quantitative data results
are to be shown.Reply to me as early as possible..its very much urgent
regarding my project.

H.parvin banu
Dear sir,

Have a great day!

I am facing the problem while booting the android kernel image in i.MX50
hardware board, showing uncompressing linux..done, booting the kernel.

As linux kernel version is 2.6.35. As i have compiled the kernel by
applying patch and all and after that facing the booting problem.

Can you please provide the necessary solution.

Thank you for your help and support.

Regards,
H.parvin.

Naveed
Linux red hat booting problem ( cpu fatal trap 13(genenral protection
fault) error -code 000)
what is solution of this problem

amol
I have installed u-boot 1.3.2 on mini2440
Then I have generated uImage of kernel 2.6.32.2 and installed it with jffs2
file system.But when it gets booted it will show in minicom
loading kernel  ok
Uncompressing kernel.....................................................
and it hangs.
any solutions.