Re: [beagleboard] which "arch" subdirectory to use?

2017-06-29 Thread William Hermans
Missed a -o in there, but hopefully you get the point ;) On Thu, Jun 29, 2017 at 10:36 AM, William Hermans wrote: > > On Thu, Jun 29, 2017 at 10:12 AM, mzimmers wrote: > >> Hey, William...thanks for the pointers. I actually do already have >> cross-development working (for user space programs).

Re: [beagleboard] which "arch" subdirectory to use?

2017-06-29 Thread William Hermans
On Thu, Jun 29, 2017 at 10:12 AM, mzimmers wrote: > Hey, William...thanks for the pointers. I actually do already have > cross-development working (for user space programs). I'm using Qt Creator, > and a Linaro toolchain and sysroot. I built Qt for the armhf in order to > get the right qmake.conf

Re: [beagleboard] which "arch" subdirectory to use?

2017-06-29 Thread mzimmers
Hey, William...thanks for the pointers. I actually do already have cross-development working (for user space programs). I'm using Qt Creator, and a Linaro toolchain and sysroot. I built Qt for the armhf in order to get the right qmake.conf file, and I can cross-debug using gdbserver on the BBB.

Re: [beagleboard] which "arch" subdirectory to use?

2017-06-29 Thread William Hermans
Ah, something I unintentionally left out. The arch you'll need is armhf. Granted, I'm not 100% sure that even applies to the kernel, or kernel modules. On Thu, Jun 29, 2017 at 9:58 AM, William Hermans wrote: > Then later, once you understand native module development much better, > you'll be abl

Re: [beagleboard] which "arch" subdirectory to use?

2017-06-29 Thread William Hermans
Then later, once you understand native module development much better, you'll be able to apply that information towards cross compiling much easier. Just be aware, this is not an overnight sort of situation. It could take years to grasp, but if you apply yourself, it'll probably take a lot less tim

Re: [beagleboard] which "arch" subdirectory to use?

2017-06-29 Thread William Hermans
mz, You know what I'd do in your shoes ? I'd just setup a development sdcard for your bb, and compile modules natively. on the bb. Much simpler, no hassle, no pain in the butt. Compiling a kernel on a bb may take a few days, but a kernel module should not take very long. Another thing you should

Re: [beagleboard] which "arch" subdirectory to use?

2017-06-29 Thread mzimmers
Hi John - I understand, and your advice was excellent, and much appreciated. I think that part of the reason I'm spinning my wheels is that I don't know enough about what I'm doing to even properly word the questions. In this particular example, despite everyone's help, I'm no closer to solving

Re: [beagleboard] which "arch" subdirectory to use?

2017-06-28 Thread John Syne
Well the purpose of my advise what to show you how to cross compile kernel modules without having to worry about kernel version, kernel headers and compiler versions. By using Robert’s build tool, he does all that for you. Better still, if you use source indexing with Eclipse, you get function c

Re: [beagleboard] which "arch" subdirectory to use?

2017-06-28 Thread mzimmers
Hi, John - I was indeed able to successfully execute Robert's instructions, so I know how to make the kernel. Useful information for when the time comes for it. I will also note your advice above. Very much appreciated. This thread has drifted a bit, and so I think I'll close it out. I'll purs

Re: [beagleboard] which "arch" subdirectory to use?

2017-06-27 Thread John Syne
I see Robert has answered all your question. Here are some suggestions that might help once you complete the first build. After you build, you will find the kernel on the yakbuild/KERNEL folder. This is where you edit your code. Do not “build_kernel.sh” again as this will overwrite any code yo

Re: [beagleboard] which "arch" subdirectory to use?

2017-06-25 Thread John Syne
To modify the kernel, you always have to clone one of Robert’s repos, either the ti-linux-kernel or the bb-kernel. The repo allows you to update the kernel as Robert adds fixes/patches. Using GIT, you can see what was changed (gitk) and by whom (git blame ). If you are looking for how a function

Re: [beagleboard] which "arch" subdirectory to use?

2017-06-23 Thread John Syne
One thing I forgot, you would use dpkg —add-architecture armhf as Robert builds with Hardware Floating point. Regards, John > On Jun 23, 2017, at 1:47 PM, mzimmers wrote: > > Thanks for all the details, John. I'll look into that approach when I get > around to more serious kernel progra

Re: [beagleboard] which "arch" subdirectory to use?

2017-06-23 Thread John Syne
I don’t do this, but I believe you can do this using Multiarch: https://wiki.debian.org/Multiarch/HOWTO Now you can install the headers using dpkg -i I have copied Robert as he is the best person to answer your question. Regards, John > On Jun 23

Re: [beagleboard] which "arch" subdirectory to use?

2017-06-23 Thread mzimmers
Thanks for all the details, John. I'll look into that approach when I get around to more serious kernel programming. Right now, I just want to figure out why this example isn't working for me. I need to download Robert's header files for the BBB to my host. If I just add a file to sources.list.

