Rebuilding the actual HF6's kernel.


Linux-SWAT

Forum Addict!
Joined
Feb 13, 2010
Messages
9,181
Can someone knows the good git commands ?


Wiki's one are outdated/imprecise.


I will update the wiki as soon as i can rebuild the same exact kernel + modules.
 
The procedure should be the same as for older hotfixes: DjWillis' toolchain + pandora-kernel.git pandora-27-omap1 branch + OE patches.
 
Code:
bash-4.1$ git clone git://openpandora.org/pandora-kernel.git                                                                                                           

Cloning into pandora-kernel...

remote: Counting objects: 2219260, done.

remote: Compressing objects: 100% (342353/342353), done.

remote: Total 2219260 (delta 1856196), reused 2219260 (delta 1856196)

Receiving objects: 100% (2219260/2219260), 436.03 MiB | 1.62 MiB/s, done.

Resolving deltas: 100% (1856196/1856196), done.

bash-4.1$ git checkout --track -b pandora-27-omap1 origin/pandora-27-omap1

fatal: Not a git repository (or any parent up to mount parent )

Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).

bash-4.1$



If i cd into pandora-kernel and try the same command :





Code:
bash-4.1$ cd pandora-kernel/

bash-4.1$ git checkout --track -b pandora-27-omap1 origin/pandora-27-omap1

Branch pandora-27-omap1 set up to track remote branch pandora-27-omap1 from origin.

Switched to a new branch 'pandora-27-omap1'

bash-4.1$ git checkout --track -b pandora-27-omap1 origin/pandora-27-omap1

fatal: git checkout: branch pandora-27-omap1 already exists

bash-4.1$


Seems no update is done.
 
If i cd into pandora-kernel and try the same command :
Indeed to switch branch you need to be inside the cloned directory, like for all others vcs. (you might want to add that cd into the wiki article ;) )

Seems no update is done.
When you have cloned, you have actually cloned all the repo including all the branches. So the switch seems instant but is done ;)
 
Edition done.


Now for the OE stuff. Why the heck do we need to use this ?

The firmware kernel is built using OE (openembedded), so the only sure way to get binary compatibility is to use that
This explains nothing to noobs like me.
 
That OE (see openembedded.org) patching is historical thing, there used to be linux-omap kernel and openembedded/Angstrom enhancement patches that were not developed enough to be applied to mainline Linux, but were providing missing features. DjWillis maintained OE and I maintained the kernel, so sane way for us to split work was that he manages OE patches and I handle the base kernel. I understand this is inconvenient for someone building a kernel for themselves, we won't do it like this for future kernels.


As about avoiding OE, I think "Firmware Compatibility" section explains it well enough how to build compatible kernel without OE.
 
Last edited by a moderator:
And were the HF6 kernel built with or without OE ?


What are the advantages/inconvenients to build with or without OE ?
 
The disadvantage is your drivers might stop working. :)


I did follow the guide for binary compatibility and it worked fine for me. The only tedious thing to do was manually copying patch files to the directory with the kernel source and applying them, again, manually.


I logged that thing, with all commands and such, here: http://boards.openpa...sb-wifi-driver/


I just didn't write down which patch file needs to be edited before applying, sorry. It's in the binary compatibility guide.
 
Last edited by a moderator:
Np, i'm working on another stuff right now, but i'll be back on kernel + wiki soon.


Meanwhile, thanks all for help.
 
Last edited by a moderator:
Hf6 does have the same kernel than all the others, just contains some more modules.
 
It's in the binary compatibility guide.

Can't find this guide :/


Well, so i did :



Code:
git clone git://git.openpandora.org/pandora-oe-environment.git pandora-firmware

cd pandora-firmware

source ./op-env-oe.sh

./initial-setup.sh

cd metadata/openembedded.git

git checkout op.openembedded.next



I'm in

Code:
/pandora-firmware/metadata/openpandora.oe.git/recipes/linux/omap3-pandora-kernel


Wow.


What's next :/ ?
 
Last edited by a moderator:
I don't know how to patch all this.


Anyway, i tried a compile with the defconfig :



Code:
Makefile:448: *** mixed implicit and normal rules.  Stop.





-------EDIT :

Back with a more recent kernel with the defconfig.



What is the compression type supported by uboot ? gzip, lzma or lzo ? It's not specified in the defconfig



-------EDIT :

Failed. Again.

Going DJWillis's toolchain, hoping it works on 64bit multilib.

Any advice for sources patching ?



-------EDIT :

Rofl, worst than ever, i can't compile anything, whatever the sources, whatever the .config.



Did

Code:
cp defconfig pandora-kernel-mainline/arch/arm/configs/omap3_pandora_defconfig





Code:
*** End of the configuration.

*** Execute 'make' to start the build or try 'make help'.

scripts/kconfig/conf --silentoldconfig Kconfig

