Trying to build a 3.8.13 kernel with seeeds BBG patches

366 views
Skip to first unread message

Keith Conger

unread,
Dec 15, 2015, 12:26:18 AM12/15/15
to BeagleBoard
I'm trying to build a 3.8.13 kernel with the BBG patches from http://www.seeedstudio.com/recipe/373-how-to-compile-beaglebone-green-linux-kernel.html.

I hit this error during the build:

make[1]: Leaving directory `/home/keithconger/Projects/bbbandroid-bluez/kernel'
make -C kernel ARCH=arm CROSS_COMPILE=/home/keithconger/Projects/bbbandroid-bluez/prebuilts/gcc/linux-x86/arm/arm-gnueabihf-4.7/bin/arm-linux-gnueabihf- dtbs
make[1]: Entering directory `/home/keithconger/Projects/bbbandroid-bluez/kernel'
  DTC     arch/arm/boot/dts/am335x-bone.dtb
  DTC     arch/arm/boot/dts/am335x-boneblack.dtb
  DTC     arch/arm/boot/dts/am335x-bonegreen.dtb
Error: arch/arm/boot/dts/am335x-bonegreen.dts:45.15-16 syntax error
FATAL ERROR: Unable to parse input tree
make[2]: *** [arch/arm/boot/dts/am335x-bonegreen.dtb] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [dtbs] Error 2
make[1]: Leaving directory `/home/keithconger/Projects/bbbandroid-bluez/kernel'
make: *** [kernel_build] Error 2

Line 45 and 46 are:
0x150 (PIN_INPUT | MUX_MODE1)   /* spi0_sclk.uart2_rxd */
0x154 (PIN_OUTPUT | MUX_MODE1)  /* spi0_d0.uart2_txd */

Anyone know how to resolve this?

Thanks

William Hermans

unread,
Dec 15, 2015, 5:58:55 AM12/15/15
to beagl...@googlegroups.com
Your problem is very likely that you do not have the files

#include "am33xx.dtsi"
#include "am335x-bone-common.dtsi"


In your path. I get the same error here:

$ dtc -O dtb -o am335x-bonegreen.dtbo -b 0 -@ am335x-bonegreen.dts
Error: am335x-bonegreen.dts:10.1-9 syntax error

FATAL ERROR: Unable to parse input tree

So, you missed a step somewhere. Which kernel version will the target be using ? This should be trivial to fix, but the only option I can think of offhand is git cloning https://github.com/RobertCNelson/device-tree-rebasing, and then placing your *bonegreen* dts file into the <base git>/src/arm/ directory, and compiling manually. As I have no idea which instructions you are following, and what the steps are.

*OR*

Perhaps placing am33xx.dtsi and am335x-bone-common.dtsi in the same directory as am335x-bonegreen.dts, and try again. I've never done this personally, but it should work. In fact, I think it makes more sense than the first option I mention above. With one caveat: I do not recall if either of these include files have further dependencies in this git tree.

--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to the Google Groups "BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

William Hermans

unread,
Dec 15, 2015, 6:01:23 AM12/15/15
to beagl...@googlegroups.com
One additional note: That git has the *bonegreen* dts file in it already. So git cloning that git, and running dtc in the src/arm/ directory for that file should just work.

William Hermans

unread,
Dec 15, 2015, 6:16:26 AM12/15/15
to beagl...@googlegroups.com
One additional note: That git has the *bonegreen* dts file in it already. So git cloning that git, and running dtc in the src/arm/ directory for that file should just work.

Following these line of reasoning, I get the same error. hmmm give me a minute.

William Hermans

unread,
Dec 15, 2015, 6:26:19 AM12/15/15
to beagl...@googlegroups.com
I'm looking into it.

William Hermans

unread,
Dec 15, 2015, 6:45:12 AM12/15/15
to beagl...@googlegroups.com
Well I was attempting to create a *.dtbo file from the source, but here this works:

$ git clone https://github.com/RobertCNelson/dtb-rebuilder.git
Cloning into 'dtb-rebuilder'...
remote: Counting objects: 6357, done.
remote: Compressing objects: 100% (12/12), done.
remote: Total 6357 (delta 3), reused 0 (delta 0), pack-reused 6343
Receiving objects: 100% (6357/6357), 4.38 MiB | 344 KiB/s, done.
Resolving deltas: 100% (2563/2563), done.

$ cd dtb-rebuilder/

$ make src/arm/am335x-bonegreen.dtb
  DTC     src/arm/am335x-bonegreen.dtb

$ cp src/arm/am335x-bonegreen.dtb .

$ ls
Bindings  COPYING  Makefile  README  am335x-bonegreen.dtb  dtc-overlay.sh  include  scripts  src

William Hermans

unread,
Dec 15, 2015, 6:51:54 AM12/15/15
to beagl...@googlegroups.com
Doh, I just realized you're working with a 3.8.x kernel . . . These instructions above I believe will only work with 4.x, as that's what the sourced in this repo are meant for. However, I bet the device tree source files are exactly the same. But unsure if dt-bindings are different or not.

William Hermans

unread,
Dec 15, 2015, 7:21:40 AM12/15/15
to beagl...@googlegroups.com
OK, wow those instructions are whack. First of all this is the proper way to use Robert's bb-kernel repo:

https://eewiki.net/display/linuxonarm/BeagleBone+Black#BeagleBoneBlack-LinuxKernel

Secondly, this builds all the necessary BBG files as well( as far as I know ). So in short . . .

$ git clone https://github.com/RobertCNelson/bb-kernel
$ cd bb-kernel/

$ git checkout origin/am33x-v3.8 -b tmp

Now you can build with:
$ ./build_kernel.sh

*OR*

$ ./build_deb.sh

build_deb.sh will build a Debian package, that will allow you to install this new kernel over the top of an existing kernel( and including dependencies ) on an already working image. Extremely useful if you need to make kernel tweaks only to a system.

I am curious though. Any specific reason why you have to use a 3.8.x kernel ? the 4.x kernels are pretty good now days . . .and they seem to be noticeably faster too.

Keith Conger

unread,
Dec 15, 2015, 4:45:42 PM12/15/15
to BeagleBoard
Hi William,

Thanks for looking at this for me.

I'm using 3.8 for video acceleration and Android.  I have not been able to get more recent kernels to fully work with everything I need on BBB.

I copied the dts file from the am33x-v3.8 tree into my kernel and was able to build and boot the kernel.  Now I'm trying to get the 4D LCD4 cape functioning.

Thanks,
Keith

William Hermans

unread,
Dec 15, 2015, 5:08:20 PM12/15/15
to beagl...@googlegroups.com
I'm using 3.8 for video acceleration and Android.  I have not been able to get more recent kernels to fully work with everything I need on BBB.

I copied the dts file from the am33x-v3.8 tree into my kernel and was able to build and boot the kernel.  Now I'm trying to get the 4D LCD4 cape functioning.

Is that even possible ? With the HDMI framer not even existing on the BBG?

Robert Nelson

unread,
Dec 15, 2015, 5:14:26 PM12/15/15
to Beagle Board
On Tue, Dec 15, 2015 at 4:08 PM, William Hermans <yyr...@gmail.com> wrote:
>> I'm using 3.8 for video acceleration and Android. I have not been able to
>> get more recent kernels to fully work with everything I need on BBB.
>>
>> I copied the dts file from the am33x-v3.8 tree into my kernel and was able
>> to build and boot the kernel. Now I'm trying to get the 4D LCD4 cape
>> functioning.
>
>
> Is that even possible ? With the HDMI framer not even existing on the BBG?

External video capes such as the lcd work fine with the BBG..

It's just missing the am335x_lcd_pins -> Nxp lcd-hdmi framer -> hdmi connector..

Regards,

--
Robert Nelson
https://rcn-ee.com/

Keith Conger

unread,
Dec 15, 2015, 9:46:36 PM12/15/15
to BeagleBoard
I've got my LCD working but I'm struggling with enabling UART2 with it connected.

I'm getting a conflict between the two:
[    1.749303] bone-capemgr bone_capemgr.9: slot #5: BB-UART2 conflict P9.21 (#3:BB-BONE-LCD4-01)

What's weird is the LCD's datasheet doesn't show that pin being used.


Anyone come across this before?

Thanks,
Keith

Robert Nelson

unread,
Dec 15, 2015, 10:02:28 PM12/15/15
to Beagle Board
On Tue, Dec 15, 2015 at 8:46 PM, Keith Conger <keith....@gmail.com> wrote:
> I've got my LCD working but I'm struggling with enabling UART2 with it
> connected.
>
> I'm getting a conflict between the two:
> [ 1.749303] bone-capemgr bone_capemgr.9: slot #5: BB-UART2 conflict P9.21
> (#3:BB-BONE-LCD4-01)
>
> What's weird is the LCD's datasheet doesn't show that pin being used.
>
> http://www.4dsystems.com.au/productpages/4DCAPE-43/downloads/4DCAPE-43(T)_datasheet_R_1_9.pdf

I see no "P9.21" being used:

https://github.com/beagleboard/linux/blob/3.8/firmware/capes/BB-BONE-LCD4-01-00A1.dts

What source/kernel (uname -r) are you using?

Keith Conger

unread,
Dec 15, 2015, 10:18:20 PM12/15/15
to BeagleBoard
I'm using 3.8.13.  In the kernel source I'm using BB-BONE-LCD4-01-00A1.dts does have that pin being used.   I just found the article below.  So I've removed the offending lines and I'm creating a new image to test.


Thanks,
Keith

Robert Nelson

unread,
Dec 15, 2015, 10:25:30 PM12/15/15
to Beagle Board
On Tue, Dec 15, 2015 at 9:18 PM, Keith Conger <keith....@gmail.com> wrote:
> I'm using 3.8.13. In the kernel source I'm using BB-BONE-LCD4-01-00A1.dts
> does have that pin being used. I just found the article below. So I've
> removed the offending lines and I'm creating a new image to test.
>
> https://accustrata.wordpress.com/2014/10/27/lcd4-cape-and-circuitco-adc-cape-working-together/

Well the reason i asked, this was fixed a year ago:

https://github.com/RobertCNelson/bb-kernel/commit/ad1d7afeb38137340a883576d6b6f582650c88f2

so: 3.8.13-bone69 ++

Keith Conger

unread,
Dec 16, 2015, 10:26:34 AM12/16/15
to BeagleBoard
Ah, figures.  Sorry, should of confirmed I was using the latest.  

Thanks again,
Keith

William Hermans

unread,
Dec 16, 2015, 10:38:54 AM12/16/15
to beagl...@googlegroups.com
Shouldn't git checkout origin/am33x-v3.8 -b tmp have pulled the latest sources ?

--

Robert Nelson

unread,
Dec 16, 2015, 10:44:01 AM12/16/15
to Beagle Board
On Wed, Dec 16, 2015 at 9:38 AM, William Hermans <yyr...@gmail.com> wrote:
> Shouldn't git checkout origin/am33x-v3.8 -b tmp have pulled the latest
> sources ?

That is what's odd, he got a branch from over a year ago.. "git
checkout origin/xyz -b tmp" just creates a branch on the local value
of 'xyz', so without a 'git pull' before hand...

Yet still, a repo from over a year ago..

William Hermans

unread,
Dec 16, 2015, 10:48:18 AM12/16/15
to beagl...@googlegroups.com
That is what's odd, he got a branch from over a year ago..  "git
checkout origin/xyz -b tmp" just creates a branch on the local value
of 'xyz', so without a 'git pull' before hand...

Yet still, a repo from over a year ago..

I blame those whack seed "instructions" . . .heh. Never ceases to amaze though how people can take something perfectly good, then feel compelled to make it "better" .


Keith Conger

unread,
Dec 16, 2015, 11:02:37 AM12/16/15
to beagl...@googlegroups.com
Hi,

It did but I manually copied in what I thought I needed.  The kernel I'm using has a few additional patches applied.  So. I went the quick and dirty route.  

Over the next two weeks I may try to get a newer kernel built.  Does anyone know what the newest kernel with sgx support is?  Is it still 3.14?

Thanks,
Keith

You received this message because you are subscribed to a topic in the Google Groups "BeagleBoard" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/beagleboard/TbQQ-ap1_HE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to beagleboard...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
Keith Conger
keith DOT conger AT gmail DOT com
http://thecongers.org

Robert Nelson

unread,
Dec 16, 2015, 11:06:47 AM12/16/15
to Beagle Board
On Wed, Dec 16, 2015 at 10:02 AM, Keith Conger <keith....@gmail.com> wrote:
> Hi,
>
> It did but I manually copied in what I thought I needed. The kernel I'm
> using has a few additional patches applied. So. I went the quick and dirty
> route.
>
> Over the next two weeks I may try to get a newer kernel built. Does anyone
> know what the newest kernel with sgx support is? Is it still 3.14?

The 'latest' kernel with working sgx is the "4.1.x-bone" /
"4.1.x-rt-bone", using sdk: 5.01.01.02

follow:
http://elinux.org/BeagleBoardDebian#SGX_BeagleBone.2FBeagleBone_Black

as everything EXCEPT the "sdk libraries" is in the apt repo..


I'm still working on sgx, for "4.1.x-ti" / "4.1.x-rt-ti" which uses the new sdk:

http://git.ti.com/gitweb/?p=graphics/omap5-sgx-ddk-um-linux.git;a=summary

Keith Conger

unread,
Dec 16, 2015, 12:19:11 PM12/16/15
to BeagleBoard
Thanks Robert!  

Happy Holidays
Keith
Reply all
Reply to author
Forward
0 new messages