2012年7月3日 星期二

[Linux] Kernel Module with no symbol version

Situation:
Compiling Kernel Module with hierarchy / cross module dependency (say there are EXPORT_SYMBOL in the kernel)
when you insert the child-module, it may cause you following error:
.... Unknown Symbol

You may call the following for further information
$ dmesg
...

[19729.170980] xrawdata0: no symbol version for DmaRegister
[19729.170984] xrawdata0: Unknown symbol DmaRegister

This may occur for all kernel module with kernel version >= 2.6.26

Solution:
1. Divide the Makefile according to the Hierarchy.
2. Make the Base first and let it generate the "Module.symvers".
3. Copy the "Module.symvers" to the directory of the child modules
4.Continue your Compilation and keep renewl the Module.Symvers.

OR
You can make a link of "Module.Symvers" to your kernel source Directory at all your modules source directory to keep your Module.Sysmvers being updated.

Make sure you have run "make vmlinux" before any kernel module compilation. 

[Xilinx] ISE & Impact

Simply, DONT USE UBUNTU over 10.10 if you want your impact function well.

2012年7月1日 星期日

[Linux] Xilinx Cable Driver Can't be Compiled


Situation:

When you compile Xilinx Cable Drier with Linux Kernel >= 2.6.36
(when you run: $Xilinx/14.1/ISE_DS/common/bin/lin/install_script/install_drivers/install_drivers)

This may cause the following problem:

/vlsi/Xilinx/14.1/ISE_DS/common/bin/lin/install_script/install_drivers/linux_drivers/xpc4drvr2_6/xpc4drvr/xpc4.c:241:2: error: unknown field ‘ioctl’ specified in initializer

Solution:

Open:
$Xilinx/14.1/ISE_DS/common/bin/lin/install_script/install_drivers/linux_drivers/xpc4drvr2_6/xpc4drvr/xpc4.c

Add @ top:
#include <linux/slab.h>

@Line 163:
- int xpc4_ioctl (struct inode *inode, struct file *filp,
+ int xpc4_ioctl (struct file *filp,

@Line 240:
- .ioctl = xpc4_ioctl,
+ .unlocked_ioctl = xpc4_ioctl,



========

This may be useful while you try to install Xilinx Cable Driver.
The Kernel Module Driver is not compile-able after 2.6.36

Hacking Material

http://lwn.net/Articles/119652/
http://hi.baidu.com/kkernel/item/ea0ae8f4abb46929743c4c96

2012年6月24日 星期日

Reset linux Root Password

My boot loader is GRUB (see LILO boot loader below)

)Following is the procedure to reset root password if you are using GRUB as a boot loader:
  1. Select the kernel
  2. Press the e key to edit the entry
  3. Select second line (the line starting with the word kernel)
  4. Press the e key to edit kernel entry so that you can append single user mode
  5. Append the word Single (or letter S) to the end of the (kernel) line *need space bar to separate the word single with original command*
  6. Press ENTER key
  7. Now press the b key to boot the Linux kernel into single user mode
  8. type "passwd" command to reset password:

My boot loader is LILO

At LILO boot loader type linux single and press [ENTER] key:
Boot: linux single
When you get the # prompt you will need to type passwd root to reset password:
# passwd
Reboot system:
# sync
# reboot



Reference: http://www.cyberciti.biz/faq/linux-reset-forgotten-root-password/

2012年6月19日 星期二

[Cadence] ICFB Installation Script Template

http://gvitalie.blogspot.hk/2009/10/setting-cadence-environment-variables.html
https://intranet.ece.cornell.edu/computing/kb_articles/kba_detail.cfm?article_id=53

Cadence內Virtuso的Hotkey list




[Cadence] "cds_alias" can't be resolved

Issues:
While using AMS with verilog, it may involve component "basic:cds_alias".
You may not find "basic" library during Simulation and cause error like:
"... cds_alias ... can't be resolved..." or " ... basic ... illegal"

Solution:
First of all, make a soft link to "basic" library in your icfb directory


ln -s /vlsi/cadence/IC5141USR5/tools/dfII/etc/cdslib/basic .

lrwxrwxrwx  1 khwong khwong   52 2012-06-18 15:16 basic -> /vlsi/cadence/IC5141USR5/tools/dfII/etc/cdslib/basic

and modify your cds.lib as follow:

#   DEFINE basic $CDS_INST_DIR/tools/dfII/etc/cdslib/basic
define basic /your_icfb_dir/basic #soft link to "basic"

[UMC130] AMS Simulation Error with umc130mmrf after Extraction

Issue:
After Layout and RCX with "UMC 130nm MMRF", they will use the cell: "pcapacitor" & "presistor" to represent parasitic components.
By default, they will be represented by "umc13mmrf:presistor" & "sample:pcapacitor"
(As CDS sample library also got "pcapacitor)

They are alright with Spectre Simulation (Pure Analog)
Unfortunately, these components don't have AMS (Mixed-Signal) Simulation Source and report:
... presistor ... can't be resolved


Solution:

Use default resistors and capacitor model provided by "analogLib". This can be done according to the setting below:
Corrected Setting
Make sure you don't have components called "res/cap" in other library. (Although I don't suppose someone will do so.)

[Cadence] Library error on 64-bit System

Cadence Tools default you are using 32-bit system.
They can't allocate 64-bit library and cause creepy Errors.
Usually they Generate Error with

" ELF64 " or " * ELF *"

You can force Cadence to Use 64-Bit Library object by adding follow to
~/.cshrc or ~/.bashrc

csh: setenv CDS_AUTO_64BIT ALL
bash: export CDS_AUTO_64BIT=ALL