beagleboard / kernel

Kernel for the beagleboard.org boards
172 stars 159 forks source link

Build 3.14... #94

Closed jiapei100 closed 10 years ago

jiapei100 commented 10 years ago

Waiting for 3.14...

BTW, is there any wiki for us to follow to produce our own "configuration"? I mean, if you've got no time to make branch 3.14, what issues should be paid most attention to to produce our own branch 3.14 (instead of just downloading your 3.13)?

Cheers

ZubairLK commented 10 years ago

Best to use the previous versions .config file and see.

https://github.com/beagleboard/kernel/blob/3.13/configs/beaglebone

its not just the .config file you need to be concerned with.

The patches folder has out of tree patches that would need to be forward ported and checked.

Some are critical for boot. And others necessary depending on what functionality you want out of the BBB.

And you might want to take a peek at https://github.com/RobertCNelson/linux-dev/tree/am33x-v3.14

Cheers ZubairLK

RobertCNelson commented 10 years ago

Pushed: https://github.com/beagleboard/kernel/tree/3.14 and Pushed: https://github.com/beagleboard/linux/tree/3.14

as you can tell, i mostly just develop it in my local repo..

jiapei100 commented 10 years ago

Unfortunately, whenever I tried to git clone beagleboard kernel.git, I obtained the following message:

➜ bbb git clone git://github.com/beagleboard/kernel.git Cloning into 'kernel'... fatal: unable to connect to github.com: github.com[0: 192.30.252.128]: errno=Connection refused

If I don't use the kernel obtained via git, and download and unzip the kernel-3.14.zip, and I run the patch, I'll get

➜ kernel-3.14 ./patch.sh Cloning into '.'... fatal: unable to connect to git.kernel.org: git.kernel.org[0: 149.20.4.72]: errno=Connection refused git.kernel.org[1: 199.204.44.194]: errno=Connection refused git.kernel.org[2: 198.145.20.140]: errno=Connection refused git.kernel.org[3: 2001:4f8:1:10:0:1991:8:25]: errno=Network is unreachable

It looks our company has blocked github's git port?? why the patch.sh needs to connect to git.kernel.org? I can see the patches are already downloaded with the kernel-3.14.zip.

➜ kernel-3.14 ls 3.14 configs db.txt hacks kernel old-patches patches patch.sh README.md recipes ➜ kernel-3.14 ls patches dts dts-bone dts-bone-capes fixes static-capes usb

Those patches are just what I'm interested in. How many patches are required specifically for beaglebone black (I mean, the difference between kernel-3.14 from http://www.kernel.org and the beaglebone kernel-3.14 from https://github.com/beagleboard/kernel ?)

Thank you very much...

Best Regards Pei

RobertCNelson commented 10 years ago

Talk to your IT people and fix your network access. The 2nd link i posted shows you the delta, otherwise mainline is fine on the BeagleBone Black.

jiapei100 commented 10 years ago

Finally, I got it... I started to build 3.14.1. I strictly followed the doc http://elinux.org/Building_BBB_Kernel and https://github.com/beagleboard/kernel/tree/3.14

However, I obtained the following error messages respectively:

1) kernel git:(tmp-patching-branch-sha) ✗ make ARCH=arm CROSS_COMPILE=arm-linux-gnu- uImage dtbs Makefile:608: Cannot use CONFIG_CC_STACKPROTECTOR_REGULAR: -fstack-protector not supported by compiler make: arm-linux-gnu-gcc: Command not found scripts/kconfig/conf --silentoldconfig Kconfig Makefile:608: Cannot use CONFIG_CC_STACKPROTECTOR_REGULAR: -fstack-protector not supported by compiler make: arm-linux-gnu-gcc: Command not found CHK include/config/kernel.release CHK include/generated/uapi/linux/version.h CHK include/generated/utsrelease.h make[1]: `include/generated/mach-types.h' is up to date. CC kernel/bounds.s /bin/sh: 1: arm-linux-gnu-gcc: not found make[1]: * [kernel/bounds.s] Error 127 make: * [prepare0] Error 2

2) kernel git:(tmp-patching-branch-sha) ✗ make ARCH=arm LOADADDR=0x80008000 uImage dtbs Makefile:608: Cannot use CONFIG_CC_STACKPROTECTOR_REGULAR: -fstack-protector not supported by compiler CHK include/config/kernel.release CHK include/generated/uapi/linux/version.h CHK include/generated/utsrelease.h make[1]: `include/generated/mach-types.h' is up to date. CC kernel/bounds.s gcc: error: unrecognized argument in option ‘-mabi=aapcs-linux’ gcc: note: valid arguments to ‘-mabi=’ are: ms sysv gcc: error: unrecognized command line option ‘-mlittle-endian’ gcc: error: unrecognized command line option ‘-mno-thumb-interwork’ gcc: error: unrecognized command line option ‘-mfpu=vfp’ make[1]: * [kernel/bounds.s] Error 1 make: * [prepare0] Error 2

I'm using Ubuntu 14.04 kernel git:(tmp-patching-branch-sha) ✗ uname -a Linux pei-Latitude-E6410 3.13.0-24-generic #46-Ubuntu SMP Thu Apr 10 19:11:08 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux

and I can see clearly I've got cpp-4.8-arm-linux-gnueabihf /usr/bin/arm-linux-gnueabihf-cpp-4.8 cpp-arm-linux-gnueabihf /usr/bin/arm-linux-gnueabihf-cpp -> arm-linux-gnueabihf-cpp-4.8 g++-4.8-arm-linux-gnueabihf /usr/bin/arm-linux-gnueabihf-g++-4.8 g++-arm-linux-gnueabihf /usr/bin/arm-linux-gnueabihf-g++ -> arm-linux-gnueabihf-g++-4.8 gcc-4.8-arm-linux-gnueabihf /usr/bin/arm-linux-gnueabihf-gcc-4.8 gcc-arm-linux-gnueabihf /usr/bin/arm-linux-gnueabihf-gcc -> arm-linux-gnueabihf-gcc-4.8

So, what should I modify to have the kernel 3.14.1 successfully built for BBB?

Thank you very much...

Best Regards Pei

RobertCNelson commented 10 years ago

Your close, just stop following random wiki's..

make ARCH=arm CROSS_COMPILE=/usr/bin/arm-linux-gnueabihf- LOADADDR=0x80008000 uImage modules dtbs
jiapei100 commented 10 years ago

Wow... Thank you so much RobertCNelson. It's successfully built now.

Now, I need a very detailed documentation about "how to install everything correctly onto the BBB's SD card or eMMc" ? What is your suggestion? Maybe, still LFS (linuxfromscratch) ??

Yup, this "how to" should be in details. If I connect the client BBB to the Host PC via USB, what are the steps that I need to follow to finally successfully install my own built kernel onto the BBB's eMMc or SD card?

Well, sorry for my naive questions...

Best Regards Pei

RobertCNelson commented 10 years ago

Something like what I wrote here:

http://eewiki.net/display/linuxonarm/BeagleBone+Black#BeagleBoneBlack-CopyKernelFiles

jiapei100 commented 10 years ago

Wow... My god... is that doc written by you??? That's cool... I'd love to ask some basic questions:

1) Is it possible to write/flash into BBB's eMMC directly? According to BBB's specification, the eMMC on a BBB is about 2GB, big enough for a small OS. So, do you have some documentation for "how to flash my own kernel, further some other packages onto eMMC" ?

In such a case, the only connection between my host Ubuntu and BBB is just USB to microUSB, right?

2) Is it possible to write/flash into BBB's SDCard directly without plug the SDCard out from BBB? If so, how to detect the SDCard on a BBB from my host Ubuntu? I'm thinking there must be a way like that ---- I mean, without plug out the SDCard from BBB, I'm still able to write/flash my kernel onto the SDCard when it's still plugged in the BBB.

Please be more specific, in more details... Thank you...

Cheers Pei