I am very new to Linux operating system and unable to install softwares necessary for my work. when i use the command Its showing the command setnev doesnot exist. How to set environment variable? I am using ubuntu 10.4 Please help! Answer setenv works only in the CShell. If you are using BASH then use the command export
Tag: linux-kernel
32-bit process’s address space on 64-bit linux
In this answer author states: With the 64-bit x86_64 kernel, a 32-bit process can use the entire 4GB address space, except for a couple pages (8KB) at the end of the 4GB address space which are managed by the kernel. What is the purpose of this kernel-managed memory? Shouldn’t it be in the kernel space, to prevent accidental corruption by
Periodic task in a Linux kernel module
Currently I am developing GPIO kernel module for friendlyarm Linux 2.6.32.2 (mini2440). I am from electronics background and new to Linux. The kernel module loaded at start-up and the related device file is located in /dev as gpiofreq. At first time writing to device file, GPIO pin toggles continuously at 50kHz. At second time writing it stop toggling. At third
How to print out registers in Linux kernel?
I want to print out values of a couple of registers from the linux kernel code running on ARM. Particularly I have the following assembly in linux – How do I print out the values of r2, r3 and r5 in kmsg? I do not want to use the variable names and want to get the values from registers. Answer
Unknown symbol in while loading a kernel module
I need help understanding why I get an error when I insert a module. I have tried this with no success. Many thanks. Answer I have solved this problem as suggested on this forum: Compiled scst. Appended the generated Module.symvers to existent /lib/modules/<version>/build/Module.symvers (Hack. Do not know why the kernel did not see the exported symbols). Copied the scst to
Linux programmatically up/down an interface kernel
What is the programmatic way of enabling or disabling an interface in kernel space? What should be done? Answer …by using IOCTL’s… … with the IFF_UP bit set or unset depending on whether you want bring the interface up or down accordingly, i.e.: Code copy-pasted from Linux networking documentation.
Is it possible to “hang” a Linux box with a SCHED_FIFO process?
I want to have a real-time process take over my computer. 🙂 I’ve been playing a bit with this. I created a process which is essentially a while (1) (never blocks nor yields the processor) and used schedtool to run it with SCHED_FIFO policy (also tried chrt). However, the process was letting other processes run as well. Then someone told
Converting jiffies to milli seconds
How do I manually convert jiffies to milliseconds and vice versa in Linux? I know kernel 2.6 has a function for this, but I’m working on 2.4 (homework) and though I looked at the code it uses lots of macro constants which I have no idea if they’re defined in 2.4. Answer As a previous answer said, the rate at
Limiting syscall access for a Linux application
Assume a Linux binary foobar which has two different modes of operation: Mode A: A well-behaved mode in which syscalls a, b and c are used. Mode B: A things-gone-wrong mode in which syscalls a, b, c and d are used. Syscalls a, b and c are harmless, whereas syscall d is potentially dangerous and could cause instability to the
What is the proper way of including linux kernel config?
I’m porting an old version of a software that is partly a linux kernel module to EL5, after doing the relevant hacks, the horrible GNU autotools mess that is used to compile the thing (no, it does not compile the kernel module via kbuild 🙁 ) I keep getting lots of warnings ‘Including config.h is deprecated’ – I am told