WI-FI Usage

=================

This is detailed explanation of each parameters for the FH7200B wi-fi use.

(Updated : 2013-09-12, by steo)


[parameters]         [val] 

{range}

-----------------   -------------------------------------------------

SSID                         {0~z, 1~32 ascii characters}

                            ::Set AP SSID

AuthMode             {AUTO,OPEN,SHARED,WPAPSK,WPA2PSK}

                                ::Set Authentication Mode

EncrypType           {NONE,WEP64,WEP128,TKIP,AES}          

::Set Encryption Type

Key                 {5 ascii characters or 10 hex number or 

                      13 ascii characters or 26 hex numbers}

                      ::Set Key String  

Examples

===================================================================

a> Config STA to link with AP which is AUTO/NONE(Authentication/Encryption)

# iwconfig wlan0 essid "AP's SSID"

# iwconfig wlan0 enc off

# iwconfig wlan0 essid "AP's SSID"

# udhcpc -i wlan0


b> Config STA to link with AP which is AUTO/WEP64(Authentication/Encryption)

# iwconfig wlan0 essid "AP's SSID"

# iwconfig wlan0 key s:AP's wep key

# iwconfig wlan0 essid "AP's SSID"

# udhcpc -i wlan0


c> Config STA to link with AP which is AUTO/WEP128(Authentication/Encryption)

# iwconfig wlan0 essid "AP's SSID"

# iwconfig wlan0 key s:AP's wep key

# iwconfig wlan0 essid "AP's SSID"

# udhcpc -i wlan0


d> Config STA to link with AP which is OPEN/NONE(Authentication/Encryption)

# iwconfig wlan0 essid "AP's SSID"

# iwconfig wlan0 enc off

# iwconfig wlan0 essid "AP's SSID"

# udhcpc -i wlan0


e> Config STA to link with AP which is OPEN/WEP64(Authentication/Encryption)

# iwconfig wlan0 essid "AP's SSID"

# iwconfig wlan0 key s:AP's wep key

# iwconfig wlan0 essid "AP's SSID"

# udhcpc -i wlan0

f> Config STA to link with AP which is OPEN/WEP128(Authentication/Encryption)

# iwconfig wlan0 essid "AP's SSID"

# iwconfig wlan0 key s:AP's wep key

# iwconfig wlan0 essid "AP's SSID"

# udhcpc -i wlan0


g> Config STA to link with AP which is SHARED/WEP64(Authentication/Encryption)

# iwconfig wlan0 essid "AP's SSID"

# iwconfig wlan0 key s:AP's wep key

# iwconfig wlan0 essid "AP's SSID"

# udhcpc -i wlan0


h> Config STA to link with AP which is SHARED/WEP128(Authentication/Encryption)

# iwconfig wlan0 essid "AP's SSID"

# iwconfig wlan0 key s:AP's wep key

# iwconfig wlan0 essid "AP's SSID"

# udhcpc -i wlan0


i> Config STA to link with AP which is WPAPSK/AES(Authentication/Encryption)

# wpa_passphrase "AP's SSID" "AP's wpa-preshared key" > /etc/wpa_supplicant/wpa_supplicant.conf


# vi /etc/wpa_supplicant/wpa_supplicant.conf

network={

ssid="AP's SSID"

proto=WPA

key_mgmt=WPA-PSK

pairwise=CCMP

group=CCMP

psk="생성된 psk"

}

# iwconfig wlan0 essid "AP's SSID"

# wpa_supplicant -iwlan0 -c/etc/wpa_supplicant/wpa_supplicant.conf &

# udhcpc -i wlan0


j> Config STA to link with AP which is WPAPSK/TKIP(Authentication/Encryption)

# wpa_passphrase "AP's SSID" "AP's wpa-preshared key" > /etc/wpa_supplicant/wpa_supplicant.conf


# vi /etc/wpa_supplicant/wpa_supplicant.conf

network={

ssid="AP's SSID"

proto=WPA

key_mgmt=WPA-PSK

pairwise=TKIP

group=TKIP

psk="생성된 psk"

}


# iwconfig wlan0 essid "AP's SSID"

# wpa_supplicant -iwlan0 -c/etc/wpa_supplicant/wpa_supplicant.conf &

# udhcpc -i wlan0


k> Config STA to link with AP which is WPA2PSK/AES(Authentication/Encryption)

# wpa_passphrase "AP's SSID" "AP's wpa-preshared key" > /etc/wpa_supplicant/wpa_supplicant.conf

# vi /etc/wpa_supplicant/wpa_supplicant.conf

network={

ssid="AP's SSID"

proto=WPA2

key_mgmt=WPA-PSK

pairwise=CCMP

group=CCMP

psk="생성된 psk"

}

# iwconfig wlan0 essid "AP's SSID"

# wpa_supplicant -iwlan0 -c/etc/wpa_supplicant/wpa_supplicant.conf &

# udhcpc -i wlan0


l> Config STA to link with AP which is WPA2PSK/TKIP(Authentication/Encryption)

# wpa_passphrase "AP's SSID" "AP's wpa-preshared key" > /etc/wpa_supplicant/wpa_supplicant.conf

# vi /etc/wpa_supplicant/wpa_supplicant.conf

network={

ssid="AP's SSID"

proto=WPA2

key_mgmt=WPA-PSK

pairwise=TKIP

group=TKIP

psk="생성된 psk"

}

# iwconfig wlan0 essid "AP's SSID"

# wpa_supplicant -iwlan0 -c/etc/wpa_supplicant/wpa_supplicant.conf &

# udhcpc -i wlan0


Posted by eoseontaek

[Error] 

Fedora 10에서 wpa_supplicant 빌드시, 아래와 같은 Error가 발생하였다. 


