$ make tags ARCH=arm

$ make cscope ARCH=arm



Posted by eoseontaek

Step 1 Switch to the kernel source code directory.

$ cd ./kernel


Step 2 Configure the kernel configuration file.

$ make hi3716c-android_defconfig


Step 3 Compile the kernel.

$ make uImage


Step 4 Copy the generated file to the out directory.

cp -avf arch/arm/boot/uImage ../out/target/product/godbox/kernel


Clear the kernel compilation result by running the following command:

$ make distclean



Posted by eoseontaek

Step 1. Switch to the fastboot source code directory.

$ cd bootable/bootloader/fastboot3.0/


Step 2. Obtain the configuration file corresponding to the board.

$ cp ./lowlevel_reg_info/hi3716cdmoverb_hi3716cv100_ddr3_1gbyte_8bitx4_4layers.reg ../.reg


Step 3. Compile the fastboot

$ make ARCH=arm CROSS_COMPILE=arm-hisiv200-linux- godbox_config

$ make ARCH=arm CROSS_COMPILE=arm-hisiv200-linux- 


Delete the fastboot compilation result

$ make ARCH=arm CROSS_COMPILE=arm-hisiv200-linux- distclean


Step 4. Burn into SPI Flash

fastboot# tftp 0x81000000 fastboot-burn.bin

fastboot# sf probe 0

fastboot# sf erase 0 0x00070000

fastboot# sf write 0x81000000 0 0x00070000


'[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] Setting Up a Local Development Environment  (0) 2013.10.31
Posted by eoseontaek

File : parse-iwlist.awk

BEGIN { OFS = "\t"; } # OFS is a field separator used for "print"
/\<Cell/ {
    # New cell description has started, so we need to print a previous one.
    # Detect security mode first.
    if (wpa) { security = "wpa" } else { if (wep) { security = "wep" } else { security = "none" }}
    if (essid) print essid, security, quality;
    # Reset security flags.
    wep = 0; wpa = 0;
}
/\<ESSID:/ {
    essid = substr($0, index($0, ":") + 1);
    essid = substr(essid, 2, length(essid) - 2) # discard quotes
}
/\<Quality/ {
    # We should support several output formats from iwlist scan (from
    # wireless_tools package):
    #
    # 1) Quality:30/70
    # 2) Quality=20/100
    # 3) Quality:60
    #
    # Quality might be separated with '=' or with ':' and we might have maximal
    # value present or not. This depends on the driver used.
    #
    split($1, q, "[:=]"); # after split: q[1] -> "Quality", q[2] -> quality value
    split(q[2], qvalues, "/");
    if (qvalues[2]) {
        quality = int(qvalues[1] / qvalues[2] * 100); # we have both parts, divide
    } else {
        quality = qvalues[1]; # we have only one part, use it as-is
    }
}
/\<Encryption key:(o|O)n/ { wep = 1 }
/\<IE:.*WPA.*/ { wpa = 1 }
END {
    # handle last cell
    if (wpa) { security = "wpa" } else { if (wep) { security = "wep" } else { security = "none" }}
    if (essid) print essid, security, quality;
}


Command :
# iwlist wlan0 scan | awk -f parse-iwlist.awk
iptime_2 wpa 100 lab2 wep 100 PRODEA none 100 HMC_HW wep 98 kotech wpa 41 portthru none 44 orbotech wpa 58 beseto-1 wpa 58 PCMM_HMK wpa 50 Air_net_ct wpa 47 KT_WLAN wep 47 000D0B836EA6 wep 35 NHTECH_ceo wpa 41 netis wpa 47 3Team wpa 47 golf19 wpa 58 EE_2F wpa 52 FREE2USE none 41 HNB200_2G none 55 myLGNet wep 38 zero none 47 chemkosc wep 50 KT_WLAN_5D5A wpa 52 iptime none 41


Link :





Posted by eoseontaek
Posted by eoseontaek

Atheros AR9300  PCI Wireless module의 driver를 porting하였다. 


Kernel Config : 

# make menuconfig-linux

...

Bus options (PCI, PCMCIA, EISA, ISA, TC)  --->    

    [*] Support for PCI controller

...

[*] Networking support  ---> 

    -*-   Wireless  --->

        <*>   cfg80211 - wireless configuration API

        <*>   Generic IEEE 802.11 Networking Stack (mac80211)

...

Device Drivers  --->

    [*] Network device support  --->

        [*]   Wireless LAN  --->

            <*>   Atheros Wireless Cards  --->

                <*>   Atheros 802.11n wireless cards support

                 [*]     Atheros ath9k PCI/PCIe bus support         


Rebuild 후, Driver가 제대로 probe 되는지 확인한다. 


Wifi 동작 테스트 : 

아래 링크를 참조하여 WIFI 환경을 설정한다. 

http://eoworld.tistory.com/entry/BCM7231-WIFI-usage-with-wirelesstoos-and-wpasupplicant


Link : 

http://wireless.kernel.org/en/users/Drivers/ath9k

Posted by eoseontaek

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
이전버튼 1 이전버튼