[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference turris::digital_unix

Title:DIGITAL UNIX(FORMERLY KNOWN AS DEC OSF/1)
Notice:Welcome to the Digital UNIX Conference
Moderator:SMURF::DENHAM
Created:Thu Mar 16 1995
Last Modified:Fri Jun 06 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:10068
Total number of notes:35879

9262.0. "Loadable device driver again, please help!" by NETRIX::"[email protected]" (Danny Lin) Mon Mar 24 1997 02:22

Hello,

	I know this problem has been posted and discussed here several times,
	but I still met some other errors, please help!

	I have followed the "Writing Device Drivers: Tutorial" guide Chapter
	14 to build and config a "Dynamically Configuring a Single Binary
	Mode". ( Follow Sec 14.1, 14.2 and 14.3 )

	All things run evry well, except in 14.3.3, when I run "sysconfig -c none",
	I got the following error:
	sh: 4664 Memory fault - core dumped
	method failed to perform postconfiguration
	subsystem error (139) unknown

	, and /dev/console showed messages as follow:
	sysconfigtab: attribute Subsystem_Description not in subsystem none
	sysconfigtab: attribute Module_Path not in subsystem none
	sysconfigtab: attribute Module_Config1 not in subsystem none
	sysconfigtab: attribute Device_Dir not in subsystem none
	none_configure: CFG_OP_CONFIGURE.
	 The none_configure routine was called.  op = 1
	Subsystem_Description: **Attribute does not exist
	Module_Path: **Attribute does not exist
	Module_Config_Name: none
	Module_Config1: **Attribute does not exist
	Device_Dir: **Attribute does not exist
	Device_Char_Major: ANY
	Device_Char_Minor: 0
	Device_Char_Files: none
	Device_User: root
	Device_Group: 0
	Device_Mode: 666
	Device_Major_Req: Same

	At the same time, I run "sysconfig -s", I got -
		:	:	:
		:	:	:
		:	:	:	
	dna_xti: loaded and configured
	lat: loaded and configured
	none: loaded and configured

	I am confused about this, what means about "none: loaded and configured"?
	Is it successful or failed?

	Also in /dev/console, there are messages:
	Subsystem_Description: **Attribute does not exist
	Module_Path: **Attribute does not exist
	Module_Config_Name: none
	Module_Config1: **Attribute does not exist
	Device_Dir: **Attribute does not exist
	I have check /etc/sysconfigtab and have entry for none:
	none:
        	Subsystem_Description = none device driver
        	Module_Path = /sys/io/ESA100/none.mod
        	Module_Config_Name = none
        	Module_Config1 = controller none0 at tc
        	Device_Dir = /dev
        	Device_Char_Major = ANY
        	Device_Char_Minor = 0
        	Device_Char_Files = none
        	Device_User = root
        	Device_Group = 0
        	Device_Mode = 666
        	Device_Major_Req = Same
	I think I have set appropriate attributes for none module.

	I am a freshman in writing loadable device driver and this is my
	customer problem, please help me correct my steps and misunderstanding
	for all about it, thanks a lot in advanced!!!

	Regards
	Danny Lin
	S/W Specialist/Taiwan
	

[Posted by WWW Notes gateway]
T.RTitleUserPersonal
Name
DateLines
9262.1sysconfigdb -a -f sysconfigtab xxxADISSW::TENHAVEMon Mar 24 1997 08:3416
    
    It sounds as if you may not have included your sysconfigtab file
    fragment into the system's sysconfigtab file (both on disk and
    in memory). 
    
    Chapter 14.1.9 talks about how to do this.  This must be done for
    either a static or dynamic driver.  In other words, for a 4.0 style
    driver.
    
    Also check out the sysconfigdb(8) man page.
    
    Note: I did not look at all your entries to check if they 
          are all valid, etc.
    
    				Tim
    
9262.2Very strange sysconfigtab snippet??NETRIX::"[email protected]"Karl EbnerMon Mar 24 1997 09:4156

Hi Danny,

   It looks like you have not correctly done an update
install of the system. You have a 3.x device driver example
you are modifing and building using the 4.0 documentatin. 

   It appears to me that your example sysconfigtab
snippet is wrong. From 4.0 and beyond digital did not
supply an example none.c device driver and I expect that
you are running on a system that has been update installed
and the none.c driver and kit was not removed by the system
admin as is recommended by the uodate install process.

  The none.c device driver on your system is a 3.x device
driver that you have made 4.x changes to like adding:

Device_Major_Req = Same


  You cannot add in 4.0 features randomly to the driver because
you will be misapplying the (3.x and 4.x) configuration
methods/technology that are documented. Either one works in 4.x but you
cannot mix them together. Such as, using the 4.0 documentation to
modify an existing 3.x driver, unless you are following chapter
4 of the 4.x Tutorial which describes how to convert a 3.x driver
to a 4.x. 

>
>        I think I have set appropriate attributes for none module.
>

Detailed answer to your load question:

   The process of configuring a loadable device driver contains