Re: [beagleboard] which "arch" subdirectory to use?

2017-06-23 Thread John Syne
The way I work is to have the BBB mount rootfs over NFS which resides on my desktop. When I create a Kernel Module, I do the following: 1) I clone Robert’s kernel repo 2) I build the kernel 3) I add my kernel module code 4) I rebuild the kernel 5) I modify Robert’s deploy script to copy the kerne

Re: [beagleboard] which "arch" subdirectory to use?

2017-06-23 Thread mzimmers
Hi, John - thanks for the reply. I don't believe, however, that I'll need to use JTAG, at least not for this specific example. Here's my current thinking: I already have a cross-development platform (Qt Creator) set up for the BBB, so I'm going to try to use it to build kernel modules. I know

Re: [beagleboard] which "arch" subdirectory to use?

2017-06-23 Thread John Syne
You need a kernel aware JTAG debugger like Lauterbach. This will allow you to debug u-boot, kernel code, including all the drivers as they are loaded, etc. It is expensive, but it is the gold standard for kernel/driver debugging. TI have Code Composer Studio that will do some debugging of the k

Re: [beagleboard] which "arch" subdirectory to use?

2017-06-22 Thread 'Roberts Maria' via BeagleBoard
On Fri, 6/23/17, William Hermans wrote: Subject: Re: [beagleboard] which "arch" subdirectory to use? To: beagleboard@googlegroups.com Date: Friday, June 23, 2017, 3:50 AM On Thu, Jun 22, 2017 at 12:54 PM, mzimmers wrote: Hey, I

Re: [beagleboard] which "arch" subdirectory to use?

2017-06-22 Thread William Hermans
On Thu, Jun 22, 2017 at 12:54 PM, mzimmers wrote: > Hey, I'm open to any and all ideas. It seems so strange that I'm getting a > seg fault in the client code, though...that does make me suspicious of the > compiler version vs. the headers, etc. > > How do people go about debugging kernel code, an

Re: [beagleboard] which "arch" subdirectory to use?

2017-06-22 Thread mzimmers
Hey, I'm open to any and all ideas. It seems so strange that I'm getting a seg fault in the client code, though...that does make me suspicious of the compiler version vs. the headers, etc. How do people go about debugging kernel code, anyway? I gather that gdb isn't much of an option. Do we jus

Re: [beagleboard] which "arch" subdirectory to use?

2017-06-22 Thread William Hermans
Yeah, ok, seemed like the obvious question to ask, but maybe too obvious ;) -- 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

Re: [beagleboard] which "arch" subdirectory to use?

2017-06-22 Thread mzimmers
Hi, William - version 4.9.2. I've isolated the problem to the buffer argument passed into dev_write(). Using printk() I can see that the address of the buffer is befffadc (though I have no idea whether that's a valid address or not). When I attempt to dereference it, though, it seems to fail, a

Re: [beagleboard] which "arch" subdirectory to use?

2017-06-22 Thread William Hermans
mzimmers, Which version of gcc are you using ? -- 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 beagleb

Re: [beagleboard] which "arch" subdirectory to use?

2017-06-22 Thread Robert Nelson
On Thu, Jun 22, 2017 at 11:25 AM, mzimmers wrote: > Hi Robert - > > When you say "something changed since 3.8.13" what are you referring to? It > appears that the example you ran (successfully) was on 4.4.68 build. Building =/= Working... "something" changed, while it didn't break the build, it

Re: [beagleboard] which "arch" subdirectory to use?

2017-06-22 Thread mzimmers
Hi Robert - When you say "something changed since 3.8.13" what are you referring to? It appears that the example you ran (successfully) was on 4.4.68 build. On Wednesday, June 21, 2017 at 6:14:03 PM UTC-6, RobertCNelson wrote: > > Well... I would contact the author, obvious something changed si

Re: [beagleboard] which "arch" subdirectory to use?

