I'm setting up the BlueZ protocol stack on a custom system using linux 3.3. I'm using buildroot to setup the filesystem, and specifically am using BlueZ-4.101.
I'm attempting to use the hcidump utility to get some logs, but the binary has not been installed.
I've checked that:
Device driver is installed in kernel
BlueZ Utils is enabled in buildroot .config file
Other utilities work, such as hcitool or hciconfig
Going into the Makefile in output/build/bluez_utils-4.101 it would appear that the object file hcidump.o is being compiled into a binary called btmon.
Further investigation would reveal that in Makefile, btmonis assigned to am__EXEEXT_10, and that is then assigned to the variable noinst_PROGRAMS.
So this is where I'm at. I'm pretty sure that this is an automatically generated Makefile by buildroot. I'm not sure how these files are generated, thus I'm unsure as to why btmon is being assigned to the noinst_PROGRAMS variable.
In summary, I believe that my version of BlueZ uses a binary btmon instead of hcidump. btmon is compiled (binary seen at output/build/bluez_utils-4.101/monitor/btmon), but not being installed onto my target system because of instructions in Makefile.
My best guess would something weird about compatibility between my kernel version and bluez. Any suggestions would be greatly appreciated!
In BlueZ 4, hcidump was distributed as a separate package, bluez-hcidump. This has never been packaged in buildroot, however. So either create your own package for bluez-hcidump, or switch to BlueZ 5. BleuZ 5 is provided by buildroot starting from 2014.08.
Related
Out of interest and learning purposes I have built Linux from scratch (LFS+BLFS, both version 10.0) according to the descriptions on www.linuxfromscratch.org.
In general the OS can boot and I can basically work with it. There are a few things which are not smooth, therefore I would like to address the experts here.
I would like to get going the AVRDragon, a programmer for Atmel microcontrollers. To use it on Linux, I work with the program "avrdude". My goal is to learn how avrdude works and interacts with the OS. Therefore I would like to build it from source with debug information.
For building avrdude from source, libusb/libusb_1_0 and libelf are required. I understand that libusb_1_0 was installed with BLFS. avrdude asks for either libusb and/or libusb_1_0. I cannot say if there is a problem with having only libusb_1_0. (libusb_1_0 is newer than libusb, isn't it?) Additionally I have installed libelf (since libelf is installed, I cannot build the kernel anymore, but this should not be a problem for now). In the kernel, USB support is enabled (Device Drivers -> USB Support -> Support for Host-side USB).
I have created a udev rule:
# Dragon
ATTR{idVendor}=="03eb", ATTR{idProduct}=="2107", GROUP="plugdev", MODE="0666"
...and lsusb says this:
# lsusb
...
Bus 003 Device 006: ID 03eb:2107 Atmel Corp. AVR Dragon
...
Also, I use a script to program a sample application onto the microcontroller, which works on my reference system.
However, running avrdude on my BLFS, I get an error message, that avrdude was not built with USB support:
# avrdude -p m328p -c dragon_isp -B5 -F -P usb -V -U flash:w:Debug/hello_world.elf
avrdude was compiled without usb support.
avrdude done. Thank you.
Researching the internet, indicated installing the prerequisites stated above and setting up the udev rule.
I have a good understanding of the Linux command line, the GCC tool chain and the usual Linux tools. But I am completely lost with how to correctly configure my BLFS with USB support. Is there somebody who can give me a hint on how to solve this problem? Many thanks!
Apparently, for full functionality you need both libusb-1.0 and libusb-0.1. The configure.ac script defines HAVE_LIBUSB_1_0 only for the former and HAVE_LIBUSB for the latter, while the *.c files containing your error message only check for HAVE_LIBUSB.
While current BLFS doesn't have instructions to build libusb-0.1, you can see them for libusb-0.1.12 in BLFS 6.3.
I need to add new functionality to a chinese Linux-based time attendance clock. More specifically I need to make It SNMP capable, which is not available by factory default.
After some research I found a login:password which worked for the TelNet login and managed to get inside the system with root privileges.
The first thing I did was to figure out which Linux distro was It running:
cat /etc/issue throws this:
"PXA Linux Preview Kit
Kernel 2.6.29 on armv5tejl"
I did a quick google search and found that
"PXA Linux is a port of the Linux kernel for PXA based processor based devices and machines."
I dont understand why It's running a PXA Linux Preview Kit on an armv5tejl.
I gave no importance to this fact, and got to the next step: finding which package manager has this system:
I tried several commands:
apt-get, aptitude, rpm, dpkg, yum, slapt-get, ipkg, and several others. None of them worked.
I found that the system had Busybox installed. More specifically BusyBox 1.15.3. In this BusyBox I couldnt find any of those commands. I found that BusyBox does implement rpm and dpkg but this version doesnt have them.
The only command which seems to be "software installation related" I found was the command "install". From BusyBox docs:
"install [-cdDsp] [-o USER] [-g GRP] [-m MODE] [source] dest|directory
Copy files and set attributes"
But probably it doesnt replace the package manager tool. I think that I need to get a way to install dpkg or rpm, and then use them to install the SNMP packages I want. As I read, the lowest level package installation tool is dpkg so I don't have a clue on where to begin.
Can someone give me some advice on how to approach this issue? How can I install a package with no package manager possiblities at all?
You won't be able to install additional software to that system via a package manager. Such devices aren't designed like that. The firmware that was shipped with the device is all there is. What would be the incentive of the device manufacturer to maintain a package repository with general purpose linux software?
But not all hope is lost. You can of course try to compile the needed software yourself (and by that extend the firmware). For that to work you will need a suitable ARM cross compiler (GCC). Via static linking your SNMP package won't have any dependencies to the library versions already on the device (so you don't need a sysroot matching the libraries on the device).
I am running into a issue with RH7 kernels. We are running RH6/Centos6 based systems - we normally compile the kernel module once (Centos6.6) and we could install the kernel module on another Centos kernel in the same series (say Centos6.4).
With Centos7 (3.10 kernel) I cannot build the kernel module with says 3.10.0-329 (Centos7.2) kernel and install on a kernel version 3.10.0-227 (Centos7.1) - insmod returns invalid format.
Anyone run into similar issues - are there any workarounds.
Thanks
--
Jimmy
Probably, you want a binary blob - ready-made object file which is part of the module. Look into kernel documentation for know how to build module which uses binary blobs. – Tsyvarev
I am a freshman for the beaglebone. I need your help. I have installed the cross compiler toolchain arm-linux-gnueabi on my 64 bit xubuntu in eclipse as well as codeblocks environment. I have made a hello world program, cross compiled it in 3 ways using eclipse , using terminal,using Codeblocks. But when i run my executable file in Beaglebone i get the error saying cant load shared file libstdc++6.so.6:file not found.
Though i have already installed latest libstdc++6,ia32-libs and configured it. I am using ssh for logging into my Beaglebone. My all projects are pending because of this. Please suggest solution. I will be grateful to you. I have worked according to derek molloy c,c++ video but still got the error. I think it is because of difference between 32 bit and 64 bit in beaglebone and laptop respectively.
Have you really installed libstdc++6,ia32-libs on your BB? It looks like x86 lib. Take a look at Buildroot. It already provides BB target, so you can get your basic rootfs quite quickly. Then just add needed packages and you are done. The main benefit, when using such distro like BR, that you have all needed dependencies in your rootfs, that you burn on your microSD card. BR also provides Eclipse plugin.
I thought abi used was arm-linux-gnueabi but when i got the details of abi version running on my beagleboard i found it was arm-linux-gnueabihf. So i just replaced the compiler and then it was able to find all the files.
Recently I have installed Ubuntu 12.04 LTS ISO image in my desktop. Below is the output of the kernel version I have installed:
# uname -r
3.5.0-41-generic
I am trying to develop a VFS and want the kernel source code version '3.5.0-41-generic' for reference purpose - where can I find the same?
What are the excellent kernel debugging options looking at logs and mapping them to kernel code?
How and which debugger I can use to debug a live kernel flow execution?
Are there ways I can add more printk methods and re-modify the modules? Say I want to know how a FS mount method works - I can modify the required FS code (adding more printk functions) re-compile and reload the modules. Now with aid of my new printk functions I can understand the flow
Why don't you install vanilla 3.5 kernel and try to develop on it?
As a kernel debugger you can use kGDB or just printk.
But... I suggest you to test your vfs on linux running on qemu. Qemu is able to debug the running linux - so you can connect gdb to it and debug the whole emulating system.