three steps. The method's preconfigure, cfgmgr configuration
and the method's post configuration. The attributes you have
supplied are incorrect and are a combination of 3.x and 4.x
syntax. You module has been loaded, but the method's 
postconfiguration process has failed to interpret the attributes
and the method has failed.

   Please use the correct examples that match the documentation
for the release you are interested in using. For example, the driver
example shipped in 4.x and beyond was called edpseudo.c... There is
no none.c driver in the documentation.

Please send me mail with any questions you have and I will try
to help.

Thanks,
Karl
[email protected]

[Posted by WWW Notes gateway]
9262.3Re .2NETRIX::"[email protected]"Danny LinMon Mar 24 1997 20:3139
Hello Carl:

	Yes, you are right, I try to modify the examples provided by Digital Unix
V3.2C.
	
	But I have no good solution when I followed the README and steps in testing
loadable
	device driver for Digital Unix V3.2C, I have checked in Digital Unix Notes,
and find
	somewhere that If I want to get correct type of .mod file, I must comment out
the
	compiling flag in /sys/BINARY/Makefile to eliminate "-Wb,-static", and after
I tried
	this and run "sysconfig -c none", I got "Invalid Arguments" error, at the
same time,
	If I use original Makefile, ie with flag "-Wb,-static", I run "sysconfig -c
none" and
	got errmsg "Unknown Relocation Type (17)" in /dev/cosole.

	I have no idea in building loadable device driver in V3.2, also my customer
failed in
	this about V3.0, this is why I checked in notes and got some hints in trying
V4.0.

	Carl, would you please help me build loadable device driver for V3.0, V3.2C
and V4.0,
	it seemed that samples provided in V3.2 are not working ones, and customer
doubted why
	we put these in system. Is it necessary to let loadable device driver run
under V4.0
	and is there any solution for prior version of V3.2C.

	Good examples or samples are welcome, I am very appreciated your kindly
support.
	My email is "[email protected]", hope to see your reply!

Best Regards
Danny Lin 
[Posted by WWW Notes gateway]
9262.43.x loadable driver example buildingNETRIX::"[email protected]"ebnerTue Mar 25 1997 11:2528
Hi Danny,

The 3.x device driver examples provided for the product have
worked for everyone (That I have dealt with) who has correctly 
applied the release notes relating to building loadable 
modules on 3.x Digital UNIX systems. 

The 3.0 Release notes detail how to effect the build
process to create 3.x loadable modules. You must reference
the 3.x device driver documentation and you must use a 3.x
to build the modules. I do not encourage you to modifying 
flags or work around the documented process for this always
causes undocumented confusion.

Please send me mail directly about the detailed problems you
encounter when use the documentation and I will be glad
to help you with whatever questions arise. We can post the notes
file with any information that would be relevent to the readers
later.

Thanks,
Karl 
[email protected]



[Posted by WWW Notes gateway]
9262.5Re .3NETRIX::"[email protected]"Danny LinTue Mar 25 1997 19:3219
Hello Karl:

        I will do my best to get 3.x documents, would you please advise
        the point to get the PostScript file for it, I just can find
        4.x documents in JANIX::/pub/docs/Digital-UNIX/V4.0/PostScript.

        I think I lost my mind to trust the README file in
        /usr/examples/devdriver/none100, I must spend time in reading
        and following the guidelines in 3.x documents to try again.

        I am very appreicated your kindly and immediate reply, when I
        try again and need help, I will let you know.

        Thanks a lot in advanced.

Best Regards
Danny Lin

[Posted by WWW Notes gateway]
9262.6Re .4 .5NETRIX::"[email protected]"Danny LinTue Mar 25 1997 19:548
Hello Karl:

	I got the pointers for 3.x documents, thanks, and will let you
	know my testing result.

Best Regards
Danny Lin
[Posted by WWW Notes gateway]
9262.7Successfully config in officeNETRIX::"[email protected]"Danny linWed Mar 26 1997 04:4019
Karl:

	After more than one week's struggle and follow the 3.x documents and "Release
Notes"
	of Digital UNIX V3.2C, I finally config and load the device driver for none
successfully.

	The key point is in Sec 5-15 (P 5-9) of Release Notes for DU V3.2C, you must
change
	/sys/BINARY/Makefile for Compiling flag from "CCDFLAGS" to "DCC_FLAGS".

	It's my fault to miss this, anyway, I am very appreciated your hints and
support.

	Now wait for customer's testing result.

Best Regards
Danny Lin
[Posted by WWW Notes gateway]
9262.8COL01::LINNARTZWed Mar 26 1997 05:1512
    Danny,
    
    take a look at 
    http://www.zk3.dec.com/~malone/driver_tool/start.html
    
    It still lacks a couple of features (like creating a standalone
    Makefile, personally I also find it cumbersome via the /sys/conf way,
    and I made my own, decoupled from this which works too), but it looks 
    really neat and I could imagine that over time this will be a big aid.
    
    Pit