make[2]: Entering directory `/home/steo/FH7200B/src.rev2342/hmc/tools/wpa_supplicant/libnl-3.2.22'

Making all in include

make[3]: Entering directory `/home/steo/FH7200B/src.rev2342/hmc/tools/wpa_supplicant/libnl-3.2.22/include'

make[4]: Entering directory `/home/steo/FH7200B/src.rev2342/hmc/tools/wpa_supplicant/libnl-3.2.22'

make[4]: Leaving directory `/home/steo/FH7200B/src.rev2342/hmc/tools/wpa_supplicant/libnl-3.2.22'

make[3]: Nothing to be done for `all'.

make[3]: Leaving directory `/home/steo/FH7200B/src.rev2342/hmc/tools/wpa_supplicant/libnl-3.2.22/include'

Making all in lib

make[3]: Entering directory `/home/steo/FH7200B/src.rev2342/hmc/tools/wpa_supplicant/libnl-3.2.22/lib'

make[4]: Entering directory `/home/steo/FH7200B/src.rev2342/hmc/tools/wpa_supplicant/libnl-3.2.22'

make[4]: Leaving directory `/home/steo/FH7200B/src.rev2342/hmc/tools/wpa_supplicant/libnl-3.2.22'

  GEN    route/cls/ematch_syntax.c

route/cls/ematch_syntax.y:31.9-16: syntax error, unexpected identifier, expecting string

make[3]: *** [route/cls/ematch_syntax.c] Error 1

make[3]: Leaving directory `/home/steo/FH7200B/src.rev2342/hmc/tools/wpa_supplicant/libnl-3.2.22/lib'

make[2]: *** [all-recursive] Error 1

make[2]: Leaving directory `/home/steo/FH7200B/src.rev2342/hmc/tools/wpa_supplicant/libnl-3.2.22'

make[1]: *** [libnl] Error 2

make[1]: Leaving directory `/home/steo/FH7200B/src.rev2342/hmc/tools/wpa_supplicant'

make: *** [wpa_supplicant] Error 2



[Solved]

bison tool version 호환성 때문에 발생하는 error이다. 

 

아래와 같이 bison source code build & install해 준다. 

 

Download source

# wget http://ftp.gnu.org/gnu/bison/bison-2.5.1.tar.gz

 

Extract tar

# tar xvzf bison-2.5.1.tar.gz

 

Build & Install

# cd bison-2.5.1

# ./configure

# make

# make install


'[C-08] BCM7231' 카테고리의 다른 글

[BCM7231] parse iwlist  (0) 2013.11.07
[BCM7231] WIFI usage (with wireless_toos and wpa-supplicant)  (0) 2013.11.05
Posted by eoseontaek

Downloading a kernel source for Nexus 10


# git clone https://android.googlesource.com/kernel/exynos.git


# cd exynos


# git checkout android-exynos-manta-3.4-jb-mr1-fr



Ensure that the prebuilt toolchain is in your path


# export PATH=~/aosp_android-4.2.1_r1.2/prebuilts/gcc/linux-x86/arm/arm-eabi-4.6/bin:$PATH



Building a manta kernel


we would build the manta kernel using the following commands:


# export ARCH=arm
# export SUBARCH=arm
# export CROSS_COMPILE=arm-eabi-

# make manta_defconfig
# make



The kernel for mantaray is device/samsung/manta/kernel


The image is output as arch/arm/boot/zImage. You may copy it as device/samsung/manta/kernel.



Creating a boot.img


Copy a image to ~/aosp_android-4.2.1_r1.2/out/target/product/manta directory.


# cp zImage ~/aosp_android-4.2.1_r1.2/out/target/product/manta/


Ensure that the mkbootimg binary is in your path


# export PATH=~/aosp_android-4.2.1_r1.2/out/host/linux-x86/bin:$PATH



Move to ~/aosp_android-4.2.1_r1.2/out/target/product/manta/ directory.


# cd ~/aosp_android-4.2.1_r1.2/out/target/product/manta/



Create a boot.img


# mkbootimg --kernel zImage --ramdisk ramdisk.img -o new-boot.img



Flashing a device


Once the device is in fastboot mode, run


# fastboot boot new-boot.img


Posted by eoseontaek

Build environment


+ Operating system -- Tested on Ubuntu 12.04 and 12.10 (64bit)

+ Terminal

+ Decent hardware (minimum of at least a dual core CPU and 4 GB of RAM)

+ Optimally have an SSD (standard mechanical drives work as well but slow down the process drastically)

+ Must have required packages for building installed, I will list them further down


Installing JDK


The Sun JDK is no longer in Ubuntu's main package repository. In order to download it, you need to add the appropriate repository and indicate to the system which JDK should be used.

Java 6: for Gingerbread and newer


# sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu hardy main multiverse"

# sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu hardy-updates main multiverse"

# sudo apt-get update

# sudo apt-get install sun-java6-jdk


Required packages


# sudo apt-get install git gnupg flex bison gperf build-essential \
 zip curl libc6-dev libncurses5-dev:i386 x11proto-core-dev \
 libx11-dev:i386 libreadline6-dev:i386 libgl1-mesa-glx:i386 \
 libgl1-mesa-dev g++-multilib mingw32 tofrodos \
 python-markdown libxml2-utils xsltproc zlib1g-dev:i386


# sudo ln -s /usr/lib/i386-linux-gnu/mesa/libGL.so.1 /usr/lib/i386-linux-gnu/libGL.so



Getting the source


+ Make directory for repo binary

# mkdir ~/bin


+ Add directory for repo binary to your path

# PATH=~/bin:$PATH


+ Download repo binary and place it in the proper directory

# curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo


+ Give the repo binary the proper permissions

# chmod a+x ~/bin/repo


+ Create directory for where the AOSP repo will be stored and synced