2017-06-21 Thread William Hermans
On Wed, Jun 21, 2017 at 7:34 PM, mzimmers wrote: > Hi, William - > > I have no (current) interest in building my own kernel. I'm trying to do > Dr. Molloy's tutorials because I want to learn about writing device drivers > for Linux (you may recall an earlier discussion where you encouraged me to

Re: [beagleboard] which "arch" subdirectory to use?

2017-06-21 Thread mzimmers
Hi, William - I have no (current) interest in building my own kernel. I'm trying to do Dr. Molloy's tutorials because I want to learn about writing device drivers for Linux (you may recall an earlier discussion where you encouraged me to go this route in favor of doing bare-metal bit-banging).

Re: [beagleboard] which "arch" subdirectory to use?

2017-06-21 Thread William Hermans
mzimmers, additionally, aside from getting hands on experience. Why do you feel compelled to build your own kernel ? If it's for the learning process, ok I get that. But if you need to build something in . . maybe, but if you're looking to build a driver module . . . you do not need to rebuild the

Re: [beagleboard] which "arch" subdirectory to use?

2017-06-21 Thread William Hermans
Just in case you do not know already. https://eewiki.net/display/linuxonarm/BeagleBone+Black That guide is for the black, there is one for the white, but don't know if there is one for the blue, or any of the wireless variants. On Wed, Jun 21, 2017 at 5:52 PM, William Hermans wrote: > mzimmers,

Re: [beagleboard] which "arch" subdirectory to use?

2017-06-21 Thread William Hermans
mzimmers, You know, I tried a few different guides when building the kernel and none of them worked until I found Robert's build guide( 4+ years ago ). In your shoes, I would probably forget about trying to follow DR Molloy's book in this case, and just use Robert's guide. Because no one is going

Re: [beagleboard] which "arch" subdirectory to use?

2017-06-21 Thread Robert Nelson
Well... I would contact the author, obvious something changed since 3.8.13. On Jun 21, 2017 6:38 PM, "mzimmers" wrote: > Another update: when I said "works" below, I should have said "builds." > When I try to run, though, problems occur: > > mzimmers@beaglebone:~/exploringBB/extras/kernel/ebbcha

Re: [beagleboard] which "arch" subdirectory to use?

2017-06-21 Thread mzimmers
Another update: when I said "works" below, I should have said "builds." When I try to run, though, problems occur: mzimmers@beaglebone:~/exploringBB/extras/kernel/ebbchar$ sudo insmod ebbchar.ko mzimmers@beaglebone:~/exploringBB/extras/kernel/ebbchar$ ls -l /dev/ebb* crw--- 1 root root 245,

Re: [beagleboard] which "arch" subdirectory to use?

2017-06-21 Thread mzimmers
Update: I deleted that C_INCLUDE_PATH variable, and it now works. No idea why it didn't work the first time. Thanks for looking... On Wednesday, June 21, 2017 at 4:18:52 PM UTC-6, mzimmers wrote: > > I just attempted to replicate your work, and I got a list of compile > errors and warnings long

Re: [beagleboard] which "arch" subdirectory to use?

2017-06-21 Thread mzimmers
I just attempted to replicate your work, and I got a list of compile errors and warnings long enough to overrun my terminal buffer. Any suggestions on how to go about troubleshooting this? Thanks. -- For more options, visit http://beagleboard.org/discuss --- You received this message because

Re: [beagleboard] which "arch" subdirectory to use?

2017-06-21 Thread Robert Nelson
On Wed, Jun 21, 2017 at 4:58 PM, mzimmers wrote: > My project *is* his project. I'm trying to build the ebbchar.c file included > in his repository. I have no idea how this used to work, but it doesn't now > (not on my system anyway). > > I added the ARCM=arm to my copy of the Makefile, but I'm st

Re: [beagleboard] which "arch" subdirectory to use?

2017-06-21 Thread mzimmers
My project *is* his project. I'm trying to build the ebbchar.c file included in his repository. I have no idea how this used to work, but it doesn't now (not on my system anyway). I added the ARCM=arm to my copy of the Makefile, but I'm still getting the error message. Is this because I have my

Re: [beagleboard] which "arch" subdirectory to use?

2017-06-21 Thread Robert Nelson
On Wed, Jun 21, 2017 at 4:44 PM, mzimmers wrote: > > > On Wednesday, June 21, 2017 at 3:38:11 PM UTC-6, RobertCNelson wrote: >> >> >> Are you passing ARCH=arm ?? > > > No. I'm just trying to do the example on this page: here For completeness, his example should have had an "ARCH=arm" make ARCH=

Re: [beagleboard] which "arch" subdirectory to use?

2017-06-21 Thread mzimmers
On Wednesday, June 21, 2017 at 3:38:11 PM UTC-6, RobertCNelson wrote: > > > Are you passing ARCH=arm ?? > No. I'm just trying to do the example on this page: here The contents of the makefile: > obj-m+=ebbcha

Re: [beagleboard] which "arch" subdirectory to use?

2017-06-21 Thread Robert Nelson
On Wed, Jun 21, 2017 at 4:31 PM, mzimmers wrote: > Hi all - > > I'm working through one of Dr. Molloy's examples on building kernel modules. > My/his program originally failed to build because I hadn't defined > C_INCLUDE_PATH which now points to > /usr/src/lineux-headers-4.4.48-ti-r88/include. No

[beagleboard] which "arch" subdirectory to use?

2017-06-21 Thread mzimmers
Hi all - I'm working through one of Dr. Molloy's examples on building kernel modules. My/his program originally failed to build because I hadn't defined C_INCLUDE_PATH which now points to /usr/src/lineux-headers-4.4.48-ti-r88/include. Now it's failing because one of the included files is faili