Author Topic: Problem with compile kernel  (Read 6603 times)

Offline PathFinder

  • Newbie
  • *
  • Posts: 27
  • Karma: +0/-0
    • View Profile
Problem with compile kernel
« on: February 06, 2014, 12:29:17 pm »
Hi,

i made a custom kernel from
   http://docs.cubieboard.org/tutorials/dvk521/documentations/a20/kernel_porting_and_configuration
and
   http://docs.cubieboard.org/tutorials/dvk521/documentations/a20/driver_porting_and_configuration
( very good tutorial )

and i successfully create a uImage file and then i replace it with my old uImage , but after reboot cubie not start !
error wrote that file boot.scr not found !

how i solve this problem?

best regards

Offline patwood

  • Linux geek
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1660
  • Karma: +129/-0
    • View Profile
Re: Problem with compile kernel
« Reply #1 on: February 06, 2014, 11:55:09 pm »
If you mean the serial messages from the boot loader, missing boot.scr isn't necessarily a problem. What other messages do you get, especially the last few lines?

Offline PathFinder

  • Newbie
  • *
  • Posts: 27
  • Karma: +0/-0
    • View Profile
Re: Problem with compile kernel
« Reply #2 on: February 13, 2014, 12:55:11 pm »
Hi,pat

sorry for my late answer. i have to compile again kernel but i wasn't successfull again !

i couldn't copy paste terminal message , then i have to attach the terminal image  :P


in my kernel only spi & 1wire was activated ; ( build in ) not module ...

boot message :
U-Boot 2013.07-07795-g645e901-dirty (Aug 18 2013 - 16:15:54) Allwinner Technology

CPU:   Allwinner A20 (SUN7I)
Board: Cubieboard2
I2C:   ready
DRAM:  1 GiB
MMC:   SUNXI SD/MMC: 0
*** Warning - bad CRC, using default environment

In:    serial
Out:   serial
Err:   serial
Net:   emac
Hit any key to stop autoboot:  1 \0x08\0x08\0x08 0
** Unrecognized filesystem type **
188 bytes read in 10 ms (17.6 KiB/s)
Loaded environment from uEnv.txt
** Unrecognized filesystem type **
** File not found boot/boot.scr **
** File not found boot.scr **
46600 bytes read in 20 ms (2.2 MiB/s)
invalid extent block
invalid extent block
ext4fs_devread read outside partition 4294967120
** Unrecognized filesystem type **
** File not found /script.bin **
sun7i#


PrintEnv Results:

Environment size: 2034/131068 bytes
sun7i#
autoboot=run loadkernel && run setargs && true && bootm 0x48000000
baudrate=115200
boot_ram=saved_stdout=$stdout;setenv stdout nc;if iminfo 0x41000000; then true; setenv stdout $saved_stdout; source 0x41000000;else setenv stdout $saved_stdout;fi
bootcmd=if run loadbootenv; then echo Loaded environment from ${bootenv};env import -t ${scriptaddr} ${filesize};fi;if test -n "${uenvcmd}"; then echo Running uenvcmd ...;run uenvcmd;fi;if run loadbootscr; then echo Jumping to ${bootscr};source ${scriptaddr};fi;run autoboot;
bootdelay=1
bootenv=uEnv.txt
bootscr=boot.scr
console=ttyS0,115200
device=mmc
ethact=emac
extraargs=disp.screen0_output_mode=1280x720p60 sunxi_no_mali_mem_reserve sunxi_g2d_mem_reserve=0 sunxi_ve_mem_reserve=0 sunxi_fb_mem_reserve=16
filesize=b608
kernel=/uImage
loadbootenv=fatload $device $partition $scriptaddr ${bootenv} || ext4load $device $partition $scriptaddr boot/${bootenv} || ext4load $device $partition $scriptaddr ${bootenv}
loadbootscr=fatload $device $partition $scriptaddr ${bootscr} || ext4load $device $partition $scriptaddr boot/${bootscr} ||ext4load $device $partition $scriptaddr ${bootscr}
loadkernel=if bootpath=/boot/ && ext4load $device $partition 0x43000000 ${bootpath}script.bin && ext4load $device $partition 0x48000000 ${bootpath}${kernel};then true; elif bootpath=/ && fatload $device $partition 0x43000000 script.bin && fatload $device $partition 0x48000000 ${kernel};then true; elif bootpath=/ && ext4load $device $partition 0x43000000 ${bootpath}script.bin && ext4load $device $partition 0x48000000 ${bootpath}${kernel};then true; else false;fi
loglevel=8
panicarg=panic=10
partition=0:1
root=/dev/mmcblk0p1 rootwait
scriptaddr=0x44000000
setargs=if test -z \\"$root\\"; then if test \\"$bootpath\\" = "boot/"; then root="/dev/mmcblk0p1 rootwait"; else root="/dev/mmcblk0p2 rootwait"; fi; fi; setenv bootargs console=${console} root=${root} loglevel=${loglevel} ${panicarg} ${extraargs}
stderr=serial
stdin=serial
stdout=serial

Environment size: 2034/131068 bytes
sun7i#
« Last Edit: February 13, 2014, 02:08:17 pm by PathFinder »

Offline patwood

  • Linux geek
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1660
  • Karma: +129/-0
    • View Profile
Re: Problem with compile kernel
« Reply #3 on: February 13, 2014, 02:13:50 pm »
Looks like you're trying to load a kernel from the ext4 root fs.  This is not reliable with u-boot.  Try putting the kernel and script.bin on your first (vfat) partition.

Offline PathFinder

  • Newbie
  • *
  • Posts: 27
  • Karma: +0/-0
    • View Profile
Re: Problem with compile kernel
« Reply #4 on: February 13, 2014, 02:45:04 pm »
thanx for  answer..

unfortunately the Saucy image don't have vfat partition ! what can i do for this?

Offline patwood

  • Linux geek
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1660
  • Karma: +129/-0
    • View Profile
Re: Problem with compile kernel
« Reply #5 on: February 13, 2014, 08:06:08 pm »
Which Saucy image are you using? saucy-core-developer-20131013-A20-3.4.61.img?  This one doesn't have a vfat; however, saucy-13.10-ct-cb2-3.4.75.img.xz does and has a newer kernel.  It is also based on the 13.10 final , whereas the other is based on a release candidate that came out a few days before the final one.

Offline PathFinder

  • Newbie
  • *
  • Posts: 27
  • Karma: +0/-0
    • View Profile
Re: Problem with compile kernel
« Reply #6 on: February 14, 2014, 03:32:59 am »
my saucy is 3.4.61 ( the older one) ! is the way to correct this problem ?

other question , the kernel source i downloaded (cubie doc tutorial) :

http://dl.cubieboard.org/parteners/waveshare/Source_Code/COMMON/linux-sunxi-sunxi-3.4.61.tar.gz

it has 1.1 GB volume ! all other kernel sources have this volume ?!

Offline patwood

  • Linux geek
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1660
  • Karma: +129/-0
    • View Profile
Re: Problem with compile kernel
« Reply #7 on: February 14, 2014, 10:40:41 am »
my saucy is 3.4.61 ( the older one) ! is the way to correct this problem ?

other question , the kernel source i downloaded (cubie doc tutorial) :

http://dl.cubieboard.org/parteners/waveshare/Source_Code/COMMON/linux-sunxi-sunxi-3.4.61.tar.gz

it has 1.1 GB volume ! all other kernel sources have this volume ?!

This distro: http://dl.cubieforums.com/patwood/saucy-13.10-ct-cb2-3.4.75.img.xz has a newer kernel and has a vfat boot partition where uImage and script.bin are stored.