# mkdir ~/aosp_android-4.2.1_r1.2


+ Move to our new AOSP directory

# cd ~/aosp_android-4.2.1_r1.2


+ Initialize the AOSP repo and download the manifest

# repo init -u https://android.googlesource.com/platform/manifest -b android-4.2.1_r1.2



+ Sync AOSP source

# repo sync


Getting the binaries

+ Obtaining proprietary binaries

Download a binary hardware support files for Nexus 10 that are available for users of the Android Open-Source Project.


Nexus 10 binaries for Android 4.2/4.2.1 (JOP40C and JOP40D)


# cd  ~/aosp_android-4.2.1_r1.2


1. Audio Processor

# wget https://dl.google.com/dl/android/aosp/audience-manta-jop40c-b1458d4b.tgz


2. Wi-Fi, Bluetooth, NFC

# wget https://dl.google.com/dl/android/aosp/broadcom-manta-jop40c-17f2edc4.tgz


3. Graphics

# wget https://dl.google.com/dl/android/aosp/samsung-manta-jop40c-a3d68928.tgz


+ Extracting the proprietary binaries


Each set of binaries comes as a self-extracting script in a compressed archive. After uncompressing each archive, run the included self-extracting script from the root of the source tree, confirm that you agree to the terms of the enclosed license agreement, and the binaries and their matching makefiles will get installed in the vendor/ hierarchy of the source tree.


# tar -xvzf audience-manta-jop40c-b1458d4b.tgz

# tar -xvzf broadcom-manta-jop40c-17f2edc4.tgz

# tar -xvzf samsung-manta-jop40c-a3d68928.tgz


# ./extract-audience-manta.sh

# ./extract-broadcom-manta.sh

# ./extract-samsung-manta.sh



Start the build


# . build/envsetup.sh


#  lunch full_manta-userdebug


If you have patience and have no build errors, you'll end up with a flashable binaries in ~/aosp_android-4.2.1_r1.2/out/target/product/manta


Flashing a device


Set the device in fastboot mode if necessary.


An entire Android system can be flashed in a single command: this writes the boot, recovery and system partitions together after verifying that the system being flashed is compatible with the installed bootloader and radio, and reboots the system. This also erases all the user data.



# cd ~/aosp_android-4.2.1_r1.2/out/target/product/manta


# fastboot -w flashall


Posted by eoseontaek

Requirements on Android Development Environment

OS : Ubuntu 10.04 64 bits

JDK version: 1.6

Cross compilation tool chain: arm-hisiv200-linux-


Installing the JDK

To install the JDK, perform the following steps:


Step 1. Download the JAVA SE Development kit

http://www.oracle.com에 접속

JAVA SE Development Kit 6u26을 다운로드한다.


# wget http://download.oracle.com/otn/java/jdk/6u26-b03/jdk-6u26-linux-x64.bin


Step 2. Extarct the JDK archive

# sudo ./jdk-6u26-linux-x64.bin


Step 3. Install the JDK 1.6

# sudo mv jdk1.6.0_26 /usr/lib/jvm/

sudo update-alternatives --install /usr/bin/java java /usr/lib/jvm/jdk1.6.0_26/bin/java 1

sudo update-alternatives --install /usr/bin/javac javac /usr/lib/jvm/jdk1.6.0_26/bin/javac 1

sudo update-alternatives --install /usr/bin/javaws javaws /usr/lib/jvm/jdk1.6.0_26/bin/javaws 1


If there are several JDK versions, switch to the specified version by running the following command : 

# sudo update-alternatives --config java  ====> select jdk1.6.0_26

# sudo update-alternatives --config javac ====> select jdk1.6.0_26

# sudo update-alternatives --config javaws ====> select jdk1.6.0_26


Step 4. Verify the JDK versioin

# java -version


Installing Required Packages


on 64-bits server

# sudo apt-get install git-core gnupg flex bison gperf build-essential zip curl zlib1g-dev libc6-dev lib32ncurses5-dev ia32-libs x11proto-core-dev libx11-dev lib32readline5-dev lib32z-dev libgl1-mesa-dev g++-multilib mingw32 tofrodos


Installing Python

Run the following command to install the python tool:

# sudo apt-get install python


Installing mkimage

The mkimage command is required to compile the kernel.

# sudo apt-get install uboot-mkimage


Installing the Cross Compilation Tool Chain

Step 1 Install the cross compilation tool chain again.

The following is the directory of the cross compilation tool:

# cd ./HiSTBAndroidV400R001C00SPC050/software/share2/mirror_fileserver/Hi3716CV100R002/toolchains/arm-hisiv200-linux


Step 2 After switching to the root user, run the following command in the installation package of the cross compilation tool:

# ./cross.install


Set-up the environment variables

# vi setup.sh

#!/bin/sh


echo "HiSTB configuration ..."


export JAVA_HOME=/usr/lib/jvm/jdk1.6.0_26

export PATH=/usr/lib/jvm/jdk1.6.0_26/bin:$PATH


export PATH=/home/root/bin/x86-arm/arm-hisiv200-linux/target/bin:$PATH




# source setup.sh











'[C-11] Hi3716C' 카테고리의 다른 글

[Hi3716C] Kernel module build  (0) 2013.12.16
[Hi3716C] sample_e2prom  (0) 2013.12.06
[Hi3716C-Kernel] tags, cscope  (0) 2013.11.28
[Hi3716C-Kernel] Kernel Build command  (0) 2013.11.26
[Hi3716C-fastboot] Build commands for fastboot  (0) 2013.11.26
Posted by eoseontaek

Error : 

[root@steo lib]# yum makecache

Repository updates is listed more than once in the configuration

http://mirror.dulug.duke.edu/pub/yum-repository/redhat/17/i386/repodata/repomd.xml: [Errno 14] curl#6 - "Could not resolve host: mirror.dulug.duke.edu; 이름 혹은 서비스를 알 수 없습니다"

Trying other mirror.



Solved :

# vi /etc/yum.conf

[main]

cachedir=/var/cache/yum

debuglevel=2

logfile=/var/log/yum.log

pkgpolicy=newest

distroverpkg=redhat-release

tolerant=1

exactarch=1


[fedora]

name=Fedora Core $releasever base

failovermethod=priority

#baseurl=http://dl.google.com/linux/chrome/rpm/stable/i386/

mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=fedora-$releasever&arch=$basearch

enabled=1

metadata_expire=7d

gpgcheck=1

gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$basearch


[fedora-debuginfo]

[fedora-debuginfo]

name=Fedora $releasever - $basearch - Debug

failovermethod=priority

#baseurl=http://download.fedoraproject.org/pub/fedora/linux/releases/$releasever/Everything/$basearch/debug/

mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=fedora-debug-$releasever&arch=$basearch

enabled=0

metadata_expire=7d

gpgcheck=1

gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$basearch


[fedora-source]

name=Fedora $releasever - Source

failovermethod=priority

#baseurl=http://download.fedoraproject.org/pub/fedora/linux/releases/$releasever/Everything/source/SRPMS/

mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=fedora-source-$releasever&arch=$basearch

enabled=0

metadata_expire=7d

gpgcheck=1

gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$basearch


Link : 


'[D-01] Linux' 카테고리의 다른 글

[Linux] Diff two directory on vi  (0) 2014.01.24
[Fedora17] When yum, segmentation fault  (0) 2013.10.21
[Linux] Fedora 8 Newtork 설치  (0) 2013.09.30
[Linux] hotplug & firmware loading  (0) 2013.09.13
Fedora 17 NFS 설정  (0) 2012.12.10
Posted by eoseontaek

Error : 


[root@steo steo]# yum clean all
세그멘테이션 오류 (core dumped)


Fixed : 

[root@steo lib]# ls -l libz*

lrwxrwxrwx. 1 root root     23 12월  6  2012 libz.so -> ../../lib/libz.so.1.2.5

lrwxrwxrwx. 1 root root     13 12월  6  2012 libz.so.1 -> libz.so.1.2.5

-rwxr-xr-x  1 root root  87332  8월  2  2012 libz.so.1.2.5


zlib-1.2.5를 zlib-1.2.8 로 변경함

# wget http://zlib.net/zlib-1.2.8.tar.gz
# tar -xvzf zlib-1.2.8.tar.gz
# cd ./zlib-1.2.8
# ./configure
# make
# make install

Link :

http://www.zlib.net/

http://serverfault.com/questions/256385/yum-segmentation-fault-in-centos

Posted by eoseontaek

Build Error : 

target Java: core (out/target/common/obj/JAVA_LIBRARIES/core_intermediates/classes)

host Java: dx (out/host/common/obj/JAVA_LIBRARIES/dx_intermediates/classes)

/bin/bash: jar: command not found

make: *** [out/host/common/obj/JAVA_LIBRARIES/jsr305lib_intermediates/javalib.jar] Error 127

make: *** Waiting for unfinished jobs....

Note: Some input files use unchecked or unsafe operations.

Note: Recompile with -Xlint:unchecked for details.

/bin/bash: jar: command not found

make: *** [out/host/common/obj/JAVA_LIBRARIES/antlr-runtime_intermediates/javalib.jar] Error 127

Note: Some input files use unchecked or unsafe operations.

Note: Recompile with -Xlint:unchecked for details.

/bin/bash: jar: command not found

make: *** [out/host/common/obj/JAVA_LIBRARIES/dx_intermediates/javalib.jar] Error 127

Note: Some input files use or override a deprecated API.

Note: Recompile with -Xlint:deprecation for details.

Note: Some input files use unchecked or unsafe operations.

Note: Recompile with -Xlint:unchecked for details.

/bin/bash: jar: command not found

make: *** [out/target/common/obj/JAVA_LIBRARIES/core_intermediates/classes-full-debug.jar] Error 127


Fixed : 
build system에서 "jar" command를 찾을 수 없어서 발생 
# which jar

# sudo update-alternatives --install /usr/bin/jar jar /usr/lib/jvm/jdk1.6.0_34/bin/jar 1
# which jar
/usr/bin/jar





Posted by eoseontaek

Build Error : 

/bin/bash: mkimage: command not found


Fixed : 

# sudo apt-get install uboot-mkimage



Posted by eoseontaek

Server name : http://archives.fedoraproject.org

File directory : /pub/archive/fedora/linux/releases/8/Fedora/i386/os/


http://archives.fedoraproject.org/pub/archive/fedora/linux/releases/8/Fedora/i386/os/images/stage2.img 파일이 존재하는 확인한다. 


Link :  http://archives.fedoraproject.org/pub/archive/fedora/linux/releases/8/Fedora/i386/os/


참고 : 

http://wiz.pe.kr/448



Posted by eoseontaek

#!/bin/sh


#########################################

# USB Port on FH7200

#

# REAR  : ehci-brcm.0 -> BUSNUM=001

# INNER : ehci-brcm.1 -> BUSNUM=002

# FRONT : ehci-brcm.2 -> BUSNUM=003

#########################################


# set to '1' to enable USB thumbdrive automount

AUTOMOUNT=1


AUTOMOUNT_REAR_POINT="/mnt/usbrear"

AUTOMOUNT_RSS_POINT="/mnt/rss"

AUTOMOUNT_FRONT_POINT="/mnt/usb"

SAVED_REAR_DEVPATH="/tmp/saved-usbrear-devpath"

SAVED_RSS_DEVPATH="/tmp/saved-rss-devpath"

