Note: Porting a new board for Android ICS, clone blaze_tablet

  1. create a new vendor directory under device, there is ‘kunyi’
  2. create a board folder under ‘kunyi’, let me assign it is ‘myboard’
  3. copy all files into myboard from ./device/ti/blaze_tablet
  4. rename blaze_tablet.mk to full_myboard.mk
  5. edit Android.mk
    diff --git a/kunyi/myboard/Android.mk b/ti/blaze_tablet/Android.mk
    index 8992b28..d00e65a 100644
    --- a/kunyi/myboard/Android.mk
    +++ b/ti/blaze_tablet/Android.mk
    @@ -17,10 +17,10 @@ LOCAL_PATH := $(call my-dir)
     # protect makefile from other boards
     # if some modules are built directly from this directory (not subdirectories),
     # their rules should be written here.
    -ifeq ($(TARGET_DEVICE),myboard)
    +ifeq ($(TARGET_DEVICE),blaze_tablet)
     include $(CLEAR_VARS)
    
    -LOCAL_MODULE := myboard_hdcp_keys
    +LOCAL_MODULE := blaze_tablet_hdcp_keys
     LOCAL_MODULE_TAGS := optional
     LOCAL_MODULE_CLASS := FAKE
     LOCAL_MODULE_SUFFIX := -timestamp
    
    
  6. edit AndroidProducts.mk
    diff --git a/kunyi/myboard/AndroidProducts.mk b/ti/blaze_tablet/AndroidProducts
    index 295dafd..f6d0ed4 100644
    --- a/kunyi/myboard/AndroidProducts.mk
    +++ b/ti/blaze_tablet/AndroidProducts.mk
    @@ -26,5 +26,5 @@
     #
    
     PRODUCT_MAKEFILES := \
    -    $(LOCAL_DIR)/full_myboard.mk
    +    $(LOCAL_DIR)/full_blaze_tablet.mk
    
    
  7. edit BoardConfig.mk
    diff --git a/kunyi/myboard/BoardConfig.mk b/ti/blaze_tablet/BoardConfig.mk
    index 52fc74c..fd21c91 100644
    --- a/kunyi/myboard/BoardConfig.mk
    +++ b/ti/blaze_tablet/BoardConfig.mk
    @@ -14,8 +14,6 @@
     # limitations under the License.
     #
    
    -MYDEV_DIR := device
    -
     # These two variables are set first, so they can be overridden
     # by BoardConfigVendor.mk
     BOARD_USES_GENERIC_AUDIO := false
    @@ -41,9 +39,9 @@ BOARD_KERNEL_BASE := 0x80000000
    
     TARGET_NO_RADIOIMAGE := true
     TARGET_BOARD_PLATFORM := omap4
    -TARGET_BOOTLOADER_BOARD_NAME := myboard
    +TARGET_BOOTLOADER_BOARD_NAME := blaze_tablet
    
    -BOARD_EGL_CFG := $(MYDEV_DIR)/kunyi/myboard/egl.cfg
    +BOARD_EGL_CFG := device/ti/blaze_tablet/egl.cfg
    
     #BOARD_USES_HGL := true
     #BOARD_USES_OVERLAY := true
    @@ -51,9 +49,9 @@ USE_OPENGL_RENDERER := true
    
     # Recovery
     TARGET_RECOVERY_PIXEL_FORMAT := "BGRA_8888"
    -TARGET_RECOVERY_UI_LIB := librecovery_ui_myboard
    +TARGET_RECOVERY_UI_LIB := librecovery_ui_blaze_tablet
     # device-specific extensions to the updater binary
    -TARGET_RELEASETOOLS_EXTENSIONS := $(MYDEV_DIR)/kunyi/myboard
    +TARGET_RELEASETOOLS_EXTENSIONS := device/ti/blaze_tablet
    
     BOARD_USES_SECURE_SERVICES := true
    
    @@ -92,7 +90,7 @@ endif
     #Set 32 byte cache line to true
     ARCH_ARM_HAVE_32_BYTE_CACHE_LINES := true
    
    -BOARD_LIB_DUMPSTATE := libdumpstate.myboard
    +BOARD_LIB_DUMPSTATE := libdumpstate.blaze_tablet
    
     BOARD_VENDOR_TI_GPS_HARDWARE := omap4
     BOARD_GPS_LIBRARIES := libgps
    
    
  8. edit board-info.txt
    diff --git a/kunyi/myboard/board-info.txt b/ti/blaze_tablet/board-info.txt
    index 688ffa9..4b74db7 100644
    --- a/kunyi/myboard/board-info.txt
    +++ b/ti/blaze_tablet/board-info.txt
    @@ -1,2 +1,2 @@
    -require board=MyBoard
    +require board=Blaze_Tablet
    
  9. edit device.mk
    
    diff --git a/kunyi/myboard/device.mk b/ti/blaze_tablet/device.mk
    index 4260b64..bd1a228 100644
    --- a/kunyi/myboard/device.mk
    +++ b/ti/blaze_tablet/device.mk
    @@ -14,9 +14,7 @@
     # limitations under the License.
     #
    
    -MYDEV_DIR := device
    -
    -DEVICE_PACKAGE_OVERLAYS := $(MYDEV_DIR)/kunyi/myboard/overlay
    +DEVICE_PACKAGE_OVERLAYS := device/ti/blaze_tablet/overlay
    
     PRODUCT_PACKAGES := \
         ti_omap4_ducati_bins \
    @@ -46,7 +44,7 @@ PRODUCT_PACKAGES += \
         VTCTestApp
    
     ifeq ($(TARGET_PREBUILT_KERNEL),)
    -LOCAL_KERNEL := $(MYDEV_DIR)/kunyi/myboard/boot/zImage
    +LOCAL_KERNEL := device/ti/blaze_tablet/boot/zImage
     else
     LOCAL_KERNEL := $(TARGET_PREBUILT_KERNEL)
     endif
    @@ -54,31 +52,31 @@ endif
     #Need to revisit the fastboot copy files
     PRODUCT_COPY_FILES := \
            $(LOCAL_KERNEL):kernel \
    -       $(MYDEV_DIR)/kunyi/myboard/init.omap4blazeboard.rc:root/init.omap4blaze
    -       $(MYDEV_DIR)/kunyi/myboard/init.omap4blazeboard.usb.rc:root/init.omap4b
    -       $(MYDEV_DIR)/kunyi/myboard/ueventd.omap4blazeboard.rc:root/ueventd.omap
    -       $(MYDEV_DIR)/kunyi/myboard/media_profiles.xml:system/etc/media_profiles
    +       device/ti/blaze_tablet/init.omap4blazeboard.rc:root/init.omap4blazeboar
    +       device/ti/blaze_tablet/init.omap4blazeboard.usb.rc:root/init.omap4blaze
    +       device/ti/blaze_tablet/ueventd.omap4blazeboard.rc:root/ueventd.omap4bla
    +       device/ti/blaze_tablet/media_profiles.xml:system/etc/media_profiles.xml
            frameworks/base/data/etc/android.hardware.telephony.gsm.xml:system/etc/
            frameworks/base/data/etc/android.hardware.usb.host.xml:system/etc/permi
            frameworks/base/data/etc/android.hardware.usb.accessory.xml:system/etc/
            frameworks/base/data/etc/android.hardware.wifi.xml:system/etc/permissio
            frameworks/base/data/etc/android.hardware.wifi.direct.xml:system/etc/pe
    -       $(MYDEV_DIR)/kunyi/myboard/android.hardware.bluetooth.xml:system/etc/pe
    -       $(MYDEV_DIR)/kunyi/myboard/twl6030_pwrbutton.kl:system/usr/keylayout/tw
    -       $(MYDEV_DIR)/kunyi/myboard/qtouch-touchscreen.idc:system/usr/idc/qtouch
    -        $(MYDEV_DIR)/kunyi/myboard/gpio-keys.kl:system/usr/keylayout/gpio-keys
    -       $(MYDEV_DIR)/kunyi/myboard/bootanimation.zip:/system/media/bootanimatio
    +       device/ti/blaze_tablet/android.hardware.bluetooth.xml:system/etc/permis
    +       device/ti/blaze_tablet/twl6030_pwrbutton.kl:system/usr/keylayout/twl603
    +       device/ti/blaze_tablet/qtouch-touchscreen.idc:system/usr/idc/qtouch-tou
    +        device/ti/blaze_tablet/gpio-keys.kl:system/usr/keylayout/gpio-keys.kl
    +       device/ti/blaze_tablet/bootanimation.zip:/system/media/bootanimation.zi
    
     # to mount the external storage (sdcard)
     PRODUCT_COPY_FILES += \
    -        $(MYDEV_DIR)/kunyi/myboard/vold.fstab:system/etc/vold.fstab
    +        device/ti/blaze_tablet/vold.fstab:system/etc/vold.fstab
    
     PRODUCT_PACKAGES += \
    -       lights.myboard
    +       lights.blaze_tablet
    
     #Remove this as it freezes at boot. Will re-enable once fixed
     PRODUCT_PACKAGES += \
    -       sensors.myboard \
    +       sensors.blaze_tablet \
            sensor.test
    
     PRODUCT_PACKAGES += \
    @@ -141,7 +139,7 @@ PRODUCT_PACKAGES += \
            setup_fs
    
     # Audio HAL module
    -PRODUCT_PACKAGES += audio.primary.myboard
    +PRODUCT_PACKAGES += audio.primary.blaze_tablet
    
     # Audioout libs
     PRODUCT_PACKAGES += libaudioutils
    @@ -194,7 +192,7 @@ PRODUCT_PACKAGES += \
             tfctrl
    
     PRODUCT_PACKAGES += \
    -       myboard_hdcp_keys
    +       blaze_tablet_hdcp_keys
    
     $(call inherit-product, frameworks/base/build/tablet-dalvik-heap.mk)
     $(call inherit-product, hardware/ti/omap4xxx/omap4.mk)
    
    
  10. Edit full-myboard.mk
    
    diff --git a/kunyi/myboard/full_myboard.mk b/ti/blaze_tablet/full_blaze_tablet.
    index 08f8f49..0055c39 100644
    --- a/kunyi/myboard/full_myboard.mk
    +++ b/ti/blaze_tablet/full_blaze_tablet.mk
    @@ -23,13 +23,13 @@
    
     # Inherit from those products. Most specific first.
     $(call inherit-product, $(SRC_TARGET_DIR)/product/full_base.mk)
    -$(call inherit-product, device/kunyi/myboard/device.mk)
    +$(call inherit-product, device/ti/blaze_tablet/device.mk)
     $(call inherit-product-if-exists, vendor/ti/proprietary/omap4/ti-omap4-vendor.
    
     # Discard inherited values and use our own instead.
    -PRODUCT_NAME := full_myboard
    -PRODUCT_DEVICE := myboard
    +PRODUCT_NAME := blaze_tablet
    +PRODUCT_DEVICE := blaze_tablet
     PRODUCT_BRAND := Android
    -PRODUCT_MODEL := MyBoard
    -PRODUCT_MANUFACTURER := Learn_KunYi
    
result in the below
————————————————————————————————————————————————–
including device/kunyi/myboard/vendorsetup.sh
including device/moto/stingray/vendorsetup.sh
including device/moto/wingray/vendorsetup.sh
including device/samsung/crespo4g/vendorsetup.sh
including device/samsung/crespo/vendorsetup.sh
including device/samsung/maguro/vendorsetup.sh
including device/samsung/toro/vendorsetup.sh
including device/samsung/tuna/vendorsetup.sh
including device/ti/blaze_tablet/vendorsetup.sh
including device/ti/blaze/vendorsetup.sh
including device/ti/panda/vendorsetup.sh
including sdk/bash_completion/adb.bash
============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=4.0.3
TARGET_PRODUCT=full_myboard
TARGET_BUILD_VARIANT=userdebug
TARGET_BUILD_TYPE=release
TARGET_BUILD_APPS=
TARGET_ARCH=arm
TARGET_ARCH_VARIANT=armv7-a-neon
HOST_ARCH=x86
HOST_OS=linux
HOST_BUILD_TYPE=release
BUILD_ID=IML74K
============================================
and you can move ./device/kunyi/myboard to ./vendor/kunyi/myboard, but need modify some path in .mk
廣告

發表迴響

在下方填入你的資料或按右方圖示以社群網站登入:

WordPress.com Logo

您的留言將使用 WordPress.com 帳號。 登出 / 變更 )

Twitter picture

您的留言將使用 Twitter 帳號。 登出 / 變更 )

Facebook照片

您的留言將使用 Facebook 帳號。 登出 / 變更 )

Google+ photo

您的留言將使用 Google+ 帳號。 登出 / 變更 )

連結到 %s

%d 位部落客按了讚: