Changes between Version 4 and Version 5 of jazz/09-05-20


Ignore:
Timestamp:
May 20, 2009, 8:58:58 PM (15 years ago)
Author:
jazz
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • jazz/09-05-20

    v4 v5  
    1414bio:~# apt-get install firmware-bnx2
    1515}}}
     16   * 解析 firmware-bnx2 安裝前與安裝後的 initrd.img 差異
     17{{{
     18bio:~$ mkdir -p temp temp2
     19bio:~$ cd temp
     20bio:~/temp$ cat /boot/initrd.img-2.6.22.19-lustre-686.bak | gunzip | cpio -i
     2127903 block
     22bio:~/temp$ cd ../temp2
     23bio:~/temp2$ cat /boot/initrd.img-2.6.22.19-lustre-686 | gunzip | cpio -i
     2428313 blockss
     25bio:~/temp2$ cd ..
     26bio:~$ diff -r temp temp2
     27只在 temp2/lib 存在:firmware
     28只在 temp2/lib/udev 存在:firmware.agent
     29bio:~$ ls temp2/lib/firmware/
     30bnx2-06-4.0.5.fw  bnx2-09-4.0.5.fw
     31bio:~$ cat temp2/lib/udev/firmware.agent
     32#!/bin/sh -e
     33#
     34# firmware loader agent
     35#
     36
     37cd /lib/udev/
     38. ./hotplug.functions
     39
     40if [ ! -e /sys/$DEVPATH/loading ]; then
     41    mesg "/sys/$DEVPATH/ does not exist"
     42    exit 1
     43fi
     44
     45for DIR in $FIRMWARE_DIRS; do
     46    [ -e "$DIR/$FIRMWARE" ] || continue
     47    echo 1 > /sys/$DEVPATH/loading
     48    cat "$DIR/$FIRMWARE" > /sys/$DEVPATH/data
     49    echo 0 > /sys/$DEVPATH/loading
     50    exit 0
     51done
     52
     53# the firmware was not found
     54echo -1 > /sys/$DEVPATH/loading
     55
     56debug_mesg "Cannot find the $FIRMWARE firmware"
     57exit 1
     58}}}
    1659 * [http://61.60.9.15/apply/ 自然人憑證 API 機關申請]
    1760 * [http://portal.acm.org/toc.cfm?id=J822 Personal and Ubiquitous Computing]