SAVED_FRONT_DEVPATH="/tmp/saved-usb-devpath"


AUTOMOUNT_FS="vfat"


HOTPLUG_FW_DIR=/lib/firmware


# on boot (option : -s)


if [ "$1" = "-s" ]; then

for i in /sys/block/sd*/*/dev 

do

if [ -f $i ]; then

DEV=$(echo $i | sed -e 's@/dev@@' -e 's@.*/@@')

BLKDEV=$(echo $DEV | cut -c1-3)

BLKDEVPATH=`readlink /sys/block/$BLKDEV/device`


DEVPATH="/block/$BLKDEV/$DEV" 

if [[ "$BLKDEVPATH" == *usb1* ]]; then

echo $DEVPATH > $SAVED_REAR_DEVPATH

exec mount /dev/${DEV} ${AUTOMOUNT_REAR_POINT} -o iocharset=utf8

if [ $? -ne 0 ]; then

exec mount /dev/${DEV} ${AUTOMOUNT_REAR_POINT}

fi

elif [[ "$BLKDEVPATH" == *usb2* ]]; then

echo $DEVPATH > $SAVED_RSS_DEVPATH

exec mount /dev/${DEV} ${AUTOMOUNT_RSS_POINT} -o data=journal

elif [[ "$BLKDEVPATH" == *usb3* ]]; then

echo $DEVPATH > $SAVED_FRONT_DEVPATH

exec mount /dev/${DEV} ${AUTOMOUNT_FRONT_POINT} -o iocharset=utf8

if [ $? -ne 0 ]; then

exec mount /dev/${DEV} ${AUTOMOUNT_FRONT_POINT}

fi

fi

fi

done

fi


# userspace firmware loader


if [ "$1" = "firmware" ]; then

if [ "$ACTION" = "add" ]; then

echo 1 > /sys/$DEVPATH/loading

cat $HOTPLUG_FW_DIR/$FIRMWARE > /sys/$DEVPATH/data

echo 0 > /sys/$DEVPATH/loading

fi

fi


# network hotplug

# NOTE: this only operates on real NICs (ethN), not lo/br0/sit0/etc.


if [ "$1" = "net" -a -e /sys/class/net/$INTERFACE/device ]; then

if [ "$ACTION" = "add" ]; then

/sbin/ifup $INTERFACE

elif [ "$ACTION" = "remove" ]; then

/sbin/ifdown $INTERFACE

fi

fi


# USB automount (only works with bash)



if [[ "$ACTION" = "remove" && "$1" = "block" ]]; then

if [[ -e $SAVED_REAR_DEVPATH ]]; then

USB_DEVPATH=`cat $SAVED_REAR_DEVPATH`

if [[ "$DEVPATH" = "$USB_DEVPATH" ]]; then

rm -f $SAVED_REAR_DEVPATH

exec umount -l ${AUTOMOUNT_REAR_POINT}

fi

fi

if [[ -e $SAVED_RSS_DEVPATH ]]; then

USB_DEVPATH=`cat $SAVED_RSS_DEVPATH`

if [[ "$DEVPATH" = "$USB_DEVPATH" ]]; then

rm -f $SAVED_RSS_DEVPATH

exec umount -l ${AUTOMOUNT_RSS_POINT}

fi

fi

if [[ -e $SAVED_FRONT_DEVPATH ]]; then

USB_DEVPATH=`cat $SAVED_FRONT_DEVPATH`

if [[ "$DEVPATH" = "$USB_DEVPATH" ]]; then

rm -f $SAVED_FRONT_DEVPATH

exec umount -l ${AUTOMOUNT_FRONT_POINT}

fi

fi

fi


# PHYSDEV* vars were removed in 2.6.37

if [ -z "$PHYSDEVPATH" ]; then

# for DEVPATH = /block/sda/sda1

PHYSDEVPATH=`readlink /sys/$DEVPATH/../device`

PHYSDEVDRIVER=`readlink /sys/$DEVPATH/../device/driver`

fi


if [[ "$AUTOMOUNT" = "1" && "$1" = "block" && "$ACTION" = "add" ]]; then

if [[ "$PHYSDEVPATH" == *usb1* ]]; then

if [[ ! -e $SAVED_REAR_DEVPATH && "$PHYSDEVDRIVER" = *sd && $[ ($MINOR % 16) == 1 ] ]]; then

