Posts

Filter selection through pipe in Emacs

Emacs has this wonderful feature of filtering a selection through a unix pipe. It's just a bit hard to remember how to invoke. C-u M-| command RET

RPM cheat sheet

list installed packages, dpkg -l rpm -qa info on an installed package, dpkg -s rpm -qi contents of an installed package, dpkg -L rpm -q -l package where a file belongs to, dpkg -S rpm -q -f extract package contents without installing, dpkg -x rpm2cpio file.rpm | cpio -idv

debugging makefile variables

To debug makefile variable assigments. Use make -p (--print-data-base) to see which values get assigned to variables and where. Need to add to reading list: Managing projects with GNU make.

OpenSSH host key signature fingerprint

Note to self. It's ssh-keygen that can dump the host key fingerprint in a format suitable for PuTTY security alert comparisons. ssh-keygen -l -f /etc/ssh/ssh_host_rsa_key.pub

Linux i2c

My notes while reading Linux kernel i2c source code and the documentation. i2c-dev implements the character devices for userspace, a generic, "remote controlled" i2c chip driver ioctl to select slave read()/write() for a subset of smbus operations i2c-tools with library functions i2c adapter A host bus adapter instance class - allow probing for slave devices in class: HWMON, TV, DDC, SPD nr - 'id' number of instance algo - operations to implement i2c_add_[numbered_]adapter() exported API i2c_transfer() - sequence of low level i2c operations i2c_smbus_transfer() - sequence of high level smbus operations i2c algorithm operations to implement a type of host bus adapter: bitbang, philips bus controllers master_xfer() - implement low level i2c transaction segment: operations to read or write bytes to/from i2c device smbus_xfer() - implement high level SMbus access functionality() - query available functionality: SMBUS support, 10bit addressing master_xfer can b...

LDD3 notes: Networking

My notes while reading Linux Device Drivers 3rd edition , network drivers. General and setup Network devices have no /dev entry point different namespace file operations don't make sense on network interface. Why? I think they could. [alloc|register|unregister|free]_netdev alloc_netdev variants alloc_[eth|fc|fddi|tr]dev separate [ltalk|fc|fddi|hippi|tr]_setup private data not a pointer to driver allocated data, but allocated along with the net_device. supply size to allocate_netdev() use netdev_priv(dev) to access the data interface flags IFF_* flags & IFF_DEBUG, enable debuggin via ioctl: netifdebug IFF_UP change -> open()/stop() any flag change -> set_multicast_list() Features, interesting ones NETIF_F_NO_CSUM - interface needs no checksums NETIF_F_HW_CSUM - interface hardware does checksums NETIF_F_VLAN_[TX|RX|FILTER] NETIF_F_HIGHDMA by default all socket buffers are in low memory Networking device structure jiffy timestamps for last tx/rx, tx watchdog timeout. Transmi...

Free UML tools

Excellent summary of freely available UML tools, with screenshots. http://www.devcurry.com/2010/06/free-open-source-uml-tools.html But it's missing the one I'm using the most: http://plantuml.sourceforge.net/