레이블이 hardkernel인 게시물을 표시합니다. 모든 게시물 표시
레이블이 hardkernel인 게시물을 표시합니다. 모든 게시물 표시

2019년 2월 19일 화요일

How to install Google Play Store on ODROID-N2/N2+/C4(PIE)

\
Open Lightning Browser.

Select ARM64, 9.0, pico



Download package.





Open OdroidUtility.

Select "Update" and "From download package"


Select "Recent" and "File Manager"

Select "Download" and "open_gapps-arm64-9.0-pico-2020xxxx.zip"

Rebooted and installed "Play Store"

Open lightning browser and search "device id apk".

Download apk.




Open "File Manager" and install device id apk.





Click "Google Service Framework (GSF)".

Click "COPY"



Go to registration site.

https://www.google.com/android/uncertified/

Log in Google account.

Paste GSF id.



Wait about 30 min and reboot system.

2014년 2월 26일 수요일

How to recovery eMMC u-boot on ODROID

eMMC에 u-boot을 잘 못 fusing하거나 망가져 부팅 할 수 없을 때 복구 방법 또는 다른 제품의 eMMC를 구매 후 사용하는 방법


eMMC의 u-boot 영역은 sd 카드와 달리 PC 상에서 접근 할 수 없습니다.
그래서 eMMC의 u-boot을 복구 하기 위해서는 SD로 부팅 하여 eMMC의 u-boot 영역을 써야 합니다.

eMMC 5.0


3. Exynos5422(ODROD-XU3/4)

http://dn.odroid.com/5422/ODROID-XU3/Android/4.4.4_Alpha_3.0_Oct-05-2015/android-4.4.4-alpha-3.0-sd_installer-odroidxu3-20151005.img.zip.md5sum


Windows 사용자는 아래 링크에서 프로그램을 받아 씁니다.

Linux 사용자들은 dd 명령으로 write합니다.
$ sudo dd if=./exynos4412_emmc_recovery_from_sd.img of=/dev/sdX

아래의 사진과 같이 sd 부팅으로 스위치를 바꾸고 전원을 넣으면 자동 복구 합니다.

ODROID-XU4

ODROID-XU3/LITE




수동으로 u-boot만 복구하려면 부팅 후 USB-UART Module Kit을 연결하고 u-boot prompt에서 pri를 입력해 봅니다.

Exynos5410 # pri
baudrate=115200
bootargs=fb_x_res=1280 fb_y_res=720 vout=hdmi led_blink=1
bootcmd=    cfgload;    mmc rescan 0:1; mmc rescan 0:2;    if run loadbootscript_1;         then run bootscript;     else        if run loadbootscript_2;           then run bootscript;        else          ;
bootdelay=1
bootscript=source 40008000
copy_uboot_emmc2sd=emmc open 0;movi r z f 0 40000000;emmc close 0;movi w f 1 40000000;emmc open 0;movi r z b 0 40000000;emmc close 0;movi w b 1 40000000;emmc open 0;movi r z u 0 40000000;emmc close 0;movi w;
copy_uboot_sd2emmc=movi r f 0 40000000;emmc open 1;movi w z f 1 40000000;emmc close 1;movi r b 0 40000000;emmc open 1;movi w z b 1 40000000;emmc close 1;movi r u 0 40000000;emmc open 1;movi w z u 1 40000000;
default_bootcmd=echo >>> Run Default Bootcmd <<<;movi read kernel 0 40008000;bootz 40008000
loadbootscript_1=echo >>> Load Boot Script from mmc 0:1 <<<;fatload mmc 0:1 40008000 boot.scr
loadbootscript_2=echo >>> Load Boot Script from mmc 0:2 <<<;fatload mmc 0:2 40008000 boot.scr
loadbootscript_3=echo >>> Load Boot Script from mmc 1:1 <<<;fatload mmc 1:1 40008000 boot.scr
loadbootscript_4=echo >>> Load Boot Script from mmc 1:2 <<<;fatload mmc 1:2 40008000 boot.scr
rootfslen=100000
stderr=serial
stdin=serial
stdout=serial

Environment size: 1565/16380 bytes
Exynos5410 # 