warning: (ARCH_OMAP4 && ARCH_VEXPRESS_CA9X4) selects ARM_ERRATA_720789 which has unmet direct dependencies (CPU_V7 && SMP)

warning: (ARCH_OMAP4 && ARCH_VEXPRESS_CA9X4) selects ARM_ERRATA_720789 which has unmet direct dependencies (CPU_V7 && SMP)

  CHK 	include/linux/version.h

  CC  	scripts/mod/empty.o

cc1: error: unrecognized command line option "-mlittle-endian"

cc1: error: unrecognized command line option "-mno-thumb-interwork"

scripts/mod/empty.c:1:0: error: unknown ABI (aapcs-linux) for -mabi= switch

scripts/mod/empty.c:1:0: error: bad value (armv5t) for -march= switch

make[2]: *** [scripts/mod/empty.o] Error 1

make[1]: *** [scripts/mod] Error 2

make: *** [scripts] Error 2

make: *** Waiting for unfinished jobs....

  CHK 	include/linux/version.h

  CHK 	include/generated/utsrelease.h

  CC  	scripts/mod/empty.o

cc1: error: unrecognized command line option "-mlittle-endian"

cc1: error: unrecognized command line option "-mno-thumb-interwork"

scripts/mod/empty.c:1:0: error: unknown ABI (aapcs-linux) for -mabi= switch

scripts/mod/empty.c:1:0: error: bad value (armv5t) for -march= switch

make[2]: *** [scripts/mod/empty.o] Error 1

Etc. etc. etc.
 
Last edited by a moderator:
I can't loose more time on it.


Can't it be possible to have a .bz2 with patched sources + preconfigured toolchain ?
 
Code:
git checkout op.openembedded.next
So DjWillis kept these in the .next tree ? color me surprised. You'ld better just keep to the normal tree.

I don't know how to patch all this.
http://lmgtfy.com/?q=applying+a+patch+linux&l=1

Anyway, i tried a compile with the defconfig
No patch ? wont work.

Going DJWillis's toolchain, hoping it works on 64bit multilib.
Yactfeau is just DJWillis's toolchain with a few twists on it ;)
 
Wiki edited.


Now what about the defconfig ?


Still get this with the CodeSourcery G++, BTW



Code:
Makefile:448: *** mixed implicit and normal rules.  Stop.



----EDIT :

Ok, removed the bad things in the Makefile, but i have fatal errors during compilation.





Code:
*** Execute 'make' to build the kernel or try 'make help'.

scripts/kconfig/conf -s arch/arm/Kconfig

  CHK 	include/linux/version.h

make[1]: `include/asm-arm/mach-types.h' is up to date.

  CHK 	include/linux/utsrelease.h

  HOSTCC  scripts/mod/file2alias.o

  HOSTCC  scripts/mod/modpost.o

scripts/mod/file2alias.c:39:49: fatal error: ../../include/linux/mod_devicetable.h: No such file or directory

compilation terminated.

make[2]: *** [scripts/mod/file2alias.o] Error 1

make[2]: *** Waiting for unfinished jobs....

scripts/mod/modpost.c:18:41: fatal error: ../../include/linux/license.h: No such file or directory

compilation terminated.

make[2]: *** [scripts/mod/modpost.o] Error 1

make[1]: *** [scripts/mod] Error 2

make: *** [scripts] Error 2

  CHK 	include/linux/version.h

make[1]: `include/asm-arm/mach-types.h' is up to date.

  CHK 	include/linux/utsrelease.h

  HOSTCC  scripts/mod/file2alias.o

  HOSTCC  scripts/mod/modpost.o

scripts/mod/file2alias.c:39:49: fatal error: ../../include/linux/mod_devicetable.h: No such file or directory

compilation terminated.

make[2]: *** [scripts/mod/file2alias.o] Error 1

make[2]: *** Waiting for unfinished jobs....

scripts/mod/modpost.c:18:41: fatal error: ../../include/linux/license.h: No such file or directory

compilation terminated.

make[2]: *** [scripts/mod/modpost.o] Error 1

make[1]: *** [scripts/mod] Error 2

make: *** [scripts] Error 2
 
Last edited by a moderator:
Help ? :(



Code:
HOSTCC  scripts/mod/modpost.o

scripts/mod/file2alias.c:39:49: fatal error: ../../include/linux/mod_devicetable.h: No such file or directory





Code:
scripts/mod/modpost.c:18:41: fatal error: ../../include/linux/license.h: No such file or directory

compilation terminated.


I'm almost here :/


There is a contradiction in the wiki :

Copy the defconfig file from above patches location to .config

and

make omap3_pandora_defconfig
 
Last edited by a moderator:
I've never seen the problems you are having and there should be no need to edit kernel's Makefile. What is the version of make you are using?


It looks like you edited out config portion from Makefile and now kernel can't build.
 
Back
Top