20220314在MT6739的android8.1下打开gpio节点

2023-05-16

20220314在MT6739的android8.1下打开gpio节点
2022/3/14 10:16


1、完整编译MT6739的android8.1的SDK:
rootroot@rootroot-desktop:~$ 
rootroot@rootroot-desktop:~$ cd mt6739_android8.1/
rootroot@rootroot-desktop:~/mt6739_android8.1$ 
rootroot@rootroot-desktop:~/mt6739_android8.1$ ll
total 304
drwxrwxr-x  36 rootroot rootroot   4096  3月 21 15:51 ./
drwxr-xr-x  22 rootroot rootroot   4096  3月 22 10:17 ../
lrwxrwxrwx   1 rootroot rootroot     19  3月  7  2018 Android.bp -> build/soong/root.bp*
drwxrwxr-x  22 rootroot rootroot   4096  3月  7  2018 art/
drwxrwxr-x  11 rootroot rootroot   4096  3月  7  2018 bionic/
drwxrwxr-x   3 rootroot rootroot   4096  3月  7  2018 bootable/
lrwxrwxrwx   1 rootroot rootroot     26  3月  7  2018 bootstrap.bash -> build/soong/bootstrap.bash*
drwxr-xr-x   6 rootroot rootroot   4096  3月  9 18:15 build/
drwxrwxr-x   8 rootroot rootroot   4096  3月  7  2018 ccu_tool/
drwxrwxr-x   3 rootroot rootroot   4096  3月  7  2018 compatibility/
drwxrwxr-x  11 rootroot rootroot   4096  3月  7  2018 cts/
drwxrwxr-x   9 rootroot rootroot   4096  3月  7  2018 dalvik/
drwxrwxr-x   5 rootroot rootroot   4096  3月  7  2018 developers/
drwxrwxr-x  20 rootroot rootroot   4096  3月  7  2018 development/
drwxr-xr-x  12 rootroot rootroot   4096  3月  9 15:45 device/
drwxrwxr-x   3 rootroot rootroot   4096  3月  7  2018 docs/
drwxrwxr-x 267 rootroot rootroot  12288  3月  7  2018 external/
drwxr-xr-x  18 rootroot rootroot   4096  3月  9 15:45 frameworks/
drwxrwxr-x  13 rootroot rootroot   4096  3月  7  2018 hardware/
drwxrwxr-x   3 rootroot rootroot   4096  3月  7  2018 kernel/
drwxrwxr-x  24 rootroot rootroot   4096  3月  7  2018 kernel-3.18/
drwxr-xr-x  25 rootroot rootroot   4096  3月  9 15:46 kernel-4.4/
drwxrwxr-x   3 rootroot rootroot   4096  3月  7  2018 kernel_modules-4.4/
drwxrwxr-x  18 rootroot rootroot   4096  3月  7  2018 libcore/
drwxrwxr-x   7 rootroot rootroot   4096  3月  7  2018 libnativehelper/
-rw-rw-r--   1 rootroot rootroot     87  3月  7  2018 Makefile
-rwxr--r--   1 rootroot rootroot 150841  3月 10 10:10 mt6739_8p1_启动+新LCD+VT-tty1_20220310_1010.tar.gz*
drwxrwxr-x   7 rootroot rootroot   4096  3月 21 18:58 out/
drwxrwxr-x   9 rootroot rootroot   4096  3月  7  2018 packages/
drwxrwxr-x   2 rootroot rootroot   4096  3月 23  2018 PatchLog/
drwxrwxr-x   5 rootroot rootroot   4096  3月  7  2018 pdk/
drwxrwxr-x   8 rootroot rootroot   4096  3月  7  2018 platform_testing/
drwxrwxr-x  22 rootroot rootroot   4096  3月  7  2018 prebuilts/
drwxrwxr-x  24 rootroot rootroot   4096  3月  7  2018 sdk/
drwxrwxr-x  28 rootroot rootroot   4096  3月  7  2018 system/
drwxrwxr-x   4 rootroot rootroot   4096  3月  7  2018 test/
drwxrwxr-x   3 rootroot rootroot   4096  3月  7  2018 toolchain/
drwxrwxr-x   8 rootroot rootroot   4096  3月  7  2018 tools/
drwxrwxr-x   8 rootroot rootroot   4096  3月  7  2018 trusty/
drwxr-xr-x   3 rootroot rootroot   4096  3月  7 14:30 vendor/
rootroot@rootroot-desktop:~/mt6739_android8.1$ 
rootroot@rootroot-desktop:~/mt6739_android8.1$ 
rootroot@rootroot-desktop:~/mt6739_android8.1$ source build/envsetup.sh 
including device/asus/fugu/vendorsetup.sh
including device/generic/car/vendorsetup.sh
including device/generic/mini-emulator-arm64/vendorsetup.sh
including device/generic/mini-emulator-armv7-a-neon/vendorsetup.sh
including device/generic/mini-emulator-mips64/vendorsetup.sh
including device/generic/mini-emulator-mips/vendorsetup.sh
including device/generic/mini-emulator-x86_64/vendorsetup.sh
including device/generic/mini-emulator-x86/vendorsetup.sh
including device/generic/uml/vendorsetup.sh
including device/google/dragon/vendorsetup.sh
including device/google/marlin/vendorsetup.sh
including device/google/muskie/vendorsetup.sh
including device/google/taimen/vendorsetup.sh
including device/huawei/angler/vendorsetup.sh
including device/lge/bullhead/vendorsetup.sh
including device/linaro/hikey/vendorsetup.sh
including device/mediatek/build/vendorsetup.sh
including device/mediateksample/k39tv1_64_bsp/vendorsetup.sh
including device/mediateksample/k39tv1_bsp_1g/vendorsetup.sh
including device/mediateksample/k39tv1_bsp_512/vendorsetup.sh
including device/mediateksample/k39tv1_bsp/vendorsetup.sh
including sdk/bash_completion/adb.bash
rootroot@rootroot-desktop:~/mt6739_android8.1$ 
rootroot@rootroot-desktop:~/mt6739_android8.1$ 
rootroot@rootroot-desktop:~/mt6739_android8.1$ lunch

You're building on Linux

Lunch menu... pick a combo:
     1. aosp_arm-eng
     2. aosp_arm64-eng
     3. aosp_mips-eng
     4. aosp_mips64-eng
     5. aosp_x86-eng
     6. aosp_x86_64-eng
     7. full_fugu-userdebug
     8. aosp_fugu-userdebug
     9. aosp_car_emu_arm-userdebug
     10. aosp_car_emu_arm64-userdebug
     11. aosp_car_emu_x86-userdebug
     12. aosp_car_emu_x86_64-userdebug
     13. mini_emulator_arm64-userdebug
     14. m_e_arm-userdebug
     15. m_e_mips64-eng
     16. m_e_mips-userdebug
     17. mini_emulator_x86_64-userdebug
     18. mini_emulator_x86-userdebug
     19. uml-userdebug
     20. aosp_dragon-userdebug
     21. aosp_dragon-eng
     22. aosp_marlin-userdebug
     23. aosp_marlin_svelte-userdebug
     24. aosp_sailfish-userdebug
     25. aosp_walleye-userdebug
     26. aosp_walleye_test-userdebug
     27. aosp_taimen-userdebug
     28. aosp_angler-userdebug
     29. aosp_bullhead-userdebug
     30. aosp_bullhead_svelte-userdebug
     31. hikey-userdebug
     32. hikey960-userdebug
     33. full_k39tv1_64_bsp-eng
     34. full_k39tv1_64_bsp-user
     35. full_k39tv1_64_bsp-userdebug
     36. full_k39tv1_bsp_1g-eng
     37. full_k39tv1_bsp_1g-user
     38. full_k39tv1_bsp_1g-userdebug
     39. full_k39tv1_bsp_512-eng
     40. full_k39tv1_bsp_512-user
     41. full_k39tv1_bsp_512-userdebug
     42. full_k39tv1_bsp-eng
     43. full_k39tv1_bsp-user
     44. full_k39tv1_bsp-userdebug

Which would you like? [aosp_arm-eng] 36

============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=8.1.0
TARGET_PRODUCT=full_k39tv1_bsp_1g
TARGET_BUILD_VARIANT=eng
TARGET_BUILD_TYPE=release
TARGET_PLATFORM_VERSION=OPM1
TARGET_BUILD_APPS=
TARGET_ARCH=arm
TARGET_ARCH_VARIANT=armv7-a-neon
TARGET_CPU_VARIANT=cortex-a53
TARGET_2ND_ARCH=
TARGET_2ND_ARCH_VARIANT=
TARGET_2ND_CPU_VARIANT=cortex-a53
HOST_ARCH=x86_64
HOST_2ND_ARCH=x86
HOST_OS=linux
HOST_OS_EXTRA=Linux-4.4.0-142-generic-x86_64-with-Ubuntu-14.04-trusty
HOST_CROSS_OS=windows
HOST_CROSS_ARCH=x86
HOST_CROSS_2ND_ARCH=x86_64
HOST_BUILD_TYPE=release
BUILD_ID=O11019
OUT_DIR=out
AUX_OS_VARIANT_LIST=
============================================
rootroot@rootroot-desktop:~/mt6739_android8.1$ 
rootroot@rootroot-desktop:~/mt6739_android8.1$ 
rootroot@rootroot-desktop:~/mt6739_android8.1$ make -j16