eMMC를 연결하고 run copy_uboot_sd2emmc 를 입력하면 복구 됩니다.


Exynos5410 # run copy_uboot_sd2emmc
reading FWBL1 ..device 0 Start 1, Count 30 
MMC read: dev # 0, block # 1, count 30 ... 30 blocks read: OK
completed
eMMC OPEN Success.!!
                        !!!Notice!!!
!You must close eMMC boot Partition after all image writing!
!eMMC boot partition has continuity at image writing time.!
!So, Do not close boot partition, Before, all images is written.!
writing FWBL1 ..device 1 Start 0, Count 30 
MMC write: dev # 1, block # 0, count 30 ... 30 blocks write: OK
completed
eMMC CLOSE Success.!!
reading BL2 ..device 0 Start 31, Count 32 
MMC read: dev # 0, block # 31, count 32 ... 32 blocks read: OK
completed
eMMC OPEN Success.!!
                        !!!Notice!!!
!You must close eMMC boot Partition after all image writing!
!eMMC boot partition has continuity at image writing time.!
!So, Do not close boot partition, Before, all images is written.!
writing BL2 ..device 1 Start 30, Count 32 
MMC write: dev # 1, block # 30, count 32 ... 32 blocks write: OK
completed
eMMC CLOSE Success.!!
reading bootloader..device 0 Start 63, Count 656 
MMC read: dev # 0, block # 63, count 656 ... 656 blocks read: OK
completed
eMMC OPEN Success.!!
                        !!!Notice!!!
!You must close eMMC boot Partition after all image writing!
!eMMC boot partition has continuity at image writing time.!
!So, Do not close boot partition, Before, all images is written.!
writing bootloader..device 1 Start 62, Count 656 
MMC write: dev # 1, block # 62, count 656 ... 656 blocks write: OK
completed
eMMC CLOSE Success.!!
reading 0 TrustZone S/W.. Start 719, Count 512 
MMC read: dev # 0, block # 719, count 512 ... 512 blocks read: OK
completed
eMMC OPEN Success.!!
                        !!!Notice!!!
!You must close eMMC boot Partition after all image writing!
!eMMC boot partition has continuity at image writing time.!
!So, Do not close boot partition, Before, all images is written.!
writing 1 TrustZone S/W.. Start 718, Count 512 
MMC write: dev # 1, block # 718, count 512 ... 512 blocks write: OK
completed
eMMC CLOSE Success.!!

MMC write: dev # 1, block # 1231, count 32 ... 32 blocks write: OK

Exynos5410 # 


2. Exynos4412(ODROD-X/X2/Q/Q2/U2/U3)

2.1 수동 복구 방법

sd로 부팅 후 u-boot prompt에서 아래와 같이 입력한다.
# movi init 1
# fastboot emmc

PC 터미날에서 android 소스를 풀면 최신 u-boot binaries들이 있습니다.
device/hardkernel/proprietary/uboot/

-rw-r--r-- 1 codewalker codewalker  15360  3월 29  2013 bl1.bin
-rw-r--r-- 1 codewalker codewalker  14592  2월 14 12:43 bl2.bin
-rwxr-xr-x 1 codewalker codewalker    567  2월  3 14:10 emmc_fastboot_fusing.sh
-rw-r--r-- 1 codewalker codewalker   7906  2월  9 14:44 README.TXT
-rwxr-xr-x 1 codewalker codewalker   1240  2월  3 14:10 sd_fusing_4412.sh
-rw-r--r-- 1 codewalker codewalker 159744  3월 29  2013 tzsw.bin
-rw-r--r-- 1 codewalker codewalker 349136  2월 14 12:43 u-boot.bin

또는 github에서 받으시면 됩니다.

아래의 스크립트를 실행하면 자동으로 4개의 bin을 fusing합니다.
$ ./emmc_fastboot_fusing.sh
$ fastboot reboot

ODROID-Q/Q2는 아래 이미지를 받아 sd에 write합니다.
http://dn.odroid.com/4412/Android/4.1.2_Feb-12-2014/ODROID-Q/d2emmc_installer.img.zip
http://dn.odroid.com/4412/Android/4.1.2_Feb-12-2014/ODROID-Q2/d2emmc_installer.img.zip

