Re: [beagleboard] Re: problem with creating a kernel module program for angstrom os
Did you install the kernel-dev package? On Saturday, March 8, 2014, siva kumar wrote: > hai, > thank u!! > but my folder structure from my board looks like > > *root@beaglebone:/usr/src# ls* > *backfire linux-3.8.13* > *root@beaglebone:/usr/src# cd linux-3.8.13/* > *root@beaglebone:/usr/src/linux-3.8.13# ls* > *include* > *root@beaglebone:/usr/src/linux-3.8.13/include# ls* > > *asm asm-generic drm linux mtd rdma scsi sound uapi video xen* > > *root@beaglebone:/usr/src/linux-3.8.13/include/linux# ls* > > *byteorder dvb isdnnetfilter_arp netfilter_ipv6 spi > tc_ematch* > *caif hdlc mmcnetfilter_bridge nfsd sunrpc usb* > *can hsi netfilter netfilter_ipv4raid tc_act wimax* > > *root@beaglebone:/usr/src/linux-3.8.13/include/linux# * > > this info shows that my board shipped with no module support by default > ..!!! > > now question is > [1] still i didn't update or upgraded my angstrom os ..shall i need to do > or is there any other way to insert my hello_world.ko module into my board?? > i found 1 more link for installing the module libs sturcture and soure > into the running os . here the link > http://wiki.replicape.com/index.php?title=Compiling_the_kernel > will this link help me to insert also to create a modules without fail .. > > can you suggest your opinion..pls.. > > > > > regards > siva > > > > > > On Saturday, 8 March 2014 14:52:49 UTC+5:30, Brandon I wrote: >> >> Missed first line on that copy paste. Should be >> >> KERNELDIR := /usr/src/kernel >> >> >> >> On Sat, Mar 8, 2014 at 1:21 AM, Brandon I wrote: >> >>> Just a regular kernel type makefile. For examlpe, here's mine for a file >>> phyaccess.c >>> >>> BEAGLEBONE_PROJ=/systems/Projects/beaglebone/workspace/Beaglebone >>> MDIO_ROOT=$(BEAGLEBONE_PROJ)/local/MDIODriver >>> >>> #http://stackoverflow.com/questions/10176238/how-do-i- >>> add-an-include-path-for-kernel-module-makefile >>> # for kernel module make uses kbuild. Paths have to be absolute, not >>> relative. >>> EXTRA_CFLAGS+=-I$(MDIO_ROOT)/include -I$(MDIO_ROOT) >>> -I$(BEAGLEBONE_PROJ)/include -I$(BEAGLEBONE_PROJ)/Interface/local/include >>> -Werror >>> >>> obj-m += phyaccess.o >>> >>> all: >>> make -C $(KERNELDIR) M=$(PWD) modules >>> >>> clean: >>> make -C $(KERNELDIR) M=$(PWD) clean >>> >>> >>> >>> >>> On Fri, Mar 7, 2014 at 10:57 PM, siva kumar wrote: >>> thanks for your reply yes , u r right i compiled the module against arm-angstrom-linux-gnueabi-gcc but my angstrom os comes with Linaro gcc root@beaglebone:~# opkg list_installed | grep gcc *gcc - linaro-4.7-r9.2* gcc-symlinks - linaro-4.7-r9.2 libgcc-s-dev - linaro-4.7-r9.0 libgcc1 - linaro-4.7-r9.0 perl-module-extutils-cbuilder-platform-windows-gcc - 5.14.2-r13.1 root@beaglebone:~# dmesg | head [ 0.00] Booting Linux on physical CPU 0×0 [ 0.00] Initializing cgroup subsys cpu *[ 0.00] Linux version 3.8.13 (koen@rrMBP) (gcc version 4.7.3 20130205 (prerelease) (Linaro GCC 4.7-2013.02-01) ) #1 SMP Tue Jun 18 02:11:09 EDT 2013* [ 0.00] CPU: ARMv7 Processor [413fc082] revision 2 (ARMv7), cr=50c5387d [ 0.00] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache [ 0.00] Machine: Generic AM33XX (Flattened Device Tree), model: TI AM335x BeagleBone [ 0.00] Memory policy: ECC disabled, Data cache writeback [ 0.00] On node 0 totalpages: 130816 [ 0.00] free_area_init_node: node 0, pgdat c0688d80, node_mem_map c06e4000 [ 0.00] Normal zone: 1024 pages used for memmap i done the following steps to update my modules for my board .but it says my kernel headers are up to date. -- For more options, visit http://beagleboard.org/discuss --- 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/fIJ5YE_fJpg/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. >>> >>> >> -- > For more options, visit http://beagleboard.org/discuss > --- > 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/fIJ5YE_fJpg/unsubscribe. > To unsubscribe from this group and all its topics, send an email to > beagleboard+unsubscr...@googlegroups.com > . > For more options, visit https://groups.google.com/d/optout. > -- 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 emai
Re: [beagleboard] Re: problem with creating a kernel module program for angstrom os
hai, thank u!! but my folder structure from my board looks like *root@beaglebone:/usr/src# ls* *backfire linux-3.8.13* *root@beaglebone:/usr/src# cd linux-3.8.13/* *root@beaglebone:/usr/src/linux-3.8.13# ls* *include* *root@beaglebone:/usr/src/linux-3.8.13/include# ls* *asm asm-generic drm linux mtd rdma scsi sound uapi video xen* *root@beaglebone:/usr/src/linux-3.8.13/include/linux# ls* *byteorder dvb isdnnetfilter_arp netfilter_ipv6 spi tc_ematch* *caif hdlc mmcnetfilter_bridge nfsd sunrpc usb* *can hsi netfilter netfilter_ipv4raid tc_act wimax* *root@beaglebone:/usr/src/linux-3.8.13/include/linux# * this info shows that my board shipped with no module support by default ..!!! now question is [1] still i didn't update or upgraded my angstrom os ..shall i need to do or is there any other way to insert my hello_world.ko module into my board?? i found 1 more link for installing the module libs sturcture and soure into the running os . here the link http://wiki.replicape.com/index.php?title=Compiling_the_kernel will this link help me to insert also to create a modules without fail .. can you suggest your opinion..pls.. regards siva On Saturday, 8 March 2014 14:52:49 UTC+5:30, Brandon I wrote: > > Missed first line on that copy paste. Should be > > KERNELDIR := /usr/src/kernel > > > > On Sat, Mar 8, 2014 at 1:21 AM, Brandon I > > wrote: > >> Just a regular kernel type makefile. For examlpe, here's mine for a file >> phyaccess.c >> >> BEAGLEBONE_PROJ=/systems/Projects/beaglebone/workspace/Beaglebone >> MDIO_ROOT=$(BEAGLEBONE_PROJ)/local/MDIODriver >> >> # >> http://stackoverflow.com/questions/10176238/how-do-i-add-an-include-path-for-kernel-module-makefile >> # for kernel module make uses kbuild. Paths have to be absolute, not >> relative. >> EXTRA_CFLAGS+=-I$(MDIO_ROOT)/include -I$(MDIO_ROOT) >> -I$(BEAGLEBONE_PROJ)/include -I$(BEAGLEBONE_PROJ)/Interface/local/include >> -Werror >> >> obj-m += phyaccess.o >> >> all: >> make -C $(KERNELDIR) M=$(PWD) modules >> >> clean: >> make -C $(KERNELDIR) M=$(PWD) clean >> >> >> >> >> On Fri, Mar 7, 2014 at 10:57 PM, siva kumar >> >> > wrote: >> >>> thanks for your reply >>> >>> yes , u r right i compiled the module against >>> arm-angstrom-linux-gnueabi-gcc but my angstrom os comes with Linaro gcc >>> root@beaglebone:~# opkg list_installed | grep gcc >>> *gcc - linaro-4.7-r9.2* >>> gcc-symlinks - linaro-4.7-r9.2 >>> libgcc-s-dev - linaro-4.7-r9.0 >>> libgcc1 - linaro-4.7-r9.0 >>> perl-module-extutils-cbuilder-platform-windows-gcc - 5.14.2-r13.1 >>> >>> root@beaglebone:~# dmesg | head >>> [ 0.00] Booting Linux on physical CPU 0×0 >>> [ 0.00] Initializing cgroup subsys cpu >>> *[ 0.00] Linux version 3.8.13 (koen@rrMBP) (gcc version 4.7.3 >>> 20130205 (prerelease) (Linaro GCC 4.7-2013.02-01) ) #1 SMP Tue Jun 18 >>> 02:11:09 EDT 2013* >>> [ 0.00] CPU: ARMv7 Processor [413fc082] revision 2 (ARMv7), >>> cr=50c5387d >>> [ 0.00] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing >>> instruction cache >>> [ 0.00] Machine: Generic AM33XX (Flattened Device Tree), model: TI >>> AM335x BeagleBone >>> [ 0.00] Memory policy: ECC disabled, Data cache writeback >>> [ 0.00] On node 0 totalpages: 130816 >>> [ 0.00] free_area_init_node: node 0, pgdat c0688d80, node_mem_map >>> c06e4000 >>> [ 0.00] Normal zone: 1024 pages used for memmap >>> >>> i done the following steps to update my modules for my board .but it >>> says my kernel headers are up to date. >>> *root@beaglebone:~# opkg install kernel-headers* >>> *Package kernel-headers (3.8.13-r23a.22) installed in root is up to >>> date.* >>> >>> [1] what should i do to get my modules to work with?? >>> >>> On Saturday, 8 March 2014 02:42:31 UTC+5:30, Brandon I wrote: >>> dmesg will give you more details. This usually means you compiled the kernel modules against a different build of the kernel. So, the kernel source you used didn't match what was on the beaglebone. You can install the kernel-headers and kernel-dev packages and build directly on the beaglebone. For some time, these packages weren't in sync with the actual kernel installed...as always, good luck with Angstrom. On Thursday, March 6, 2014 10:30:41 PM UTC-8, siva kumar wrote: > > hello, > > i recently purchased beagle bone black . my bbb come with pre compiled > angstrom os( Angstrom v2012.12 - Kernel 3.8.13) still i didn't updated > my > os > i try to test my board with simple hello module program . but when i > insert a module i got the error message > root@beaglebone:~# insmod hello.ko > Error: could not insert module hello.ko: Invalid module format > root@beaglebone:~# > > i compiled the module program from my host pc against > arm-angstrom-linux-gcc compiler..and i transferred the hello.ko file via >>
Re: [beagleboard] Re: problem with creating a kernel module program for angstrom os
Missed first line on that copy paste. Should be KERNELDIR := /usr/src/kernel On Sat, Mar 8, 2014 at 1:21 AM, Brandon I wrote: > Just a regular kernel type makefile. For examlpe, here's mine for a file > phyaccess.c > > BEAGLEBONE_PROJ=/systems/Projects/beaglebone/workspace/Beaglebone > MDIO_ROOT=$(BEAGLEBONE_PROJ)/local/MDIODriver > > # > http://stackoverflow.com/questions/10176238/how-do-i-add-an-include-path-for-kernel-module-makefile > # for kernel module make uses kbuild. Paths have to be absolute, not > relative. > EXTRA_CFLAGS+=-I$(MDIO_ROOT)/include -I$(MDIO_ROOT) > -I$(BEAGLEBONE_PROJ)/include -I$(BEAGLEBONE_PROJ)/Interface/local/include > -Werror > > obj-m += phyaccess.o > > all: > make -C $(KERNELDIR) M=$(PWD) modules > > clean: > make -C $(KERNELDIR) M=$(PWD) clean > > > > > On Fri, Mar 7, 2014 at 10:57 PM, siva kumar > wrote: > >> thanks for your reply >> >> yes , u r right i compiled the module against >> arm-angstrom-linux-gnueabi-gcc but my angstrom os comes with Linaro gcc >> root@beaglebone:~# opkg list_installed | grep gcc >> *gcc - linaro-4.7-r9.2* >> gcc-symlinks - linaro-4.7-r9.2 >> libgcc-s-dev - linaro-4.7-r9.0 >> libgcc1 - linaro-4.7-r9.0 >> perl-module-extutils-cbuilder-platform-windows-gcc - 5.14.2-r13.1 >> >> root@beaglebone:~# dmesg | head >> [ 0.00] Booting Linux on physical CPU 0×0 >> [ 0.00] Initializing cgroup subsys cpu >> *[ 0.00] Linux version 3.8.13 (koen@rrMBP) (gcc version 4.7.3 >> 20130205 (prerelease) (Linaro GCC 4.7-2013.02-01) ) #1 SMP Tue Jun 18 >> 02:11:09 EDT 2013* >> [ 0.00] CPU: ARMv7 Processor [413fc082] revision 2 (ARMv7), >> cr=50c5387d >> [ 0.00] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing >> instruction cache >> [ 0.00] Machine: Generic AM33XX (Flattened Device Tree), model: TI >> AM335x BeagleBone >> [ 0.00] Memory policy: ECC disabled, Data cache writeback >> [ 0.00] On node 0 totalpages: 130816 >> [ 0.00] free_area_init_node: node 0, pgdat c0688d80, node_mem_map >> c06e4000 >> [ 0.00] Normal zone: 1024 pages used for memmap >> >> i done the following steps to update my modules for my board .but it >> says my kernel headers are up to date. >> *root@beaglebone:~# opkg install kernel-headers* >> *Package kernel-headers (3.8.13-r23a.22) installed in root is up to date.* >> >> [1] what should i do to get my modules to work with?? >> >> On Saturday, 8 March 2014 02:42:31 UTC+5:30, Brandon I wrote: >> >>> dmesg will give you more details. >>> >>> This usually means you compiled the kernel modules against a different >>> build of the kernel. So, the kernel source you used didn't match what was >>> on the beaglebone. >>> >>> You can install the kernel-headers and kernel-dev packages and build >>> directly on the beaglebone. For some time, these packages weren't in sync >>> with the actual kernel installed...as always, good luck with Angstrom. >>> >>> On Thursday, March 6, 2014 10:30:41 PM UTC-8, siva kumar wrote: hello, i recently purchased beagle bone black . my bbb come with pre compiled angstrom os( Angstrom v2012.12 - Kernel 3.8.13) still i didn't updated my os i try to test my board with simple hello module program . but when i insert a module i got the error message root@beaglebone:~# insmod hello.ko Error: could not insert module hello.ko: Invalid module format root@beaglebone:~# i compiled the module program from my host pc against arm-angstrom-linux-gcc compiler..and i transferred the hello.ko file via scp protocol. my question is [1] Is it possible to add a module program with my available angstrom os..if yes what should i do to insert modules [2] what are all the basic things needed to insert a module?? help me to better understand the beagle bone black >>> -- >> For more options, visit http://beagleboard.org/discuss >> --- >> 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/fIJ5YE_fJpg/unsubscribe. >> To unsubscribe from this group and all its topics, send an email to >> beagleboard+unsubscr...@googlegroups.com. >> For more options, visit https://groups.google.com/d/optout. >> > > -- 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+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [beagleboard] Re: problem with creating a kernel module program for angstrom os
Just a regular kernel type makefile. For examlpe, here's mine for a file phyaccess.c BEAGLEBONE_PROJ=/systems/Projects/beaglebone/workspace/Beaglebone MDIO_ROOT=$(BEAGLEBONE_PROJ)/local/MDIODriver # http://stackoverflow.com/questions/10176238/how-do-i-add-an-include-path-for-kernel-module-makefile # for kernel module make uses kbuild. Paths have to be absolute, not relative. EXTRA_CFLAGS+=-I$(MDIO_ROOT)/include -I$(MDIO_ROOT) -I$(BEAGLEBONE_PROJ)/include -I$(BEAGLEBONE_PROJ)/Interface/local/include -Werror obj-m += phyaccess.o all: make -C $(KERNELDIR) M=$(PWD) modules clean: make -C $(KERNELDIR) M=$(PWD) clean On Fri, Mar 7, 2014 at 10:57 PM, siva kumar wrote: > thanks for your reply > > yes , u r right i compiled the module against > arm-angstrom-linux-gnueabi-gcc but my angstrom os comes with Linaro gcc > root@beaglebone:~# opkg list_installed | grep gcc > *gcc - linaro-4.7-r9.2* > gcc-symlinks - linaro-4.7-r9.2 > libgcc-s-dev - linaro-4.7-r9.0 > libgcc1 - linaro-4.7-r9.0 > perl-module-extutils-cbuilder-platform-windows-gcc - 5.14.2-r13.1 > > root@beaglebone:~# dmesg | head > [ 0.00] Booting Linux on physical CPU 0×0 > [ 0.00] Initializing cgroup subsys cpu > *[ 0.00] Linux version 3.8.13 (koen@rrMBP) (gcc version 4.7.3 20130205 > (prerelease) (Linaro GCC 4.7-2013.02-01) ) #1 SMP Tue Jun 18 02:11:09 EDT > 2013* > [ 0.00] CPU: ARMv7 Processor [413fc082] revision 2 (ARMv7), cr=50c5387d > [ 0.00] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing > instruction cache > [ 0.00] Machine: Generic AM33XX (Flattened Device Tree), model: TI > AM335x BeagleBone > [ 0.00] Memory policy: ECC disabled, Data cache writeback > [ 0.00] On node 0 totalpages: 130816 > [ 0.00] free_area_init_node: node 0, pgdat c0688d80, node_mem_map > c06e4000 > [ 0.00] Normal zone: 1024 pages used for memmap > > i done the following steps to update my modules for my board .but it says > my kernel headers are up to date. > *root@beaglebone:~# opkg install kernel-headers* > *Package kernel-headers (3.8.13-r23a.22) installed in root is up to date.* > > [1] what should i do to get my modules to work with?? > > On Saturday, 8 March 2014 02:42:31 UTC+5:30, Brandon I wrote: > >> dmesg will give you more details. >> >> This usually means you compiled the kernel modules against a different >> build of the kernel. So, the kernel source you used didn't match what was >> on the beaglebone. >> >> You can install the kernel-headers and kernel-dev packages and build >> directly on the beaglebone. For some time, these packages weren't in sync >> with the actual kernel installed...as always, good luck with Angstrom. >> >> On Thursday, March 6, 2014 10:30:41 PM UTC-8, siva kumar wrote: >>> >>> hello, >>> >>> i recently purchased beagle bone black . my bbb come with pre compiled >>> angstrom os( Angstrom v2012.12 - Kernel 3.8.13) still i didn't updated my >>> os >>> i try to test my board with simple hello module program . but when i >>> insert a module i got the error message >>> root@beaglebone:~# insmod hello.ko >>> Error: could not insert module hello.ko: Invalid module format >>> root@beaglebone:~# >>> >>> i compiled the module program from my host pc against >>> arm-angstrom-linux-gcc compiler..and i transferred the hello.ko file via >>> scp protocol. >>> >>> >>> >>> my question is >>> [1] Is it possible to add a module program with my available angstrom >>> os..if yes what should i do to insert modules >>> [2] what are all the basic things needed to insert a module?? >>> >>> >>> help me to better understand the beagle bone black >>> >>> >> -- > For more options, visit http://beagleboard.org/discuss > --- > 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/fIJ5YE_fJpg/unsubscribe. > To unsubscribe from this group and all its topics, send an email to > beagleboard+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. > -- 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+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.