Running Solaris 8 compiled kernel module on Solaris 9
Hi,
I found some differences in the vnode definitions on S8 and S9. This
means a file system kernel module written on S8 would have to be recompiled to run on S9. From what I know, such a constraint did not exist when going from Solaris 7 to 8. Is it true? Has anyone faced a similar situation for device drivers?
Thanks.
well I have tried it actually. and the behavior is weird. On my solaris 8 box. Every thing works perfectly fine. But due to some reason on solaris 10 machine the values i transmit over the tcp socket totally change. i send a msgCode = 1 , 2, or 3 ... but on the other end, which is a windows machine i get strange values 210, 10, 35 49 etc etc ... is this due to version problem.
Similar Messages
-
How to write a kernel module for Solaris
Hi
I would like to know where I can find information about writing a kernel module for Solaris. Is there a pdf developers reference?http://docs.sun.com
Search "writing device drivers".Even if I don't intend writing a device driver? -
Hello. I tryed to compile kernel module
/home/das/job/C/foo.c:
#include <linux/module.h>
#include <linux/kernel.h>
int init_module(void)
printk(KERN_INFO "Hello world 1.\n");
return 0;
void cleanup_module(void)
printk(KERN_INFO "Goodbye world 1.\n");
I created /home/das/job/C/Makefile:
obj-m += foo.o
all:
make -C /lib/modules/$(shell uname -r)/build M=$(PWD) modules
clean:
make -C /lib/modules/$(shell uname -r)/build M=$(PWD) clean
But when i tryed to compile it with command make I take the error:
make -C /lib/modules/2.6.33-ARCH/build M=/home/das/job/C modules
make: *** /lib/modules/2.6.33-ARCH/build: No such file or directory. Stop.
make: *** [all] Error 2
My question is what is wrong and how i can compile module?
Last edited by F1sher (2011-11-01 15:37:51)tomk wrote:Install it somewhere under /lib/modules/2.6.32-lts, run depmod, and modprobe it.
After
depmod -a
modprobe module
I can't start my system. GDM start but keyboard and mice don't work -
Compiling kernel module on 64bit Solaris10 amd64 platform
Hi,
i m compiling my kernel module in Solaris10 booted in 64bit on amd64 platform.
i m using two extra flags: -xarch=amd64 -xmodel=kernel
But i m getting error s as follows:
ld: fatal: file -c : open failed: No sich file or directory.
ld: fatal: symbol '_fini' is multiply defined.
(file /opt/SUNWspro/prod/lib/ctri.o type=FUNC; file bcmod.o type=FUNC) ;
ld: fatal: symbol '_init' is multiply defined.
(file /opt/SUNWspro/prod/lib/ctri.o type=FUNC; file bcmod.o type=FUNC) ;
ld: fatal: file processing errors: No output written to a.out
can somebody give hint .I think you need to take this question to an Open Solaris community forum at http://www.opensolaris.org
Your question is not about the C compiler, but about how to build the Solaris kernel. -
Compile kernel module during install
I have an ASUS USB-N66 wireless adapater. I have verified that it works in Knoppix using the instructions here: https://bbs.archlinux.org/viewtopic.php?pid=1289702.
I would like to now compile the module during the Arch install process, but cannot run make. Is this possible? Is there an Arch image that includes make?
If not, would it be somehow possible to use the kernel module compiled in Knoppix during the Arch install?
Thanks,
TimI suggest you use a wired connection for the installation process and install all base-devel packages. Then fetch the pkgbuild for rt3573, patch the source, makepkg -si it.
-
Compiling kernel modules against 2.6.15-ARCH
I recently migrated to arch from Gentoo and Debian for a new webserver, and couldn't be happier. The system has worked great so far, and RAID card aside, I haven't had a single problem with Arch. The base system is easy to configure, and there is actually a list of config files in the install docs. Pacman is an absolute dream... Debian's apt is willfully a year out of date, and Gentoo's portage is a convulted and time-consuming nightmare.
In fact, Gentoo's unprompted and unwarranted removal of libstdc++ was the final straw.
However, one thing that confuses me about arch is the kernel build system.
I have an Areca ARC-1210 PCIe to SATAII hardware RAID card, but I can't figure out how to build the driver as a kernel module. If I compile it on its own it fails with literally hundreds of errors, almost like there's a header missing.
The instructions that came with the source want me to add a
config SCSI_ARCMSR
tristate "ARECA SATA RAID HOST Controller"
depends on PCI && SCSI
help
block to /usr/src/linux/drivers/scsi/Kconfig (which I did: it shows up in menuconfig), and a
obj-$(CONFIG_SCSI_ARCMSR) += arcmsr/
line to /usr/src/linux/drivers/scsi/Makefile.
However, arch doesn't seem to have the recursive makefile kernel build system that I and the good people at Areca used to.
How can I build this driver, preferably as a module, against my 2.6.15 kernel?
There are also precompiled x86 modules availible for Red Hat, SuSE, and TurboLinux. Assuming one of them is built against a reasonably current kernel, could they be used safely? I normally wouldn't try such a thing, but time is of the essence, and the RAID card seems to have such simple dependencies, I imagine it unlikely that all three major distros would have SCSI and PCI drivers patched to incompatability.having said all that ...do u think compiling the kernel myself would provide any improvment for me???? ( I am haveing freezing and instablility problems..ive used 3 of the arch kernels....check out my thread titled Arch Instable.. (please)
p.s. btw Welcome -
Compiled kernel module fails to install
A few moments ago finished compiling my own kernel, but still I can not boot with the new kernel.
When installing modules:
make modules_install
I get this:
Warning: you may need to install module-init-tools
The kernel was compiled in the traditional manner, and I get no error with mkinitcpio:
----> mkinitcpio -k 3.2.9 New -g /boot/initramfs-New.img
==> Starting build: 3.2.9
-> Running build hook: [base]
-> Running build hook: [udev]
-> Running build hook: [autodetect]
-> Running build hook: [pata]
-> Running build hook: [scsi]
-> Running build hook: [sata]
-> Running build hook: [filesystems]
-> Running build hook: [usbinput]
-> Running build hook: [fsck]
-> Running build hook: [fglrx]
Building fglrx module for 3.2.9 kernel ...
Ok.
==> Generating module dependencies
==> Creating gzip initcpio image: /boot/initramfs-New.img
==> Image generation successful
I have the entry in grub and I can enter without problem, but there comes a point where you do not start:
Waiting 10 seconds for device /dev/sda4 ...
ERROR: Unable to find root device '/dev/sda4'.
You are being dropped to a recovery shell
Type 'exit' to try and continue booting
sh: can't access tty: job control turned off
[rootfs /]#
And if my partition /root is /dev/sda4,I found a topic like this, but even I can not fix the problem:
https://bbs.archlinux.org/viewtopic.php?id=135851I compiled the kernel old version that I have problems with the battery life on the newer versions.
The battery only lasts me one hour, but that is another problem.
fdisk:
Disk /dev/sda: 500.1 GB, 500107862016 bytes, 976773168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Identificador del disco: 0x5d8c0991
Disposit. Inicio Comienzo Fin Bloques Id Sistema
/dev/sda1 * 2048 409599 203776 7 HPFS/NTFS/exFAT
/dev/sda2 409600 147210239 73400320 7 HPFS/NTFS/exFAT
/dev/sda3 147219660 862304939 357542640 5 Extendida
/dev/sda4 * 862304940 976773167 57234114 83 Linux
/dev/sda5 147219723 859477499 356128888+ 7 HPFS/NTFS/exFAT
/dev/sda6 859477563 862304939 1413688+ 82 Linux swap / Solaris
/lib/modules:
drwxr-xr-x 4 root root 4096 oct 3 20:40 3.2.9
drwxr-xr-x 3 root root 4096 oct 3 08:55 3.5.4-1-ARCH
drwxr-xr-x 2 root root 4096 oct 3 08:55 extramodules-3.5-ARCH
/boot:
drwxr-xr-x 6 root root 4096 oct 3 06:20 grub
-rw-r--r-- 1 root root 12612222 oct 3 08:55 initramfs-linux-fallback.img
-rw-r--r-- 1 root root 3098536 oct 3 08:55 initramfs-linux.img
-rw-r--r-- 1 root root 2016551 oct 3 20:40 initramfs-New.img
-rw-r--r-- 1 root root 2081862 oct 3 19:37 System.map-New
-rw-r--r-- 1 root root 3444736 sep 15 00:15 vmlinuz-linux
-rw-r--r-- 1 root root 4434400 oct 3 19:35 vmlinuz-New
I install grub-legacy of AUR, but I have to change to syslinux.
For now this is my menu.lst:
# (0) Arch Linux
title Arch Linux
root (hd0,3)
kernel /boot/vmlinuz-linux root=/dev/sda4 nomodeset vga=773 ro
initrd /boot/initramfs-linux.img
# (0) Arch Linux
title Arch Linux NK
root (hd0,3)
kernel /boot/vmlinuz-New root=/dev/sda4 nomodeset ro
initrd /boot/initramfs-New.img -
ATI drivers won't compile kernel modules, what other options?
Just building my first Arch build on my desktop, I've got XFCE working, and ALSA (Finally after some troubleshooting and tweaking), but now I'm up to video drivers.
I've just found out the hard way that FGLRX will not compile, I'm assuming because ATI drivers do not support Kernel 3.1.1. So I got rid of FGLRX and the ATI configuration tools. But now I have a dual head display, running on ati-dri (which I assume is just your run of the mill basic driver for ATI cards) and I'm a bit lost on what to look into in terms of using the 3D power of my ATI 4870, and also to set up my dual head displays, on other distros I used to just use the ATI tool and it wrote an xorg file for me, but now I've just got a cloned display.
Halp?Thank you tomk, sorry to have wasted a thread on something that I could of found in the wiki, I'll keep it in mind next time.
Going with the easiest and fastest option seeing as all options will give the same end result, that being using the unofficial catalyst repo. From what I understand the Arch wikis are frequently updated, so that method should work with the 3.1.1 kernel, correct? -
C++ Code in kernel modules
Is it possible to load kernel modules into Solaris that contain C++ code? If so, what compile/linker options are required to make this happen? Thanks.
FredIs it possible to load kernel modules into Solaris
that contain C++ code? If so, what compile/linker
options are required to make this happen?Hello.
Yes. The kernel modules are independent of programming language as long as the object file format is correct. So C++ will work.
There are two kinds of problems:
1) The init, fini and info functions must have the same name as in other programming languages. This is a problem in C++ because C++ adds data type information to symbol names in the object files. This means a function named "int x(int)" would have the symbol name "x" when using C/x86 or just "x" when using C/Sparc while it may have a symbol name like "1_xII" when using C++ (the actual symbol name depends on the C++ compiler used).
To solve this problem you may use the 'extern "C"' statement or write a simple assembler wrapper function.
2) Normally C++ requires a large run-time library. One example for this is the "new" operator. You'll have to write a replacement for this run-time library. So if you want to use the "new" operator you'll have to provide a function named "operator new(int size)" (or something like that). This is true for ALL C++ operators (delete, new[], delete[], ...).
Martin -
Writing a kernel module?
I'm looking for an article to learn writing kernel modules for Solaris OS. Where do I have to look for it?
Hi, look I don't have an answer for you but, I wanted to know tha same. I'm trying to reach some privileged registers so I need to get to execute some privileged code. If you finded out some other way than here, please, please let me know... (I'll do tha same)
Nep -
Copliling Solaris kernel module code in 64bit for AMD64
Hi,
I have solaris10 OS in my HP ProLiant DL-145 server machine
I m using SunStudio C compiler (cc) for compling my kernel module source code. My code is successfully work in 32bit kernel mode. But when i boot the OS in 64bit mode & complile the same code , then no error during compliaion & linking. but my module doesn't work. When i add two flags
-xarch=amd64 -xmodel=kernel , then also no error during compilation, but module still not work.
I want to know , how i can complie my soruce code successfully in 64bit kernel for AMD64, so that it can be loaded successfully through modload command.
I think i need some other flags for that, pls help.from
http://docs.sun.com/app/docs/doc/817-5789/6ml7kh1b4?q=amd64&a=view
Compiling with Sun Studio
Use the -D_KERNEL option to indicate that this code defines a kernel module.
If you are compiling for a 64-bit x86 architecture, use both the -xarch=amd64 option and the -xmodel=kernel option:
% cc -D_KERNEL -xarch=amd64 -xmodel=kernel -c mydriver.c
% ld -r -o mydriver mydriver.o
tim -
Compiling STREAM module for 64-bit kernel
Hi,
I am trying to compile a STREAM module for Solaris. The results I get when I execute "isalist" and "isainfo -kv" are:
-"sparcv9+vis sparcv9 sparcv8plus+vis sparcv8plus sparcv8 sparcv8-fsmuld sparcv7 sparc"
-"64-bit sparcv9 kernel modules"
The host is a Ultra5_10 with SunOS 5.7 sun4u sparc.
First I tried to compile the module with gcc 2.8.1 but altough the compilation apparentelly finisihed OK I did not get to load the module. Later I read that, gcc so far does not generate binaries for 64-bit sparc.
So I installed the Sun WorkShop 5 environment (try version) and I tried to compile my sources with the following line:"cc -D_KERNEL -xarch=v9 -xcode=abs32 -xregs=no%appl -x03 -I. -I/usr/include -c mymodule.c"
but I get a huge list of errors such as:
"/usr/include/sys/thread.h/, line73:warning: volatile is a keyworkd in
ANSI C"
"/usr/include/sys/thread.h/, line 73:sintax error before or at:volatile"
so if I compile adding the directire "-D_ASM" to the previous line, the list of errors descreases to 2 lines:
"/usr/include/sys/kstat.h, line 52: sintax error before or at: hrtime_t"
"/usr/include/sys/kstat.h, line 52: cannot recover from previous errors".
I have also tried adding directives such as: -D_LP64 -D__sparcv9 -D_POSIX_C_SOURCE, -D_XOPEN_SOURCE but I do not get to compile it successfully.
Could someone be so kind to give me a clue of what I am doing wrong, and what should I do in order to compile it??.
The header files I have included right now in my ".c" are:
#include <sys/stream.h>
#include <sys/conf.h>
#include <sys/modctl.h>
#include <sys/kmem.h>
#include <sys/cmn_err.h>
#include <sys/ddi.h>
#include <sys/sunddi.h>
If I do not add the directives -I. -I/usr/include to the compile line above I get the following error:
"/usr/include/sys/modctl.h, line 185: major, argument mismatch"
"/usr/include/sys/cred.h, line 51: sintax error before or at: uint_t"
But this is because the environment it is taken the /usr/ucbinclude as default include path instead of the "/usr/include". �which one should I consider?.
Thank in advance for your support.
Looking forward to hearing from you.
(could you please send to me the answeres to this e-mail:[email protected]??)
Regards
ElenaHI,
Maybe a file I can edit that says to run the Garmin stuff in 32-bit mode?
Right or control click the Garmin application (or utility) then click: Get Info
In the Get Info window under the General tab, if it can be enabled you should see:
Open in 32-bit mode.
Activity Monitor (Applications/Utilities) shows all apps running in 64 bit. If it doesn't have 64 bit under Kind on the right, then it's running in 32 bit mode.
Carolyn -
How to read Share Memeory values in Solaris 10 Kernel?
How to read Share Memeory values in Solaris 10 Kernel?
# ipcs
IPC status from <running system> as of Tue Apr 8 15:39:50 BST 2008
T ID KEY MODE OWNER GROUP
Message Queues:
Shared Memory:
Semaphores:
or review the output of
# sysdef -
I have a large client that is looking to upgrade from Solaris 5.9 up to Solaris 11.2. I need to find some hardware I can run in house to do development, run tests and run setups/configuration on a 64 bit Sparc machine. I know Solaris 11 dropped support for some of the UltraSPARC II, III, IV series. However I need to have a setup in shop locally for me to work on. Any ideas on if buy a sun blade workstation or another workstation that I could get Solaris 11.2 installed? I don't necessarily need the GUI desktop but the text/curses based setup is all I need. Any ideas on where to go? Seems like the cutoff from Solaris 10 to 11 was a pretty big one regarding legacy support of older hardware. Also I know there are x86 distributions of Solaris 11.2 but I have 3rd party software that is compiled on Sparc.
Have you seen the HCL?
I write most of my labs on Virtual Box, and also use a few older 5440s and some new M10s when I want to shoe LDOMs.
OTN - Oracle Solaris 11: Hardware Compatibility List -
What is solaris 10 kernel file name ?
doing report on solaris 10 need the kernel file name
... and if you don't have access to a system that is running Solaris, use Google.
Search on solaris man kernel .
See 1,960,000 "hits" from such a search
Gosh!
How did civilization-as-we-know-it
ever survive this far
until Google arrived to save us ?!?
Maybe you are looking for
-
I am getting an 1015 error while updating Iphone 3G with latest iTunes pls help me to restore iPhone 3G
-
Calling Subroutine of a Function Module
Hi friends, I need to call a routine which exists in a function module from anopther function module. The routine is in a include program (ie type I). is there any way....
-
Tecra M4-133 - when and where can i buy it?
does anyone know when the m4-133 model will be on sale in the uk? want the 128mb nvidia version also does anyone know where u can buy a top spec m4 in the uk? eg. 2.2ghz 2gb ram dvd-rw 128 graphics. cos the standard model just aint enuf? thanks [Edit
-
Need help with pictures on an external HDD and windows labtop to Ipad3
Hallo everybody! This week (I finally) bought an Ipad 3 and an Apple TV! For the time being I still have a windows labtop and an external HDD full with photo's. The ICloud software for windows has been installed because I would like to stream the pic
-
I have an ipod nano. I don't know what generation. It's about 1.5 in square with a touch screen. I've had it for several years and never had a problem with it till now. The playlists don't play in order anymore. How do I get control of that back?