sd를 연결하고 스위치를 사진과 같이 하시면 sd로 부팅이 됩니다. 동일하게 eMMC를 복구 하시면 됩니다.


2.2 자동으로 복구 하기

포럼에 설명이 잘되어 있습니다.
http://forum.odroid.com/viewtopic.php?f=53&t=969

복구용 sd 이미지를 다운 받습니다.
http://forum.odroid.com/download/file.php?id=1089

Windows 사용자는 아래 링크에서 프로그램을 받아 씁니다.
http://com.odroid.com/sigong/nf_file_board/nfile_board_view.php?keyword=&tag=&bid=199
Linux 사용자들은 dd 명령으로 write합니다.
$ sudo dd if=./exynos4412_emmc_recovery_from_sd.img of=/dev/sdX

sd를 꼽고 eMMC를 제거한고 전원을 넣습니다.


U-Boot 2010.12-svn (Jan 12 2014 - 12:55:58) for Exynox4412                      
                                                                                
                                                                                
CPU: S5PC220 [Samsung SOC on SMP Platform Base on ARM CortexA9]                 
APLL = 1000MHz, MPLL = 880MHz                                                   
DRAM:  2 GiB                                                                    
                                                                                
PMIC VERSION : 0x00, CHIP REV : 2                                               
TrustZone Enabled BSP                                                           
BL1 version: 20121128                                                           
                                                                                
                                                                                
Checking Boot Mode ... SDMMC                                                    
MMC Device 0: 7647 MB                                                           
MMC Device 1 not found                                                          
*** Warning - using default environment                                         
                                                                                
USB3503 NINT = OUTPUT LOW!                                                      
ModeKey Check... run normal_boot                                                
No ethernet found.                                                              
Hit any key to stop autoboot:  0                                                
do_fat_cfgload : cmd = fatload mmc 0:1 0x41000000 boot.ini                      
reading boot.ini                                                                
2701 bytes read in 25 ms (105.5 KiB/s)                                          
Find boot.ini file from FAT Area!!                                              
boot.ini command = setenv flag_true                1                            
boot.ini command = setenv flag_false               0                            
boot.ini command = setenv system_memory_end        80000000                     
boot.ini command = setenv emmc_update_from_sdmmc   1                            
boot.ini command = setenv emmc_wait    'if itest.s ${emmc_update_from_sdmmc} -e'
boot.ini command = run emmc_wait                                                
Insert eMMC Module before usb connect....

debug 터미날을 보시면 위와 같이 대기 상태로 됩니다.



전원을 넣으면 아래와 같이 전원 Red LED가 켜지고 옆에 ALIVE Blue LED가 깜빡 거립니다.


그럼 eMMC를 연결하고 USB를 연결 하시면 됩니다.
아래와 같이 eMMC를 복구하고 전원이 꺼집니다.



Trigger Detected... read boot.scr form SDMMC & boot 
boot.ini command = setenv movi_init    'if itest.s ${emmc_update_from_sdmmc} -e'
boot.ini command = run movi_init
emmc reset...
REVISION: 2.0
Manufacturer TOSHIBA [ 15028MB ]
NAME: S5P_MSHC4
Device: S5P_MSHC4
Manufacturer ID: 11
OEM: 100
Name: 016G9 
Tran Speed: 0
Rd Block Len: 512
MMC version 4.0
High Capacity: Yes
Size: 0MB (block: 15028)
Bus Width: 8-bit DDR
Boot Partition Size: 4096 KB
boot.ini command = setenv update_device_num    1
boot.ini command = setenv load_device_num      0
boot.ini command = setenv load_partition_num   1
boot.ini command = setenv emmc_open    'if itest.s ${emmc_update_from_sdmmc} -e'
boot.ini command = run emmc_open;
eMMC OPEN Success.!!
                        !!!Notice!!!
!You must close eMMC boot Partition after all image writing!
!eMMC boot partition has continuity at image writing time.!
!So, Do not close boot partition, Before, all images is written.!
boot.ini command = fatload mmc 0:1 40008000 update/bl1.bin;
reading update/bl1.bin
15360 bytes read in 29 ms (516.6 KiB/s)
boot.ini command = setenv bl1_write    'if itest.s ${emmc_update_from_sdmmc} -e'
boot.ini command = run bl1_write
writing FWBL1 ..device 1 Start 0, Count 30 
MMC write: dev # 1, block # 0, count 30 ... 30 blocks written: OK
completed
boot.ini command = fatload mmc 0:1 40008000 update/bl2.bin;
reading update/bl2.bin
14592 bytes read in 32 ms (445.3 KiB/s)
boot.ini command = setenv bl2_write    'if itest.s ${emmc_update_from_sdmmc} -e'
boot.ini command = run bl2_write
writing BL2 ..device 1 Start 30, Count 32 
MMC write: dev # 1, block # 30, count 32 ... 32 blocks written: OK
completed
boot.ini command = fatload mmc 0:1 40008000 update/u-boot.bin;
reading update/u-boot.bin
348936 bytes read in 37 ms (9 MiB/s)
boot.ini command = setenv uboot_write  'if itest.s ${emmc_update_from_sdmmc} -e'
boot.ini command = run uboot_write
writing bootloader..device 1 Start 62, Count 2048 
MMC write: dev # 1, block # 62, count 2048 ... 2048 blocks written: OK
completed
boot.ini command = fatload mmc 0:1 40008000 update/tzsw.bin;
reading update/tzsw.bin
159744 bytes read in 28 ms (5.4 MiB/s)
boot.ini command = setenv tzsw_write   'if itest.s ${emmc_update_from_sdmmc} -e'
boot.ini command = run tzsw_write
writing 1 TrustZone S/W.. Start 2110, Count 312 
MMC write: dev # 1, block # 2110, count 312 ... 312 blocks written: OK
completed
boot.ini command = setenv emmc_close   'if itest.s ${emmc_update_from_sdmmc} -e'
boot.ini command = run emmc_close;
eMMC CLOSE Success.!!
boot.ini command = mmc write 1 0x40008000 0x977 0x20;

MMC write: dev # 1, block # 2423, count 32 ... 32 blocks written: OK

boot.ini command = fastboot poweroff

이후 최신 버전 emmc_self_installer.img를 받아 쓰시면 됩니다.
http://dn.odroid.com/4412/Android/

ODROID-Q/Q2는 최신 버전의 sd2emmc_installer.img로 sd 부팅 하시면 자동으로 eMMC를 복구 합니다.


3. Exynos4412(ODROD-XU)

4.1 복구 방법

아래 링크의 최신 sd 이미지를 받습니다.


위에 설명한 동일한 방법으로 sd에 씁니다.

아래의 사진과 같이 sd 부팅으로 스위치를 바꾸고 전원을 넣으면 자동 복구 합니다.





sd로 부팅 후 u-boot prompt에서 pri를 입력해 봅니다.

Exynos5410 # pri
baudrate=115200
bootargs=fb_x_res=1280 fb_y_res=720 vout=hdmi led_blink=1
bootcmd=    cfgload;    mmc rescan 0:1; mmc rescan 0:2;    if run loadbootscript_1;         then run bootscript;     else        if run loadbootscript_2;           then run bootscript;        else          ;
bootdelay=1
bootscript=source 40008000
copy_uboot_emmc2sd=emmc open 0;movi r z f 0 40000000;emmc close 0;movi w f 1 40000000;emmc open 0;movi r z b 0 40000000;emmc close 0;movi w b 1 40000000;emmc open 0;movi r z u 0 40000000;emmc close 0;movi w;
copy_uboot_sd2emmc=movi r f 0 40000000;emmc open 1;movi w z f 1 40000000;emmc close 1;movi r b 0 40000000;emmc open 1;movi w z b 1 40000000;emmc close 1;movi r u 0 40000000;emmc open 1;movi w z u 1 40000000;
default_bootcmd=echo >>> Run Default Bootcmd <<<;movi read kernel 0 40008000;bootz 40008000
loadbootscript_1=echo >>> Load Boot Script from mmc 0:1 <<<;fatload mmc 0:1 40008000 boot.scr
loadbootscript_2=echo >>> Load Boot Script from mmc 0:2 <<<;fatload mmc 0:2 40008000 boot.scr
loadbootscript_3=echo >>> Load Boot Script from mmc 1:1 <<<;fatload mmc 1:1 40008000 boot.scr
loadbootscript_4=echo >>> Load Boot Script from mmc 1:2 <<<;fatload mmc 1:2 40008000 boot.scr
rootfslen=100000
stderr=serial
stdin=serial
stdout=serial

Environment size: 1565/16380 bytes

Exynos5410 # 

eMMC를 연결하고 run copy_uboot_sd2emmc 를 입력하면 복구 됩니다.



Exynos5410 # run copy_uboot_sd2emmc
reading FWBL1 ..device 0 Start 1, Count 30 
MMC read: dev # 0, block # 1, count 30 ... 30 blocks read: OK
completed
eMMC OPEN Success.!!
                        !!!Notice!!!
!You must close eMMC boot Partition after all image writing!
!eMMC boot partition has continuity at image writing time.!
!So, Do not close boot partition, Before, all images is written.!
writing FWBL1 ..device 1 Start 0, Count 30 
MMC write: dev # 1, block # 0, count 30 ... 30 blocks write: OK
completed
eMMC CLOSE Success.!!
reading BL2 ..device 0 Start 31, Count 32 
MMC read: dev # 0, block # 31, count 32 ... 32 blocks read: OK
completed
eMMC OPEN Success.!!
                        !!!Notice!!!
!You must close eMMC boot Partition after all image writing!
!eMMC boot partition has continuity at image writing time.!
!So, Do not close boot partition, Before, all images is written.!
writing BL2 ..device 1 Start 30, Count 32 
MMC write: dev # 1, block # 30, count 32 ... 32 blocks write: OK
completed
eMMC CLOSE Success.!!
reading bootloader..device 0 Start 63, Count 656 
MMC read: dev # 0, block # 63, count 656 ... 656 blocks read: OK
completed
eMMC OPEN Success.!!
                        !!!Notice!!!
!You must close eMMC boot Partition after all image writing!
!eMMC boot partition has continuity at image writing time.!
!So, Do not close boot partition, Before, all images is written.!
writing bootloader..device 1 Start 62, Count 656 
MMC write: dev # 1, block # 62, count 656 ... 656 blocks write: OK
completed
eMMC CLOSE Success.!!
reading 0 TrustZone S/W.. Start 719, Count 512 
MMC read: dev # 0, block # 719, count 512 ... 512 blocks read: OK
completed
eMMC OPEN Success.!!
                        !!!Notice!!!
!You must close eMMC boot Partition after all image writing!
!eMMC boot partition has continuity at image writing time.!
!So, Do not close boot partition, Before, all images is written.!
writing 1 TrustZone S/W.. Start 718, Count 512 
MMC write: dev # 1, block # 718, count 512 ... 512 blocks write: OK
completed
eMMC CLOSE Success.!!

MMC write: dev # 1, block # 1231, count 32 ... 32 blocks write: OK


Exynos5410 # 


스위치를 eMMC 부팅으로 바꾸고 부팅 하시면 됩니다.

3.2 자동 복구 방법

http://dn.odroid.com/ODROID-XU/Recovery_0.5/emmc_installer.zip

위에 이미지를 받아 sd에 write하고 sd와 eMMC를 연결 후 sd 부팅하면 자동으로  eMMC의 u-boot이 복구 됩니다.

2014년 2월 18일 화요일

ODROID-U2/U3/X/X2(Exynos4412) update

first recovery.
ODROID-U2/U3
http://dn.odroid.com/4412/Android/4.1.2_Feb-12-2014/ODROID-U/
ODROID-X2
http://dn.odroid.com/4412/Android/4.1.2_Feb-12-2014/ODROID-X2/
ODROID-X
http://dn.odroid.com/4412/Android/4.1.2_Feb-12-2014/ODROID-X/


[   ]emmc_self_installer.img.zip12-Feb-2014 13:15146M
[   ]emmc_self_installer.img.zip.md5sum12-Feb-2014 13:1562
[   ]sd_self_installer.img.zip12-Feb-2014 13:15146M
[   ]sd_self_installer.img.zip.md5sum12-Feb-2014 13:1560

Windows users


Linux users

$ unzip sd[emmc]_self_installer.img.zip
$ sudo fdisk -l
$ sudo dd if=./sd[emmc]_self_installer.img of=/dev/sdX

Update complete.
Run ODROID Updater.

ODROID-U2/U3
Input URL http://dn.odroid.com/4412/Android/4.1.2_Feb-19-2014/ODROID-U/update.zip

ODROID-X
Input URL http://dn.odroid.com/4412/Android/4.1.2_Feb-19-2014/ODROID-X/update.zip

ODROID-X2
Input URL http://dn.odroid.com/4412/Android/4.1.2_Feb-19-2014/ODROID-X2/update.zip



If you run flappy bird in Landscape mode then app run like this picture.
Mouse worked well, but multitouch screen do not work.


HDMI Portrait screen and HID multitouch.
Run ODROID Utility app.
Select HDMI Portrait and apply. Reboot.


Boot complete, automatically rotate screen to portrait.



Install Google Mobile Service apps.


2014년 1월 24일 금요일

cm(android-4.2.1) on ODROID-U2/U3

eMMC recovery tool for ODROID-U2/U3

http://forum.odroid.com/viewtopic.php?f=53&t=969

How to use.
1. Prepare a microSD card and flash the attached image.
2. Boot with the microSD without eMMC
3. Turn on U2/U3 and wait a few seconds and blue LED will blink.
4. Plug your eMMC module into U2/U3
5. Plug micro-USB cable into U2/U3 and connect other side to your PC USB host or ODROID's USB host port. (This is a trigger to start the recovery)
6. After recovery process (only a few seconds), the blue LED will turn off automatically.
7. Finish. Install OS on your eMMC with as usual.


Install CM for odroid-u2/u3

http://wiki.cyanogenmod.org/w/Install_CM_for_odroidu2

$ sh ./install-emmc.sh /dev/sdX


2011년 11월 23일 수요일

ODROID-7에 android ICS(4.0.3_r1, IML74K) 올리기



odroid7 kernel을 준비 한다.


http://com.odroid.com/sigong/nf_file_board/nfile_board_view.php?keyword=&bid=41

아래 경로에서 kernel 소스를 다운 받는다.

https://github.com/Kwiboo/kernel_samsung_crespo/tree/master/drivers/gpu

drivers/gpu 폴더을 odroid7 kernel에 덮어쓴다.

git로 부터 최신 android 소스를 받는다.


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


repo sync





아래 링크에서 odroid7으로 빌드가 가능한도록 수정한 폴더들을 받아 device와 vendor를 덮어쓴다.


http://dl.dropbox.com/u/4485660/ICS.tar.gz




vendor의 파일들은 아래 링크에서 받은 Nexus S의 ICS ROM에서 얻은 것 들이다.


http://www.multiupload.com/F0F156G363

crespo project를 지운다.

rm -rf device/samsung/crespo*

chmod u+x device/hardkerenl/odroid7/build_android.sh


안드로이드를 빌드한다.


device/hardkerenl/odroid7/build_android.sh


build가 완료되면 odroid-7 처럼 f-flash에 복사하고 zImage와 ramdisk-uboot.img를 fastboot로 write한다.














아래 소스를 고치면 마우스 없이 touch까지 가능합니다.

kernel/drivers/input/touchscreen/odroid7_MT_touch_portrait.c


169                 input_sync(hkc1xx_touch.driver);
170 
171 //codewalker
172                 input_mt_sync(hkc1xx_touch.driver);
173 
174                 input_sync(hkc1xx_touch.driver);
175 176 177 #if defined(DEBUG_HKC1XX_TOUCH_MSG) 178 printk("%s : Penup event send[x = %d, y = %d]\n", __FUNCTION__, hkc1xx_touch.x, hkc1xx_touch.y); 179 #endif




소리가 나오게 하는 방법은 ICS ROM에서 두 파일을 odroid7으로 이름을 바꿔서 넣어 주시면 됩니다.


/system/lib/hw/audio.primary.herring.so 를 audio.primary.odroid7.so
/system/lib/hw/audio_policy.herring.so 를 audio_policy.odroid7.so














wifi 가능 하도록 수정 방법



device/hardkernel/odroid7/BoardConfigCommon.mk


71 #WIFI_DRIVER_MODULE_ARG := "firmware_path=/vendor/firmware/fw_bcm4329.bin nvram_path=/vendor/firmware/nvram_net.txt iface_name=wlan" 72 WIFI_DRIVER_MODULE_ARG := "iface_name=wlan firmware_path=/vendor/firmware/fw_bcm4329.bin nvram_path=/vendor/firmware/nvram"

WIFI_DRIVER_MODULE_ARG를 수정하고 odroid7dml fw_bcm4329.bin, nvram을 해당 위치에 복사합니다.




hardware/libhardware_legacy/wifi/wifi.c


102 103 #define WIFI_WAKEUP_CTL_FP "/sys/devices/platform/hkc1xx-sysfs/wifi_wakeup" // 1 -> wakeup on 104 #define WIFI_REG_CTL_FP "/sys/devices/platform/hkc1xx-sysfs/wifi_reg" // 1 -> reg on 105 #define WIFI_RESET_CTL_FP "/sys/devices/platform/hkc1xx-sysfs/wifi_reset" // 1 -> reset on 106 107 int wifi_set_module_status (char *ctl_fp, unsigned char status); 108 int wifi_get_module_status (char *ctl_fp); 109 110 111 static int insmod(const char *filename, const char *args) 112 {





206 int wifi_load_driver() 207 { 208 #ifdef WIFI_DRIVER_MODULE_PATH 209 char driver_status[PROPERTY_VALUE_MAX]; 210 int count = 100; /* wait at most 20 seconds for completion */ 211 212 if (is_wifi_driver_loaded()) { 213 return 0; 214 } 215 216 // Wifi power control & wakeup enable 217 wifi_set_module_status(WIFI_WAKEUP_CTL_FP, 1); usleep(10000); 218 wifi_set_module_status(WIFI_REG_CTL_FP, 1); usleep(10000); 219 wifi_set_module_status(WIFI_RESET_CTL_FP, 1); sleep(1); sync(); 220 221 222 if (insmod(DRIVER_MODULE_PATH, DRIVER_MODULE_ARG) < 0) { 223 LOGE("insmod(DRIVER_MODULE_PATH = %s, DRIVER_MODULE_ARG = %s) FAIL!!!", DRIVER_MODULE_PATH, DRIVER_MODULE_ARG); 224 wifi_set_module_status(WIFI_WAKEUP_CTL_FP, 0); usleep(10000); 225 wifi_set_module_status(WIFI_REG_CTL_FP, 0); usleep(10000); 226 wifi_set_module_status(WIFI_RESET_CTL_FP, 0); sleep(1); sync(); 227 return -1; 228 } 229 230 if (strcmp(FIRMWARE_LOADER,"") == 0) {




259 int wifi_unload_driver() 260 { 261 usleep(200000); /* allow to finish interface down */ 262 #ifdef WIFI_DRIVER_MODULE_PATH 263 if (rmmod(DRIVER_MODULE_NAME) == 0) { 264 int count = 20; /* wait at most 10 seconds for completion */ 265 while (count-- > 0) { 266 if (!is_wifi_driver_loaded()) 267 break; 268 usleep(500000); 269 } 270 271 wifi_set_module_status(WIFI_WAKEUP_CTL_FP, 0); usleep(10000); 272 wifi_set_module_status(WIFI_REG_CTL_FP, 0); usleep(10000); 273 wifi_set_module_status(WIFI_RESET_CTL_FP, 0); sleep(1); sync(); 274 275 276 usleep(500000); /* allow card removal */ 277 if (count) { 278 return 0;


int wifi_set_module_status(char *ctl_fp, unsigned char status) { int fd, ret, nwr; char buf[10]; if((fd = open(ctl_fp, O_RDWR)) < 0) { LOGE("%s(%s) : Cannot access \"%s\"", __FILE__, __FUNCTION__, ctl_fp); return -1; // fd open fail } memset((void *)buf, 0x00, sizeof(buf)); if(status) nwr = sprintf(buf, "%d\n", 1); else nwr = sprintf(buf, "%d\n", 0); ret = write(fd, buf, nwr); close(fd); if(ret == nwr) { LOGI("%s : write success (on = %d)", ctl_fp, status); return 0; } else { LOGE("%s : write fail (on = %d)", ctl_fp, status); return -1; } } //---------------------------------------------------------------------------------------------------------------- int wifi_get_module_status(char *ctl_fp) { int fd, ret, nrd; char buf[10]; if((fd = open(ctl_fp, O_RDONLY)) < 0) { LOGE("%s(%s) : Cannot access \"%s\"", __FILE__, __FUNCTION__, ctl_fp); return -1; // fd open fail } memset((void *)buf, 0x00, sizeof(buf)); nrd = read(fd, buf, sizeof(buf)); close(fd); // read ok if(nrd) { if(!strncmp(buf, "1", 1)) { LOGI("%s : status == 1", ctl_fp); return 1; // wakeup } else { LOGI("%s : status == 0", ctl_fp); return 0; // suspend } } LOGI("%s(%s) : module status == unknown", __FILE__, __FUNCTION__); return -1; } //---------------------------------------------------------------------------------------------------------------- int wifi_module_wakeup_status() { int fd, ret, nrd; char buf[10]; if((fd = open(WIFI_WAKEUP_CTL_FP, O_RDONLY)) < 0) { LOGE("%s(%s) : Cannot access \"%s\"", __FILE__, __FUNCTION__, WIFI_WAKEUP_CTL_FP); return -1; // fd open fail } memset((void *)buf, 0x00, sizeof(buf)); nrd = read(fd, buf, sizeof(buf)); close(fd); // read ok if(nrd) { if(!strncmp(buf, "1", 1)) { LOGI("%s(%s) : module status == wakeup", __FILE__, __FUNCTION__); return 1; // wakeup } else { LOGI("%s(%s) : module status == suspend", __FILE__, __FUNCTION__); return 0; // suspend } } LOGI("%s(%s) : module status == unknown", __FILE__, __FUNCTION__); return -1; } //---------------------------------------------------------------------------------------------------------------- int wifi_module_wait_time(int waitTime) { LOGI("%s(%s) : module wait time = %d sec", __FILE__, __FUNCTION__, waitTime); sleep(waitTime); sync(); return 0; }



위와 같이 수정 하고 libhardware_legacy.so를 넣습니다.

bcm4329.ko는 kernel에서 make modules로 만들어 넣습니다.










market 사용




gapps는 아래 파일에서 받았습니다.

위에 system을 adb push로 밀어 넣으면 몇개 중복되는 apk가 존재하여 문제가 발생합니다.

그래서 중복되는 apk를 삭제하여 묶었습니다.

http://dl.dropbox.com/u/4485660/gapps-ics-20111122-full-blade_codewalker.tar.gz



android-4.0.3_r1(IML74k) 올려 봤습니다.


gps

odroid-7 gingerbread의 gps library를 드대로 사용하니 gps도 동작하네요.
int.rc에 gps 노드만 바꾸면 됩니다.

 29     chown gps root /sys/class/sec/gps/GPS_PWR_EN/value
 30     chmod 660 /sys/class/sec/gps/GPS_PWR_EN/value
 31                                                   
 32     #===================================================================
 33     #                                         
 34     # Odroid GPS Device name Setting                         
 35     #                                                       
 36     #===================================================================
 37     setprop ro.kernel.android.gps s3c2410_serial1            
 38     chmod 0666  /dev/s3c2410_serial1
 39                    
 40            
 41 on fs                
 42     mkdir /efs 0775 radio radio




가속 센서 역시 odroid7의 orientationd, geomagneticd, sensors.odroid7.so를 그대로 사용하니 동작 합니다.

지자기 센서는 역시 동작하지 않네요.









앞에서 추가적으로 수정된 내용은 ICS.tar.gz에 계속 반영 됩니다.