2、查找.config(内核配置文件)内核配置文件
rootroot@rootroot-desktop:~/mt6739_android8.1$ find . -name .config
./external/toybox/.config
./out/target/product/k39tv1_bsp_1g/obj/KERNEL_OBJ/.config
rootroot@rootroot-desktop:~/mt6739_android8.1$ 
rootroot@rootroot-desktop:~/mt6739_android8.1$ 
rootroot@rootroot-desktop:~/mt6739_android8.1$ cd ./out/target/product/k39tv1_bsp_1g/obj/KERNEL_OBJ/
rootroot@rootroot-desktop:~/mt6739_android8.1/out/target/product/k39tv1_bsp_1g/obj/KERNEL_OBJ$ ll
total 1069164
drwxrwxr-x 22 rootroot rootroot      4096  3月 21 18:59 ./
drwxrwxr-x 23 rootroot rootroot      4096  3月 21 17:14 ../
drwxrwxr-x  3 rootroot rootroot      4096  3月 21 15:54 arch/
-rw-rw-r--  1 rootroot rootroot    115467  3月 21 18:56 bak10.conifig
drwxrwxr-x  3 rootroot rootroot      4096  3月 21 15:56 block/
drwxrwxr-x  2 rootroot rootroot      4096  3月 21 15:55 certs/
-rw-rw-r--  1 rootroot rootroot    115445  3月 21 18:57 .config
-rw-rw-r--  1 rootroot rootroot    115467  3月 21 15:54 .config.old
drwxrwxr-x  2 rootroot rootroot      4096  3月 21 15:56 crypto/
drwxrwxr-x 56 rootroot rootroot      4096  3月 21 18:59 drivers/
drwxrwxr-x 36 rootroot rootroot      4096  3月 21 16:04 firmware/
drwxrwxr-x 23 rootroot rootroot      4096  3月 21 15:58 fs/
drwxrwxr-x  4 rootroot rootroot      4096  3月 21 15:55 include/
drwxrwxr-x  2 rootroot rootroot      4096  3月 21 18:59 init/
drwxrwxr-x  2 rootroot rootroot      4096  3月 21 15:55 ipc/
drwxrwxr-x 14 rootroot rootroot      4096  3月 21 18:59 kernel/
drwxrwxr-x 10 rootroot rootroot     12288  3月 21 16:02 lib/
-rw-rw-r--  1 rootroot rootroot       646  3月 21 18:59 Makefile
-rw-rw-r--  1 rootroot rootroot       715  3月 21 18:59 .missing-syscalls.d
drwxrwxr-x  2 rootroot rootroot      4096  3月 21 15:57 mm/
-rw-rw-r--  1 rootroot rootroot     18439  3月 21 18:59 modules.builtin
-rw-rw-r--  1 rootroot rootroot         0  3月 21 18:59 modules.order
-rw-rw-r--  1 rootroot rootroot    473427  3月 21 18:59 Module.symvers
drwxrwxr-x 18 rootroot rootroot      4096  3月 21 16:02 net/
drwxrwxr-x  8 rootroot rootroot      4096  3月 21 15:55 scripts/
drwxrwxr-x  5 rootroot rootroot      4096  3月 21 15:56 security/
drwxrwxr-x 22 rootroot rootroot      4096  3月 21 18:59 sound/
lrwxrwxrwx  1 rootroot rootroot        43  3月 21 18:59 source -> /home/rootroot/mt6739_android8.1/kernel-4.4/
-rw-rw-r--  1 rootroot rootroot   5203992  3月 21 18:59 System.map
-rw-rw-r--  1 rootroot rootroot   3729684  3月 21 18:59 .tmp_kallsyms1.o
-rw-rw-r--  1 rootroot rootroot   3729684  3月 21 18:59 .tmp_kallsyms2.o
-rw-rw-r--  1 rootroot rootroot   5203992  3月 21 18:59 .tmp_System.map
drwxrwxr-x  2 rootroot rootroot      4096  3月 21 15:55 .tmp_versions/
-rwxrwxr-x  1 rootroot rootroot 216834308  3月 21 18:59 .tmp_vmlinux1*
-rwxrwxr-x  1 rootroot rootroot 219259396  3月 21 18:59 .tmp_vmlinux2*
drwxrwxr-x  2 rootroot rootroot      4096  3月 21 15:55 usr/
-rw-rw-r--  1 rootroot rootroot         2  3月 21 18:59 .version
drwxrwxr-x  3 rootroot rootroot      4096  3月 21 16:02 virt/
-rwxrwxr-x  1 rootroot rootroot 219259396  3月 21 18:59 vmlinux*
-rw-rw-r--  1 rootroot rootroot       235  3月 21 18:59 .vmlinux.cmd
-rw-rw-r--  1 rootroot rootroot 421234364  3月 21 18:59 vmlinux.o
rootroot@rootroot-desktop:~/mt6739_android8.1/out/target/product/k39tv1_bsp_1g/obj/KERNEL_OBJ$ 
rootroot@rootroot-desktop:~/mt6739_android8.1/out/target/product/k39tv1_bsp_1g/obj/KERNEL_OBJ$ cp .config bak11.config
rootroot@rootroot-desktop:~/mt6739_android8.1/out/target/product/k39tv1_bsp_1g/obj/KERNEL_OBJ$ 
rootroot@rootroot-desktop:~/mt6739_android8.1/out/target/product/k39tv1_bsp_1g/obj/KERNEL_OBJ$ 

 

 

 

 

 

 

 

 


3、配置gpio这个设备节点:
rootroot@rootroot-desktop:~/mt6739_android8.1/out/target/product/k39tv1_bsp_1g/obj/KERNEL_OBJ$ 
rootroot@rootroot-desktop:~/mt6739_android8.1/out/target/product/k39tv1_bsp_1g/obj/KERNEL_OBJ$ make ARCH=arm menuconfig
  GEN     ./Makefile
scripts/kconfig/mconf  Kconfig
warning: (MACH_MT6771 && PINCTRL_MT6739 && PINCTRL_MT6775) selects MTK_EINT_MULTI_TRIGGER_DESIGN which has unmet direct dependencies (PINCTRL && PINCTRL_MTK)


*** End of the configuration.
*** Execute 'make' to start the build or try 'make help'.


#### build completed successfully (01:38 (mm:ss)) ####

rootroot@rootroot-desktop:~/mt6739_android8.1/out/target/product/k39tv1_bsp_1g/obj/KERNEL_OBJ$ 
rootroot@rootroot-desktop:~/mt6739_android8.1/out/target/product/k39tv1_bsp_1g/obj/KERNEL_OBJ$ 


Device Drivers  --->
    -*- GPIO Support  --->

        --- GPIO Support
        [ ]   Debug GPIO calls
        [ ]   /sys/class/gpio/... (sysfs interface)


        修改为:

        --- GPIO Support
        [*]   Debug GPIO calls
        [*]   /sys/class/gpio/... (sysfs interface)

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 


4、编译内核:
rootroot@rootroot-desktop:~/mt6739_android8.1$ 
rootroot@rootroot-desktop:~/mt6739_android8.1$ make bootimage
rootroot@rootroot-desktop:~/mt6739_android8.1$ 
rootroot@rootroot-desktop:~/mt6739_android8.1$ cd out/target/product/k39tv1_bsp_1g/
rootroot@rootroot-desktop:~/mt6739_android8.1/out/target/product/k39tv1_bsp_1g$ 
rootroot@rootroot-desktop:~/mt6739_android8.1/out/target/product/k39tv1_bsp_1g$ 
rootroot@rootroot-desktop:~/mt6739_android8.1/out/target/product/k39tv1_bsp_1g$ ll
total 1004224
drwxrwxr-x 14 rootroot rootroot      4096  3月 21 18:59 ./
drwxrwxr-x  3 rootroot rootroot      4096  3月 21 15:51 ../
-rw-rw-r--  1 rootroot rootroot        20  3月 21 15:54 android-info.txt
-rw-rw-r--  1 rootroot rootroot    543736  3月 21 15:53 appsboot.mbn
-rw-rw-r--  1 rootroot rootroot    543696  3月 21 15:53 appsboot.raw
-rwxrw-r--  1 rootroot rootroot  10078208  3月 21 17:12 boot10.img*
-rw-rw-r--  1 rootroot rootroot  10078208  3月 21 18:55 boot15.img
-rw-rw-r--  1 rootroot rootroot  10080256  3月 21 18:59 boot.img
-rw-rw-r--  1 rootroot rootroot        76  3月 21 18:58 build_fingerprint.txt
drwxrwxr-x  2 rootroot rootroot      4096  3月 21 16:53 cache/
-rw-r--r--  1 rootroot rootroot   6086804  3月 21 16:53 cache.img
-rw-rw-r--  1 rootroot rootroot     96698  3月 21 15:51 clean_steps.mk
drwxrwxr-x  7 rootroot rootroot      4096  3月 21 17:09 data/
drwxrwxr-x  3 rootroot rootroot      4096  3月 21 16:09 dex_bootjars/
drwxrwxr-x  2 rootroot rootroot      4096  3月 21 17:12 fake_packages/
drwxrwxr-x  6 rootroot rootroot      4096  3月 21 16:14 gen/
-rw-rw-r--  1 rootroot rootroot    279128  3月 21 17:14 installed-files.json
-rw-rw-r--  1 rootroot rootroot     85182  3月 21 17:14 installed-files.txt
-rw-rw-r--  1 rootroot rootroot    137466  3月 21 17:14 installed-files-vendor.json
-rw-rw-r--  1 rootroot rootroot     43017  3月 21 17:14 installed-files-vendor.txt
-rw-rw-r--  1 rootroot rootroot   9035186  3月 21 18:59 kernel
-rw-rw-r--  1 rootroot rootroot    543696  3月 21 15:53 lk.img
-rw-rw-r--  1 rootroot rootroot     45168  3月 21 15:53 loader_ext.img
-rw-rw-r--  1 rootroot rootroot   1267376  3月 21 15:53 logo.bin
-rw-rw-r--  1 rootroot rootroot      3440  3月 21 15:54 mcupmfw.img
-rw-rw-r--  1 rootroot rootroot       528  3月 21 15:54 md1arm7.img
-rw-rw-r--  1 rootroot rootroot       528  3月 21 15:54 md1dsp.img
-rw-rw-r--  1 rootroot rootroot       528  3月 21 15:54 md1img.img
-rw-rw-r--  1 rootroot rootroot       528  3月 21 15:54 md3img.img
-rw-rw-r--  1 rootroot rootroot   2535989  3月 21 15:53 module-info.json
-rw-rw-r--  1 rootroot rootroot     14988  3月 21 15:52 MT6739_Android_scatter.txt
drwxrwxr-x 23 rootroot rootroot      4096  3月 21 17:14 obj/
-rw-rw-r--  1 rootroot rootroot     31776  3月 21 16:04 odmdtbo.img
-rw-rw-r--  1 rootroot rootroot       624  3月 21 15:52 ota_scatter.txt
-rw-rw-r--  1 rootroot rootroot     16896  3月 21 15:52 PGPT
-rw-rw-r--  1 rootroot rootroot    117480  3月 21 15:53 preloader.bin
-rw-rw-r--  1 rootroot rootroot    119528  3月 21 15:53 preloader.img
-rw-rw-r--  1 rootroot rootroot    117480  3月 21 15:53 preloader_k39tv1_bsp_1g.bin
-rw-rw-r--  1 rootroot rootroot        48  3月 21 15:52 previous_build_config.mk
-rw-rw-r--  1 rootroot rootroot   1041509  3月 21 18:59 ramdisk.img
-rw-rw-r--  1 rootroot rootroot   5419173  3月 21 17:12 ramdisk-recovery.img
drwxrwxr-x  3 rootroot rootroot      4096  3月 21 15:54 recovery/
-rw-rw-r--  1 rootroot rootroot        67  3月 21 17:12 recovery.id
-rw-rw-r--  1 rootroot rootroot  14456832  3月 21 17:12 recovery.img
drwxrwxr-x 17 rootroot rootroot      4096  3月 21 17:12 root/
-rw-rw-r--  1 rootroot rootroot    135168  3月 21 15:52 secro.img
-rw-rw-r--  1 rootroot rootroot     24752  3月 21 15:54 spmfw.img
drwxrwxr-x  8 rootroot rootroot      4096  3月 21 17:08 symbols/
drwxrwxr-x 15 rootroot rootroot      4096  3月 21 17:14 system/
-rw-r--r--  1 rootroot rootroot 733369444  3月 21 17:14 system.img
-rw-rw-r--  1 rootroot rootroot    108032  3月 21 16:00 tee.img
drwxrwxr-x  4 rootroot rootroot      4096  3月 21 16:00 trustzone/
-rw-r--r--  1 rootroot rootroot     57624  3月 21 17:13 userdata.img
drwxrwxr-x 16 rootroot rootroot      4096  3月 21 16:54 vendor/
-rw-r--r--  1 rootroot rootroot 221644092  3月 21 17:14 vendor.img
rootroot@rootroot-desktop:~/mt6739_android8.1/out/target/product/k39tv1_bsp_1g$ 
rootroot@rootroot-desktop:~/mt6739_android8.1/out/target/product/k39tv1_bsp_1g$ 
rootroot@rootroot-desktop:~/mt6739_android8.1/out/target/product/k39tv1_bsp_1g$ diff boot.img boot10.img 
Binary files boot.img and boot10.img differ
rootroot@rootroot-desktop:~/mt6739_android8.1/out/target/product/k39tv1_bsp_1g$ 
rootroot@rootroot-desktop:~/mt6739_android8.1/out/target/product/k39tv1_bsp_1g$ 

 

 

 

 

 

 


5、刷机之后可以看到在这里配置GPIO端口无效!:


k39tv1_bsp_1g:/ # 
k39tv1_bsp_1g:/ # 
k39tv1_bsp_1g:/ #   
k39tv1_bsp_1g:/ # 
k39tv1_bsp_1g:/ # ls -l
total 1208
dr-xr-xr-x   3 root   root         0 2022-03-22 10:13 acct
lrwxrwxrwx   1 root   root        50 1970-01-01 08:00 bugreports -> /data/user_de/0/com.android.shell/files/bugreports
drwxrwx---   6 system cache     4096 2022-03-22 10:14 cache
lrwxrwxrwx   1 root   root        13 1970-01-01 08:00 charger -> /sbin/charger
drwxr-xr-x   4 root   root         0 1970-01-01 08:00 config
drwxr-xr-x   2 root   root         0 2022-03-22 10:14 custom
lrwxrwxrwx   1 root   root        17 1970-01-01 08:00 d -> /sys/kernel/debug
drwxrwx--x  55 system system    4096 2022-03-22 10:14 data
lrwxrwxrwx   1 root   root        23 1970-01-01 08:00 default.prop -> system/etc/prop.default
drwxr-xr-x  18 root   root      3660 2022-03-22 10:14 dev
lrwxrwxrwx   1 root   root        11 1970-01-01 08:00 etc -> /system/etc
-rw-r-----   1 root   root        61 1970-01-01 08:00 fstab.enableswap
-rwxr-x---   1 root   root   1140080 1970-01-01 08:00 init
-rwxr-x---   1 root   root      1344 1970-01-01 08:00 init.environ.rc
-rwxr-x---   1 root   root        62 1970-01-01 08:00 init.preload.rc
-rwxr-x---   1 root   root     28403 1970-01-01 08:00 init.rc
-rwxr-x---   1 root   root      7874 1970-01-01 08:00 init.usb.configfs.rc
-rwxr-x---   1 root   root      5721 1970-01-01 08:00 init.usb.rc
-rwxr-x---   1 root   root       497 1970-01-01 08:00 init.zygote32.rc
drwxr-xr-x   3 root   root         0 1970-01-01 08:00 lib
drwxr-xr-x  11 root   system     240 2022-03-22 10:14 mnt
drwxr-xr-x   2 root   root         0 1970-01-01 08:00 oem
dr-xr-xr-x 347 root   root         0 1970-01-01 08:00 proc
drwx------   2 root   root         0 2022-03-10 11:07 root
drwxr-x---   2 root   root         0 1970-01-01 08:00 sbin
lrwxrwxrwx   1 root   root        21 1970-01-01 08:00 sdcard -> /storage/self/primary
drwxr-xr-x   3 root   root        80 2022-03-22 10:14 storage
dr-xr-xr-x  15 root   root         0 2022-03-22 10:13 sys
drwxr-xr-x  16 root   root      4096 1970-01-01 08:00 system
-rw-r--r--   1 root   root      5222 1970-01-01 08:00 ueventd.rc
drwxr-xr-x  17 root   root      4096 1970-01-01 08:00 vendor
k39tv1_bsp_1g:/ # 
k39tv1_bsp_1g:/ # cd /sys/
k39tv1_bsp_1g:/sys # 
k39tv1_bsp_1g:/sys # ls -l
total 0
drwxr-xr-x   2 root root 0 2022-03-22 10:13 block
drwxr-xr-x   2 root root 0 2022-03-22 10:13 bootinfo
drwxr-xr-x  20 root root 0 2022-03-22 10:13 bus
drwxr-xr-x  73 root root 0 2022-03-22 10:13 class
drwxr-xr-x   4 root root 0 2022-03-22 10:13 dev
drwxr-xr-x   9 root root 0 2022-03-22 10:13 devices
drwxr-xr-x   3 root root 0 2022-03-22 10:13 firmware
drwxr-xr-x   8 root root 0 2022-03-22 10:13 fs
drwxr-xr-x  10 root root 0 2022-03-22 10:13 kernel
drwxr-xr-x 128 root root 0 2022-03-22 10:13 module
drwxr-xr-x   2 root root 0 2022-03-22 10:13 mtk_rgu
drwxr-xr-x   2 root root 0 2022-03-22 10:13 mtuart
drwxr-xr-x   5 root root 0 2022-03-22 10:13 power
k39tv1_bsp_1g:/sys # 
k39tv1_bsp_1g:/sys # cd class/                                                 
k39tv1_bsp_1g:/sys/class # 
k39tv1_bsp_1g:/sys/class # ls -l
total 0
drwxr-xr-x 2 root root 0 2022-03-22 10:13 BOOT
drwxr-xr-x 2 root root 0 2022-03-22 10:13 CAM_CALdrv1
drwxr-xr-x 2 root root 0 2022-03-22 10:13 MTK_SMI
drwxr-xr-x 2 root root 0 2022-03-22 10:13 MT_pmic_adc_cali
drwxr-xr-x 2 root root 0 2022-03-22 10:13 Vcodec
drwxr-xr-x 2 root root 0 2022-03-22 10:13 accdet
drwxr-xr-x 2 root root 0 2022-03-22 10:13 actuatordrv_main_af
drwxr-xr-x 2 root root 0 2022-03-22 10:13 android_usb
drwxr-xr-x 2 root root 0 2022-03-22 10:13 bdi
drwxr-xr-x 2 root root 0 2022-03-22 10:13 block
drwxr-xr-x 2 root root 0 2022-03-22 10:13 btif
drwxr-xr-x 2 root root 0 2022-03-22 10:13 ccci_md_sta
drwxr-xr-x 2 root root 0 2022-03-22 10:13 ccci_node
drwxr-xr-x 2 root root 0 2022-03-22 10:13 charger_ftm
drwxr-xr-x 2 root root 0 2022-03-22 10:13 devmap
drwxr-xr-x 2 root root 0 2022-03-22 10:13 drm
drwxr-xr-x 2 root root 0 2022-03-22 10:13 firmware
drwxr-xr-x 2 root root 0 2022-03-22 10:13 flashlight_core
drwxr-xr-x 2 root root 0 2022-03-22 10:14 fm
drwxr-xr-x 2 root root 0 2022-03-22 10:13 gauge
drwxr-xr-x 2 root root 0 2022-03-22 10:13 gpio
drwxr-xr-x 2 root root 0 2022-03-22 10:13 graphics
drwxr-xr-x 2 root root 0 2022-03-22 10:14 hidg
drwxr-xr-x 2 root root 0 2022-03-22 10:13 hidraw
drwxr-xr-x 2 root root 0 2022-03-22 10:13 i2c-adapter
drwxr-xr-x 2 root root 0 2022-03-22 10:13 ieee80211
drwxr-xr-x 2 root root 0 2022-03-22 10:13 input
drwxr-xr-x 2 root root 0 2022-03-22 10:13 ispdrv
drwxr-xr-x 2 root root 0 2022-03-22 10:13 leds
drwxr-xr-x 2 root root 0 2022-03-22 10:13 mem
drwxr-xr-x 2 root root 0 2022-03-22 10:13 misc
drwxr-xr-x 2 root root 0 2022-03-22 10:13 mmc_host
drwxr-xr-x 2 root root 0 2022-03-22 10:13 mtk-adc-cali
drwxr-xr-x 2 root root 0 2022-03-22 10:13 mtk_cmdq
drwxr-xr-x 2 root root 0 2022-03-22 10:13 mtk_dfrc
drwxr-xr-x 2 root root 0 2022-03-22 10:13 mtk_disp_mgr
drwxr-xr-x 2 root root 0 2022-03-22 10:13 net
drwxr-xr-x 2 root root 0 2022-03-22 10:13 pmic_ftm
drwxr-xr-x 2 root root 0 2022-03-22 10:13 pmsg
drwxr-xr-x 2 root root 0 2022-03-22 10:13 power_supply
drwxr-xr-x 2 root root 0 2022-03-22 10:13 ppp
drwxr-xr-x 2 root root 0 2022-03-22 10:13 regulator
drwxr-xr-x 2 root root 0 2022-03-22 10:13 rpmb
drwxr-xr-x 2 root root 0 2022-03-22 10:13 rpmb_dummy
drwxr-xr-x 2 root root 0 2022-03-22 10:13 rtc
drwxr-xr-x 2 root root 0 2022-03-22 10:13 scheddrv
drwxr-xr-x 2 root root 0 2022-03-22 10:13 scsi_device
drwxr-xr-x 2 root root 0 2022-03-22 10:13 scsi_disk
drwxr-xr-x 2 root root 0 2022-03-22 10:13 scsi_host
drwxr-xr-x 2 root root 0 2022-03-22 10:13 sec
drwxr-xr-x 2 root root 0 2022-03-22 10:13 sensor
drwxr-xr-x 2 root root 0 2022-03-22 10:13 sensordrv
drwxr-xr-x 2 root root 0 2022-03-22 10:13 sound
drwxr-xr-x 2 root root 0 2022-03-22 10:13 spi_master
drwxr-xr-x 2 root root 0 2022-03-22 10:14 stpbt
drwxr-xr-x 2 root root 0 2022-03-22 10:14 stpgps
drwxr-xr-x 2 root root 0 2022-03-22 10:14 stpwmt
drwxr-xr-x 2 root root 0 2022-03-22 10:13 switch
drwxr-xr-x 2 root root 0 2022-03-22 10:13 switching_charger
drwxr-xr-x 2 root root 0 2022-03-22 10:13 thermal
drwxr-xr-x 2 root root 0 2022-03-22 10:13 timed_output
drwxr-xr-x 2 root root 0 2022-03-22 10:13 tty
drwxr-xr-x 2 root root 0 2022-03-22 10:13 udc
drwxr-xr-x 2 root root 0 2022-03-22 10:13 usb_boost
drwxr-xr-x 2 root root 0 2022-03-22 10:13 usb_rawbulk
drwxr-xr-x 2 root root 0 2022-03-22 10:13 vc
drwxr-xr-x 2 root root 0 2022-03-22 10:13 vtconsole
drwxr-xr-x 2 root root 0 2022-03-22 10:14 wmtWifi
drwxr-xr-x 2 root root 0 2022-03-22 10:14 wmtdetect
drwxr-xr-x 2 root root 0 2022-03-22 10:13 xt_idletimer
drwxr-xr-x 2 root root 0 2022-03-22 10:13 zram-control
k39tv1_bsp_1g:/sys/class # 
k39tv1_bsp_1g:/sys/class # 
k39tv1_bsp_1g:/sys/class # cd gpio/                                            
k39tv1_bsp_1g:/sys/class/gpio # 
k39tv1_bsp_1g:/sys/class/gpio # ls -l
total 0
--w------- 1 root root 4096 2022-03-22 10:16 export
lrwxrwxrwx 1 root root    0 2022-03-22 10:16 gpiochip343 -> ../../devices/platform/1000b000.pinctrl/gpio/gpiochip343
--w------- 1 root root 4096 2022-03-22 10:16 unexport
k39tv1_bsp_1g:/sys/class/gpio # 
k39tv1_bsp_1g:/sys/class/gpio # 
k39tv1_bsp_1g:/sys/class/gpio # 
k39tv1_bsp_1g:/sys/class/gpio # 
k39tv1_bsp_1g:/sys/class/gpio # 
k39tv1_bsp_1g:/sys/class/gpio # 
k39tv1_bsp_1g:/sys/class/gpio # 
k39tv1_bsp_1g:/sys/class/gpio # echo 12 > export
1|k39tv1_bsp_1g:/sys/class/gpio # 
1|k39tv1_bsp_1g:/sys/class/gpio # ls -l
total 0
--w------- 1 root root 4096 2022-03-22 10:18 export
lrwxrwxrwx 1 root root    0 2022-03-22 10:16 gpiochip343 -> ../../devices/platform/1000b000.pinctrl/gpio/gpiochip343
--w------- 1 root root 4096 2022-03-22 10:16 unexport
k39tv1_bsp_1g:/sys/class/gpio # 
k39tv1_bsp_1g:/sys/class/gpio # 
k39tv1_bsp_1g:/sys/class/gpio # 
k39tv1_bsp_1g:/sys/class/gpio # 
 

 

 

参考资料:
https://linus.blog.csdn.net/article/details/105760139
LinuxGPIO操作和MTK平台GPIO

缘起:
需要配置OTG,但是GPIO端口号不知道,于是尝试通过配置/sys/class/gpio/失败。
初步判断需要配置:/sys/devices/platform/1000b000.pinctrl/mt_gpio

 

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

20220314在MT6739的android8.1下打开gpio节点 的相关文章

  • APM32F103CBT6调试接口复用为GPIO配置问题

    APM32F103CBT6调试接口复用为GPIO配置问题 xff1a 可以通过调整复用配置 xff0c 改为GPIO口 xff0c xff08 注意 xff1a 改为上电默认为GPIO口后 xff0c 将无法再用调试功能 xff0c 慎重选
  • Nvidia Xavier GPIO 输入输出 中断 PWM

    文章目录 前言Jetson GPIO安装可用引脚点亮LEDGPIO输出示例GPIO输入示例GPIO EventGPIO InterruptPWM微信公众号 前言 Nvidia Jetson AGX Xavier 硬件相关 这篇讲到Xavie
  • STM32F103笔记(二)——GPIO原理

    GPIO的工作原理与两个实验实例 一 STM32F103 GPIO说明1 stm32 GPIO引脚的主要功能2 GPIO相关配置寄存器的简介3 STM32F103 GPIO的8种工作方式4种输入模式4种输出模式 二 点亮LED实例 xff0
  • xilinx ZYNQ 7000 AXI GPIO

    0AXI GPIO 第一部分 PS 和 PL之间的通讯有一个接口称为AXI AXI总线具体的内容这边不去深究 xff0c 可以理解为一种特殊协议的通讯方式 AXI GPIO是什么意思 xff1f PL是FPGA它可以做成任何你想要的东西 x
  • TX2/Xavier Linux GPIO 计算

    目录 Linux GPIO子系统TX2 Linux GPIO计算Xavier Linux GPIO计算参考用C快捷计算TX2 Linux GPIO用C快捷计算Xavier Linux GPIODebug微信公众号 Linux GPIO子系统
  • GPIO模式

    开漏输出 只能输出低电平 xff0c 不能输出高电
  • linux用户态使用gpio中断方法

    一 用户空间gpio的调用文件 用户空间访问gpio 即通过sysfs接口访问gpio 下面是 sys class gpio目录下的三种文件 export unexport文件 gpioN指代具体的gpio引脚 gpio chipN指代gp
  • GPIO的速度的理解

    一 GPIO模式配置 1 输入 输出模式 参考stm32手册 2 GPIO输出模式下 几种速度的区别 1 GPIO 引脚速度 GPIO Speed 2MHz 10MHz 50MHz 又称输出驱动电路的响应速度 芯片内部在I O口的输出部分安
  • 新唐NUC980使用记录(5.10.y内核):在用户应用中使用GPIO

    文章目录 目的 使用参考与演示 使用参考 存在的问题 问题定位 修改设备树 使用测试 总结 设备树文件内容 目的 GPIO是最基础的外设 使用频率也非常高 这篇文章将简单体验在NUC980 Liunx用户应用中使用GPIO功能 这篇文章中内
  • Linux的GPIO子系统解析 ( 一 ) 之 gpiolib.c

    文章目录 Linux的GPIO子系统解析 一 之 gpiolib c 绪论 关于GPIO子系统库文件的gpiolib c解析 drivers gpio gpiolib c gpio desc结构体 gpio chip结构体 gpio ens
  • 零基础玩转树莓派(四)—GPIO端口控制(LED灯)

    一 GPIO介绍 树莓派3B 和普通电脑不一样的地方在于它还带了40个可编程的GPIO General Purpose Input Output 可以用来驱动各种外设 如传感器 步进电机等 GPIO General Purpose I O
  • 品味树莓派:GPIO Zero库使用入门

    文章目录 目的 基础说明 入门使用 LED PWMLED Button 更多入门例程 类基础说明 注意事项 总结 目的 树莓派有很多GPIO口可供用户使用 官方同时也提供了一些方式来操作这些IO口 其中目前主要推荐的是基于Python的GP
  • wiringPi引脚编号方式

    树莓派引出的20 2排针引脚 引脚定义使用gpio readall命令查看 如下 可以看到wiringpi库有三种引脚编号方式 分别为 BCM编号方式 就是使用芯片的GPIO引脚编号 wiringpi库编号方式 使用wiringpi库自己规
  • 使用HAL库开发STM32:GPIO口基础使用与外部中断

    文章目录 目的 GPIO口基础使用 基础说明 初始化设置 输出与控制 读取端口值 GPIO口与外部中断 总结 目的 对于MCU来说GPIO口的使用是最基础的内容 仅使用GPIO口和延时等 就可以完成很多功能了 GPIO口基础使用 基础说明
  • android.os.ServiceSpecificException:GPIO2_IO02 已在使用中(代码 16)

    我正在研究 android 的东西 Pico i MX7D I O 我得到了android os ServiceSpecificException GPIO2 IO02 已在使用中 代码 16 异常 这是什么意思 请帮我 我的示例程序是从克
  • 使用多个线程多次调用一个方法

    我想要一个 LED 闪烁 同时我的 Raspberry 上正在做一些工作 我在 Python 脚本中使用 LED 线程 初始代码 import RPi GPIO import time import threading pinLED 10
  • Raspberry Pi RuntimeError:已为此 GPIO 通道启用冲突边缘检测

    我正在遵循此处找到的教程 https www linkedin com pulse prepare your raspberry pi work aws iot kay lerch I have not even begun the int
  • 如何检查您的内核是否支持硬件上的 GPIO?

    我的目标是控制 Intel 主板 带 C1037U 处理器的 NM70 芯片组 上 Peppermint 4 Linux 内核版本 3 8 0 中的 GPIO 引脚 如何检查您的内核是否支持硬件上的 GPIO 背景 主板 Intel NM7
  • 从内核模块向用户空间通知 GPIO 中断[关闭]

    Closed 这个问题是基于意见的 help closed questions 目前不接受答案 我有一段代码可以检测内核模块中的 GPIO 中断 现在 我正在寻找一种机制 在检测到来自内核模块的 gpio 中断时通知用户空间 任何与不同选项
  • 对 FINTEK F81866A 芯片组上的 GPIO 引脚进行编程

    我有一个德承DE 1000 http www cincoze com goods info php id 10工业 PC 具有芬泰克 F81866A http www fintek com tw index php i o controll

随机推荐