DEV=${DEVPATH##*/}

echo $DEVPATH > $SAVED_REAR_DEVPATH

exec mount /dev/${DEV} ${AUTOMOUNT_REAR_POINT} -o iocharset=utf8

if [ $? -ne 0 ]; then

exec mount /dev/${DEV} ${AUTOMOUNT_REAR_POINT}

fi

fi

elif [[ "$PHYSDEVPATH" == *usb2* ]]; then

if [[ ! -e $SAVED_RSS_DEVPATH && "$PHYSDEVDRIVER" = *sd && $[ ($MINOR % 16) == 1 ] ]]; then

DEV=${DEVPATH##*/}

echo $DEVPATH > $SAVED_RSS_DEVPATH

exec mount /dev/${DEV} ${AUTOMOUNT_RSS_POINT} -o data=journal

fi

elif [[ "$PHYSDEVPATH" == *usb3* ]]; then

if [[ ! -e $SAVED_FRONT_DEVPATH && "$PHYSDEVDRIVER" = *sd && $[ ($MINOR % 16) == 1 ] ]]; then

DEV=${DEVPATH##*/}

echo $DEVPATH > $SAVED_FRONT_DEVPATH

exec mount /dev/${DEV} ${AUTOMOUNT_FRONT_POINT} -o iocharset=utf8

if [ $? -ne 0 ]; then

exec mount /dev/${DEV} ${AUTOMOUNT_FRONT_POINT}

fi

fi

fi

fi


Here's a C program to print hotplug nelink events to stdout:

hnetlink.c


참조 :

http://lwn.net/Articles/242046/

https://www.kernel.org/doc/pending/hotplug.txt



'[D-01] Linux' 카테고리의 다른 글

[Fedora17] When yum, segmentation fault  (0) 2013.10.21
[Linux] Fedora 8 Newtork 설치  (0) 2013.09.30
Fedora 17 NFS 설정  (0) 2012.12.10
Fedora17 SAMBA 설정  (0) 2012.12.07
[Linux] .vimrc & mkcscope.sh  (1) 2012.11.23
Posted by eoseontaek
2012. 12. 21. 11:51

EDID(Extended Display Identification Data)란 모니터 정보 Data를 의미합니다.
포함정보는 판매자/생산자 id 및 기본 디스플레이 변수 및 특성등을 정의합니다.
정보는 Monitor 생산시 내부 Micom에 기록되어 일반 User가 PC를 켜면 PC와
통신을 주고 받아 "나는 이런 Spec의 Monitor야" 라는 것을 PC에 알려 주게 되어
Plug and Play가 가능하게 합니다.

1 Summary
The Extended Display Identification Data (EDID)는 선택적인 변수와
구조형식(Format)에 관하여 설명이 되어 있으며, 디스플레이의 인식(認識)과
역량(役糧) 정보를 Host(PC)에게 전달함.

2 Background
초기 모니터 식별 설계는 제한된 모니터의 종류와 변수를 처리하는 능력만이 있었기 때문에 Display 의 능력에 관련한 정보를 다루지 않아 유용성이
부족하였다.

3 Standard Objectives
EDID 발전은 정확한 기준으로 VESA에 의하여 보완 및 Update 되어진다.
이 기준은 아래의 Standard의 목표를 따른다.

Standard 목표
● Microsoft의 Plug and Play 를 정의한다.
● System에 부착되어지는 모니터의 역량을 기본으로, 구성되어 지는
Graphic Sub-System(VGA)에 간결한 형식의 정보를 제공한다.
(DDC를 이용한 EDID 를 전송한다 )

4 Revision history
EDID Version1.0 Revision 0 August 12, 1994 ; VEA DDC Standard안에
EDID가 통합되어 있음.
EDID Version2.0 Revision 0 April 9, 1996 ; VEA DDC Standard에서
분리가 되면서, 1.0으로 명시됨.
EDID Version2.0 Revision 1 July 24, 1996 ; Appendix B 추가,
EISA ID Codes 변경,

참고로 위에서 언급됨 DDC(Data Display Channle)란 Host Computer와
주변기기가 서로 통신하는 통신방법을 의미합니다.
모니터가 DDC 기능을 가진다는 것은 통신 Protocol(약속)에 따라 데이터를
주고 받을 수 있다는 것을 의미함.
→ 모니터가 자신의 정보를 PC에 제공하면 Plug and Play 가능

* 즉, PC가 부팅할때 Monitor의 EDID정보(Monitor의 표현 가능
해상도, 수평,수직 주파수등)가 PC에 넘어가기 때문에(DDC를 통해)
User가 일일이 Monitor정보를 몰라도 Monitor의 Display를 용이하게
해줍니다.

참 고 :

http://pureumlnt.com/shop/board/view.php?id=videostudy&no=11

 

 

'[Z-01] 참고 ' 카테고리의 다른 글

[UTIL] OCTAVE (GNU MatLab)  (0) 2014.07.15
VirtualBox에서 USB로 부팅하기  (0) 2012.12.04
[Site] NotePad ++  (0) 2011.11.24
[Site] pdf 암호제거 tool  (0) 2011.11.07
[site] JEDEC (DDR2, DDR3 Standard 문서를 얻을 수 있는 곳)  (0) 2011.10.14
Posted by eoseontaek
2012. 12. 10. 14:39

http://www.server-world.info/en/note?os=Fedora_17&p=nfs

NFS Server configuration

 

NFS Client configuration

 

 

 

Posted by eoseontaek
2012. 12. 7. 15:33

http://www.cmsfactory.net/node/62

Fedora 16부터는 서비스(Service) 관리를 systemctl이라는 명령어로 합니다. 이전 명령어들도 사용할 수 있지만 systemctl 사용을 권장하고 있습니다. systemctl 명령어의 주요 사용법을 정리합니다.

서비스 상태 확인 하기

서비스 상태 확인은 다음과 같이 합니다.

systemctl status service_name.service

예를 들어 httpd의 상태를 확인하려면 다음과 같이 명령합니다.

systemctl status httpd.service

서비스 시작, 중지, 재시작 하기

서비스를 시작하는 기본 명령 방식은 다음과 같습니다.

systemctl start service_name.service

중지할 때에는 start 대신 stop, 재시작할 때에는 restart를 쓰면 됩니다. 예를 들어 httpd를 시작하려면 다음과 같이 명령한다.

systemctl start httpd.service

중지와 재시작은 다음과 같이 명령하면 된다.

systemctl stop httpd.service
systemctl restart httpd.service

부팅 시 자동 실행 하기

시스템 부팅 시 서비스가 자동 실행되게 하는 명령은 다음과 같습니다.

systemctl enable service_name.service

예를 들어 httpd를 부팅 시 자동 실행되게 하려면 다음과 같이 명령합니다.

systemctl enable httpd.service

자동 실행 되지 않게 하려면 enable 대신 disable을 쓰면 됩니다.

실행 중인 서비스 보기

실행 중인 모든 서비스 목록을 보려면 다음과 같이 명령합니다.

systemctl list-units --type=service

 

 

http://www.howtoforge.com/fedora-17-samba-standalone-server-with-tdbsam-backend

 

1 Preliminary Note

I'm using a Fedora 17 system here with the hostname server1.example.com and the IP address 192.168.0.100.

Please make sure that SELinux is disabled:

Edit /etc/selinux/config and set SELINUX=disabled:

vi /etc/selinux/config

# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
#     enforcing - SELinux security policy is enforced.
#     permissive - SELinux prints warnings instead of enforcing.
#     disabled - No SELinux policy is loaded.
SELINUX=disabled
# SELINUXTYPE= can take one of these two values:
#     targeted - Targeted processes are protected,
#     minimum - Modification of targeted policy. Only selected processes are protected.
#     mls - Multi Level Security protection.
SELINUXTYPE=targeted

Afterwards we must reboot the system:

reboot

2 Installing Samba

Connect to your server on the shell and install the Samba packages:

yum install cups-libs samba samba-common

Edit the smb.conf file:

vi /etc/samba/smb.conf

Make sure you see the following lines in the [global] section:

[...]
# ----------------------- Standalone Server Options ------------------------
#
# security = the mode Samba runs in. This can be set to user, share
# (deprecated), or server (deprecated).
#
# passdb backend = the backend used to store user information in. New
# installations should use either tdbsam or ldapsam. No additional configuration
# is required for tdbsam. The "smbpasswd" utility is available for backwards
# compatibility.
#

        security = user
        passdb backend = tdbsam


[...]

This enables Linux system users to log in to the Samba server.

Then create the system startup links for Samba and start it:

systemctl enable smb.service
systemctl start smb.service

3 Adding Samba Shares

Now I will add a share that is accessible by all users.

Create the directory for sharing the files and change the group to the users group:

mkdir -p /home/shares/allusers
chown -R root:users /home/shares/allusers/
chmod -R ug+rwx,o+rx-w /home/shares/allusers/

At the end of the file /etc/samba/smb.conf add the following lines:

vi /etc/samba/smb.conf

[...]
[allusers]
  comment = All Users
  path = /home/shares/allusers
  valid users = @users
  force group = users
  create mask = 0660
  directory mask = 0771
  writable = yes

If you want all users to be able to read and write to their home directories via Samba, add the following lines to /etc/samba/smb.conf (make sure you comment out or remove the other [homes] section in the smb.conf file!):

[...]
[homes]
   comment = Home Directories
   browseable = no
   valid users = %S
   writable = yes
   create mask = 0700
   directory mask = 0700

Now we restart Samba:

systemctl restart smb.service

4 Adding And Managing Users

In this example, I will add a user named tom. You can add as many users as you need in the same way, just replace the username tom with the desired username in the commands.

useradd tom -m -G users

Set a password for tom in the Linux system user database. If the user tom should not be able to log into the Linux system, skip this step.

passwd tom

-> Enter the password for the new user.

Now add the user to the Samba user database:

smbpasswd -a tom

-> Enter the password for the new user.

Now you should be able to log in from your Windows workstation with the file explorer (address is \\192.168.0.100 or \\192.168.0.100\tom for tom's home directory) using the username tom and the chosen password and store files on the Linux server either in tom's home directory or in the public shared directory.

5 Links

 

 

 

 

 

Posted by eoseontaek

 

Step 1. USB 가상 하드이미지 생성

VirtualBox에서 USB로 직접 부팅하는 것을 지원하지 않음.

USB 드라이브 자체를 가상하드 이미지로 만들어 virtualbox 하드디스크 설정에서 선택하면 USB로 부팅 가능

우선, 디스크 번호를 확인한다.

제어판 -> 관리도구 -> 컴퓨터 관리 -> 디스크 관리

 

디스크 1 이 이동식 USB 드라이브이다.

cmd (명령프롬프트)를 실행하고 C:\Program Files\Oracle\VirtualBox 로 이동.

아래의 명령 입력하여 vmdk 파일을 생성한다.

C:\Program Files\Oracle\VirtualBox> VBoxManage internalcommands createrawvmdk -filename E:\VirtualBox\Fedora10_Server\Fedora10_Server.vmdk -rawdisk \\.\PhysicalDrive1

 

 

-filename : E:/VirtualBox\Fedora10_Server\Fedora10_Server.vmdk

-rawdisk : \\.\PhysicalDrive1

 

Step 2. 하드디스크 설정

 생성된  vmdk 파일을 VirtualBox 하드디스크 설정에 적용해준다.

시작...

 

참 고

http://searchme.tistory.com/3

 

 

'[Z-01] 참고 ' 카테고리의 다른 글

[UTIL] OCTAVE (GNU MatLab)  (0) 2014.07.15
EDID란?  (0) 2012.12.21
[Site] NotePad ++  (0) 2011.11.24
[Site] pdf 암호제거 tool  (0) 2011.11.07
[site] JEDEC (DDR2, DDR3 Standard 문서를 얻을 수 있는 곳)  (0) 2011.10.14
Posted by eoseontaek

Download Vim script

http://www.vim.org/

 

Source Explorer

SrcExpl a Source code Explorer which works like the context window of "Source Insight"

NERD Tree

The NERD Tree A tree explorer plugin for navigating the filesystem

Tag List

taglist.vim Source code browser (supports C/C++, java, perl, python, tcl, sql, php, etc)

 

 

.vim tree

vim configuration

# cd ~

# vi .vimrc

".........................................."
" vim
".........................................."
set nu
set ai
set ts=4
set bg=dark


".........................................."
" ctags database path
".........................................."
set tags=/home/steo/FH7200/src/kernel/stblinux-2.6.37/tags

".........................................."
" cscope database path
".........................................."
set csprg=/usr/bin/cscope
set csto=0
set cst
set nocsverb

"cscope DB location
cs add /home/steo/FH7200/src/kernel/stblinux-2.6.37/cscope.out /home/steo/FH7200/src/kernel/stblinux-2.6.37
set csverb

".........................................."
" Tag List
".........................................."
filetype on
nmap <F7> :TlistToggle<CR>
let Tlist_Ctags_Cmd = "/usr/bin/ctags"
let Tlist_Inc_Winwidth = 0
let Tlist_Exit_OnlyWindow = 0

let Tlist_Auto_Open = 0
let Tlist_Use_Right_Window = 1

".........................................."
" Source Explorer
".........................................."
nmap <F8> :SrcExplToggle<CR>
nmap <C-H> <C-W>h
nmap <C-J> <C-W>j
nmap <C-K> <C-W>k
nmap <C-L> <C-W>l

let g:SrcExpl_winHeight = 8
let g:SrcExpl_refreshTime = 100
let g:SrcExpl_jumpKey = "<ENTER>"
let g:SrcExpl_gobackKey = "<SPACE>"
let g:SrcExpl_isUpdateTags = 0

".........................................."
" NERD Tree
".........................................."
let NERDTreeWinPos = "left"
nmap <F9> :NERDTreeToggle<CR>

 

# vi mkcscope.sh

#!/bin/sh

rm -rf cscope.files cscope.out
find . \( -name '*.c' -o -name '*.cpp' -o -name '*.cc' -o -name '*.h' -o -name '*.s' -o -name '*.S' \) -print > cscope.files
cscope -b -i cscope.files

 

 

 

Posted by eoseontaek

리눅스 특정확장자 하위디렉토리까지 일괄삭제

# find /home/id/dir -name "*.ext" -exec rm -rf {} \;

리눅스 특정확장자 피일을 제외하고 일괄삭제

# find . ! -name "*.jsp" -exec rm {} \;

 

 

 

'[D-01] Linux' 카테고리의 다른 글

Fedora17 SAMBA 설정  (0) 2012.12.07
[Linux] .vimrc & mkcscope.sh  (1) 2012.11.23
[Linux] Vi(m) 사용시 ^M 없애기  (0) 2011.11.30
에볼루션(E-mail) 사용하기  (0) 2011.11.26
position-independent 과 relocatable의 차이  (0) 2011.09.09
Posted by eoseontaek
Posted by eoseontaek

 

http://www.leopit.com/Leophp/board/lecture_board/view.php?id=66&board_mode=linux

vi 에디터 사용시 윈도우에서 작업한 파일에 ^M 문자가 붙는경우가 있습니다.
정말 귀찮기 짝이 없죠. 아래 방법을 참고하시기 바랍니다. KLDP에서 퍼왔습니다.

1. vi(m)이 열린 상태
1.1 문자 치환 명령 이용
다음과 같이 문자 치환 명령으로 이 문자를 없애도록 합니다.
:1,$s/^M//g

물론 이것의 입력은 다음과 같이 하도록 합니다.
:1,$s/[Control]+v+m을 누른다.//g

1.2 파일포맷 변경
vim 5.0 이상에서는 다음과 같이 명령을 내리도록 합니다

:set fileformat=unix
혹은
:set ff=unix
그리고, 저장하고 종료합니다.
:wq

이와 반대로 끝에 ^M붙이려면 다음과 같이 합니다.
:set fileformat=dos

이전버전에서는 다음과 같이 합니다.
:set textmode


2. 프롬프트 상에서
2.1 dos2unix 이용
dos2unix와 unix2dos를 이용하여 변환할 수 있습니다.

다음과 같이 하면 ^M 문자가 없어집니다.
$ dos2unix [문서명](여러 파일의 경우 *.확장자)

그리고 다음과 같이 하면 ^M 문자가 생기죠.
$ unix2dos [문서명]

2.2 cat과 tr을 이용한 방법
다음과 같이 하면 해당 파일의 ^M 문자가 없어집니다.
$ cat dos-file | tr -d ^M > unix-file

2.3 perl 스크립트
다음과 같이 하면 여러파일을 한번에 바꾸게 됩니다.

# perl -i -pe 's/


Posted by eoseontaek
1. gmail 에 가입을 한다.(다른 메일도 가능하지만, 구글이 가장 좋은 환경을 제공한다.)

2. gmail 로 들어가서 환경설정을 들어가면, 메뉴중에 '전달 및 pop/imap' 탭에서 pop기능을 켜둔다.

3. 프로그램-오피스-에볼루션 실행

4. 환영합니다 -> 앞으로

5. 백업에서 복구 -> 앞으로

6. 신상 정보 - 전체이름 : cheonbi
                  - 전자 메일 주소 : cheonbi@gmail.com
                  -> 앞으로

7. 메일 받기 - 서버 종류 : pop
                  - 서버 : pop.gmail.com
                  - 사용자 이름 : cheonbi
                  - 보안 연결 사용 : ssl 암호화
                  - 인증 방법 : '지원하는 방법인지 확인'을 클릭하여 가능한 것으로 선택
                  -> 앞으로

8. 받기 옵션 - 원하는대로 체크
                  -> 앞으로

9. 메일 보내기 - 서버 종류 : smtp
                     - 서버 : smtp.gmail.com
                     - 서버인증 체크
                     - 보안 연결 사용 : ssl 암호화
                     - 인증 방법 : 일반 텍스트, 사용자 이름 : cheonbi
                     -> 앞으로

10. 계정 관리 -> 앞으로

11. 시간대 -> (선택후, 필자는 아시아/서울) 앞으로

12. 완료 -> 적용!

13. 이제 gmail 암호 입력한 후 엔터, 별다른 메시지 없이 메일을 전송 받았으면 성공

네이버, 핫메일 등등에도 같은 방법으로 적용할 수 있습니다.


Link
http://zoozeros.egloos.com/2286446

Posted by eoseontaek