mirror of
https://github.com/chararomandroid/android_device_samsung_a20
synced 2026-08-22 04:05:31 -04:00
universal7885: Add my makefile Generator script
Change-Id: I2ec7e72a67d73e5b9b6dd4f57557ede1651ebe03 Signed-off-by: roynatech2544 <whiteshell2544@naver.com>
This commit is contained in:
parent
70476a701f
commit
b231e3bd21
4 changed files with 82 additions and 5 deletions
20
a20/setup.sh
Executable file
20
a20/setup.sh
Executable file
|
|
@ -0,0 +1,20 @@
|
|||
VENDOR=$(cat device/samsung/universal7885-common/vendor_name)
|
||||
|
||||
# Generate AndroidProducts.mk
|
||||
echo "# Auto-Generated by device/samsung/a20/setup.sh" > device/samsung/a20/AndroidProducts.mk
|
||||
echo "PRODUCT_MAKEFILES += \$(LOCAL_DIR)/"$VENDOR"_a20.mk" >> device/samsung/a20/AndroidProducts.mk
|
||||
|
||||
# Generate <vendor>_a20.mk
|
||||
echo "# Auto-Generated by device/samsung/a20/setup.sh" > device/samsung/a20/"$VENDOR"_a20.mk
|
||||
echo "\$(call inherit-product, device/samsung/a20/full_a20.mk)" >> device/samsung/a20/"$VENDOR"_a20.mk
|
||||
if test -f vendor/"$VENDOR"/config/common_full_phone.mk && echo "common_full_phone"; then
|
||||
echo "\$(call inherit-product, vendor/"$VENDOR"/config/common_full_phone.mk)" >> device/samsung/a20/"$VENDOR"_a20.mk
|
||||
elif test -f vendor/"$VENDOR"/config/common.mk && echo "common"; then
|
||||
echo "\$(call inherit-product, vendor/"$VENDOR"/config/common.mk)" >> device/samsung/a20/"$VENDOR"_a20.mk
|
||||
fi
|
||||
echo "PRODUCT_NAME := "$VENDOR"_a20" >> device/samsung/a20/"$VENDOR"_a20.mk
|
||||
echo "" >> device/samsung/a20/"$VENDOR"_a20.mk
|
||||
echo "# Additional Props" >> device/samsung/a20/"$VENDOR"_a20.mk
|
||||
echo "TARGET_FACE_UNLOCK_SUPPORTED := true" >> device/samsung/a20/"$VENDOR"_a20.mk
|
||||
echo "TARGET_BOOT_ANIMATION_RES := 720" >> device/samsung/a20/"$VENDOR"_a20.mk
|
||||
|
||||
19
a20e/setup.sh
Executable file
19
a20e/setup.sh
Executable file
|
|
@ -0,0 +1,19 @@
|
|||
VENDOR=$(cat device/samsung/universal7885-common/vendor_name)
|
||||
|
||||
# Generate AndroidProducts.mk
|
||||
echo "# Auto-Generated by device/samsung/a20e/setup.sh" > device/samsung/a20e/AndroidProducts.mk
|
||||
echo "PRODUCT_MAKEFILES += \$(LOCAL_DIR)/"$VENDOR"_a20e.mk" >> device/samsung/a20e/AndroidProducts.mk
|
||||
|
||||
# Generate <vendor>_a20e.mk
|
||||
echo "# Auto-Generated by device/samsung/a20e/setup.sh" > device/samsung/a20e/"$VENDOR"_a20e.mk
|
||||
echo "\$(call inherit-product, device/samsung/a20e/full_a20e.mk)" >> device/samsung/a20e/"$VENDOR"_a20e.mk
|
||||
if test -f vendor/"$VENDOR"/config/common_full_phone.mk && echo "common_full_phone"; then
|
||||
echo "\$(call inherit-product, vendor/"$VENDOR"/config/common_full_phone.mk)" >> device/samsung/a20e/"$VENDOR"_a20e.mk
|
||||
elif test -f vendor/"$VENDOR"/config/common.mk && echo "common"; then
|
||||
echo "\$(call inherit-product, vendor/"$VENDOR"/config/common.mk)" >> device/samsung/a20e/"$VENDOR"_a20e.mk
|
||||
fi
|
||||
echo "PRODUCT_NAME := "$VENDOR"_a20e" >> device/samsung/a20e/"$VENDOR"_a20e.mk
|
||||
echo "" >> device/samsung/a20e/"$VENDOR"_a20e.mk
|
||||
echo "# Additional Props" >> device/samsung/a20e/"$VENDOR"_a20e.mk
|
||||
echo "TARGET_FACE_UNLOCK_SUPPORTED := true" >> device/samsung/a20e/"$VENDOR"_a20e.mk
|
||||
echo "TARGET_BOOT_ANIMATION_RES := 720" >> device/samsung/a20e/"$VENDOR"_a20e.mk
|
||||
29
universal7885-common/vendor_detect/main.cpp
Normal file
29
universal7885-common/vendor_detect/main.cpp
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
#include <iostream>
|
||||
#include <fstream>
|
||||
#include <vector>
|
||||
#include <filesystem>
|
||||
using namespace std;
|
||||
std::vector<std::string> get_directories(const std::string& s)
|
||||
{
|
||||
std::vector<std::string> r;
|
||||
for(auto& p : std::filesystem::recursive_directory_iterator(s))
|
||||
if (p.is_directory())
|
||||
r.push_back(p.path().string());
|
||||
return r;
|
||||
}
|
||||
int main(){
|
||||
std::vector<std::string> vendors = get_directories("vendor");
|
||||
for (int i = 0; i < vendors.size(); i++){
|
||||
std::string name = vendors[i].substr(7, vendors[i].length());
|
||||
name = name.substr(0, name.find('/'));
|
||||
if (name != "qcom" && name != "nxp" && name != "samsung"
|
||||
&& name != "gapps" && name != "google" &&
|
||||
name != "gms" && name != "codeaurora"){
|
||||
ofstream output;
|
||||
output.open("device/samsung/universal7885-common/vendor_name");
|
||||
output << name;
|
||||
output.close();
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
19
setup.sh → universal7885-common/vendorsetup.sh
Executable file → Normal file
19
setup.sh → universal7885-common/vendorsetup.sh
Executable file → Normal file
|
|
@ -1,12 +1,21 @@
|
|||
cd ../..
|
||||
git clone git@github.com:eurekadevelopment/android_vendor_samsung_a20_r.git vendor/samsung -b master
|
||||
#git clone git@github.com:eurekadevelopment/android_device_samsung_a20_r.git device/samsung
|
||||
rm -rf hardware/samsung
|
||||
git clone git@github.com:eurekadevelopment/android_hardware_samsung.git hardware/samsung -b AOSP-11
|
||||
rm -rf hardware/custom
|
||||
git clone git@github.com:eurekadevelopment/Eureka-Kernel-Exynos7885-Q-R.git kernel/samsung/exynos7885 --depth=1 -b R7.5_rom
|
||||
git clone git@github.com:eurekadevelopment/Eureka-Kernel-Exynos7885-Q-R-S-private.git kernel/samsung/exynos7885 --depth=1 -b R8.0_rom
|
||||
git clone https://github.com/lineageos/android_hardware_samsung_nfc hardware/samsung/nfc
|
||||
git clone https://github.com/lineageos/android_hardware_samsung_slsi_libbt hardware/samsung_slsi/libbt
|
||||
git clone https://github.com/lineageos/android_hardware_samsung_slsi_scsc_wifibt_wifi_hal hardware/samsung_slsi/scsc_wifibt/wifi_hal
|
||||
git clone https://github.com/lineageos/android_hardware_samsung_slsi_scsc_wifibt_wpa_supplicant_lib hardware/samsung_slsi/scsc_wifibt/wpa_supplicant_lib
|
||||
git clone https://github.com/lineageos/android_device_samsung_slsi_sepolicy device/samsung_slsi/sepolicy
|
||||
git clone https://github.com/LineageOS/android_hardware_lineage_interfaces.git hardware/lineage/interfaces
|
||||
if ! test -f vendor_detect; then
|
||||
clang++ device/samsung/universal7885-common/vendor_detect/main.cpp -o vendor_detect -std=c++17
|
||||
fi
|
||||
if ! test -f device/samsung/universal7885-common/vendor_name; then
|
||||
touch device/samsung/universal7885-common/vendor_name
|
||||
fi
|
||||
./vendor_detect
|
||||
echo "Generating A20 Makefiles"
|
||||
./device/samsung/a20/setup.sh
|
||||
echo "Generating A20e Makefiles"
|
||||
./device/samsung/a20e/setup.sh
|
||||
|
||||
Loading…
Reference in a new issue