URL: https://linuxfr.org/forums/linux-embarque/posts/uboot-et-commande-tlv-eeprom Title: uboot et commande tlv eeprom Authors: doudootiana Date: 2022年12月30日T13:38:10+01:00 License: CC By-SA Tags: Score: 0 Bonjour à toutes et à tous. Pour un projet, j'utilise deux cartes de même marque mais modèle différent : clearfog base et la Clearfog pro. J'ai fait un fichier Fit en commun avec l'image kernel et les dtb pour chaque modèle. ``` /dts-v1/; / { description = "Kernel et dtb"; #address-cells = <1>; images { kernel { description = "Kernel"; data = /incbin/("/a/Image"); type = "kernel"; arch = "arm64"; os = "linux"; compression = "none"; load = <0x44000000>; entry = <0x44000000>; hash-1 { algo = "sha1"; }; }; fdt-pro { description = "dtb"; data = /incbin/("/a/diagbox_pro.dtb"); type = "flat_dt"; arch = "arm64"; load = <0x47000000>; compression = "none"; hash-1 { algo = "sha1"; }; }; fdt-base { description = "dtb"; data = /incbin/("/a/diagbox_base.dtb"); type = "flat_dt"; arch = "arm64"; load = <0x47000000>; compression = "none"; hash-1 { algo = "sha1"; }; }; }; configurations { default = "conf-pro"; conf-pro { description = "Configuration"; kernel = "kernel"; fdt = "fdt-pro"; hash-1 { algo = "sha1"; }; }; conf-base { description = "Configuration"; kernel = "kernel"; fdt = "fdt-base"; hash-1 { algo = "sha1"; }; }; }; }; ``` Mon but serait qu'à partir d'U-boot, la sélection du profil se fasse automatiquement. Dans U-boot, j'ai une commande qui me permet d'afficher les infos de la carte stockée dans un eeprom : ```> DiagBox>> tlv_eeprom TLV: 0 TlvInfo Header: Id String: TlvInfo Version: 1 Total Length: 12 TLV Name Code Len Value -------------------- ---- --- ----- Product Name 0x21 4 CFCP CRC-32 0xFE 4 0x8455DBA5 Checksum is valid. DiagBox>> TLV: 0 TlvInfo Header: Id String: TlvInfo Version: 1 Total Length: 12 TLV Name Code Len Value -------------------- ---- --- ----- Product Name 0x21 4 CFCP CRC-32 0xFE 4 0x8455DBA5 Checksum is valid. DiagBox>> tlv help tlv_eeprom - Display and program the system EEPROM data block. Usage: tlv_eeprom [read|write|set |erase|list] tlv_eeprom - With no arguments display the current contents. tlv_eeprom dev [dev] - List devices or set current EEPROM device. tlv_eeprom read - Load EEPROM data from device to memory. tlv_eeprom write - Write the EEPROM data to persistent storage. tlv_eeprom set - Set a field to a value. - If no string_value, field is deleted. - Use 'tlv_eeprom write' to make changes permanent. tlv_eeprom erase - Reset the in memory EEPROM data. - Use 'tlv_eeprom read' to refresh the in memory EEPROM data. - Use 'tlv_eeprom write' to make changes permanent. tlv_eeprom list - List the understood TLV codes and names. DiagBox>> ``` Est il possible de ne sélectionner que la ligne 'Product Name', afin d'avoir le modèle de la carte et pouvoir utiliser la bonne configuration du FIT? En vous remerciant par avance :)

AltStyle によって変換されたページ (->オリジナル) /