• Home
  • Help
  • Search
  • Login
  • Register
Pages: [1] 2
Author Topic: anyone compile a custom kernel yet?  (Read 8981 times)
tmk
Newbie
*

Karma: 1
Posts: 40


View Profile
« on: April 11, 2009, 01:18:41 AM »

Hi folks,

I've been trying to get a custom, modular kernel built using the packaged LSP kernel and gcc compiler.

So far, i can get it almost all the way built, with the following problems:

marvell MMC driver won't compile: SUSPEND_DISABLE undeclared
dallas 1wire won't compile: no clk_get function defined

I don't see any GPIO options available in the menuconfig also..

Anyone have a working .config file? or even the .config that was used to build the packaged kernel?

I'd like the MMC stuff to work (it works in the packaged one), and i really want i2c / gpio / dallas 1w working.

I picked the Feroceon-KW system type, since that's what /proc/cpuinfo tells me it is.


Lastly, assuming i can get it compiled, how would one go about booting it? i don't see the usual vmlinuz file anywhere on the filesystem. My current plan is to try and NFS boot it.
Logged

kilowatt
Global Moderator
Full Member
*****

Karma: 3
Posts: 106


View Profile
« Reply #1 on: April 11, 2009, 08:13:12 AM »

I have not tried any customizations yet but I did successfully setup the cross compiler and build the kernel code in the default configureation.  I downloaded the version 1.1 of the development kit from www.globalscaletechnologies.com.  The files in the download area of this site were a bit stale last time I checked.  I just followed the instructions that came with that version of the development kit.
Logged

tmk
Newbie
*

Karma: 1
Posts: 40


View Profile
« Reply #2 on: April 11, 2009, 08:24:42 AM »

I have not tried any customizations yet but I did successfully setup the cross compiler and build the kernel code in the default configureation. 

did you try the kernel?

how did you determine the default configuration ('make defconfig'?)

-tmk
Logged

tmk
Newbie
*

Karma: 1
Posts: 40


View Profile
« Reply #3 on: April 11, 2009, 08:53:15 AM »

maybe answering my own question here.

this appears to be the default config for the processor i think we're using here:

arch/arm/configs/mv88f6281_defconfig

-tmk
Logged

kilowatt
Global Moderator
Full Member
*****

Karma: 3
Posts: 106


View Profile
« Reply #4 on: April 11, 2009, 10:54:59 AM »

I just followed the one page PDF in the documents package (from dev kit ver 1.1)

step 4 says to make a dir

step 5 says to mv

you can skip step 4 since it really wants you to rename the directory in step 5.

basically :
make mrproper
make mv88f6281_defconfig
make uImage
cp uImage uImage.sheeva.20090319

I did not load the image though.  I was just trying to get the development package setup.  I haven't started customizing yet.

Mark
Logged

moshiach
Guest
« Reply #5 on: April 11, 2009, 08:00:35 PM »

I've not only manged to compile a kernel, but I've also got it working (finallyt) on my plug.  I needed CIFS to make the plug replace my current home server so I booted the plug in to ubuntu, got it working with a usb storage root instead of ram, then dowloaded the orion.git sources and got to work.  Once you have the sources go into /usr/src/linux (you have to link the sources dirctory to this) and
make ARCH=arm mrproper
make ARCH=arm kirkwood_defconfig
make ARCH=arm menuconfig (I suggest compiling a monolithic kernel and not modules)
make ARCH=arm -j2 uImage
(30 minutes later (did this on the plug))
flash_eraseall /dev/mtd1
nandwrite -p /dev/mtd1 arch/arm/boot/uImage
reboot


Pretty easy.  Forget about the cross compiling unless you are using Gentoo and compiling packages.  Compiling the kernel from scratch takes no more than 30-50 minutes.  Oh, one other thing.  Make sure you change your mtdparts in your environment variables.  I found that the name of the mtd changed from nand_mtd to orion_nand.  Other than that, piece of cake compared to getting it to boot into /dev/sda2/
Logged

solstice
Newbie
*

Karma: 0
Posts: 17


View Profile
« Reply #6 on: April 13, 2009, 10:00:33 PM »

I was able to customized a kernel based off the default one they have. I tried it twice before getting it to work. For some reasons, there are a couple things you have to watch out:

1. First make sure the uImage size is same as the default. Otherwise, you will not have enough memory.
2. I deleted the kernel bootcmd and it caused some problem. I suspect that and the RAID driver are fairly important.
Logged

Blazer
Newbie
*

Karma: 0
Posts: 21


View Profile
« Reply #7 on: April 13, 2009, 11:56:26 PM »

Maybe it's because I need sleep, but I appear to need some help here.  The docs that tell how to build a kernel mention some files that I cannot find:

linux-feroceon_4_2_7_KW_new.zip
0001_gw_BE_fix.patch

I have looked all over for these 2 files, but cannot find them. I'm sure it's right in front of my face so feel free to point it out and laugh at me :-)

Also is it possible to upgrade kernel via apt-get?  In this case it won't do me any good as I need a kernel that supports the uvcvideo module, but just wondering.
Logged

Blazer
Newbie
*

Karma: 0
Posts: 21


View Profile
« Reply #8 on: April 14, 2009, 01:06:39 AM »

Im now trying to build a kernel following these instructions:  http://plugcomputer.org/plugwiki/index.php/Compiling_Linux_Kernel_for_the_Plug_Computer

The cross-compile is running, but my issue is that I cannot get mkimage to build:

Code:
[root@gnouf u-boot-2009.03]# make tools
for dir in tools examples api_examples ; do make -C $dir _depend ; done
make[1]: Entering directory `/root/tmp/u-boot-2009.03/tools'
make[1]: Nothing to be done for `_depend'.
make[1]: Leaving directory `/root/tmp/u-boot-2009.03/tools'
make[1]: Entering directory `/root/tmp/u-boot-2009.03/examples'
make[1]: Nothing to be done for `_depend'.
make[1]: Leaving directory `/root/tmp/u-boot-2009.03/examples'
make[1]: Entering directory `/root/tmp/u-boot-2009.03/api_examples'
make[1]: Nothing to be done for `_depend'.
make[1]: Leaving directory `/root/tmp/u-boot-2009.03/api_examples'
make -C tools all
make[1]: Entering directory `/root/tmp/u-boot-2009.03/tools'
gcc -g  -idirafter /root/tmp/u-boot-2009.03/include -idirafter /root/tmp/u-boot-2009.03/include2 -idirafter /root/tmp/u-boot-2009.03/include -DTEXT_BASE= -DUSE_HOSTCC -c -o env_embedded.o env_embedded.c
In file included from env_embedded.c:30:
/root/tmp/u-boot-2009.03/include/environment.h:107: error: 'CONFIG_ENV_SIZE' undeclared here (not in a function)
make[1]: *** [env_embedded.o] Error 1
make[1]: Leaving directory `/root/tmp/u-boot-2009.03/tools'
make: *** [tools] Error 2

Can anyone suggest what could be wrong, or post a mkimage binary? Smiley

*EDIT*

Well the cross-compile "finished" and looks like it is hosed too Sad
Code:
  LD      vmlinux
  SYSMAP  System.map
  SYSMAP  .tmp_System.map
  OBJCOPY arch/arm/boot/Image
  Kernel: arch/arm/boot/Image is ready
  AS      arch/arm/boot/compressed/head.o
  GZIP    arch/arm/boot/compressed/piggy.gz
  AS      arch/arm/boot/compressed/piggy.o
  CC      arch/arm/boot/compressed/misc.o
  LD      arch/arm/boot/compressed/vmlinux
/root/tmp/arm-2008q3/bin/arm-none-eabi-ld: ERROR: arch/arm/boot/compressed/misc.o uses VFP instructions, whereas arch/arm/boot/compressed/vmlinux does not
/root/tmp/arm-2008q3/bin/arm-none-eabi-ld: failed to merge target specific data of file arch/arm/boot/compressed/misc.o
make[2]: *** [arch/arm/boot/compressed/vmlinux] Error 1
make[1]: *** [arch/arm/boot/compressed/vmlinux] Error 2
make: *** [uImage] Error 2

I give up for now. Need sleep.
« Last Edit: April 14, 2009, 01:35:58 AM by Blazer » Logged

Raśl Porcel
Global Moderator
Jr. Member
*****

Karma: 0
Posts: 68


View Profile
« Reply #9 on: April 15, 2009, 12:30:32 AM »

Where are you building this stuff?
Logged

Blazer
Newbie
*

Karma: 0
Posts: 21


View Profile
« Reply #10 on: April 15, 2009, 01:58:01 AM »

Fedora 10. Maybe I should try it on a debian system, I thought it wouldn't matter since It's a cross-compiler.
Logged

KaiBo
Newbie
*

Karma: 0
Posts: 35



View Profile
« Reply #11 on: April 15, 2009, 05:44:18 AM »

Compiled my Kernel yesterday (almost) without hassles. It took the approximated 45 Minutes on the Plug itself, which is fine for my purposes. But somehow I must have missed something.

I set everything up as stated in the Wiki (getting kernel using snapshot) and compiled it using the steps provided by moshiach in this thread (Thanks for that!). However, after flashing the Image and booting it, I get this:
Code:
Error: unrecognized/unsupported machine ID (r1 = 0x0000020f).

Available machine support:

ID (hex) NAME
00000690 Marvell DB-88F6281-BP Development Board
00000691 Marvell RD-88F6192-NAS Development Board
00000682 Marvell RD-88F6281 Reference Board
00000831 Marvell SheevaPlug Reference Board
0000085b QNAP TS-119/TS-219

Please check your kernel config and/or bootloader.

Did I miss something? Maybe a kernel-option that is not being set by using make defconfig? Even though I find it odd that a SheevaPlug is listed as supported...
Logged

tmk
Newbie
*

Karma: 1
Posts: 40


View Profile
« Reply #12 on: April 15, 2009, 07:54:10 AM »

Im now trying to build a kernel following these instructions:  http://plugcomputer.org/plugwiki/index.php/Compiling_Linux_Kernel_for_the_Plug_Computer


This seems fairly involved, and I am taking a slightly different track (simpler?)

There is a cross-compile toolchain, mkimage binary, and kernel source provided with the devkit. The docs i have found state that you have to use their kernel image due to some custom patches they did for this device. Not sure if that's true or not.

i have found that I can unpack these and use them to compile a kernel, with very little hassle. (once i found the right 'default' kernel config file, anyways.. 'make mv88f6281_defconfig')

I may still want to create my own mkimage binary, to modify the banner, but we'll see.

I should also caveat this and say i haven't actually tried my new kernel yet Smiley

Once i do, i'll post my steps. My plan is to 'QA' the new kernel via NFS before i flash it.

-tmk
Logged

Raśl Porcel
Global Moderator
Jr. Member
*****

Karma: 0
Posts: 68


View Profile
« Reply #13 on: April 15, 2009, 10:15:11 AM »

Compiled my Kernel yesterday (almost) without hassles. It took the approximated 45 Minutes on the Plug itself, which is fine for my purposes. But somehow I must have missed something.

I set everything up as stated in the Wiki (getting kernel using snapshot) and compiled it using the steps provided by moshiach in this thread (Thanks for that!). However, after flashing the Image and booting it, I get this:
Code:
Error: unrecognized/unsupported machine ID (r1 = 0x0000020f).

Available machine support:

ID (hex) NAME
00000690 Marvell DB-88F6281-BP Development Board
00000691 Marvell RD-88F6192-NAS Development Board
00000682 Marvell RD-88F6281 Reference Board
00000831 Marvell SheevaPlug Reference Board
0000085b QNAP TS-119/TS-219

Please check your kernel config and/or bootloader.

Did I miss something? Maybe a kernel-option that is not being set by using make defconfig? Even though I find it odd that a SheevaPlug is listed as supported...

I've updated the wiki regarding that: http://plugcomputer.org/plugwiki/index.php/Compiling_Linux_Kernel_for_the_Plug_Computer#Troubleshooting
Logged

Blazer
Newbie
*

Karma: 0
Posts: 21


View Profile
« Reply #14 on: April 15, 2009, 11:04:30 AM »

Fedora 10. Maybe I should try it on a debian system, I thought it wouldn't matter since It's a cross-compiler.

Well for the record I also just tried compiling mkimage on a CentOS 5.3 machine and got the same failure. I guess I should either try compiling it on a ubuntu/debian system, or I think there may be a binary in the dev kit.
Logged

Pages: [1] 2
Print
Jump to: