Wednesday, December 28, 2011

ATA device control

I added new driver.
It has ATA and ATAPI control function.
HDD is controlled PIO mode and LBA.


  • First, Initialize ATA and ATAPI device.
Execute soft reset.

Read Cylinder Low inb(0x01f4);

Read Cylinder High inb(0x01f5);

Input Cylinder Low and High to get device type.

(We can confirm ATA device when Cylinder High and Low is Zero.

 We can confirm ATAPI device when Cylinder High is 0xeb and Cylinder Low is 0x14.)

Identify device.

Execute device selection protocol.

Wait until BSY to Zero.
Wait DRQ to active.
Read 256 byte sectors for prepare.

  • Next, read sector from ATA device.
I will write this section tomorrow.... sorry.

Thursday, December 22, 2011

Build ICS

OS:Ubuntu 11.10 x86
CPU:Core2Duo
Mem:2.0GB
shell:zsh

download repo utility.
$ curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo
$ chmod a+x ~/bin/repo
Create directory and initialize git repository.
$ mkdir android-ics
$ cd andorid-ics
$ repo init -u https://android.googlesource.com/platform/manifest -b android-4.0.1_r1
$ repo sync

$ bash
$ source ./build/envsetup.sh
$ lunch full-eng
$ time make -j2 2>&1 |tee make.log
That method will be to the error on Ubuntu 11.10(x86).
$ emacs -nw build/core/combo/HOST_linux-x86.mk
-HOST_GLOBAL_CFLAGS += -D_FORTIFY_SOURCE=0
+HOST_GLOBAL_CFLAGS += -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=0

$ emacs -nw external/gtest/include/gtest/internal/gtest-param-util.h
 #include 
+#include   // 40 line
 #include 

$ emacs -nw external/oprofile/libpp/format_output.h
 -               mutable counts_t & counts;
 +               counts_t & counts;  // 94 line

$ emacs -nw frameworks/compile/slang/Android.mk
-local_cflags_for_slang := -Wno-sign-promo -Wall -Wno-unused-parameter -Werror
+local_cflags_for_slang := -Wno-sign-promo -Wall -Wno-unused-parameter  # 22line

$ emacs -nw external/llvm/lib/Support/Mutex.cpp
 #include "llvm/Config/config.h"
 #include "llvm/Support/Mutex.h"
+#undef ENABLE_THREADS  // 16 line
+#undef HAVE_PTHREAD_H

$ emacs -nw external/llvm/lib/Support/Signals.cpp
 }

+#undef HAVE_DLFCN_H  // 28 line

$ emacs -nw external/llvm/lib/Support/Threading.cpp
 #include "llvm/Support/Mutex.h"
 #include "llvm/Config/config.h"
 #include 
+#undef LLVM_MULTITHREADED  // 19 line

$ source build/envsetup.sh
$ lunch full-eng
$ make -j2
launch emulator
$ emulator
But.... I failed to display AndroidOS home screen, after I succeed to launch emulator.

Sunday, December 4, 2011

Review English study in November

I reviewed English studying in November.
I was able to hear some English.
Example,

  • Famous peoples interview on TV.
  • Talk on Movies.
  • CD for practice.
I did practice below.
  1. I was hearing English CD on Commuter Train.
  2. I was hearing high speed English CD on Commuter Train.
  3. I was writing English, after I was hearing high speed English CD.
  4. I read aloud in English.(Very easy Englishes)
I keep to try these practice in December. and I restart implement my own OS a little :-)

Thanks.