Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[question] 關於device tree 架構詢問 #8

Open
skysumbra opened this issue May 5, 2023 · 8 comments
Open

[question] 關於device tree 架構詢問 #8

skysumbra opened this issue May 5, 2023 · 8 comments

Comments

@skysumbra
Copy link

skysumbra commented May 5, 2023

你好,我嘗試用工具製作device tree 並編譯twrp branch (12.1),
其結果是完成的,卻沒有在out/ 下產生img,因此想於這來討論我缺少的項目,
可以的話將依序請教,謝謝

@skysumbra
Copy link
Author

skysumbra commented Jun 7, 2023

詢問你這邊的twrp_elish.mk

# 引用默认的编译配置文件,core_64_bit必须先于其他引用,否则不生效
$(call inherit-product, $(SRC_TARGET_DIR)/product/core_64_bit.mk)
$(call inherit-product, $(SRC_TARGET_DIR)/product/core_minimal.mk)

請問這邊是參考什麼的? 我在twrp 網頁上找不到要跟據什麼時機才能使用這些

有的是這樣使用

$(call inherit-product, $(SRC_TARGET_DIR)/product/core_64_bit.mk)
$(call inherit-product, $(SRC_TARGET_DIR)/product/aosp_base.mk)

@ymdzq
Copy link
Owner

ymdzq commented Jun 7, 2023

配置文件都在build/target/product/
有时间你可以自己研究内容,但是很多包twrp根本用不上,所以随便抄一个就行了

@skysumbra
Copy link
Author

配置文件都在build/target/product/ 有时间你可以自己研究内容,但是很多包twrp根本用不上,所以随便抄一个就行了

Got it

@skysumbra
Copy link
Author

skysumbra commented Jun 8, 2023

請問你的device.mk
其中類似這樣的

# Boot Control HAL
PRODUCT_PACKAGES += \
    [email protected] \
    bootctrl.kona.recovery

+= 右邊的那些項目也是twrpdtgen tool 產生的嗎? 我是twrpdtgen tool 產生相關的項目再修改
需要手動放入device tree folder ?
那是直接在手機系統找那些名稱就可以嗎?

@ymdzq
Copy link
Owner

ymdzq commented Jun 9, 2023

不是,这个东西是bootctrl的一部分,是需要编译生成的包,跟bootctrl一起抄,不需要从手机提取

@skysumbra
Copy link
Author

我放上個月產生的devcie tree ,使用twrpdtgen 工具並到處看編輯,結果來說並不能產生img。
應該缺少許多東西和錯誤的內容

@skysumbra
Copy link
Author

skysumbra commented Jun 9, 2023

twrp_panther.mk: 這邊應該是 /build/target/product/ 用的項目未確認,之後再嘗試

# Inherit from those products. Most specific first.
$(call inherit-product, $(SRC_TARGET_DIR)/product/core_64_bit.mk)
$(call inherit-product, $(SRC_TARGET_DIR)/product/full_base_telephony.mk)
$(call inherit-product, $(SRC_TARGET_DIR)/product/languages_full.mk)

至於網頁下面的內容,大概都是那樣的寫法,應該沒有錯

@skysumbra
Copy link
Author

skysumbra commented Jun 10, 2023

請問你這邊twrp.flags 內容是如何找出正確的內容?

我覺得它和recovery.fstab有些類似

我發現網路上看到的內容都比較多,但是練習時發現到內容沒有如網路上看到的多,是屬於手動新增的方式?

去by-name 下檢查會有以下項目,

abl_a   bl31_b   dram_train_a  frp          ldfw_b          pbl_a    tzsw_a           vbmeta_vendor_a
abl_b   blenv    dram_train_b  gsa_a        metadata        pbl_b    tzsw_b           vbmeta_vendor_b
bl1_a   boot_a   dtbo_a        gsa_b        mfg_data        persist  userdata         vendor_boot_a
bl1_b   boot_b   dtbo_b        init_boot_a  misc            pinfo    vbmeta_a         vendor_boot_b
bl2_a   devinfo  efs           init_boot_b  modem_a         pvmfw_a  vbmeta_b         vendor_kernel_boot_a
bl2_b   dpm_a    efs_backup    klog         modem_b         pvmfw_b  vbmeta_system_a  vendor_kernel_boot_b
bl31_a  dpm_b    fips          ldfw_a       modem_userdata  super    vbmeta_system_b

練習時 twrp.flags 有以下的內容

# mount point       fstype    device                                                                flags
/system             ext4      system                                                                flags=display="System";backup=1;logical;
/system_image       emmc      system                                                                flags=display="System image";backup=1;flashimg=1;logical;
/system_dlkm        ext4      system_dlkm                                                           flags=display="System_dlkm";logical;
/system_ext         ext4      system_ext                                                            flags=display="System_ext";backup=1;logical;
/system_ext_image   emmc      system_ext                                                            flags=display="System_ext image";backup=1;flashimg=1;logical;
/product            ext4      product                                                               flags=display="Product";backup=1;logical;
/product_image      emmc      product                                                               flags=display="Product image";backup=1;flashimg=1;logical;
/vendor             ext4      vendor                                                                flags=display="Vendor";backup=1;logical;
/vendor_image       emmc      vendor                                                                flags=display="Vendor image";backup=1;flashimg=1;logical;
/vendor_dlkm        ext4      vendor_dlkm                                                           flags=display="Vendor_dlkm";logical;
/boot               emmc      /dev/block/platform/14700000.ufs/by-name/boot                         flags=display="Boot";backup=1;flashimg=1;
/init_boot          emmc      /dev/block/platform/14700000.ufs/by-name/init_boot                    flags=display="Init_boot";
/misc               emmc      /dev/block/platform/14700000.ufs/by-name/misc                         flags=display="Misc";backup=1;flashimg=1;
/metadata           f2fs      /dev/block/platform/14700000.ufs/by-name/metadata                     flags=display="Metadata";
/data               f2fs      /dev/block/platform/14700000.ufs/by-name/userdata                     flags=display="Data";
/vbmeta             emmc      /dev/block/platform/14700000.ufs/by-name/vbmeta                       flags=display="Vbmeta";
/11210000.usb*      auto      vfat                                                                  flags=display="11210000.usb*";logical;

感覺有缺少,項目沒有很多,是需要手動補齊?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants