From 33805d47ca63de3b803b1f9f83b9eab2d2b63cfd Mon Sep 17 00:00:00 2001 From: Xindong Xu Date: Wed, 13 Dec 2017 03:08:41 +0000 Subject: 1. change all p230 to braun 2. use prebuilt kernel --- diff --git a/Android.mk b/Android.mk index 7cfc3b6..75267aa 100644 --- a/Android.mk +++ b/Android.mk @@ -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),p230) +ifeq ($(TARGET_PRODUCT),braun) 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 a8af687..73cf6bd 100644 --- a/AndroidProducts.mk +++ b/AndroidProducts.mk @@ -14,4 +14,4 @@ # limitations under the License. # -PRODUCT_MAKEFILES := $(LOCAL_DIR)/p230.mk +PRODUCT_MAKEFILES := $(LOCAL_DIR)/braun.mk diff --git a/BoardConfig.mk b/BoardConfig.mk index a6849c1..18741ee 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 := p230 +TARGET_BOOTLOADER_BOARD_NAME := braun # Graphics & Display USE_OPENGL_RENDERER := true @@ -83,9 +83,9 @@ endif TARGET_SUPPORT_USB_BURNING_V2 := true -TARGET_AMLOGIC_RES_PACKAGE := device/amlogic/p230/logo_img_files +TARGET_AMLOGIC_RES_PACKAGE := device/amlogic/braun/logo_img_files -TARGET_RECOVERY_FSTAB := device/amlogic/p230/recovery/recovery.fstab +TARGET_RECOVERY_FSTAB := device/amlogic/braun/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/p230/manifest.xml +DEVICE_MANIFEST_FILE := device/amlogic/braun/manifest.xml #DEVICE_MATRIX_FILE := device/amlogic/common/compatibility_matrix.xml diff --git a/Kernel.mk b/Kernel.mk index 0e71334..b66cff4 100644 --- a/Kernel.mk +++ b/Kernel.mk @@ -3,19 +3,37 @@ -include device/amlogic/common/media_modules.mk -include device/amlogic/common/wifi_modules.mk +KERNEL_ROOTDIR := common +KERNEL_KO_OUT := $(PRODUCT_OUT)/obj/lib_vendor + +TARGET_KERNEL_BUILT_FROM_SOURCE := false -USE_PREBUILT_KERNEL := 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/braun-kernel/Image.gz +INSTALLED_BOARDDTB_TARGET := $(PRODUCT_OUT)/dtb.img +LOCAL_DTB := device/amlogic/braun-kernel/braun.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/braun-kernel/lib/mali.ko $(PRODUCT_OUT)/vendor/lib/ + cp device/amlogic/braun-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 @@ -24,7 +42,7 @@ KERNEL_DEVICETREE := gxl_p230_2g KERNEL_DEFCONFIG := meson64_defconfig KERNEL_ARCH := arm64 -KERNEL_ROOTDIR := common + KERNEL_OUT := $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ KERNEL_CONFIG := $(KERNEL_OUT)/.config @@ -44,8 +62,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) diff --git a/p230.mk b/braun.mk index f7b3923..a910c56 100644 --- a/p230.mk +++ b/braun.mk @@ -31,19 +31,19 @@ endif endif $(call inherit-product, device/amlogic/common/products/mbox/product_mbox.mk) -$(call inherit-product, device/amlogic/p230/device.mk) +$(call inherit-product, device/amlogic/braun/device.mk) $(call inherit-product-if-exists, vendor/google/products/gms.mk) -# p230: +# braun: PRODUCT_PROPERTY_OVERRIDES += \ ro.hdmi.device_type=4 \ persist.sys.hdmi.keep_awake=false -PRODUCT_NAME := p230 -PRODUCT_DEVICE := p230 +PRODUCT_NAME := braun +PRODUCT_DEVICE := braun PRODUCT_BRAND := Amlogic -PRODUCT_MODEL := p230 +PRODUCT_MODEL := braun PRODUCT_MANUFACTURER := Amlogic PRODUCT_TYPE := mbox @@ -139,36 +139,36 @@ ifneq ($(BOARD_USES_RECOVERY_AS_BOOT), true) ifeq ($(AB_OTA_UPDATER),true) ifeq ($(BUILD_WITH_DM_VERITY), true) PRODUCT_COPY_FILES += \ - device/amlogic/p230/fstab.AB.verity.amlogic:root/fstab.amlogic + device/amlogic/braun/fstab.AB.verity.amlogic:root/fstab.amlogic else PRODUCT_COPY_FILES += \ - device/amlogic/p230/fstab.AB.amlogic:root/fstab.amlogic + device/amlogic/braun/fstab.AB.amlogic:root/fstab.amlogic endif else ifeq ($(BUILD_WITH_DM_VERITY), true) PRODUCT_COPY_FILES += \ - device/amlogic/p230/fstab.verity.amlogic:root/fstab.amlogic + device/amlogic/braun/fstab.verity.amlogic:root/fstab.amlogic else PRODUCT_COPY_FILES += \ - device/amlogic/p230/fstab.amlogic:root/fstab.amlogic + device/amlogic/braun/fstab.amlogic:root/fstab.amlogic endif endif else ifeq ($(AB_OTA_UPDATER),true) ifeq ($(BUILD_WITH_DM_VERITY), true) PRODUCT_COPY_FILES += \ - device/amlogic/p230/fstab.AB.verity.amlogic:recovery/root/fstab.amlogic + device/amlogic/braun/fstab.AB.verity.amlogic:recovery/root/fstab.amlogic else PRODUCT_COPY_FILES += \ - device/amlogic/p230/fstab.AB.amlogic:recovery/root/fstab.amlogic + device/amlogic/braun/fstab.AB.amlogic:recovery/root/fstab.amlogic endif else ifeq ($(BUILD_WITH_DM_VERITY), true) PRODUCT_COPY_FILES += \ - device/amlogic/p230/fstab.verity.amlogic:recovery/root/fstab.amlogic + device/amlogic/braun/fstab.verity.amlogic:recovery/root/fstab.amlogic else PRODUCT_COPY_FILES += \ - device/amlogic/p230/fstab.amlogic:recovery/root/fstab.amlogic + device/amlogic/braun/fstab.amlogic:recovery/root/fstab.amlogic endif endif endif diff --git a/device.mk b/device.mk index 580d4c1..d38f453 100644 --- a/device.mk +++ b/device.mk @@ -17,48 +17,48 @@ PRODUCT_COPY_FILES += device/amlogic/common/products/mbox/init.amlogic.rc:root/init.amlogic.rc PRODUCT_COPY_FILES += \ - device/amlogic/p230/init.amlogic.usb.rc:root/init.amlogic.usb.rc \ + device/amlogic/braun/init.amlogic.usb.rc:root/init.amlogic.usb.rc \ device/amlogic/common/products/mbox/ueventd.amlogic.rc:root/ueventd.amlogic.rc \ - device/amlogic/p230/init.amlogic.board.rc:root/init.amlogic.board.rc + device/amlogic/braun/init.amlogic.board.rc:root/init.amlogic.board.rc PRODUCT_COPY_FILES += \ - device/amlogic/p230/files/media_profiles.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_profiles.xml \ - device/amlogic/p230/files/media_profiles_V1_0.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_profiles_V1_0.xml \ - device/amlogic/p230/files/audio_policy.conf:$(TARGET_COPY_OUT_VENDOR)/etc/audio_policy.conf \ - device/amlogic/p230/files/media_codecs.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs.xml \ - device/amlogic/p230/files/media_codecs_performance.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs_performance.xml \ - device/amlogic/p230/files/mixer_paths.xml:$(TARGET_COPY_OUT_VENDOR)/etc/mixer_paths.xml \ - device/amlogic/p230/files/mesondisplay.cfg:$(TARGET_COPY_OUT_VENDOR)/etc/mesondisplay.cfg \ - device/amlogic/p230/files/remote.cfg:$(TARGET_COPY_OUT_VENDOR)/etc/remote.cfg \ - device/amlogic/p230/files/remote.tab1:$(TARGET_COPY_OUT_VENDOR)/etc/remote.tab1 \ - device/amlogic/p230/files/remote.tab2:$(TARGET_COPY_OUT_VENDOR)/etc/remote.tab2 \ - device/amlogic/p230/files/remote.tab3:$(TARGET_COPY_OUT_VENDOR)/etc/remote.tab3 \ + device/amlogic/braun/files/media_profiles.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_profiles.xml \ + device/amlogic/braun/files/media_profiles_V1_0.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_profiles_V1_0.xml \ + device/amlogic/braun/files/audio_policy.conf:$(TARGET_COPY_OUT_VENDOR)/etc/audio_policy.conf \ + device/amlogic/braun/files/media_codecs.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs.xml \ + device/amlogic/braun/files/media_codecs_performance.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs_performance.xml \ + device/amlogic/braun/files/mixer_paths.xml:$(TARGET_COPY_OUT_VENDOR)/etc/mixer_paths.xml \ + device/amlogic/braun/files/mesondisplay.cfg:$(TARGET_COPY_OUT_VENDOR)/etc/mesondisplay.cfg \ + device/amlogic/braun/files/remote.cfg:$(TARGET_COPY_OUT_VENDOR)/etc/remote.cfg \ + device/amlogic/braun/files/remote.tab1:$(TARGET_COPY_OUT_VENDOR)/etc/remote.tab1 \ + device/amlogic/braun/files/remote.tab2:$(TARGET_COPY_OUT_VENDOR)/etc/remote.tab2 \ + device/amlogic/braun/files/remote.tab3:$(TARGET_COPY_OUT_VENDOR)/etc/remote.tab3 \ frameworks/native/data/etc/android.hardware.hdmi.cec.xml:system/etc/permissions/android.hardware.hdmi.cec.xml \ - device/amlogic/p230/manifest.xml:$(TARGET_COPY_OUT_VENDOR)/manifest.xml + device/amlogic/braun/manifest.xml:$(TARGET_COPY_OUT_VENDOR)/manifest.xml PRODUCT_COPY_FILES += \ - device/amlogic/p230/recovery/init.recovery.amlogic.rc:root/init.recovery.amlogic.rc \ - device/amlogic/p230/recovery/recovery.kl:recovery/root/etc/recovery.kl \ - device/amlogic/p230/files/mesondisplay.cfg:recovery/root/etc/mesondisplay.cfg \ - device/amlogic/p230/recovery/busybox:recovery/root/sbin/busybox \ - device/amlogic/p230/recovery/remotecfg:recovery/root/sbin/remotecfg \ - device/amlogic/p230/files/remote.cfg:recovery/root/etc/remote.cfg \ - device/amlogic/p230/files/remote.tab1:recovery/root/etc/remote.tab1 \ - device/amlogic/p230/files/remote.tab2:recovery/root/etc/remote.tab2 \ - device/amlogic/p230/files/remote.tab3:recovery/root/etc/remote.tab3 \ - device/amlogic/p230/recovery/sh:recovery/root/sbin/sh + device/amlogic/braun/recovery/init.recovery.amlogic.rc:root/init.recovery.amlogic.rc \ + device/amlogic/braun/recovery/recovery.kl:recovery/root/etc/recovery.kl \ + device/amlogic/braun/files/mesondisplay.cfg:recovery/root/etc/mesondisplay.cfg \ + device/amlogic/braun/recovery/busybox:recovery/root/sbin/busybox \ + device/amlogic/braun/recovery/remotecfg:recovery/root/sbin/remotecfg \ + device/amlogic/braun/files/remote.cfg:recovery/root/etc/remote.cfg \ + device/amlogic/braun/files/remote.tab1:recovery/root/etc/remote.tab1 \ + device/amlogic/braun/files/remote.tab2:recovery/root/etc/remote.tab2 \ + device/amlogic/braun/files/remote.tab3:recovery/root/etc/remote.tab3 \ + device/amlogic/braun/recovery/sh:recovery/root/sbin/sh # remote IME config file PRODUCT_COPY_FILES += \ - device/amlogic/p230/files/Vendor_0001_Product_0001.kl:/$(TARGET_COPY_OUT_VENDOR)/usr/keylayout/Vendor_0001_Product_0001.kl \ - device/amlogic/p230/files/Generic.kl:/$(TARGET_COPY_OUT_VENDOR)/usr/keylayout/Generic.kl + device/amlogic/braun/files/Vendor_0001_Product_0001.kl:/$(TARGET_COPY_OUT_VENDOR)/usr/keylayout/Vendor_0001_Product_0001.kl \ + device/amlogic/braun/files/Generic.kl:/$(TARGET_COPY_OUT_VENDOR)/usr/keylayout/Generic.kl PRODUCT_AAPT_CONFIG := xlarge hdpi xhdpi PRODUCT_AAPT_PREF_CONFIG := hdpi PRODUCT_CHARACTERISTICS := mbx,nosdcard DEVICE_PACKAGE_OVERLAYS := \ - device/amlogic/p230/overlay + device/amlogic/braun/overlay PRODUCT_TAGS += dalvik.gc.type-precise diff --git a/make_boot.sh b/make_boot.sh index 5872f56..20c1dad 100755 --- a/make_boot.sh +++ b/make_boot.sh @@ -11,7 +11,7 @@ if [ "$ROOTFS" == "" -o ! -f "$ROOTFS" ]; then exit 1 fi -KERNEL_OUT=out/target/product/p230/obj/KERNEL_OBJ +KERNEL_OUT=out/target/product/braun/obj/KERNEL_OBJ mkdir -p $KERNEL_OUT if [ ! -f $KERNEL_OUT/.config ]; then @@ -20,11 +20,11 @@ fi make -C common O=../$KERNEL_OUT ARCH=arm64 -j6 CROSS_COMPILE=$PREFIX_CROSS_COMPILE modules Image.gz -cp $KERNEL_OUT/arch/arm64/boot/Image.gz out/target/product/p230/kernel +cp $KERNEL_OUT/arch/arm64/boot/Image.gz out/target/product/braun/kernel if [ "$2" != "m" ]; then make -C common O=../$KERNEL_OUT gxl_p230_2g.dtb ARCH=arm64 CROSS_COMPILE=$PREFIX_CROSS_COMPILE - cp -f $KERNEL_OUT/arch/arm64/boot/dts/amlogic/gxl_p230_2g.dtb out/target/product/p230/dtb.img + cp -f $KERNEL_OUT/arch/arm64/boot/dts/amlogic/gxl_p230_2g.dtb out/target/product/braun/dtb.img fi if [ "$2" != "m" ]; then @@ -32,8 +32,8 @@ if [ "$2" != "m" ]; then --base 0x0 \ --kernel_offset 0x1080000 \ --ramdisk ${ROOTFS} \ - --second out/target/product/p230/dtb.img \ - --output ./out/target/product/p230/boot.img - ls -l ./out/target/product/p230/boot.img + --second out/target/product/braun/dtb.img \ + --output ./out/target/product/braun/boot.img + ls -l ./out/target/product/braun/boot.img echo "boot.img done" fi diff --git a/mkern.sh b/mkern.sh index 8f550ba..7c062f7 100644..100755 --- a/mkern.sh +++ b/mkern.sh @@ -3,7 +3,7 @@ # Run from top of kitkat source #ROOTFS=$1 -ROOTFS="out/target/product/p230/ramdisk.img" +ROOTFS="out/target/product/braun/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/p230/obj/KERNEL_OBJ +KERNEL_OUT=out/target/product/braun/obj/KERNEL_OBJ #mkdir -p $KERNEL_OUT if [ ! -f $KERNEL_OUT/.config ]; then @@ -30,7 +30,7 @@ if [ "$2" != "m" ]; then --base 0x0 \ --kernel_offset 0x1080000 \ --ramdisk ${ROOTFS} \ - --output ./out/target/product/p230/boot.img - ls -l ./out/target/product/p230/boot.img + --output ./out/target/product/braun/boot.img + ls -l ./out/target/product/braun/boot.img echo "boot.img done" fi diff --git a/vendorsetup.sh b/vendorsetup.sh index 0df7f7e..fae2830 100644..100755 --- a/vendorsetup.sh +++ b/vendorsetup.sh @@ -1,3 +1,3 @@ -add_lunch_combo p230-eng -add_lunch_combo p230-user -add_lunch_combo p230-userdebug +add_lunch_combo braun-eng +add_lunch_combo braun-user +add_lunch_combo braun-userdebug -- cgit