I'm implementing the ad hoc AODV routing protocol on ARM based system Sabrelite http://boundarydevices.com/products/sabre-lite-imx6-sbc/ ......... After configuring and building the kernel that match to the one used on the board. I get the following errors:
error: unknown type name '__kernel_ulong_t'
__kernel_ulong_t loads[3]; /* 1, 5, and 15 minute load averages */
error: unknown type name '__kernel_ulong_t'
__kernel_ulong_t totalram; /* Total usable main memory size */
^
/usr/local/oecore-x86_64/sysroots/cortexa9hf-vfp-neon-oe-linux-gnueabi/usr/include/linux/sysinfo.h:18:2: error: unknown type name '__kernel_ulong_t'
__kernel_ulong_t freeram; /* Available memory size */
^
error: unknown type name '__kernel_ulong_t'
__kernel_ulong_t sharedram; /* Amount of shared memory */
^
/usr/local/oecore-x86_64/sysroots/cortexa9hf-vfp-neon-oe-linux-gnueabi/usr/include/linux/sysinfo.h:28:22: error: '__kernel_ulong_t' undeclared here (not in a function)
char _f[20-2*sizeof(__kernel_ulong_t)-sizeof(__u32)]; /* Padding: libc5 uses this.. */
^
make: * [nl-arm.o] Error 1
As the errors suggested, it is something along with the cross compilation source tree but i don't know how on earth i get those errors because the used SDK works perfectly.
I followed the tutorial cited in the README file provided by AODV packages..
Has anyone ever experienced implementing AODV on ARM ? and did they got these errors
How can i resolve these issues ?
Thanks
well, the solution was to properly upgrade the makefile to work for post 2.6 kernel. If you happen to read this page: write your makefile like this:http://lwn.net/Articles/21823/
Related
I am trying to build custom Micropython firmware with ethernet support for STM32F407VE. I've forked working board without ethernet support and trying to modify it with ethernet support.
Things I have done:
defined MICROPY_HW_ETH_* variables in mpconfigboard.h
added MICROPY_PY_LWIP = 1 to mpconfigboard.mk
added ETH_* pins to pins.csv
added additional pins from Port F, G, H, I to pins.csv
Here is my modified board: https://github.com/untitledlt/BLACK_F407VE
Now when I'm trying to build it, i get:
In file included from eth.c:31:
eth.c: In function 'eth_mac_init':
eth.c:163:106: error: implicit declaration of function 'STATIC_AF_ETH_RMII_REF_CLK'; did you mean 'STATIC_AF_ETH_RMII__REF_CLK'? [-Werror=implicit-function-declaration]
mp_hal_pin_config_alt_static(MICROPY_HW_ETH_RMII_REF_CLK, MP_HAL_PIN_MODE_ALT, MP_HAL_PIN_PULL_NONE, STATIC_AF_ETH_RMII_REF_CLK);
^~~~~~~~~~~~~~~~~~~~~~~~~~
pin_static_af.h:42:48: note: in definition of macro 'mp_hal_pin_config_alt_static'
mp_hal_pin_config(pin_obj, mode, pull, fn_type(pin_obj)) /* Overflow Error => alt func not found */
^~~~~~~
cc1: all warnings being treated as errors
make: *** [build-BLACK_F407VE/eth.o] Error 1
What am I doing wrong here?
There was a bug (typo) in Micropython branch.
ETH_RMII__REF_CLK should be replaced with ETH_RMII_REF_CLK in ports/stm32/boards/stm32f405_af.csv file.
It's already fixed by https://github.com/micropython/micropython/pull/5308.
All Credit goes to Mike Causer.
Thanks, Mike!
My main question: Please may you list a few examples of what SDL_GetError would print?
I want to use SDL_GetError to help me debug, however I don't know what to expect or how to create my own intentional errors.
The libsdl wiki says:
The message is only applicable when an SDL function has signaled an
error. You must check the return values of SDL function calls to determine
when to appropriately call SDL_GetError().
however http://sdl.beuc.net/sdl.wiki/SDL_GetError says:
Although this example uses SDL_Init, SDL_GetError provides an error
message for any failed SDL operation.
so which is it? Only some or all? None of the SDL wikis/documentations I have seen give a list of example error messages, so I don't know how to initiate an error, or what to expect in terms of content and format. Is
Error in `./foo': double free or corruption (top):
an SDL_GetError message or is that caused by something else?
The wiki entry for SDL_Error lists the error strings:
SDL_errorcode | The corresponding error string
SDL_ENOMEM | Out of memory
SDL_EFREAD | Error reading from datastream
SDL_EFWRITE | Error writing to datastream
SDL_EFSEEK | Error seeking in datastream
SDL_UNSUPPORTED | Unknown SDL error
SDL_LASTERROR | Unknown SDL error
any other value | Unknown SDL error
See also SDL_error.c. One of the wiki entries seems to be incorrect. The correct error code - error string pair would be:
SDL_UNSUPPORTED | That operation is not supported
You can set custom errors messages with SDL_SetError - see the .c above. Finally, "double free or corruption" is not an error caused by SDL, but most likely by a double free. I suggest gdb/valgrind to debug it.
I was referring:
http://www-users.cs.umn.edu/~boutcher/kprobes/kprobes.txt.html to understand kprobe. I used kprobe_example.c as given in the doc.
I compiled it using the makefile (code taken from the same document)
I got compilation errors because my kernel version is 4.2 and some fields were changed in struct pt_regs. So I replaced eip with ip and eflag with flag in kprobe_example.c which is https://gist.github.com/murlee417/87c2eb43a6afa1954b05404a07813e81. Then I was able to compile it successfully.
Now, as a root user, I did:
#insmod kprobe_example.ko
and I got:
insmod: ERROR: could not insert module kprobe_example.ko: Operation not permitted
My message buffer has:
#dmesg
[ 4537.478408] Couldn't find do_fork to plant kprobe
Please help me to resolve this error and make insmod work.
In x86 do_fork() is known as sys_fork(), so change the code as below
/* For each probe you need to allocate a kprobe structure */
static struct kprobe kp = {
//.symbol_name = "do_fork",
.symbol_name = "sys_fork",
};
I need to directly write to and read from physical memory for my research and the only way I can think of doing it is with a kernel module. I found this generic device driver called phram that I've been trying to use to map memory and then write to and read from it but I'm having trouble mapping more than ~1.5GB. In my 16GB system, I have the OS usage constrained to 500MB at 0x0. Here are my kernel parameters: mem=500M memmap=500M#0. When I try to load the phram module with more than ~1.5GB like this:
sudo modprobe phram phram=test,500Mi,15Gi
I get this error message:
modprobe: ERROR: could not insert 'phram': Input/output error
And this in dmesg:
[ 247.303346] modprobe:1402 conflicting memory types 1f400000-3df400000 write-back<->write-combining
[ 247.303350] reserve_memtype failed [mem 0x1f400000-0x3df3fffff], track uncached-minus, req uncached-minus
[ 247.303352] ioremap reserve_memtype failed -16
[ 247.303376] phram: ioremap failed
[ 247.303393] phram: `test,500Mi,15Gi' invalid for parameter `phram'
I can't find any documentation on phram other than the source code. From what I have researched ioremap() (the mapping call in phram) shouldn't have a max size so I don't know where the issue could be. The dmesg output is a little too cryptic for me so if somebody could at least translate it that would also be a significant help.
Thanks!
In my CRC8.c I have this function:
BOOL isCRCValid(const UINT8 *ptr, UINT8 Len, UINT8 CRCChar){
return CRCChar == generateCRC(ptr, Len); //generareCRC returns a UINT8
}
It's is declared in CRC8.h, but PC Lint returns me the following.
Info 714: Symbol 'isCRCValid(const unsigned char *, unsigned char, unsigned
char)' not referenced
Info 830: Location cited in prior message
Help says 714 is:
714: Symbol 'Symbol' (Location) not referenced -- The named external
variable or external function was defined but not referenced. This
message is suppressed for unit checkout (-u option).
and 830 is:
830 Location cited in prior message -- Message 830 is a vehicle to
convey in 'canonical form' the location information embedded within
some other message. For example, consider the (somewhat simplified)
message:
file x.c line 37: Declaration for 'x' conflicts with line 22
This contains the location ("line 22") embedded in the text of the
message. Embedded location information is not normally understood by
editors and IDE's (Interactive Development Environments) which can
only position to the nominal location (line 37 in this example). By
adding this additional message with the nominal location of line 22
the user can, by stepping to the next message and, in this case, see
what the 'conflict' is all about. This message and message 831 below
do not follow the ordinary rules for message suppression. If they did
then when the option -w2 was employed to turn the warning level down
to 2 these messages (at level 3) would also vanish. Instead they
continue to function as expected. To inhibit them you need to
explicitly turn them off using one of:
-e830
-e831
They may be restored via +e830 and +e831; they state of suppression
can be saved and restored via the -save -restore options. Options such
as -e8* and -e{831} will have no effect.
As I'm newbie with PC Lint, and relative newbie with C, I'm not achieving resolving this problem.
Can anyone help me with this problem?
The message simply means that PCLint didn't find anything that actually uses this function, so it could be dead code/candidate for removal.
It could also mean that you did not use the input arguments in your function.