If you mean the kernel sources are big -- well, yes, they are.  Welcome to linux!  My kernel sources are ~600MB, and the .git repository is 1.4GB.  A typical build (object files) with minimal drivers runs ~500MB-700MB, and the builds I've been doing run 2.4GB.

I would suggest getting your kernel sources from github.  The cubietech guys have their own repo (I assume this is where they tar up their kernel sources), and the "official" sunxi linux kernel sources are also there.  It's pretty easy to maintain one local source repository with all these branches in one place (of course, you then end up with a .git directory that 1.4GB in size).

Offline PathFinder

  • Newbie
  • *
  • Posts: 27
  • Karma: +0/-0
    • View Profile
Re: Problem with compile kernel
« Reply #8 on: February 28, 2014, 05:04:54 am »
Hi
i uses 3.4.75 pat kernel . and when i compile it , some error occurred at last ..

Code: [Select]
CC [M]  drivers/net/wireless/rtxx7x/chips/rt3370.o
  CC [M]  drivers/net/wireless/rtxx7x/chips/rt5390.o
  CC [M]  drivers/net/wireless/rtxx7x/common/rtusb_dev_id.o
  CC [M]  drivers/net/wireless/rtxx7x/os/linux/rt_usb_util.o
  CC [M]  drivers/net/wireless/rtxx7x/os/linux/usb_main_dev.o
/media/Kernel-3.4.75/linux-sunxi-pat-3.4.75/drivers/net/wireless/rtxx7x/os/linux/usb_main_dev.c: In function ‘rt2870_suspend’:
/media/Kernel-3.4.75/linux-sunxi-pat-3.4.75/drivers/net/wireless/rtxx7x/os/linux/usb_main_dev.c:450:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
  LD [M]  drivers/net/wireless/rtxx7x/rt5370sta.o
make: *** [sub-make] Error 2
  INSTALL arch/arm/mach-sun7i/rf/bt_gpio.ko
  INSTALL arch/arm/mach-sun7i/rf/wifi_gpio.ko
  INSTALL crypto/af_alg.ko
  INSTALL crypto/algif_hash.ko
cp: cannot stat `arch/arm/mach-sun7i/rf/wifi_gpio.ko'cp: cannot stat `arch/arm/mach-sun7i/rf/bt_gpio.ko': No such file or directory: No such file or directory

cp: cp: cannot stat `crypto/algif_hash.ko'cannot stat `crypto/af_alg.ko': No such file or directory: No such file or directory

arm-linux-gnueabihf-strip: arm-linux-gnueabihf-strip: 'output/lib/modules/3.4.75/kernel/crypto/af_alg.ko': No such file
make[2]: *** [crypto/af_alg.ko] Error 1
make[2]: *** Waiting for unfinished jobs....
arm-linux-gnueabihf-strip: 'output/lib/modules/3.4.75/kernel/arch/arm/mach-sun7i/rf/bt_gpio.ko': No such file
make[2]: *** [arch/arm/mach-sun7i/rf/bt_gpio.ko] Error 1
'output/lib/modules/3.4.75/kernel/arch/arm/mach-sun7i/rf/wifi_gpio.ko': No such file
make[2]: *** [arch/arm/mach-sun7i/rf/wifi_gpio.ko] Error 1
arm-linux-gnueabihf-strip: 'output/lib/modules/3.4.75/kernel/crypto/algif_hash.ko': No such file
make[2]: *** [crypto/algif_hash.ko] Error 1
make[1]: *** [_modinst_] Error 2
make: *** [sub-make] Error 2
xxx@xxx:/media/Kernel-3.4.75/linux-sunxi-pat-3.4.75$

only 4 error about this file:

bt_gpio.ko
wifi_gpio.ko
af_alg.ko
algif_hash.ko


before makeuimage command i clear old object file and this is default def_config of sun7i and i have no  change in menuconfig .
why this error occurred ?
maybe a simple makefile problem ?

« Last Edit: February 28, 2014, 05:11:47 am by PathFinder »