author | Xindong Xu <xindong.xu@amlogic.com> | 2017-12-13 03:12:51 (GMT) |
---|---|---|
committer | Xindong Xu <xindong.xu@amlogic.com> | 2017-12-13 03:12:51 (GMT) |
commit | 4e922dfc295be0f2f678ff1d1bb6913e04bc1664 (patch) | |
tree | 89d55c2b782fea06a3cc4bfe4529a8f4926f36e0 | |
parent | c9d12ac7dc7d8a23f9a41eb250f6d6bee2351ace (diff) | |
download | curie-4e922dfc295be0f2f678ff1d1bb6913e04bc1664.zip curie-4e922dfc295be0f2f678ff1d1bb6913e04bc1664.tar.gz curie-4e922dfc295be0f2f678ff1d1bb6913e04bc1664.tar.bz2 |
1. change all p241 to curie
2. use prebuilt kernel
-rw-r--r-- | Android.mk | 2 | ||||
-rw-r--r-- | AndroidProducts.mk | 2 | ||||
-rw-r--r-- | BoardConfig.mk | 8 | ||||
-rw-r--r-- | Kernel.mk | 32 | ||||
-rw-r--r-- | curie.mk (renamed from p241.mk) | 28 | ||||
-rw-r--r-- | device.mk | 58 | ||||
-rw-r--r-- | init.amlogic.usb.rc | 2 | ||||
-rwxr-xr-x | mkern.sh | 8 | ||||
-rwxr-xr-x | vendorsetup.sh | 6 |
9 files changed, 82 insertions, 64 deletions
@@ -20,7 +20,7 @@ # to only building on ARM if they include assembly. Individual makefiles # are responsible for having their own logic, for fine-grained control. -ifeq ($(TARGET_PRODUCT),p241) +ifeq ($(TARGET_PRODUCT),curie) LOCAL_PATH := $(call my-dir) # if some modules are built directly from this directory (not subdirectories), # their rules should be written here. diff --git a/AndroidProducts.mk b/AndroidProducts.mk index 05bf44d..a0c66f3 100644 --- a/AndroidProducts.mk +++ b/AndroidProducts.mk @@ -14,4 +14,4 @@ # limitations under the License. # -PRODUCT_MAKEFILES := $(LOCAL_DIR)/p241.mk +PRODUCT_MAKEFILES := $(LOCAL_DIR)/curie.mk diff --git a/BoardConfig.mk b/BoardConfig.mk index a76501a..6752a60 100644 --- a/BoardConfig.mk +++ b/BoardConfig.mk @@ -44,7 +44,7 @@ TARGET_NO_KERNEL := false TARGET_NO_RADIOIMAGE := true TARGET_BOARD_PLATFORM := gxl -TARGET_BOOTLOADER_BOARD_NAME := p241 +TARGET_BOOTLOADER_BOARD_NAME := curie # Graphics & Display USE_OPENGL_RENDERER := true @@ -83,9 +83,9 @@ endif TARGET_SUPPORT_USB_BURNING_V2 := true -TARGET_AMLOGIC_RES_PACKAGE := device/amlogic/p241/logo_img_files +TARGET_AMLOGIC_RES_PACKAGE := device/amlogic/curie/logo_img_files -TARGET_RECOVERY_FSTAB := device/amlogic/p212/recovery/recovery.fstab +TARGET_RECOVERY_FSTAB := device/amlogic/curie/recovery/recovery.fstab #BOARD_HAL_STATIC_LIBRARIES := libhealthd.mboxdefault @@ -122,5 +122,5 @@ WITH_DEXPREOPT := true PRODUCT_FULL_TREBLE_OVERRIDE := true BOARD_PROPERTY_OVERRIDES_SPLIT_ENABLED := true -DEVICE_MANIFEST_FILE := device/amlogic/p241/manifest.xml +DEVICE_MANIFEST_FILE := device/amlogic/curie/manifest.xml #DEVICE_MATRIX_FILE := device/amlogic/common/compatibility_matrix.xml @@ -3,18 +3,37 @@ -include device/amlogic/common/media_modules.mk -include device/amlogic/common/wifi_modules.mk -USE_PREBUILT_KERNEL := false +KERNEL_ROOTDIR := common +KERNEL_KO_OUT := $(PRODUCT_OUT)/obj/lib_vendor + +TARGET_KERNEL_BUILT_FROM_SOURCE := false + WIFI_MODULE := multiwifi INSTALLED_KERNEL_TARGET := $(PRODUCT_OUT)/kernel -ifeq ($(USE_PREBUILT_KERNEL),true) -TARGET_PREBUILT_KERNEL := $(LOCAL_PATH)/kernel +ifneq ($(TARGET_KERNEL_BUILT_FROM_SOURCE), true) +TARGET_PREBUILT_KERNEL := device/amlogic/curie-kernel/Image.gz +INSTALLED_BOARDDTB_TARGET := $(PRODUCT_OUT)/dtb.img +LOCAL_DTB := device/amlogic/curie-kernel/curie.dtb + +$(TARGET_PREBUILT_KERNEL): $(INSTALLED_BOARDDTB_TARGET) + @echo "cp kernel modules" + mkdir -p $(PRODUCT_OUT)/root/boot + mkdir -p $(PRODUCT_OUT)/vendor/lib + mkdir -p $(KERNEL_KO_OUT) + cp device/amlogic/curie-kernel/lib/mali.ko $(PRODUCT_OUT)/vendor/lib/ + cp device/amlogic/curie-kernel/lib/modules/* $(KERNEL_KO_OUT)/ + mkdir -p $(PRODUCT_OUT)/$(TARGET_COPY_OUT_VENDOR)/lib/modules/ + cp $(KERNEL_KO_OUT)/* $(PRODUCT_OUT)/$(TARGET_COPY_OUT_VENDOR)/lib/modules/ $(INSTALLED_KERNEL_TARGET): $(TARGET_PREBUILT_KERNEL) | $(ACP) @echo "Kernel installed" $(transform-prebuilt-to-target) - @echo "cp kernel modules" + +$(INSTALLED_BOARDDTB_TARGET): $(LOCAL_DTB) | $(ACP) + @echo "dtb installed" + $(transform-prebuilt-to-target) else @@ -22,7 +41,8 @@ KERNEL_DEVICETREE := gxl_p241_1g gxl_p241_v2-1g KERNEL_DEFCONFIG := meson64_defconfig KERNEL_ARCH := arm64 -KERNEL_ROOTDIR := common + + KERNEL_OUT := $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ KERNEL_CONFIG := $(KERNEL_OUT)/.config @@ -41,8 +61,6 @@ WIFI_OUT := $(TARGET_OUT_INTERMEDIATES)/hardware/wifi PREFIX_CROSS_COMPILE=/opt/gcc-linaro-6.3.1-2017.02-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu- -KERNEL_KO_OUT := $(PRODUCT_OUT)/obj/lib_vendor - define cp-modules mkdir -p $(PRODUCT_OUT)/root/boot mkdir -p $(KERNEL_KO_OUT) @@ -33,10 +33,10 @@ endif endif $(call inherit-product, device/amlogic/common/products/mbox/product_mbox.mk) -$(call inherit-product, device/amlogic/p241/device.mk) +$(call inherit-product, device/amlogic/curie/device.mk) $(call inherit-product-if-exists, vendor/google/products/gms.mk) -# p241: +# curie: NUM_FRAMEBUFFER_SURFACE_BUFFERS := 3 @@ -45,10 +45,10 @@ PRODUCT_PROPERTY_OVERRIDES += \ ro.hdmi.device_type=4 \ persist.sys.hdmi.keep_awake=false -PRODUCT_NAME := p241 -PRODUCT_DEVICE := p241 +PRODUCT_NAME := curie +PRODUCT_DEVICE := curie PRODUCT_BRAND := Amlogic -PRODUCT_MODEL := p241 +PRODUCT_MODEL := curie PRODUCT_MANUFACTURER := Amlogic PRODUCT_TYPE := mbox @@ -146,43 +146,43 @@ ifneq ($(BOARD_USES_RECOVERY_AS_BOOT), true) ifeq ($(AB_OTA_UPDATER),true) ifeq ($(BUILD_WITH_DM_VERITY), true) PRODUCT_COPY_FILES += \ - device/amlogic/p241/fstab.AB.verity.amlogic:root/fstab.amlogic + device/amlogic/curie/fstab.AB.verity.amlogic:root/fstab.amlogic else PRODUCT_COPY_FILES += \ - device/amlogic/p241/fstab.AB.amlogic:root/fstab.amlogic + device/amlogic/curie/fstab.AB.amlogic:root/fstab.amlogic endif else ifeq ($(BUILD_WITH_DM_VERITY), true) PRODUCT_COPY_FILES += \ - device/amlogic/p241/fstab.verity.amlogic:root/fstab.amlogic + device/amlogic/curie/fstab.verity.amlogic:root/fstab.amlogic else PRODUCT_COPY_FILES += \ - device/amlogic/p241/fstab.amlogic:root/fstab.amlogic + device/amlogic/curie/fstab.amlogic:root/fstab.amlogic endif endif else ifeq ($(AB_OTA_UPDATER),true) ifeq ($(BUILD_WITH_DM_VERITY), true) PRODUCT_COPY_FILES += \ - device/amlogic/p241/fstab.AB.verity.amlogic:recovery/root/fstab.amlogic + device/amlogic/curie/fstab.AB.verity.amlogic:recovery/root/fstab.amlogic else PRODUCT_COPY_FILES += \ - device/amlogic/p241/fstab.AB.amlogic:recovery/root/fstab.amlogic + device/amlogic/curie/fstab.AB.amlogic:recovery/root/fstab.amlogic endif else ifeq ($(BUILD_WITH_DM_VERITY), true) PRODUCT_COPY_FILES += \ - device/amlogic/p241/fstab.verity.amlogic:recovery/root/fstab.amlogic + device/amlogic/curie/fstab.verity.amlogic:recovery/root/fstab.amlogic else PRODUCT_COPY_FILES += \ - device/amlogic/p241/fstab.amlogic:recovery/root/fstab.amlogic + device/amlogic/curie/fstab.amlogic:recovery/root/fstab.amlogic endif endif endif endif ifeq ($(BOARD_OLD_PARTITION),true) PRODUCT_COPY_FILES += \ - device/amlogic/p212/fstab.3.14.amlogic:root/fstab.amlogic + device/amlogic/ampere/fstab.3.14.amlogic:root/fstab.amlogic endif ######################################################################### @@ -18,55 +18,55 @@ ifneq ($(BOARD_USES_RECOVERY_AS_BOOT), true) PRODUCT_COPY_FILES += device/amlogic/common/products/mbox/init.amlogic.rc:root/init.amlogic.rc PRODUCT_COPY_FILES += \ - device/amlogic/p241/init.amlogic.usb.rc:root/init.amlogic.usb.rc \ + device/amlogic/curie/init.amlogic.usb.rc:root/init.amlogic.usb.rc \ device/amlogic/common/products/mbox/ueventd.amlogic.rc:root/ueventd.amlogic.rc \ - device/amlogic/p241/init.amlogic.board.rc:root/init.amlogic.board.rc + device/amlogic/curie/init.amlogic.board.rc:root/init.amlogic.board.rc else PRODUCT_COPY_FILES += device/amlogic/common/products/mbox/init.amlogic.rc:recovery/root/init.amlogic.rc PRODUCT_COPY_FILES += \ - device/amlogic/p241/init.amlogic.usb.rc:recovery/root/init.amlogic.usb.rc \ + device/amlogic/curie/init.amlogic.usb.rc:recovery/root/init.amlogic.usb.rc \ device/amlogic/common/products/mbox/ueventd.amlogic.rc:recovery/root/ueventd.amlogic.rc \ - device/amlogic/p241/init.amlogic.board.rc:recovery/root/init.amlogic.board.rc + device/amlogic/curie/init.amlogic.board.rc:recovery/root/init.amlogic.board.rc endif PRODUCT_COPY_FILES += \ - device/amlogic/p241/files/media_profiles.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_profiles.xml \ - device/amlogic/p241/files/media_profiles_V1_0.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_profiles_V1_0.xml \ - device/amlogic/p241/files/audio_policy.conf:$(TARGET_COPY_OUT_VENDOR)/etc/audio_policy.conf \ - device/amlogic/p241/files/media_codecs.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs.xml \ - device/amlogic/p241/files/media_codecs_performance.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs_performance.xml \ - device/amlogic/p241/files/mixer_paths.xml:$(TARGET_COPY_OUT_VENDOR)/etc/mixer_paths.xml \ - device/amlogic/p241/files/mesondisplay.cfg:$(TARGET_COPY_OUT_VENDOR)/etc/mesondisplay.cfg \ - device/amlogic/p241/files/remote.cfg:$(TARGET_COPY_OUT_VENDOR)/etc/remote.cfg \ - device/amlogic/p241/files/remote.tab1:$(TARGET_COPY_OUT_VENDOR)/etc/remote.tab1 \ - device/amlogic/p241/files/remote.tab2:$(TARGET_COPY_OUT_VENDOR)/etc/remote.tab2 \ - device/amlogic/p241/files/remote.tab3:$(TARGET_COPY_OUT_VENDOR)/etc/remote.tab3 \ - device/amlogic/p241/manifest.xml:$(TARGET_COPY_OUT_VENDOR)/manifest.xml + device/amlogic/curie/files/media_profiles.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_profiles.xml \ + device/amlogic/curie/files/media_profiles_V1_0.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_profiles_V1_0.xml \ + device/amlogic/curie/files/audio_policy.conf:$(TARGET_COPY_OUT_VENDOR)/etc/audio_policy.conf \ + device/amlogic/curie/files/media_codecs.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs.xml \ + device/amlogic/curie/files/media_codecs_performance.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs_performance.xml \ + device/amlogic/curie/files/mixer_paths.xml:$(TARGET_COPY_OUT_VENDOR)/etc/mixer_paths.xml \ + device/amlogic/curie/files/mesondisplay.cfg:$(TARGET_COPY_OUT_VENDOR)/etc/mesondisplay.cfg \ + device/amlogic/curie/files/remote.cfg:$(TARGET_COPY_OUT_VENDOR)/etc/remote.cfg \ + device/amlogic/curie/files/remote.tab1:$(TARGET_COPY_OUT_VENDOR)/etc/remote.tab1 \ + device/amlogic/curie/files/remote.tab2:$(TARGET_COPY_OUT_VENDOR)/etc/remote.tab2 \ + device/amlogic/curie/files/remote.tab3:$(TARGET_COPY_OUT_VENDOR)/etc/remote.tab3 \ + device/amlogic/curie/manifest.xml:$(TARGET_COPY_OUT_VENDOR)/manifest.xml PRODUCT_COPY_FILES += \ - device/amlogic/p241/recovery/init.recovery.amlogic.rc:root/init.recovery.amlogic.rc \ - device/amlogic/p241/recovery/recovery.kl:recovery/root/etc/recovery.kl \ - device/amlogic/p241/files/mesondisplay.cfg:recovery/root/etc/mesondisplay.cfg \ - device/amlogic/p241/recovery/busybox:recovery/root/sbin/busybox \ - device/amlogic/p241/recovery/remotecfg:recovery/root/sbin/remotecfg \ - device/amlogic/p241/files/remote.cfg:recovery/root/etc/remote.cfg \ - device/amlogic/p241/files/remote.tab1:recovery/root/etc/remote.tab1 \ - device/amlogic/p241/files/remote.tab2:recovery/root/etc/remote.tab2 \ - device/amlogic/p241/files/remote.tab3:recovery/root/etc/remote.tab3 \ - device/amlogic/p241/recovery/sh:recovery/root/sbin/sh + device/amlogic/curie/recovery/init.recovery.amlogic.rc:root/init.recovery.amlogic.rc \ + device/amlogic/curie/recovery/recovery.kl:recovery/root/etc/recovery.kl \ + device/amlogic/curie/files/mesondisplay.cfg:recovery/root/etc/mesondisplay.cfg \ + device/amlogic/curie/recovery/busybox:recovery/root/sbin/busybox \ + device/amlogic/curie/recovery/remotecfg:recovery/root/sbin/remotecfg \ + device/amlogic/curie/files/remote.cfg:recovery/root/etc/remote.cfg \ + device/amlogic/curie/files/remote.tab1:recovery/root/etc/remote.tab1 \ + device/amlogic/curie/files/remote.tab2:recovery/root/etc/remote.tab2 \ + device/amlogic/curie/files/remote.tab3:recovery/root/etc/remote.tab3 \ + device/amlogic/curie/recovery/sh:recovery/root/sbin/sh # remote IME config file PRODUCT_COPY_FILES += \ - device/amlogic/p241/files/Vendor_0001_Product_0001.kl:$(TARGET_COPY_OUT_VENDOR)/usr/keylayout/Vendor_0001_Product_0001.kl \ - device/amlogic/p241/files/Generic.kl:$(TARGET_COPY_OUT_VENDOR)/usr/keylayout/Generic.kl + device/amlogic/curie/files/Vendor_0001_Product_0001.kl:$(TARGET_COPY_OUT_VENDOR)/usr/keylayout/Vendor_0001_Product_0001.kl \ + device/amlogic/curie/files/Generic.kl:$(TARGET_COPY_OUT_VENDOR)/usr/keylayout/Generic.kl PRODUCT_AAPT_CONFIG := xlarge hdpi xhdpi mdpi PRODUCT_AAPT_PREF_CONFIG := mdpi PRODUCT_CHARACTERISTICS := mbx,nosdcard DEVICE_PACKAGE_OVERLAYS := \ - device/amlogic/p241/overlay + device/amlogic/curie/overlay PRODUCT_TAGS += dalvik.gc.type-precise diff --git a/init.amlogic.usb.rc b/init.amlogic.usb.rc index 8d97119..c9375e9 100644 --- a/init.amlogic.usb.rc +++ b/init.amlogic.usb.rc @@ -9,7 +9,7 @@ on boot mkdir /config/usb_gadget/g1/strings/0x409 0770 write /config/usb_gadget/g1/strings/0x409/serialnumber ${ro.serialno} write /config/usb_gadget/g1/strings/0x409/manufacturer amlogic - write /config/usb_gadget/g1/strings/0x409/product p212 + write /config/usb_gadget/g1/strings/0x409/product p241 mkdir /config/usb_gadget/g1/functions/ffs.adb mkdir /config/usb_gadget/g1/functions/mtp.gs0 mkdir /config/usb_gadget/g1/configs/b.1 0770 shell shell @@ -3,7 +3,7 @@ # Run from top of kitkat source #ROOTFS=$1 -ROOTFS="out/target/product/p241/ramdisk.img" +ROOTFS="out/target/product/curie/ramdisk.img" PREFIX_CROSS_COMPILE=aarch64-linux-gnu- if [ "$ROOTFS" == "" -o ! -f "$ROOTFS" ]; then @@ -11,7 +11,7 @@ if [ "$ROOTFS" == "" -o ! -f "$ROOTFS" ]; then exit 1 fi -KERNEL_OUT=out/target/product/p241/obj/KERNEL_OBJ +KERNEL_OUT=out/target/product/curie/obj/KERNEL_OBJ #mkdir -p $KERNEL_OUT if [ ! -f $KERNEL_OUT/.config ]; then @@ -32,7 +32,7 @@ if [ "$2" != "m" ]; then --base 0x0 \ --kernel_offset 0x1080000 \ --ramdisk ${ROOTFS} \ - --output ./out/target/product/p241/boot.img - ls -l ./out/target/product/p241/boot.img + --output ./out/target/product/curie/boot.img + ls -l ./out/target/product/curie/boot.img echo "boot.img done" fi diff --git a/vendorsetup.sh b/vendorsetup.sh index e0069a5..ac2edd6 100755 --- a/vendorsetup.sh +++ b/vendorsetup.sh @@ -1,3 +1,3 @@ -add_lunch_combo p241-eng -add_lunch_combo p241-user -add_lunch_combo p241-userdebug +add_lunch_combo curie-eng +add_lunch_combo curie-user +add_lunch_combo curie-userdebug |