您尚未登录。

#1 Re: 全志 SOC » 刚刚收到的全志AIC800开发板,接个串口打印LOG 试一试 » 2023-06-25 18:16:19

X3
Package libcedarx is missing dependencies for the following libraries:
libasound.so.2
libuapi.so

出现这种问题:

make package/libs/alsa-lib/clean && make package/libs/alsa-lib/install
make package/allwinner/libuapi/clean && make package/allwinner/libuapi/install

#2 Re: 全志 SOC » 刚刚收到的全志AIC800开发板,接个串口打印LOG 试一试 » 2023-05-27 21:35:15

X3

读寄存器:

echo 0x05096318 > /sys/class/misc/sunxi-reg/rw/dump

cat /sys/class/misc/sunxi-reg/rw/dump

写寄存器:

echo "0x05096318 0x4c8230A0" > /sys/class/misc/sunxi-reg/rw/write

#3 Re: 全志 SOC » 刚刚收到的全志AIC800开发板,接个串口打印LOG 试一试 » 2023-05-23 09:09:07

X3

因为 Android.mk 开启 LOCAL_PRODUCT_MODULE := true 会导致 apk打包到 system.img,

即使 device/softwinner/x3-dock2/x3_dock2.mk 关闭此 apk ,

如果不执行 make systemimage 会导致 system.img 一直不更新,所以怎么烧录原来的apk还在里面。

#4 Re: 全志 SOC » 刚刚收到的全志AIC800开发板,接个串口打印LOG 试一试 » 2023-05-23 09:03:50

X3

掉坑里面了

添加一个预置apk

vendor/aw/public/prebuild/apk/Meeting/Android.mk

###############################################################################
# ESFileExplorer
LOCAL_PATH := $(call my-dir)

include $(CLEAR_VARS)
LOCAL_MODULE := Meeting2
LOCAL_MODULE_TAGS := optional
LOCAL_CERTIFICATE := PRESIGNED
#LOCAL_PRODUCT_MODULE := true
LOCAL_DEX_PREOPT := false
#LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR)/preinstall
LOCAL_MODULE_CLASS := APPS
LOCAL_MODULE_SUFFIX := $(COMMON_ANDROID_PACKAGE_SUFFIX)
LOCAL_SRC_FILES := Meeting2.apk
#LOCAL_PROPRIETARY_MODULE := true
include $(BUILD_PREBUILT)

不小心开启了 LOCAL_PRODUCT_MODULE := true

但是,后来客户不想要这个预置apk了,

device/softwinner/x3-dock2/x3_dock2.mk

禁用了 #PRODUCT_PACKAGES += Meeting2

发现无论怎么make,烧录进去之后发现预置的apk还是自动启动了。



一顿狂搜之后,发现 make productimage 可以强制更新 product.img

$ make productimage
/bin/bash: line 0: cd: too many arguments
/bin/bash: line 0: cd: too many arguments
/bin/bash: line 0: cd: too many arguments
/bin/bash: line 0: cd: too many arguments
============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=10
TARGET_PRODUCT=x3_dock2
TARGET_BUILD_VARIANT=eng
TARGET_BUILD_TYPE=release
TARGET_ARCH=arm64
TARGET_ARCH_VARIANT=armv8-a
TARGET_CPU_VARIANT=generic
TARGET_2ND_ARCH=arm
TARGET_2ND_ARCH_VARIANT=armv8-a
TARGET_2ND_CPU_VARIANT=generic
HOST_ARCH=x86_64
HOST_2ND_ARCH=x86
HOST_OS=linux
HOST_OS_EXTRA=Linux-5.4.0-148-generic-x86_64-Ubuntu-18.04.6-LTS
HOST_CROSS_OS=windows
HOST_CROSS_ARCH=x86
HOST_CROSS_2ND_ARCH=x86_64
HOST_BUILD_TYPE=release
BUILD_ID=QP1A.191105.004
OUT_DIR=out
============================================
[100% 82/82] Target product fs image: out/target/product/x3-dock2/product.img

#### build completed successfully (27 seconds) ####

然后按照原来的流程 make && pack 就OK了。

参考: https://gist.github.com/h1code2/d2b8626643b456b3e714ce4a94904b59#file-android_compile_common-md

#6 Re: 全志 SOC » 刚刚收到的全志AIC800开发板,接个串口打印LOG 试一试 » 2022-05-22 18:59:54

X3

开始怼 ubuntu18.04,

(WW) Warning, couldn't open module fbdev
(EE) Failed to load module "fbdev" (module does not exist, 0)
...
Fatal server error:
(EE) no screens found(EE)
...
So I installed the missing fbdev module (took me some time to figure out the exact name):

解决方案:

sudo apt install xserver-xorg-video-fbdev


参考: https://askubuntu.com/questions/1213538/ee-no-screens-found-when-startx

#7 Re: 全志 SOC » 全志A133/T509/AIC800 编译 longan SDK 出现这个错误 » 2022-03-17 10:04:06

X3

gpu清除:

make package/libs/libgpu/clean

gpu编译:

make package/libs/libgpu/compile

gpu安装:

make package/libs/libgpu/install

#8 Re: 全志 SOC » RTL8723BS蓝牙错误有人遇上吗? » 2022-02-28 15:22:24

X3
root@dragonboard:~# rtk_hciattach  -n -s 115200 /dev/ttyS1 rtk_h5[   70.482306] random: crng init done

Realtek Bluetooth :Realtek Bluetooth init uart with init speed:115200, type:HCI UART H5
Realtek Bluetooth :Realtek hciattach version 3.1

Realtek Bluetooth :Use epoll
Realtek Bluetooth :[SYNC] Get SYNC Resp Pkt
Realtek Bluetooth :[CONFIG] Get SYNC pkt
Realtek Bluetooth :[CONFIG] Get CONFG pkt
Realtek Bluetooth :[CONFIG] Get CONFG resp pkt
Realtek Bluetooth :dic is 1, cfg field 0x14
Realtek Bluetooth :H5 init finished

Realtek Bluetooth :Realtek H5 IC
Realtek Bluetooth :Receive cmd complete event of command: 1001
Realtek Bluetooth :HCI Version 0x08
Realtek Bluetooth :HCI Revision 0x000d
Realtek Bluetooth :LMP Subversion 0x8723
Realtek Bluetooth :Receive cmd complete event of command: fc6d
Realtek Bluetooth :Read ROM version 02
Realtek Bluetooth :LMP Subversion 0x8723
Realtek Bluetooth :EVersion 2
Realtek Bluetooth :IC: RTL8723DS
Realtek Bluetooth :Firmware/config: rtl8723d_fw, rtl8723d_config
Realtek Bluetooth :Couldnt open extra config /opt/rtk_btconfig.txt, No such file or directory
Realtek Bluetooth :Couldnt access customer BT MAC file /opt/bdaddr
Realtek Bluetooth :Origin cfg len 48
Realtek Bluetooth :55 ab 23 87 2a 00 0c 00 10 02 80 92 04 50 c5 ea
Realtek Bluetooth :19 e1 1b fd af 5f 01 a4 0b d9 00 01 0f e4 00 01
Realtek Bluetooth :08 f3 00 01 0c f4 00 08 01 00 01 90 00 00 09 04
Realtek Bluetooth :Config baudrate: 04928002
Realtek Bluetooth :uart flow ctrl: 1
Realtek Bluetooth :Vendor baud from Config file: 04928002
Realtek Bluetooth :New cfg len 48
Realtek Bluetooth :55 ab 23 87 2a 00 0c 00 10 02 80 92 04 50 c5 ea
Realtek Bluetooth :19 e1 1b fd af 5f 01 a4 0b d9 00 01 0f e4 00 01
Realtek Bluetooth :08 f3 00 01 0c f4 00 08 01 00 01 90 00 00 09 04
Realtek Bluetooth :Load FW /lib/firmware/rtlbt/rtl8723d_fw OK, size 52096
Realtek Bluetooth :rtb_get_fw_project_id: opcode 0, len 1, data 9
Realtek Bluetooth :FW version 0xaa7add92, Patch num 3
Realtek Bluetooth :Chip id 0x0001
Realtek Bluetooth :Chip id 0x0002
Realtek Bluetooth :Chip id 0x0003
Realtek Bluetooth :Patch length 0x81b8
Realtek Bluetooth :Start offset 0x00004980
Realtek Bluetooth :Svn version:    20318
Realtek Bluetooth :Coexistence: BTCOEX_20180125-2323

Realtek Bluetooth :FW  exists, Config file  exists
Realtek Bluetooth :Total len 33256 for fwc
Realtek Bluetooth :baudrate in change speed command: 0x02 0x80 0x92 0x04
Realtek Bluetooth :Receive cmd complete event of command: fc17
Realtek Bluetooth :Received cc of vendor change baud
Realtek Bluetooth :Final speed 1500000
Realtek Bluetooth :end_idx: 131, lp_len: 244, additional pkts: 0

Realtek Bluetooth :Start downloading...
Realtek Bluetooth :Send last pkt
Realtek Bluetooth :Enable host hw flow control
Realtek Bluetooth :h5_hci_reset: Issue hci reset cmd
Realtek Bluetooth ERROR: Out-of-order packet arrived, got(6)expected(7)
Realtek Bluetooth ERROR: Out-of-order packet arrived, got(6)expected(7)
Realtek Bluetooth ERROR: Out-of-order packet arrived, got(6)expected(7)
Realtek Bluetooth ERROR: Out-of-order packet arrived, got(6)expected(7)
Realtek Bluetooth ERROR: Out-of-order packet arrived, got(6)expected(7)
Realtek Bluetooth ERROR: Out-of-order packet arrived, got(6)expected(7)
Realtek Bluetooth ERROR: Out-of-order packet arrived, got(6)expected(7)
Realtek Bluetooth ERROR: Out-of-order packet arrived, got(6)expected(7)
Realtek Bluetooth ERROR: Out-of-order packet arrived, got(6)expected(7)
Realtek Bluetooth ERROR: Out-of-order packet arrived, got(6)expected(7)
Realtek Bluetooth ERROR: Out-of-order packet arrived, got(6)expected(7)
Realtek Bluetooth WARN: OP_HCI_RESET Transmission timeout
Realtek Bluetooth ERROR: Out-of-order packet arrived, got(6)expected(7)
Realtek Bluetooth ERROR: Out-of-order packet arrived, got(6)expected(7)
Realtek Bluetooth ERROR: Out-of-order packet arrived, got(6)expected(7)
Realtek Bluetooth ERROR: Out-of-order packet arrived, got(6)expected(7)
Realtek Bluetooth ERROR: Out-of-order packet arrived, got(6)expected(7)
Realtek Bluetooth ERROR: Out-of-order packet arrived, got(6)expected(7)
Realtek Bluetooth ERROR: Out-of-order packet arrived, got(6)expected(7)
Realtek Bluetooth ERROR: Out-of-order packet arrived, got(6)expected(7)
Realtek Bluetooth ERROR: Out-of-order packet arrived, got(6)expected(7)
Realtek Bluetooth ERROR: Out-of-order packet arrived, got(6)expected(7)
Realtek Bluetooth ERROR: Out-of-order packet arrived, got(6)expected(7)
Realtek Bluetooth ERROR: Out-of-order packet arrived, got(6)expected(7)
Realtek Bluetooth WARN: OP_HCI_RESET Transmission timeout
Realtek Bluetooth ERROR: Retransmission exhausts
root@dragonboard:~#

遇到同样的问题

#9 Re: 全志 SOC » 集齐F1C马甲就能召唤神龙吗? 我试一试 » 2022-02-28 09:38:00

X3

@cube
遇到和楼主一样的问题,发现居然是 F1C100s / F1C500 DRAM 内存不够引起的,用 F1C200s / F1C600s 代替就好了,FK浪费一天时间。

#10 Re: 全志 SOC » 荔枝派nano运行Tina tvout问题 » 2022-02-28 00:30:04

X3

遇到和楼主一样的问题,发现居然是 F1C100s / F1C500 DRAM 内存不够引起的,用 F1C200s / F1C600s 代替就好了,FK浪费一天时间。

#11 Re: 全志 SOC » Lichee Pi Nano sdcard boot hangs » 2022-02-23 22:31:35

X3

mmc1 不支持 启动,
只有 mmc0 / mmc2 支持启动。

#13 Re: 全志 SOC » 刚刚收到的全志AIC800开发板,接个串口打印LOG 试一试 » 2022-02-18 15:42:26

X3
[ctp_para]
ctp_used = 1
ctp_name = "ft5x_ts"
ctp_twi_id = 0
ctp_twi_addr = 0x38
ctp_screen_max_x = 800
ctp_screen_max_y = 480
ctp_revert_x_flag = 0
ctp_revert_y_flag = 0
ctp_exchange_x_y_flag = 0
ctp_int_port = port:PB03<5><default><default><default>
ctp_wakeup = port:PB04<1><default><default><1>
ctp_io_port = port:PB03<0><default><default><default>

[ctp_list_para]
ctp_det_used = 1
ft5x_ts = 1
gt82x = 0
gslX680 = 0
gt9xx_ts = 0

FT6336 驱动不了,无法中断,尴尬。

#14 Re: 全志 SOC » 刚刚收到的全志AIC800开发板,接个串口打印LOG 试一试 » 2022-02-18 00:04:13

X3
------------------------------------
  partition_name  : private
  partition_size  : 1024
------------------------------------
  partition_name  : recovery
  partition_size  : 32768
  downloadfile  : recovery.fex
  recovery.fex size : 24 byte
------------------------------------
  partition_name  : UDISK
------------------------------------
/opt/sw509/tina/scripts/pack_img.sh: line 1466: [: Feb: integer expression expected
/opt/sw509/tina/scripts/pack_img.sh: line 1472: [: Feb: integer expression expected
/opt/sw509/tina/scripts/pack_img.sh: line 1484: [: Feb: integer expression expected
ERROR: boot0 files are all invalid files, now exit

_20220218000302.png

#15 Re: 全志 SOC » f1c100s调用cedar 实现硬编码jpeg h.264 » 2022-02-17 23:30:16

X3

cp /opt/D1/tina_d1_open/package/allwinner/tina_multimedia/libcedarx/libcore/base/include/CdxList.i package/allwinner/tina_multimedia/libcedarx/libcore/base/include/

去D1 SDK 里面借一个用用。

#17 Re: 全志 SOC » f1c100s调用cedar 实现硬编码jpeg h.264 » 2022-02-17 21:52:11

X3
make[4]: Entering directory '/opt/a133/tina/out/mr813-a3/compile_dir/target/libcedarx/libcedarx'
Making install in libcore
make[5]: Entering directory '/opt/a133/tina/out/mr813-a3/compile_dir/target/libcedarx/libcedarx/libcore'
Making install in base
make[6]: Entering directory '/opt/a133/tina/out/mr813-a3/compile_dir/target/libcedarx/libcedarx/libcore/base'
  CC       libcdx_base_la-AwPool.lo
In file included from ./AwPool.c:13:0:
./include/CdxList.h:153:21: fatal error: CdxList.i: No such file or directory
 #include <CdxList.i>
                     ^
compilation terminated.
Makefile:551: recipe for target 'libcdx_base_la-AwPool.lo' failed
make[6]: *** [libcdx_base_la-AwPool.lo] Error 1
make[6]: Leaving directory '/opt/a133/tina/out/mr813-a3/compile_dir/target/libcedarx/libcedarx/libcore/base'
Makefile:353: recipe for target 'install-recursive' failed
make[5]: *** [install-recursive] Error 1
make[5]: Leaving directory '/opt/a133/tina/out/mr813-a3/compile_dir/target/libcedarx/libcedarx/libcore'
Makefile:398: recipe for target 'install-recursive' failed
make[4]: *** [install-recursive] Error 1
make[4]: Leaving directory '/opt/a133/tina/out/mr813-a3/compile_dir/target/libcedarx/libcedarx'
Makefile:724: recipe for target '/opt/a133/tina/out/mr813-a3/compile_dir/target/libcedarx/.built' failed
make[3]: *** [/opt/a133/tina/out/mr813-a3/compile_dir/target/libcedarx/.built] Error 2
make[3]: Leaving directory '/opt/a133/tina/package/allwinner/tina_multimedia'
package/Makefile:192: recipe for target 'package/allwinner/tina_multimedia/compile' failed
make[2]: *** [package/allwinner/tina_multimedia/compile] Error 2
make[2]: Leaving directory '/opt/a133/tina'
package/Makefile:189: recipe for target '/opt/a133/tina/out/mr813-a3/staging_dir/target/stamp/.package_compile' failed
make[1]: *** [/opt/a133/tina/out/mr813-a3/staging_dir/target/stamp/.package_compile] Error 2
make[1]: Leaving directory '/opt/a133/tina'
/opt/a133/tina/build/toplevel.mk:304: recipe for target 'world' failed
make: *** [world] Error 2

#### make failed to build some targets (22 seconds) ####

./include/CdxList.h:153:21: fatal error: CdxList.i: No such file or directory
#include <CdxList.i>


这个错误 。。。

#18 Re: 全志 SOC » 刚刚收到的全志AIC800开发板,接个串口打印LOG 试一试 » 2022-02-16 10:45:46

X3
#
# insmod /lib/modules/4.9.170/pvrsrvkm.ko
[   42.148898] pvrsrvkm gpu: set gpu core rate:504000000 freq:504000000 dfs:0x00000001
[   42.157608] pvrsrvkm gpu: set gpu core rate:504000000 freq:472500000 dfs:0x00000002
[   42.166236] pvrsrvkm gpu: set gpu core rate:504000000 freq:441000000 dfs:0x00000004
[   42.174857] pvrsrvkm gpu: set gpu core rate:252000000 freq:252000000 dfs:0x00000001
[   42.183663] PVR_K:  1129: Read BVNC 22.102.54.38 from HW device registers
[   42.191314] PVR_K:  1129: RGX Device initialised with BVNC 22.102.54.38
[   42.200260] [drm] Initialized pvr 1.10.5260539 20170530 on minor 0
#
# insmod /lib/modules/4.9.170/dc_sunxi.ko
[   50.899788] Found usable fbdev device ():
[   50.899788] range (physical) = 0xff800000-0xfffd0000
[   50.899788] size (bytes)     = 0x7d0000
[   50.899788] xres x yres      = 1280x800
[   50.899788] xres x yres (v)  = 1280x1600
[   50.899788] img pix fmt      = 89
[   50.899788] flipping?        = 1
#

mount -t debugfs none /sys/kernel/debug

可是这个目录并没有文件:

cat /sys/kernel/debug/sunxi_gpu/dump

参考: Linux_GPU_开发指南.pdf

#21 Re: 全志 SOC » 刚刚收到的全志AIC800开发板,接个串口打印LOG 试一试 » 2022-02-15 11:47:51

X3
$ source build/envsetup.sh
$ lunch 55
$ extract-bsp
$ make
$ pack

总结一下,就是这几步了。

#22 Re: 全志 SOC » 刚刚收到的全志AIC800开发板,接个串口打印LOG 试一试 » 2022-02-15 10:12:07

X3
X3 说:

me@ubuntu:/opt/sw509/android$ cp ../longan/out/t509/a3/android/bImage device/softwinner/pluto-a3/kernel
me@ubuntu:/opt/sw509/android$
me@ubuntu:/opt/sw509/android$ cp ../longan/out/t509/a3/android/* device/softwinner/pluto-a3/

缺啥复制啥,好险 make 可以继续了。。。

晕,居然是执行 extract-bsp 代替这个命令,掩面泪过,浪费一天时间。

#23 Re: 全志 SOC » 刚刚收到的全志AIC800开发板,接个串口打印LOG 试一试 » 2022-02-14 22:14:40

X3

重新打包: make_ext4fs -l 128M -s out/pack_out/rootfs3.fex test/dragonboard/rootfs

屏蔽 build/pack 的 函数 function do_prepare()

#不删除 out/pack_out/ 目录
    if [ "x" != "x${LICHEE_PACK_OUT_DIR}" ]; then
        rm -rf ${LICHEE_PACK_OUT_DIR}
    fi
再将 device/config/chips/t509/configs/a3/dragonboard/sys_partition.fex 里面的 rootfs.fex 改为 rootfs3.fex

接着执行 ./build.sh pack 打包烧录,一切正常。

make_ext4fs  不能打包有设备文件的文件夹, 比如 /dev/console,/dev/null 就不能打包成 ext4 文件系统了。

用 mkfs.ext4 可以:

mkfs.ext4 -d /opt/a133/buildroot/output/target -r 1 -N 0 -m 5 -L "rootfs" -O ^64bit rootfs4a.fex "72M"


/opt/a133/buildroot/output/target 需要:
① 把 /sbin/init 复制到 /init
② 存在 /dev/console,/dev/null 等设备文件

这样就可以用 dragon 命令打包成 img文件了。

#24 Re: 全志 SOC » 刚刚收到的全志AIC800开发板,接个串口打印LOG 试一试 » 2022-02-14 21:33:19

X3

me@ubuntu:/opt/sw509/android$ cp ../longan/out/t509/a3/android/bImage device/softwinner/pluto-a3/kernel
me@ubuntu:/opt/sw509/android$
me@ubuntu:/opt/sw509/android$ cp ../longan/out/t509/a3/android/* device/softwinner/pluto-a3/

缺啥复制啥,好险 make 可以继续了。。。

#25 Re: 全志 SOC » 刚刚收到的全志AIC800开发板,接个串口打印LOG 试一试 » 2022-02-14 21:31:39

X3
me@ubuntu:/opt/sw509/android$ source build/envsetup.sh
including device/softwinner/common/vendorsetup.sh
longan project path: /opt/sw509/longan
me@ubuntu:/opt/sw509/android$ lunch 55

============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=10
TARGET_PRODUCT=pluto_a3
TARGET_BUILD_VARIANT=eng
TARGET_BUILD_TYPE=release
TARGET_ARCH=arm
TARGET_ARCH_VARIANT=armv7-a-neon
TARGET_CPU_VARIANT=cortex-a7
HOST_ARCH=x86_64
HOST_2ND_ARCH=x86
HOST_OS=linux
HOST_OS_EXTRA=Linux-5.4.0-97-generic-x86_64-Ubuntu-18.04.2-LTS
HOST_CROSS_OS=windows
HOST_CROSS_ARCH=x86
HOST_CROSS_2ND_ARCH=x86_64
HOST_BUILD_TYPE=release
BUILD_ID=QP1A.191105.004
OUT_DIR=out
============================================
me@ubuntu:/opt/sw509/android$ make
============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=10
TARGET_PRODUCT=pluto_a3
TARGET_BUILD_VARIANT=eng
TARGET_BUILD_TYPE=release
TARGET_ARCH=arm
TARGET_ARCH_VARIANT=armv7-a-neon
TARGET_CPU_VARIANT=cortex-a7
HOST_ARCH=x86_64
HOST_2ND_ARCH=x86
HOST_OS=linux
HOST_OS_EXTRA=Linux-5.4.0-97-generic-x86_64-Ubuntu-18.04.2-LTS
HOST_CROSS_OS=windows
HOST_CROSS_ARCH=x86
HOST_CROSS_2ND_ARCH=x86_64
HOST_BUILD_TYPE=release
BUILD_ID=QP1A.191105.004
OUT_DIR=out
============================================
[100% 148/148] out/soong/.bootstrap/bin/soong_build out/soong/build.ninja
cedarc config go file start
cedarx config go file start
sdkVersion: 29
board: pluto
Platform config has NOT been set. Please check it.
cryptolevel: 3
playreadytype:
registry_table has NOT been set. Please check it.
Include_dirs has NOT been set. Please check it.
sdkVersion: 29
board: pluto
[ 56% 353/621] including hardware/aw/camera/Android.mk ...
hardware/aw/camera/3_4/allwinnertech/libAWIspApi/Android.mk:23: warning: Use ceres include libisp_new!
hardware/aw/camera/3_4/allwinnertech/libAWIspApi/libisp_new/Android.mk:66: warning: Use pluto libisp_new!
[ 58% 362/621] including hardware/aw/playready/Android.mk ...
hardware/aw/playready/lib/Android.mk:17: warning: libplayreadydrmplugin=nonsecure/lib32/libplayreadydrmplugin.so
hardware/aw/playready/lib/Android.mk:40: warning: libplayreadydrmplugin=nonsecure/lib64/libplayreadydrmplugin.so
hardware/aw/playready/lib/Android.mk:63: warning: libplayreadypk=nonsecure/lib32/libplayreadypk.so
hardware/aw/playready/lib/Android.mk:87: warning: libplayreadypk=nonsecure/lib64/libplayreadypk.so
[ 99% 620/621] finishing build rules ...
platform_testing/build/tasks/tests/instrumentation_test_list.mk: warning: continuous_instrumentation_tests: Unknown installed file for module 'NexusLauncherOutOfProcTests'
platform_testing/build/tasks/tests/instrumentation_test_list.mk: warning: continuous_instrumentation_tests: Unknown installed file for module 'NexusLauncherDebug'
platform_testing/build/tasks/tests/instrumentation_test_list.mk: warning: continuous_instrumentation_tests: Unknown installed file for module 'NexusLauncherTests'
platform_testing/build/tasks/tests/platform_test_list.mk: warning: platform_tests: Unknown installed file for module 'LauncherRotationStressTest'
platform_testing/build/tasks/tests/platform_test_list.mk: warning: platform_tests: Unknown installed file for module 'PlatformScenarioTests'
FAILED: ninja: 'device/softwinner/pluto-a3/kernel', needed by 'out/target/product/pluto-a3/kernel', missing and no known rule to make it
20:35:31 ninja failed with: exit status 1

#### failed to build some targets (01:47 (mm:ss)) ####

me@ubuntu:/opt/sw509/android$

FAILED: ninja: 'device/softwinner/pluto-a3/kernel', needed by 'out/target/product/pluto-a3/kernel', missing and no known rule to make it
20:35:31 ninja failed with: exit status 1

一脸茫然。。。

#26 Re: 全志 SOC » 刚刚收到的全志AIC800开发板,接个串口打印LOG 试一试 » 2022-02-14 18:28:51

X3

Win32 用 FASTBOOT 烧写 A100 eMMC
https://bbs.aw-ol.com/topic/1027







① 准备 fastboot_and_usbdriver.zip

② 电脑USB连接A100 otg,

③ A100 按住 s 上电进入 uboot 命令行,输入 fastboot 命令

④ 电脑出现一个 Android Phone 的USB设备则以驱动,如果未驱动则安装①里面的usbdriver

⑤ 电脑运行① fastboot.exe 命令:
1) 列设备: fastboot devices
2)擦除eMMC分区: fastboot erase xxxx (分区名)
3)烧录文件到eMMC分区: fastboot flash xxx yyyy (xxxx是分区名,yyyy是文件名)
4)重启: fastboot reboot

1644829748964-40254869-a377-42fe-bd91-25f505604946-image[1].png1644829837780-a1db2794-fd48-43a2-80a3-f7b8db759dfa-18b5517d324f249ad025f12f085d203[1].png

#27 Re: 全志 SOC » 刚刚收到的全志AIC800开发板,接个串口打印LOG 试一试 » 2022-02-14 13:57:08

X3

_20220214135358.png


./build.sh brandy 之后,devicetree居然是这个配置:

CONFIG_OF_BOARD:                                                                                           │
  │                                                                                                            │
  │ If this option is enabled, the device tree will be provided by                                             │
  │ the board at runtime if the board supports it, instead of being                                            │
  │ bundled with the image.                                                                                    │
  │                                                                                                            │
  │ Symbol: OF_BOARD [=y]                                                                                      │
  │ Type  : boolean                                                                                            │
  │ Prompt: Provided by the board at runtime                                                                   │
  │   Location:                                                                                                │
  │     -> Device Tree Control                                                                                 │
  │       -> Provider of DTB for DT control (<choice> [=y])                                                    │
  │   Defined at dts/Kconfig:88                                                                                │
  │   Depends on: <choice> && !SANDBOX [=n]

http://www.wowotech.net/x_project/bubblegum_uboot_device_tree.html

@wowo:谢谢wowo的解答,这样理解也是很有道理。
我考虑的是对于arm soc,boot和kernel看到的设备其实是一样的,而且本来boot就会去修改kernel的dtb(cmdline、ram/initramfs start&sizee),并传递给kernel,分成两份有点重复。
我自己对这个问题的进展:
如果定义了CONFIG_OF_SEPARATE,uboot会去编译CONFIG_DEFAULT_DEVICE_TREE,倒是可以把这个路径指向内核的dts文件,就是目录跨得有点多;
另外还有一个CONFIG_OF_BOARD选项,可以在代码里去指定dtb文件内存地址,不过搜索了uboot目录,几乎没有厂家用这个选项。
当然也听说uboot解析和修改dtb文件效率并不高,分成一大一小不知道会不会更快一些了。

看起来, uboot 和 kernel 应该是共用设备树 。

CONFIG_SUNXI_FDT_ADDR=44000000
# CONFIG_SUNXI_FDT_SAVE is not set
CONFIG_SUNXI_TURNNING_FLASH=y
CONFIG_SUNXI_TURNNING_DRAM=y
# CONFIG_SUNXI_OTA_TURNNING is not set
# CONFIG_SUNXI_DEBUG is not set
# CONFIG_SUNXI_NOR_IMG is not set
CONFIG_SYS_CLK_FREQ=1008000000
CONFIG_SUNXI_ARM64=y

#28 Re: 全志 SOC » 刚刚收到的全志AIC800开发板,接个串口打印LOG 试一试 » 2022-02-13 21:04:52

X3

编译 longan,配置为 android 编译环境:

sw509@ubuntu:/opt/sw509/longan$ ./build.sh config

Welcome to mkscript setup progress
All available platform:
   0. android
   1. linux
Choice [linux]: 0
All available ic:
   0. a133
   1. t509
Choice [t509]: 1
All available board:
   0. a3
   1. demo
   2. demo2
   3. fpga
   4. qa
   5. srandway
   6. ver
Choice [a3]: 0
INFO: kernel defconfig: generate /opt/sw509/longan/kernel/linux-4.9/.config by /opt/sw509/longan/kernel/linux-4.9/arch/arm64/configs/sun50iw10p1smp_t509_android_defconfig
*** Default configuration is based on 'sun50iw10p1smp_t509_android_defconfig'
#
# configuration written to .config
#

编译for安卓内核:

sw509@ubuntu:/opt/sw509/longan$ ./build.sh
ACTION List: mklichee;========
Execute command: mklichee
INFO: ----------------------------------------
INFO: build lichee ...
INFO: chip: sun50iw10p1
INFO: platform: android
INFO: kernel: linux-4.9
INFO: board: a3
INFO: output: /opt/sw509/longan/out/t509/a3/android
INFO: ----------------------------------------
INFO: build dtbo ...
debug: main,line:309
....
[GPU]: ge8300 device driver has been built.
regenerate rootfs cpio
15757 blocks
15758 blocks
build_ramfs
Copy boot.img to output directory ...
Copy modules to target ...

sun50iw10p1 compile Kernel successful


INFO: build kernel OK.
INFO: build rootfs ...
INFO: skip make rootfs for android
INFO: ----------------------------------------
INFO: build lichee OK.
INFO: ----------------------------------------
sw509@ubuntu:/opt/sw509/longan$
sw509@ubuntu:/opt/sw509/android$ source build/envsetup.sh
including device/softwinner/common/vendorsetup.sh
longan project path: /opt/sw509/longan
sw509@ubuntu:/opt/sw509/android$
sw509@ubuntu:/opt/sw509/android$
sw509@ubuntu:/opt/sw509/android$ lunch

You're building on Linux

Lunch menu... pick a combo:
     1. aosp_arm-eng
     2. aosp_arm64-eng
     3. aosp_blueline-userdebug
     4. aosp_bonito-userdebug
     5. aosp_car_arm-userdebug
     6. aosp_car_arm64-userdebug
     7. aosp_car_x86-userdebug
     8. aosp_car_x86_64-userdebug
     9. aosp_cf_arm64_phone-userdebug
     10. aosp_cf_x86_64_phone-userdebug
     11. aosp_cf_x86_auto-userdebug
     12. aosp_cf_x86_phone-userdebug
     13. aosp_cf_x86_tv-userdebug
     14. aosp_crosshatch-userdebug
     15. aosp_marlin-userdebug
     16. aosp_sailfish-userdebug
     17. aosp_sargo-userdebug
     18. aosp_taimen-userdebug
     19. aosp_walleye-userdebug
     20. aosp_walleye_test-userdebug
     21. aosp_x86-eng
     22. aosp_x86_64-eng
     23. beagle_x15-userdebug
     24. ceres_b1-eng
     25. ceres_b1-user
     26. ceres_b1-userdebug
     27. ceres_b3-eng
     28. ceres_b3-user
     29. ceres_b3-userdebug
     30. ceres_c3-eng
     31. ceres_c3-user
     32. ceres_c3-userdebug
     33. ceres_c4-eng
     34. ceres_c4-user
     35. ceres_c4-userdebug
     36. ceres_perf1-user
     37. ceres_perf1-userdebug
     38. ceres_perf2-user
     39. ceres_perf2-userdebug
     40. ceres_qa-user
     41. ceres_qa-userdebug
     42. ceres_verify-user
     43. ceres_verify-userdebug
     44. fuchsia_arm64-eng
     45. fuchsia_x86_64-eng
     46. hikey-userdebug
     47. hikey64_only-userdebug
     48. hikey960-userdebug
     49. hikey960_tv-userdebug
     50. hikey_tv-userdebug
     51. m_e_arm-userdebug
     52. mini_emulator_arm64-userdebug
     53. mini_emulator_x86-userdebug
     54. mini_emulator_x86_64-userdebug
     55. pluto_a3-eng
     56. pluto_a3-user
     57. pluto_a3-userdebug
     58. pluto_demo-eng
     59. pluto_demo-user
     60. pluto_demo-userdebug
     61. pluto_demo2-eng
     62. pluto_demo2-user
     63. pluto_demo2-userdebug
     64. pluto_qa-eng
     65. pluto_qa-userdebug
     66. poplar-eng
     67. poplar-user
     68. poplar-userdebug
     69. qemu_trusty_arm64-userdebug
     70. uml-userdebug

Which would you like? [aosp_arm-eng] 55

============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=10
TARGET_PRODUCT=pluto_a3
TARGET_BUILD_VARIANT=eng
TARGET_BUILD_TYPE=release
TARGET_ARCH=arm
TARGET_ARCH_VARIANT=armv7-a-neon
TARGET_CPU_VARIANT=cortex-a7
HOST_ARCH=x86_64
HOST_2ND_ARCH=x86
HOST_OS=linux
HOST_OS_EXTRA=Linux-5.4.0-97-generic-x86_64-Ubuntu-18.04.2-LTS
HOST_CROSS_OS=windows
HOST_CROSS_ARCH=x86
HOST_CROSS_2ND_ARCH=x86_64
HOST_BUILD_TYPE=release
BUILD_ID=QP1A.191105.004
OUT_DIR=out
============================================
sw509@ubuntu:/opt/sw509/android$
sw509@ubuntu:/opt/sw509/android$ make
============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=10
TARGET_PRODUCT=pluto_a3
TARGET_BUILD_VARIANT=eng
TARGET_BUILD_TYPE=release
TARGET_ARCH=arm
TARGET_ARCH_VARIANT=armv7-a-neon
TARGET_CPU_VARIANT=cortex-a7
HOST_ARCH=x86_64
HOST_2ND_ARCH=x86
HOST_OS=linux
HOST_OS_EXTRA=Linux-5.4.0-97-generic-x86_64-Ubuntu-18.04.2-LTS
HOST_CROSS_OS=windows
HOST_CROSS_ARCH=x86
HOST_CROSS_2ND_ARCH=x86_64
HOST_BUILD_TYPE=release
BUILD_ID=QP1A.191105.004
OUT_DIR=out
============================================
[ 99% 11233/11247] glob vendor.nxp.nxpnfc-V1.0-java.prof

安卓编译,保证 android 的同级目录有 longan 即可。

#29 Re: 全志 SOC » 刚刚收到的全志AIC800开发板,接个串口打印LOG 试一试 » 2022-02-13 19:37:55

X3

_20220213193606.png

cat /dev/fb1 > fb1.rgb

电脑用 yuview 显示framebuffer图像,颜色格式 BGRA。

#30 Re: 全志 SOC » 刚刚收到的全志AIC800开发板,接个串口打印LOG 试一试 » 2022-02-13 13:19:33

X3

根据 kernel/linux-4.9/rootfs/init

#!/bin/sh

mount -t proc proc /proc
mount -t sysfs sysfs /sys
mount -t devtmpfs none /dev

exec < /dev/console > /dev/console 2>&1

for parm in $(cat /proc/cmdline); do
        case $parm in
        ramfs)
                RAMFS_MODE=1
                ;;
        root=*)
                ROOT_DEVICE=`echo $parm | awk -F\= '{print $2}'`
                ;;
        console=*)
                CONSOLE_DEVICE=`echo $parm | awk -F\= '{print $2}' | awk -F\, '{print $1}'`
                ;;
        gpt=*)
                GPT_SUPPORT=`echo $parm | awk -F\= '{print $2}'`
                ;;
        esac
done

if [ "x$ROOT_DEVICE" = "x" ]; then
        ROOT_DEVICE=autoconfig
fi

echo [$0]: "getty is $CONSOLE_DEVICE"
echo [$0]: RootDevice is \"$ROOT_DEVICE\" , GPT_SUPPORT=$GPT_SUPPORT

#set the default device for autoconfig
if [ "x$GPT_SUPPORT" = "x1" ]; then
        NAND_DEF_DEVICE=nand0p5
        SDMMC_DEF_DEVICE=mmcblk0p5
else
        NAND_DEF_DEVICE=nandd
        SDMMC_DEF_DEVICE=mmcblk0p7
fi

# $1: the name of block device
wait_for_ready()
{
        CNT=10
        while true; do
                if [ -b $1 ]; then
                        return 0
                fi

                echo [$0]: Wait $1 ready ...

                CNT=`expr $CNT - 1`
                if [ $CNT -eq 0 ]; then
                        echo [$0]: $1 is not available!
                        return 1
                fi
                sleep 1
        done
}

# $1: The block device
do_mount()
{
        e2fsck -y $1
        mount -o rw,noatime,nodiratime,norelatime,noauto_da_alloc,barrier=0,data=ordered -t ext4 $1 /mnt
        if [ $? -ne 0 ]; then
                echo [$0]: Failed to mount $1!
        fi
}

load_nand()
{
        echo [$0]: Try to load Nand ...

        NAND_MODULE=/lib/modules/$(uname -r)/nand.ko
        if [ ! -f $NAND_MODULE ]; then
                echo [$0]: $NAND_MODULE does not exist!
#               return 1
        fi

        insmod $NAND_MODULE
        if [ $? -ne 0 ]; then
                echo [$0]: $NAND_MODULE is invalid!
#               return 2
        fi
        wait_for_ready $1
        if [ $? -eq 0 ]; then
                do_mount $1
        fi
}

load_emmc()
{
        echo [$0]: Try to load EMMC ...

        wait_for_ready $1
        if [ $? -eq 0 ]; then
                do_mount $1
        fi
}

case $ROOT_DEVICE in
        /dev/nand*|/dev/system)
                load_nand $ROOT_DEVICE
                ;;
        /dev/mmc*)
                load_emmc $ROOT_DEVICE
                ;;
        autoconfig*)
                sleep 1;
                echo [$0]: default device $SDMMC_DEF_DEVICE $NAND_DEF_DEVICE
                if cat /proc/partitions|grep "$SDMMC_DEF_DEVICE" >/dev/null;then
                        magic_num=$(hexdump -s 1292 -n 2 -x /dev/$SDMMC_DEF_DEVICE|head -1|awk '{print $2 }')
                        echo $magic_num|grep "f30a" >/dev/null
                        if [ $? -eq 0 ]; then
                                echo [$0]: "magic_num[f30a] match!!!"
                        else
                                load_emmc /dev/$SDMMC_DEF_DEVICE
                        fi
                else
                        load_nand /dev/$NAND_DEF_DEVICE
                fi
                ;;
        *)
                echo [$0]: "Use default type"
                ;;
esac

[ -x /mnt/init ] && exec switch_root /mnt /init
/sbin/getty -L $CONSOLE_DEVICE 115200 vt100 -n -l /bin/ash

先根据 bootargs 参数:

[    0.000000] Kernel command line: earlyprintk=sunxi-uart,0x05000000 initcall_debug=0 console=ttyS0,115200 loglevel=8 root=/dev/mmcblk0p4 init=/init partitions=boot-resource@mmcblk0p1:env@mmcblk0p2:boot@mmcblk0p3:rootfs@mmcblk0p4:klog@mmcblk0p5:UDISK@mmcblk0p6 cma=8M snum=0c001415a0c0876220d mac_addr= wifi_mac= bt_mac= specialstr= gpt=1 androidboot.mode=normal androidboot.serialno=0c001415a0c0876220d androidboot.hardware=sun50iw10p1 boot_type=2 androidboot.boot_type=2 androidboot.secure_os_exist=0 androidboot.trustchain=false gpt=1 uboot_message=2018.05(02/07/2022-22:08:09) disp_reserve=4096000,0x7bf65080 bootreason=unknow
[    0.000000] PID hash table entries: 4096 (order: 3, 32768 bytes)

① 找出 root dev /dev/mmcblk0p4 然后挂载到 /mnt 目录,
② 如果存在 /mnt/init 并可执行,那么switch_root 到 /mnt/目录,并执行 /init 命令
③ 确保 rootfs 存在 /dev/console /dev/null 设备文件

#31 Re: 全志 SOC » 关于全志 HelperA64 开发板 SDK 使用 » 2022-02-13 11:56:52

X3
zbbbaobao 说:

error: build_directory_structure: unknown file type on /dev/console
对比软件左边是打包成功的,右边是失败的

弹出错误:

   error: build_directory_structure: unknown file type on root/dev/console

经过和厂家提供的rootfs_qtopia_qt4-20141213.tar.gz文件系统作对比发现厂家提供的qt文件系统的dev目录下已经不存在console字符设备节点了,故决定手动删除之前创建的字符设备节点console文件,删除后再编译:

   rm -rf dev/*

   make_ext4fs -s -l 314572800 -a root -L linux new_fs_tiny4412.img new_fs_tiny4412

得到:

Creating filesystem with parameters:

    Size: 314572800

    Block size: 4096

    Blocks per group: 32768

    Inodes per group: 6400

    Inode size: 256

    Journal blocks: 1200

    Label: linux

    Blocks: 76800

    Block groups: 3

    Reserved block group size: 23

Created filesystem with 417/19200 inodes and 7354/76800 blocks

编译根文件系统镜像成功!

http://news.eeworld.com.cn/mcu/2018/ic-news101441765_7.html

#32 Re: 全志 SOC » 刚刚收到的全志AIC800开发板,接个串口打印LOG 试一试 » 2022-02-12 22:45:26

X3

重新打包: make_ext4fs -l 128M -s out/pack_out/rootfs3.fex test/dragonboard/rootfs

屏蔽 build/pack 的 函数 function do_prepare()

#不删除 out/pack_out/ 目录
	if [ "x" != "x${LICHEE_PACK_OUT_DIR}" ]; then
		rm -rf ${LICHEE_PACK_OUT_DIR}
	fi

再将 device/config/chips/t509/configs/a3/dragonboard/sys_partition.fex 里面的 rootfs.fex 改为 rootfs3.fex

接着执行 ./build.sh pack 打包烧录,一切正常。

#33 Re: 全志 SOC » 刚刚收到的全志AIC800开发板,接个串口打印LOG 试一试 » 2022-02-12 21:28:43

X3

./build.sh pack 打包:

make: Entering directory '/opt/sw509/longan/kernel/linux-4.9/modules/gpu'
make -j -C img-rgx/linux/rogue_km/build/linux/sunxi_linux BUILD=release
make[1]: Entering directory '/opt/sw509/longan/kernel/linux-4.9/modules/gpu/img-rgx/linux/rogue_km/build/linux/sunxi_linux'
******* Multiarch build: no
******* Primary arch:    target_aarch64
******* Secondary arch:  none
WARNING: You are not specifying how to find dependent libraries, e.g., by specifying SYSROOT.
The build may fail.
  Building modules, stage 2.
  MODPOST 2 modules
make[1]: Leaving directory '/opt/sw509/longan/kernel/linux-4.9/modules/gpu/img-rgx/linux/rogue_km/build/linux/sunxi_linux'
'img-rgx/linux/rogue_km/binary_sunxi_linux_release/target_aarch64/pvrsrvkm.ko' -> '/opt/sw509/longan/kernel/linux-4.9/output/lib/modules/4.9.170/pvrsrvkm.ko'
'img-rgx/linux/rogue_km/binary_sunxi_linux_release/target_aarch64/dc_sunxi.ko' -> '/opt/sw509/longan/kernel/linux-4.9/output/lib/modules/4.9.170/dc_sunxi.ko'
make: Leaving directory '/opt/sw509/longan/kernel/linux-4.9/modules/gpu'
[GPU]: ge8300 device driver has been built.
regenerate rootfs cpio
15757 blocks
15758 blocks
build_ramfs
Copy boot.img to output directory ...
./scripts/build.sh

longan/kernel/linux-4.9/scripts/build.sh

#!/bin/bash
set -e

localpath=$(cd $(dirname $0) && pwd)
build_system=lichee
[ -d $localpath/../../../device/config/chips ] && build_system=longan
[ -d $localpath/../../tools/pack/chips ] && build_system=lichee

echo "build_system: $build_system"

#Setup common variables
export ARCH=arm
export CROSS_COMPILE=arm-linux-gnueabi-
if [ -n "`echo ${LICHEE_CHIP} | grep "sun5[0-9]i"`" ] && \
        [ "x${LICHEE_ARCH}" = "xarm64" ]; then
    export ARCH=arm64
    export CROSS_COMPILE=aarch64-linux-gnu-
fi

if [ -n "${LICHEE_TOOLCHAIN_PATH}" \
        -a -d "${LICHEE_TOOLCHAIN_PATH}" ]; then
    GCC=$(find ${LICHEE_TOOLCHAIN_PATH} -perm /a+x -a -regex '.*-gcc');
    export CROSS_COMPILE="${GCC%-*}-";
elif [ -n "${LICHEE_CROSS_COMPILER}" ]; then
    export CROSS_COMPILE="${LICHEE_CROSS_COMPILER}-"
fi

MAKE="make"

if [ -n "$ANDROID_CLANG_PATH" ]; then
    MAKE="make CC=$LICHEE_TOP_DIR/../$ANDROID_CLANG_PATH/clang"
    ARCH_PREFIX=arm
    [ "x$ARCH" == "xarm64" ] && ARCH_PREFIX=aarch64
    if [ -n "$ANDROID_TOOLCHAIN_PATH" ]; then
        export CROSS_COMPILE=$LICHEE_TOP_DIR/../$ANDROID_TOOLCHAIN_PATH/$ARCH_PREFIX-linux-android-
        export CLANG_TRIPLE=$ARCH_PREFIX-linux-gnu-
    fi
fi

export AS=${CROSS_COMPILE}as
export LD=${CROSS_COMPILE}ld
export CC=${CROSS_COMPILE}gcc
export AR=${CROSS_COMPILE}ar
export NM=${CROSS_COMPILE}nm
export STRIP=${CROSS_COMPILE}strip
export OBJCOPY=${CROSS_COMPILE}objcopy
export OBJDUMP=${CROSS_COMPILE}objdump
export LOCALVERSION=""
export MKBOOTIMG=${LICHEE_TOOLS_DIR}/pack/pctools/linux/android/mkbootimg
if [ "x$CCACHE_DIR" != "x" ];then
    CCACHE_Y="ccache "
fi

KERNEL_VERSION=`${MAKE} -s kernelversion -C ./`
LICHEE_KDIR=`pwd`
LICHEE_MOD_DIR=${LICHEE_KDIR}/output/lib/modules/${KERNEL_VERSION}
export LICHEE_KDIR

update_kern_ver()
{
    if [ -r include/generated/utsrelease.h ]; then
        KERNEL_VERSION=`cat include/generated/utsrelease.h |awk -F\" '{print $2}'`
    fi
    LICHEE_MOD_DIR=${LICHEE_KDIR}/output/lib/modules/${KERNEL_VERSION}
}

do_init_to_dts()
{
        local DTC_SRC_PATH=${LICHEE_KERN_DIR}/arch/${ARCH}/boot/dts
        if [ "x${ARCH}" == "xarm64" ]; then
                DTC_SRC_PATH=${DTC_SRC_PATH}/sunxi
        fi
        local DTC_DEP_BOARD1=${DTC_SRC_PATH}/.board.dtb.d.dtc.tmp
        local DTC_SRC_BOARD1=${DTC_SRC_PATH}/.board.dtb.dts.tmp
        local DTC_DEP_BOARD=${DTC_SRC_PATH}/.${LICHEE_CHIP}-${LICHEE_BOARD}.dtb.d.dtc.tmp
        local DTC_SRC_BOARD=${DTC_SRC_PATH}/.${LICHEE_CHIP}-${LICHEE_BOARD}.dtb.dts.tmp
        local DTC_DEP_BUSSINESS=${DTC_SRC_PATH}/.${LICHEE_CHIP}-${LICHEE_BUSSINESS}.dtb.d.dtc.tmp
        local DTC_SRC_BUSSINESS=${DTC_SRC_PATH}/.${LICHEE_CHIP}-${LICHEE_BUSSINESS}.dtb.dts.tmp
        local DTC_DEP_COMMON=${DTC_SRC_PATH}/.${LICHEE_CHIP}-soc.dtb.d.dtc.tmp
        local DTC_SRC_COMMON=${DTC_SRC_PATH}/.${LICHEE_CHIP}-soc.dtb.dts.tmp

        local DTC_COMPILER=${LICHEE_KERN_DIR}/scripts/dtc/dtc

        local DTC_INI_FILE_BASE=${LICHEE_BOARD_CONFIG_DIR}/sys_config.fex
        local DTC_INI_FILE=output/sys_config_fix.fex

        cp $DTC_INI_FILE_BASE $DTC_INI_FILE
        sed -i "s/\(\[dram\)_para\(\]\)/\1\2/g" $DTC_INI_FILE
        sed -i "s/\(\[nand[0-9]\)_para\(\]\)/\1\2/g" $DTC_INI_FILE

        if [ ! -f $DTC_COMPILER ]; then
                echo "Script_to_dts: Can not find dtc compiler.\n"
                exit 1
        fi

        if [ -f $DTC_DEP_BOARD1 ]; then
                printf "Script_to_dts: use board special dts file board.dts\n"
                DTC_DEP_FILE=${DTC_DEP_BOARD1}
                DTC_SRC_FILE=${DTC_SRC_BOARD1}
        elif [ -f $DTC_DEP_BOARD ]; then
                printf "Script_to_dts: use board special dts file ${LICHEE_CHIP}-${LICHEE_BOARD}.dts\n"
                DTC_DEP_FILE=${DTC_DEP_BOARD}
                DTC_SRC_FILE=${DTC_SRC_BOARD}
        elif [ -f $DTC_DEP_BUSSINESS ]; then
                printf "Script_to_dts: use bussiness special dts file ${LICHEE_CHIP}-${LICHEE_BUSSINESS}.dts\n"
                DTC_DEP_FILE=${DTC_DEP_BUSSINESS}
                DTC_SRC_FILE=${DTC_SRC_BUSSINESS}
        else
                printf "Script_to_dts: use common dts file ${LICHEE_CHIP}-soc.dts\n"
                DTC_DEP_FILE=${DTC_DEP_COMMON}
                DTC_SRC_FILE=${DTC_SRC_COMMON}
        fi

        local DTC_FLAGS="-W no-unit_address_vs_reg"

        if [ -d ${LICHEE_CHIP_CONFIG_DIR}/dtbo ];  then
                echo "sunxi_dtb create"
                $DTC_COMPILER ${DTC_FLAGS} -@ -O dtb -o ${LICHEE_KERN_DIR}/output/sunxi.dtb     \
                        -b 0                    \
                        -i $DTC_SRC_PATH        \
                        -F $DTC_INI_FILE        \
                        -d $DTC_DEP_FILE $DTC_SRC_FILE
        else
                echo "sunxi_dtb create"
                $DTC_COMPILER -p 2048 ${DTC_FLAGS} -O dtb -o ${LICHEE_KERN_DIR}/output/sunxi.dtb        \
                        -b 0                    \
                        -i $DTC_SRC_PATH        \
                        -F $DTC_INI_FILE        \
                        -d $DTC_DEP_FILE $DTC_SRC_FILE
        fi

        if [ $? -ne 0 ]; then
                echo "Conver script to dts failed"
                exit 1
        fi

        #restore the orignal dtsi
        if [ "x${LICHEE_LINUX_DEV}" = "xdragonboard" \
                -o "x${LICHEE_LINUX_DEV}" = "xdragonmat" ]; then
                local DTS_PATH=${LICHEE_KERN_DIR}/arch/${ARCH}/boot/dts
                [ "x${ARCH}" = "xarm64" ] && DTS_PATH=${LICHEE_KERN_DIR}/arch/${ARCH}/boot/dts/sunxi
                if [ -f ${DTS_PATH}/${LICHEE_CHIP}_bak.dtsi ];then
                        rm -f ${DTS_PATH}/${LICHEE_CHIP}.dtsi
                        mv  ${DTS_PATH}/${LICHEE_CHIP}_bak.dtsi  ${DTS_PATH}/${LICHEE_CHIP}.dtsi
                fi
        fi

        printf "Conver script to dts ok.\n"

        # It'is used for debug dtb
        $DTC_COMPILER ${DTC_FLAGS} -I dtb -O dts -o ${LICHEE_KERN_DIR}/output/.sunxi.dts ${LICHEE_KERN_DIR}/output/sunxi.dtb

        return
}

show_help()
{
    printf "
    Build script for Lichee platform

    Invalid Options:

    help         - show this help
    kernel       - build kernel
    modules      - build kernel module in modules dir
    clean        - clean kernel and modules

    "
}

build_nand()
{
    NAND_ROOT=${LICHEE_KDIR}/modules/nand

    ${MAKE} -C modules/nand LICHEE_MOD_DIR=${LICHEE_MOD_DIR} \
        LICHEE_KDIR=${LICHEE_KDIR} \
        CONFIG_CHIP_ID=${CONFIG_CHIP_ID} install

}

gpu_message()
{
    echo -ne "\033[34;1m"
    echo "[GPU]: $1"
    echo -ne "\033[0m"
}

build_gpu()
{
    GPU_TYPE=`fgrep CONFIG_SUNXI_GPU_TYPE ${LICHEE_KDIR}/.config 2>/dev/null | cut -d \" -f 2`
    if [ "X$GPU_TYPE" = "XNone" -o "X$GPU_TYPE" = "X" ]; then
        gpu_message "No GPU type is configured in ${LICHEE_KDIR}/.config."
        return
    fi

    gpu_message "Building $GPU_TYPE device driver..."

    if [ "X${LICHEE_PLATFORM}" = "Xandroid" -o "X${LICHEE_PLATFORM}" = "Xsecureandroid" ] ; then
        TMP_OUT=$OUT
        TMP_TOP=$TOP
        unset OUT
        unset TOP
    fi

    ${MAKE} -C modules/gpu LICHEE_MOD_DIR=${LICHEE_MOD_DIR} LICHEE_KDIR=${LICHEE_KDIR}

    if [ "X${LICHEE_PLATFORM}" = "Xandroid" -o "X${LICHEE_PLATFORM}" = "Xsecureandroid" ] ; then
        export OUT=$TMP_OUT
        export TOP=$TMP_TOP
    fi

    gpu_message "$GPU_TYPE device driver has been built."
}

clean_gpu()
{
    GPU_TYPE=`fgrep CONFIG_SUNXI_GPU_TYPE ${LICHEE_KDIR}/.config 2>/dev/null | cut -d \" -f 2`
    if [ "X$GPU_TYPE" = "XNone" -o "X$GPU_TYPE" = "X" ]; then
        gpu_message "No GPU type is configured in .config."
        return
    fi

    gpu_message "Cleaning $GPU_TYPE device driver..."
    ${MAKE} -C modules/gpu LICHEE_MOD_DIR=${LICHEE_MOD_DIR} LICHEE_KDIR=${LICHEE_KDIR} clean
    gpu_message "$GPU_TYPE device driver has been cleaned."
}

build_check()
{
    if [ "x$SUNXI_CHECK" = "x1" ];then
        SUNXI_SPARSE_CHECK=1
        SUNXI_SMATCH_CHECK=1
        SUNXI_STACK_CHECK=1
    fi

    if [ "x$SUNXI_SPARSE_CHECK" = "x1" ] && [ -f ../tools/codecheck/sparse/sparse ];then
        echo "\n\033[0;31;1mBuilding Round for sparse check...\033[0m\n\n"
        CHECK="../tools/codecheck/sparse/sparse"
        ${MAKE} CHECK=${CHECK} ARCH=${ARCH} CROSS_COMPILE="${CCACHE_Y}${CROSS_COMPILE}" -j${LICHEE_JLEVEL} \
                C=2 all modules 2>&1|tee output/build_sparse.txt
        cat output/build_sparse.txt|egrep -w '(warn|error|warning)' >output/warn_sparse.txt
    fi

    if [ "x$SUNXI_SMATCH_CHECK" = "x1" ]&& [ -f ../tools/codecheck/smatch/smatch ];then
        echo "\n\033[0;31;1mBuilding Round for smatch check...\033[0m\n\n"
        CHECK="../tools/codecheck/smatch/smatch --full-path --no-data -p=kkernel"
        ${MAKE} CHECK=${CHECK} ARCH=${ARCH} CROSS_COMPILE="${CCACHE_Y}${CROSS_COMPILE}" -j${LICHEE_JLEVEL} \
                C=2 all modules 2>&1|tee output/build_smatch.txt
        cat output/build_smatch.txt|egrep -w '(warn|error|warning)' >output/warn_smatch.txt
    fi

    if [ "x$SUNXI_STACK_CHECK" = "x1" ];then
        ${MAKE} ARCH=${ARCH} CROSS_COMPILE="${CCACHE_Y}${CROSS_COMPILE}" -j${LICHEE_JLEVEL} checkstack 2>&1 \
                |tee output/warn_stack.txt
    fi
}

build_dts(){
    if [ ! -f .config ] ; then
        printf "\n\033[0;31;1mUsing default config ${LICHEE_KERN_DEFCONF_ABSOLUTE} ...\033[0m\n\n"
        ${MAKE} ARCH=${ARCH} defconfig KBUILD_DEFCONFIG=${LICHEE_KERN_DEFCONF_RELATIVE}
    fi

    echo "---build dts for ${LICHEE_CHIP} ${LICHEE_BOARD}-----"
    if [ "x${ARCH}" = "xarm" ];then
        dts_path="arch/arm/boot/dts"
    else
        dts_path="arch/arm64/boot/dts/sunxi"
        prefix="sunxi/"
    fi
    dtb_file=board.dtb
    dts_file=board.dts
    if [ ! -f $dts_path/$dts_file ];then
        dtb_file="${LICHEE_CHIP}-${LICHEE_BOARD}.dtb"
        dts_file="${LICHEE_CHIP}-${LICHEE_BOARD}.dts"
    fi
    if [ ! -f $dts_path/$dts_file ];then
        dts_file="${LICHEE_CHIP}-soc.dts"
        dtb_file="${LICHEE_CHIP}-soc.dtb"
    fi
    ${MAKE} ARCH=${ARCH} ${prefix}${dtb_file}
}

build_kernel()
{
    echo "Building kernel"

    cd ${LICHEE_KDIR}
    rm -rf output/
    echo "${LICHEE_MOD_DIR}"
    mkdir -p ${LICHEE_MOD_DIR}

    # uImage is arm architecture specific target
    local arch_target=""
    if [ "${ARCH}" = "arm" ]; then
        arch_target="uImage dtbs"
    else
        arch_target="all"
    fi

    #exchange sdc0 and sdc2 for dragonBoard card boot
    local check_cardboot=false
    local SYS_CONFIG_FILE=""
    if [ "x$build_system" == "xlichee" ]; then
        [ "x${LICHEE_PLATFORM}" == "xdragonboard" -o "x${LICHEE_PLATFORM}" == "xdragonmat" ] && check_cardboot=true
        SYS_CONFIG_FILE=$localpath/../../tools/pack/chips/${LICHEE_CHIP}/configs/${LICHEE_BOARD}/sys_config.fex
    else
        [ "x${LICHEE_PLATFORM}" == "xlinux" ] && [ "x${LICHEE_LINUX_DEV}" == "xdragonboard" -o "x${LICHEE_LINUX_DEV}" == "xdragonmat" ] && check_cardboot=true
        SYS_CONFIG_FILE=${LICHEE_BOARD_CONFIG_DIR}/sys_config.fex
    fi

    if [ "x$check_cardboot" == "xtrue" ]; then
        local DTS_PATH=./arch/${ARCH}/boot/dts
        [ "x$ARCH" == "xarm64" ] && DTS_PATH=$DTS_PATH/sunxi

        if [ -f ${DTS_PATH}/${LICHEE_CHIP}_bak.dtsi ];then
            mv ${DTS_PATH}/${LICHEE_CHIP}_bak.dtsi ${DTS_PATH}/${LICHEE_CHIP}.dtsi
        fi

        # if find dragonboard_test=1 in sys_config.fex ,then will exchange sdc0 and sdc2
        local card_boot=$(awk -F= '/^dragonboard_test[[:space:]]*=/{gsub(/[[:blank:]]*/,"",$2);print $2}' $SYS_CONFIG_FILE)
        if [ "x$card_boot" == "x1" ]; then
            echo "exchange sdc0 and sdc2 for dragonboard card boot"
            ./scripts/exchange-sdc0-sdc2-for-dragonboard.sh ${DTS_PATH}/${LICHEE_CHIP}.dtsi
        fi
    fi

    if [ ! -f .config ] ; then
        printf "\n\033[0;31;1mUsing default config ${LICHEE_KERN_DEFCONF_ABSOLUTE} ...\033[0m\n\n"
        ${MAKE} ARCH=${ARCH} defconfig KBUILD_DEFCONFIG=${LICHEE_KERN_DEFCONF_RELATIVE}
    fi

    if [ "x$PACK_TINY_ANDROID" = "xtrue" ]; then
        ARCH=${ARCH} scripts/kconfig/merge_config.sh .config \
            linaro/configs/sunxi-tinyandroid.conf
    fi

    if [ "x$PACK_BSPTEST" != "x" -o "x$BUILD_SATA" != "x" -o "x$LICHEE_LINUX_DEV" = "xsata" ]; then
            if [ -f linaro/configs/sunxi-common.conf ];then
                ARCH=${ARCH} scripts/kconfig/merge_config.sh .config \
                linaro/configs/sunxi-common.conf
            fi
            if [ -f linaro/configs/sunxi-sata.conf ];then
                ARCH=${ARCH} scripts/kconfig/merge_config.sh .config \
                linaro/configs/sunxi-sata.conf
        fi
        if [ -f linaro/configs/sunxi-sata-${LICHEE_CHIP}.conf ];then
            ARCH=${ARCH} scripts/kconfig/merge_config.sh .config \
                linaro/configs/sunxi-sata-${LICHEE_CHIP}.conf
        fi
        if [ -f linaro/configs/sunxi-sata-${ARCH}.conf ];then
            ARCH=${ARCH} scripts/kconfig/merge_config.sh .config \
                linaro/configs/sunxi-sata-${ARCH}.conf
        fi
    fi

    ${MAKE} ARCH=${ARCH} CROSS_COMPILE="${CCACHE_Y}${CROSS_COMPILE}" -j${LICHEE_JLEVEL} ${arch_target} modules
    build_check
    update_kern_ver
    do_init_to_dts
    #The Image is origin binary from vmlinux.
    if [ -f arch/${ARCH}/boot/Image ]; then
        cp -vf arch/${ARCH}/boot/Image output/bImage
    fi

    if [ -f arch/${ARCH}/boot/zImage ] || [ -f arch/${ARCH}/boot/uImage ]; then
        cp -vf arch/${ARCH}/boot/[zu]Image output/
    fi

    if [ -f arch/${ARCH}/boot/Image.gz ]; then
        cp -vf arch/${ARCH}/boot/Image.gz output/
    fi

    echo "Copy rootfs.cpio.gz for ${ARCH}"
    if [ "${ARCH}" = "arm" ]; then
        cp -f rootfs_32bit.cpio.gz output/rootfs.cpio.gz
    else
        cp -f rootfs.cpio.gz output/rootfs.cpio.gz
    fi

    cp .config output/

    tar -jcf output/vmlinux.tar.bz2 vmlinux
    for file in $(find drivers sound crypto block fs security net -name "*.ko"); do
        cp $file ${LICHEE_MOD_DIR}
    done
    cp -f Module.symvers ${LICHEE_MOD_DIR}

}

build_modules()
{

    echo "Building modules"

    if [ ! -f include/generated/utsrelease.h ]; then
        printf "Please build kernel first!\n"
        exit 1
    fi

    update_kern_ver
    build_nand
    build_gpu
}

regen_rootfs_cpio()
{
    echo "regenerate rootfs cpio"

    cd ${LICHEE_KDIR}/output
    if [ -x "../scripts/build_rootfs.sh" ]; then
        ../scripts/build_rootfs.sh e ./rootfs.cpio.gz > /dev/null
    else
        echo "No such file: scripts/build_rootfs.sh"
        exit 1
    fi

    mkdir -p ./skel/lib/modules/${KERNEL_VERSION}

    if [ -e ${LICHEE_MOD_DIR}/nand.ko ]; then
        cp ${LICHEE_MOD_DIR}/nand.ko ./skel/lib/modules/${KERNEL_VERSION}
        if [ $? -ne 0 ]; then
            echo "copy nand module error: $?"
            exit 1
        fi
    fi

    ko_file=`find ./skel/lib/modules/$KERNEL_VERSION/ -name *.ko`
    if [ ! -z "$ko_file" ]; then
            ${STRIP} -d ./skel/lib/modules/$KERNEL_VERSION/*.ko
    fi

    rm -f rootfs.cpio.gz
    ../scripts/build_rootfs.sh c rootfs.cpio.gz > /dev/null
    rm -rf skel
    cd - > /dev/null
}

build_ramfs()
{
    local bss_sz=0;
    local bss_offset=0;
    local bss_size=0;
    local CHIP="";

    local BIMAGE="output/bImage";
    local RAMDISK="output/rootfs.cpio.gz";
    local DTB="output/sunxi.dtb";
    local BASE="";
    local RAMDISK_OFFSET="";
    local KERNEL_OFFSET="";

    # update rootfs.cpio.gz with new module files
    regen_rootfs_cpio

    CHIP=`echo ${LICHEE_CHIP} | sed -e 's/.*\(sun[0-9x]*i\).*/\1/g'`;

    if [ "${CHIP}" = "sun9i" ]; then
        BASE="0x20000000";
    else
        BASE="0x40000000";
    fi

    if [ "${ARCH}" = "arm" ]; then
        KERNEL_OFFSET="0x8000";
    elif [ "${ARCH}" = "arm64" ]; then
        KERNEL_OFFSET="0x80000";
    fi

    if [ -f vmlinux ]; then
        bss_offset=`${CROSS_COMPILE}readelf -S vmlinux | \
            awk  '/\.bss/ {print $5}'`;
        bss_size=`${CROSS_COMPILE}readelf -S vmlinux | \
            awk  '/\.bss/ {print $6}'`;

        # If linux-4.9 the bss_size will be in next line
        if [ -z "$bss_size" ]; then
            bss_size=`${CROSS_COMPILE}readelf -S vmlinux | \
                 awk  '/\.bss/ {getline var; print var}' | awk '{print $1}'`;
        fi

        bss_sz=$[ $((16#$bss_offset))+$((16#$bss_size))]
    fi

    # If the size of bImage larger than 16M, will offset 0x02000000
    if [ ${bss_sz} -gt $((16#1000000)) ]; then
        RAMDISK_OFFSET="0x02000000";
    else
        RAMDISK_OFFSET="0x01000000";
    fi
    DTB_OFFSET="0x04000000";

    ${MKBOOTIMG} --kernel ${BIMAGE} \
        --ramdisk ${RAMDISK} \
        --dtb ${DTB} \
        --board ${CHIP}_${ARCH} \
        --base ${BASE} \
        --kernel_offset ${KERNEL_OFFSET} \
        --ramdisk_offset ${RAMDISK_OFFSET} \
        --dtb_offset ${DTB_OFFSET} \
        --header_version 0x2 \
        -o output/boot.img

    # If uboot use *bootm* to boot kernel, we should use uImage.
    echo build_ramfs
    echo "Copy boot.img to output directory ..."
    cp output/boot.img ${LICHEE_PLAT_OUT}
    cp output/vmlinux.tar.bz2 ${LICHEE_PLAT_OUT}

    if [ -f output/zImage ] || [ -f output/uImage ]; then
        cp output/[zu]Image ${LICHEE_PLAT_OUT}
    fi

    if [ ! -f output/arisc ]; then
        echo "arisc" > output/arisc
    fi
    cp output/arisc ${LICHEE_PLAT_OUT}

    cp output/.sunxi.dts ${LICHEE_PLAT_OUT}
    cp output/sunxi.dtb ${LICHEE_PLAT_OUT}
}

gen_output()
{
    if [ "x${LICHEE_PLATFORM}" = "xandroid" ] ; then
        echo "Copy modules to target ..."
        rm -rf ${LICHEE_PLAT_OUT}/lib
        cp -rf ${LICHEE_KDIR}/output/* ${LICHEE_PLAT_OUT}
        return
    fi

    if [ -d ${LICHEE_BR_OUT}/target ] ; then
        echo "Copy modules to target ..."
        local module_dir="${LICHEE_BR_OUT}/target/lib/modules"
        rm -rf ${module_dir}
        mkdir -p ${module_dir}
        cp -rf ${LICHEE_MOD_DIR} ${module_dir}
    fi

    echo "$0"
}

clean_kernel()
{
    clarg="clean"
    if [ "x$1" == "xdistclean" ]; then
        clarg="distclean"
    fi
    echo "Cleaning kernel, arg: $clarg ..."
    ${MAKE} ARCH=${ARCH} "$clarg"
    rm -rf output/*
    echo
}

clean_modules()
{
    echo "Cleaning modules ..."
    clean_gpu
    echo
}

#####################################################################
#
#                      Main Runtine
#
#####################################################################

case "$1" in
    kernel)
        build_kernel
        ;;
    modules)
        build_modules
        ;;
    clean|distclean)
        clean_modules
        clean_kernel "$1"
        ;;
    dts)
        build_dts
        ;;
    *)
        build_kernel
        build_modules
        build_ramfs
        gen_output
        echo -e "\n\033[0;31;1m${LICHEE_CHIP} compile Kernel successful\033[0m\n\n"
        ;;
esac

继续跟踪, 执行 ./build.sh 之后,是根据 longan/kernel/linux-4.9/rootfs.cpio.gz 为基础,再把 ko 文件打包到里面去,建立新的 longan/kernel/linux-4.9/output/rootfs.cpio.gz  。

#34 Re: 全志 SOC » 刚刚收到的全志AIC800开发板,接个串口打印LOG 试一试 » 2022-02-12 20:46:42

X3

QQ图片20220212204539.png

挂载文件系统延迟一点点,移到后面去就好了,

不知道怎么改。

#35 Re: 全志 SOC » 刚刚收到的全志AIC800开发板,接个串口打印LOG 试一试 » 2022-02-12 20:21:43

X3

2022-02-12_202811.png

[    2.126916] sunxi_cpufreq_init: only one opp_table
[    2.132333] [cpu_freq] ERR: DEBUG: get cpu 0 device
[    2.137870] [cpu_freq] ERR: Unable to get regulator, use the dummy
[    2.144908] cpu0 supply dummy not found, using dummy regulator
[    2.151558] core: (null) get dummy regulator
[    2.157473] cpu cpu0: _set_opp_voltage: failed to set voltage (0 0 0 mV): -22
[    2.168949] sunxi-mmc sdc2: SD/MMC/SDIO Host Controller Driver(v3.46 2020-6-1 11:33-202006021635)
[    2.179088] sunxi-mmc sdc2: No vmmc regulator found
[    2.184586] sunxi-mmc sdc2: No vqmmc regulator found
[    2.190182] sunxi-mmc sdc2: No vdmmc regulator found
[    2.195773] sunxi-mmc sdc2: No vd33sw regulator found
[    2.201466] sunxi-mmc sdc2: No vd18sw regulator found
[    2.207154] sunxi-mmc sdc2: No vq33sw regulator found
[    2.212847] sunxi-mmc sdc2: No vq18sw regulator found
[    2.219145] sunxi-mmc sdc2: set host busy
[    2.223737] mmc:failed to get gpios
[    2.227895] sunxi-mmc sdc2: sdc set ios:clk 0Hz bm PP pm UP vdd 21 width 1 timing LEGACY(SDR12) dt B
[    2.254174] sunxi-mmc sdc2: sdc set ios:clk 400000Hz bm PP pm ON vdd 21 width 1 timing LEGACY(SDR12) dt B
[    2.280852] sunxi-mmc sdc2: detmode:alway in(non removable)
[    2.280872] sunxi-mmc sdc2: sdc set ios:clk 400000Hz bm PP pm ON vdd 21 width 1 timing LEGACY(SDR12) dt B
[    2.289228] sunxi-mmc sdc2: sdc set ios:clk 400000Hz bm PP pm ON vdd 21 width 1 timing LEGACY(SDR12) dt B
[    2.290290] sunxi-mmc sdc2: sdc set ios:clk 400000Hz bm OD pm ON vdd 21 width 1 timing LEGACY(SDR12) dt B
[    2.301134] sunxi-mmc sdc2: sdc set ios:clk 400000Hz bm OD pm ON vdd 21 width 1 timing LEGACY(SDR12) dt B
[    2.301196] sunxi-mmc sdc2: sdc set ios:clk 400000Hz bm OD pm ON vdd 21 width 1 timing LEGACY(SDR12) dt B
[    2.314032] sunxi-mmc sdc2: sdc set ios:clk 400000Hz bm OD pm ON vdd 21 width 1 timing LEGACY(SDR12) dt B
[    2.359182] sunxi-mmc sdc2: sdc set ios:clk 400000Hz bm PP pm ON vdd 21 width 1 timing LEGACY(SDR12) dt B
[    2.361009] hidraw: raw HID events driver (C) Jiri Kosina
[    2.363340] usbcore: registered new interface driver usbhid
[    2.363342] usbhid: USB HID core driver
[    2.364587] ashmem: initialized
[    2.366234] optee: probing for conduit method from DT.
[    2.366243] optee: api uid mismatch
[    2.366618] usbcore: registered new interface driver snd-usb-audio
[    2.368138] u32 classifier
[    2.368140]     Actions configured
[    2.368149] Netfilter messages via NETLINK v0.30.
[    2.368164] nfnl_acct: registering with nfnetlink.
[    2.368442] nf_conntrack version 0.5.0 (8192 buckets, 32768 max)
[    2.368649] ctnetlink v0.93: registering with nfnetlink.
[    2.369104] xt_time: kernel timezone is -0000
[    2.369192] ipip: IPv4 and MPLS over IPv4 tunneling driver
[    2.369786] gre: GRE over IPv4 demultiplexor driver
[    2.369790] ip_gre: GRE over IPv4 tunneling driver
[    2.370771] IPv4 over IPsec tunneling driver
[    2.382389] ip_tables: (C) 2000-2006 Netfilter Core Team
[    2.382616] arp_tables: arp_tables: (C) 2002 David S. Miller
[    2.386681] Initializing XFRM netlink socket
[    2.386713] IPsec XFRM device driver
[    2.387400] NET: Registered protocol family 10
[    2.389329] mip6: Mobile IPv6
[    2.389358] ip6_tables: (C) 2000-2006 Netfilter Core Team
[    2.391214] sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
[    2.392529] NET: Registered protocol family 17
[    2.392555] NET: Registered protocol family 15
[    2.392584] l2tp_core: L2TP core driver, V2.0
[    2.392596] l2tp_ppp: PPPoL2TP kernel driver, V2.0
[    2.396018] Registered cp15_barrier emulation handler
[    2.396030] Registered setend emulation handler
[    2.396805] registered taskstats version 1
[    2.409204] cpu cpu1: dev_pm_opp_set_prop_name: Already have prop-name a0
[    2.409211] cpu cpu2: dev_pm_opp_set_prop_name: Already have prop-name a0
[    2.409216] cpu cpu3: dev_pm_opp_set_prop_name: Already have prop-name a0
[    2.409798] get usb_detect_mode is fail, 22
[    2.413847] sunxi-rtc rtc: setting system clock to 1970-01-01 00:00:19 UTC (19)
[    2.414926] usb1-vbus: disabling
[    2.414931] ALSA device list:
[    2.414933]   No soundcards found.
[    2.589139] VFS: Cannot open root device "mmcblk0p4" or unknown-block(0,0): error -6
[    2.597912] Please append a correct "root=" boot option; here are the available partitions:
[    2.607329] 0100            8192 ram0  (driver?)
[    2.612552] 0101            8192 ram1  (driver?)
[    2.617776] 0102            8192 ram2  (driver?)
[    2.623002] 0103            8192 ram3  (driver?)
[    2.628238] 0104            8192 ram4 [    2.628301] sunxi-mmc sdc2: sdc set ios:clk 400000Hz bm PP pm ON vdd 21 width 1 timing MMC-HS(SDR20) dt B
[    2.632332] sunxi-mmc sdc2: sdc set ios:clk 50000000Hz bm PP pm ON vdd 21 width 1 timing MMC-HS(SDR20) dt B

[    2.654012]  (driver?)
[    2.654069] sunxi-mmc sdc2: sdc set ios:clk 50000000Hz bm PP pm ON vdd 21 width 8 timing MMC-HS(SDR20) dt B
[    2.667849] 0105            8192 ram5  (driver?)
[    2.671944] sunxi-mmc sdc2: sdc set ios:clk 50000000Hz bm PP pm ON vdd 21 width 8 timing MMC-DDR52 dt B
[    2.683648] 0106            8192 ram6  (driver?)
[    2.688870] 0107            8192 ram7 [    2.688934] mmc0: new DDR MMC card at address 0001
[    2.689656] mmcblk0: mmc0:0001 8WPD3R 7.28 GiB
[    2.689956] mmcblk0boot0: mmc0:0001 8WPD3R partition 1 4.00 MiB
[    2.693658] mmcblk0boot1: mmc0:0001 8WPD3R partition 2 4.00 MiB
[    2.697293] mmcblk0rpmb: mmc0:0001 8WPD3R partition 3 512 KiB

[    2.723282]  (driver?)
[    2.723378]  mmcblk0: p1 p2 p3 p4 p5 p6
[    2.730501] 0108            8192 ram8  (driver?)
[    2.735716] 0109            8192 ram9  (driver?)
[    2.740936] 010a            8192 ram10  (driver?)
[    2.746248] 010b            8192 ram11  (driver?)
[    2.751565] 010c            8192 ram12  (driver?)
[    2.756871] 010d            8192 ram13  (driver?)
[    2.762182] 010e            8192 ram14  (driver?)
[    2.767504] 010f            8192 ram15  (driver?)
[    2.772830] b300         7634944 mmcblk0  driver: mmcblk
[    2.778836]   b301           16384 mmcblk0p1 a0085546-4166-744a-a353-fca9272b8e45
[    2.787265]   b302           16384 mmcblk0p2 a0085546-4166-744a-a353-fca9272b8e46
[    2.795700]   b303           32768 mmcblk0p3 a0085546-4166-744a-a353-fca9272b8e47
[    2.804130]   b304          524288 mmcblk0p4 a0085546-4166-744a-a353-fca9272b8e48
[    2.812565]   b305           16384 mmcblk0p5 a0085546-4166-744a-a353-fca9272b8e49
[    2.821005]   b306         6991855 mmcblk0p6 a0085546-4166-744a-a353-fca9272b8e4a
[    2.829443] b330             512 mmcblk0rpmb  (driver?)
[    2.835340] b320            4096 mmcblk0boot1  (driver?)
[    2.841338] b310            4096 mmcblk0boot0  (driver?)
[    2.847331] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
[    2.856626] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.9.170 #3
[    2.863375] Hardware name: sun50iw10 (DT)
[    2.867879] Call trace:
[    2.870633] [<ffffff800808bfb8>] dump_backtrace+0x0/0x2b8
[    2.876702] [<ffffff800808c294>] show_stack+0x24/0x30
[    2.882382] [<ffffff800847c0e0>] dump_stack+0x90/0xb0
[    2.888062] [<ffffff80081c41c8>] panic+0x148/0x374
[    2.893448] [<ffffff8008fa1158>] mount_block_root+0x21c/0x2fc
[    2.899906] [<ffffff8008fa13f0>] mount_root+0x74/0x84
[    2.905583] [<ffffff8008fa1568>] prepare_namespace+0x168/0x1b0
[    2.912140] [<ffffff8008fa0d74>] kernel_init_freeable+0x1bc/0x1e0
[    2.918991] [<ffffff8008b8f410>] kernel_init+0x18/0x120
[    2.924864] [<ffffff80080834f0>] ret_from_fork+0x10/0x20
[    2.930831] SMP: stopping secondary CPUs
[    2.935248] Kernel Offset: disabled
[    2.939180] Memory Limit: none
[    2.942627] ---[ end Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
[    2.952794] sunxi dump enabled
[    2.956222] dump regs done
[    2.959312] flush cache done
[    2.962560] crashdump enter
NOTICE:  sunxi_usb_dev_register
NOTICE:  sunxi_usb_main_loop

感觉这个AIC800的 SDC2 有问题,但是不确定是硬件问题,还是软件问题,需要文件系统的时候eMMC却没有就绪,但是最终挂载成功,系统却宕机了。

怪不得出厂的 rootfs 用 initramfs了。

#36 Re: 全志 SOC » 刚刚收到的全志AIC800开发板,接个串口打印LOG 试一试 » 2022-02-09 12:45:55

X3

用uboot命令查看分区与文件:

切换到 eMMC:

=> mmc dev 2
[27.544][mmc]: Best spd md: 2-HSDDR52/DDR50, freq: 2-50000000, Bus width: 8
switch to partitions #0, OK
mmc2(part 0) is current device
=>

再瞅一次分区:

=> mmc part

Partition Map for MMC device 2  --   Partition Type: EFI

Part    Start LBA       End LBA         Name
        Attributes
        Type GUID
        Partition GUID
  1     0x00012000      0x00019fff      "boot-resource"
        attrs:  0x8000000000000000
        type:   ebd0a0a2-b9e5-4433-87c0-68b6b72699c7
        guid:   a0085546-4166-744a-a353-fca9272b8e45
  2     0x0001a000      0x00021fff      "env"
        attrs:  0x8000000000000000
        type:   ebd0a0a2-b9e5-4433-87c0-68b6b72699c7
        guid:   a0085546-4166-744a-a353-fca9272b8e46
  3     0x00022000      0x00031fff      "boot"
        attrs:  0x8000000000000000
        type:   ebd0a0a2-b9e5-4433-87c0-68b6b72699c7
        guid:   a0085546-4166-744a-a353-fca9272b8e47
  4     0x00032000      0x00131fff      "rootfs"
        attrs:  0x8000000000000000
        type:   ebd0a0a2-b9e5-4433-87c0-68b6b72699c7
        guid:   a0085546-4166-744a-a353-fca9272b8e48
  5     0x00132000      0x00139fff      "klog"
        attrs:  0x8000000000000000
        type:   ebd0a0a2-b9e5-4433-87c0-68b6b72699c7
        guid:   a0085546-4166-744a-a353-fca9272b8e49
  6     0x0013a000      0x01d1efde      "UDISK"
        attrs:  0x8000000000000000
        type:   ebd0a0a2-b9e5-4433-87c0-68b6b72699c7
        guid:   a0085546-4166-744a-a353-fca9272b8e4a
=>

然后就可以查看分区信息与文件了:

=> fatinfo mmc 2:1
Interface:  MMC
  Device 2: Vendor: Man 000015 Snr fc7e4f81 Rev: 0.3 Prod: AJTD4R
            Type: Removable Hard Disk
            Capacity: 14910.0 MB = 14.5 GB (30535680 x 512)
Filesystem: FAT16 "Volumn"
=> fatls mmc 2:1
   344813   font24.sft
   357443   font32.sft
  2764856   bootlogo.bmp
            bat/
    10140   test_config.fex
   189966   fastbootlogo.bmp
            wavefile/
    10240   test_config.bin
      512   magic.bin

7 file(s), 2 dir(s)

=>

#37 Re: 全志 SOC » 刚刚收到的全志AIC800开发板,接个串口打印LOG 试一试 » 2022-02-09 12:37:14

X3

输入 part list sunxi_flash 0 命令获取eMMC分区列表:

=> part list sunxi_flash 0

Partition Map for UNKNOWN device 0  --   Partition Type: EFI

Part    Start LBA       End LBA         Name
        Attributes
        Type GUID
        Partition GUID
  1     0x00012000      0x00019fff      "boot-resource"
        attrs:  0x8000000000000000
        type:   ebd0a0a2-b9e5-4433-87c0-68b6b72699c7
        guid:   a0085546-4166-744a-a353-fca9272b8e45
  2     0x0001a000      0x00021fff      "env"
        attrs:  0x8000000000000000
        type:   ebd0a0a2-b9e5-4433-87c0-68b6b72699c7
        guid:   a0085546-4166-744a-a353-fca9272b8e46
  3     0x00022000      0x00031fff      "boot"
        attrs:  0x8000000000000000
        type:   ebd0a0a2-b9e5-4433-87c0-68b6b72699c7
        guid:   a0085546-4166-744a-a353-fca9272b8e47
  4     0x00032000      0x00131fff      "rootfs"
        attrs:  0x8000000000000000
        type:   ebd0a0a2-b9e5-4433-87c0-68b6b72699c7
        guid:   a0085546-4166-744a-a353-fca9272b8e48
  5     0x00132000      0x00139fff      "klog"
        attrs:  0x8000000000000000
        type:   ebd0a0a2-b9e5-4433-87c0-68b6b72699c7
        guid:   a0085546-4166-744a-a353-fca9272b8e49
  6     0x0013a000      0x01d1efde      "UDISK"
        attrs:  0x8000000000000000
        type:   ebd0a0a2-b9e5-4433-87c0-68b6b72699c7
        guid:   a0085546-4166-744a-a353-fca9272b8e4a

也可以先输入mmc info

=> mmc info
curr_device:2
Device: SUNXI SD/MMC
Manufacturer ID: 15
OEM: 100
Name: AJTD4
Bus Speed: 50000000
Mode : MMC legacy
Rd Block Len: 512
MMC version 5.1
High Capacity: Yes
Capacity: 14.6 GiB
Bus Width: 8-bit DDR
Erase Group Size: 512 KiB
HC WP Group Size: 8 MiB
User Capacity: 14.6 GiB WRREL
Boot Capacity: 4 MiB ENH
RPMB Capacity: 4 MiB ENH

然后输入 mmc part

=> mmc part

Partition Map for MMC device 2  --   Partition Type: EFI

Part    Start LBA       End LBA         Name
        Attributes
        Type GUID
        Partition GUID
  1     0x00012000      0x00019fff      "boot-resource"
        attrs:  0x8000000000000000
        type:   ebd0a0a2-b9e5-4433-87c0-68b6b72699c7
        guid:   a0085546-4166-744a-a353-fca9272b8e45
  2     0x0001a000      0x00021fff      "env"
        attrs:  0x8000000000000000
        type:   ebd0a0a2-b9e5-4433-87c0-68b6b72699c7
        guid:   a0085546-4166-744a-a353-fca9272b8e46
  3     0x00022000      0x00031fff      "boot"
        attrs:  0x8000000000000000
        type:   ebd0a0a2-b9e5-4433-87c0-68b6b72699c7
        guid:   a0085546-4166-744a-a353-fca9272b8e47
  4     0x00032000      0x00131fff      "rootfs"
        attrs:  0x8000000000000000
        type:   ebd0a0a2-b9e5-4433-87c0-68b6b72699c7
        guid:   a0085546-4166-744a-a353-fca9272b8e48
  5     0x00132000      0x00139fff      "klog"
        attrs:  0x8000000000000000
        type:   ebd0a0a2-b9e5-4433-87c0-68b6b72699c7
        guid:   a0085546-4166-744a-a353-fca9272b8e49
  6     0x0013a000      0x01d1efde      "UDISK"
        attrs:  0x8000000000000000
        type:   ebd0a0a2-b9e5-4433-87c0-68b6b72699c7
        guid:   a0085546-4166-744a-a353-fca9272b8e4a
=>

一样可以获取分区列表。


然后手动执行:

run setargs_mmc
mmc read 45000000 0x00022000 0x10000
bootm 45000000

可以手动引导启动Linux:

=> printenv
aaa=bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
boot_fastboot=fastboot
boot_normal=sunxi_flash read 45000000 boot;bootm 45000000
boot_recovery=sunxi_flash read 45000000 recovery;bootm 45000000
bootcmd=run setargs_mmc boot_normal
bootdelay=0
bootreason=unknow
ccc=ddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddz
cma=8M
console=ttyS0,115200
earlyprintk=sunxi-uart,0x05000000
fdtcontroladdr=7bed7240
fileaddr=40000000
filesize=2a3038
init=/init
initcall_debug=0
keybox_list=widevine,ec_key,ec_cert1,ec_cert2,ec_cert3,rsa_key,rsa_cert1,rsa_cert2,rsa_cert3
loglevel=8
mmc_root=/dev/mmcblk0p4
nand_root=/dev/nand0p4
partitions=boot-resource@mmcblk0p1:env@mmcblk0p2:boot@mmcblk0p3:rootfs@mmcblk0p4:klog@mmcblk0p5:UDISK@mmcblk0p6
rotpk_status=0
setargs_mmc=setenv  bootargs earlyprintk=${earlyprintk} initcall_debug=${initcall_debug} console=${console} loglevel=${loglevel} root=${mmc_root}  init=${init} partitions=${partitions} cma=${cma} snum=${snum} mac_addr=${mac} wifi_mac=${wifi_mac} bt_mac=${bt_mac} specialstr=${specialstr} gpt=1
setargs_nand=setenv bootargs earlyprintk=${earlyprintk} initcall_debug=${initcall_debug} console=${console} loglevel=${loglevel} root=${nand_root} init=${init} partitions=${partitions} cma=${cma} snum=${snum} mac_addr=${mac} wifi_mac=${wifi_mac} bt_mac=${bt_mac} specialstr=${specialstr} gpt=1
snum=0c001415a0c08851e4d

Environment size: 1427/131068 bytes
=> run setargs_mmc
=> mmc read 45000000 0x00022000 0x10000

MMC read: dev # 2, block # 139264, count 65536 ... 65536 blocks read: OK
=> bootm 45000000
[282.345]in boot normal mode,pass normal para to cmdline
[282.351]android.hardware = sun50iw10p1
[282.354]androidboot.dtbo_idx  can't findAndroid's image name: sun50i_arm64
[282.432]Starting kernel ...

[282.435][mmc]: mmc exit start
[282.454][mmc]: mmc 2 exit ok
[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 4.9.170 (whycan@ubuntu) (gcc version 5.3.1 20160412 (Linaro GCC 5.3-2016.05) ) #2 SMP PREEMPT Mon Feb 7 21:04:51 CST 2022
[    0.000000] Boot CPU: AArch64 Processor [410fd034]
[    0.000000] bootconsole [earlycon0] enabled
[    0.000000] disp reserve base 0x7bf65140 ,size 0x3e8000
[    0.000000] cma: Reserved 8 MiB at 0x000000007f800000
[    0.000000] On node 0 totalpages: 262144
[    0.000000]   DMA zone: 4096 pages used for memmap
[    0.000000]   DMA zone: 0 pages reserved
[    0.000000]   DMA zone: 262144 pages, LIFO batch:31
[    0.000000] psci: probing for conduit method from DT.
[    0.000000] psci: PSCIv1.0 detected in firmware.
[    0.000000] psci: Using standard PSCI v0.2 function IDs
[    0.000000] psci: Trusted OS migration not required
[    0.000000] psci: SMC Calling Convention v1.0
[    0.000000] percpu: Embedded 23 pages/cpu @ffffffc03f705000 s53376 r8192 d32640 u94208
[    0.000000] pcpu-alloc: s53376 r8192 d32640 u94208 alloc=23*4096
[    0.000000] pcpu-alloc: [0] 0 [0] 1 [0] 2 [0] 3
[    0.000000] Detected VIPT I-cache on CPU0
[    0.000000] CPU features: enabling workaround for ARM erratum 845719
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 258048
[    0.000000] Kernel command line: earlyprintk=sunxi-uart,0x05000000 initcall_debug=0 console=ttyS0,115200 loglevel=8 root=/dev/mmcblk0p4 init=/init partitions=boot-resource@mmcblk0p1:env@mmcblk0p2:boot@mmcblk0p3:rootfs@mmcblk0p4:klog@mmcblk0p5:UDISK@mmcblk0p6 cma=8M snum=0c001415a0c08851e4d mac_addr= wifi_mac= bt_mac= specialstr= gpt=1 androidboot.mode=normal androidboot.serialno=0c001415a0c08851e4d androidboot.hardware=sun50iw10p1 boot_type=2 androidboot.boot_type=2 androidboot.secure_os_exist=0 androidboot.trustchain=false gpt=1 uboot_message=2018.05(02/07/2022-22:08:09) disp_reserve=4096000,0x7bf65140 bootreason=unknow
[    0.000000] PID hash table entries: 4096 (order: 3, 32768 bytes)
[    0.000000] Dentry cache hash table entries: 131072 (order: 8, 1048576 bytes)
[    0.000000] Inode-cache hash table entries: 65536 (order: 7, 524288 bytes)
[    0.000000] Memory: 975568K/1048576K available (11454K kernel code, 2200K rwdata, 4056K rodata, 4416K init, 602K bss, 64816K reserved, 8192K cma-reserved)
[    0.000000] Virtual kernel memory layout:
[    0.000000]     modules : 0xffffff8000000000 - 0xffffff8008000000   (   128 MB)
[    0.000000]     vmalloc : 0xffffff8008000000 - 0xffffffbebfff0000   (   250 GB)
[    0.000000]       .text : 0xffffff8008080000 - 0xffffff8008bb0000   ( 11456 KB)
[    0.000000]     .rodata : 0xffffff8008bb0000 - 0xffffff8008fb0000   (  4096 KB)
[    0.000000]       .init : 0xffffff8008fb0000 - 0xffffff8009400000   (  4416 KB)
[    0.000000]       .data : 0xffffff8009400000 - 0xffffff8009626008   (  2201 KB)
[    0.000000]        .bss : 0xffffff8009626008 - 0xffffff80096bc998   (   603 KB)
[    0.000000]     fixed   : 0xffffffbefe7fb000 - 0xffffffbefec00000   (  4116 KB)
[    0.000000]     PCI I/O : 0xffffffbefee00000 - 0xffffffbeffe00000   (    16 MB)
[    0.000000]     vmemmap : 0xffffffbf00000000 - 0xffffffc000000000   (     4 GB maximum)
[    0.000000]               0xffffffbf00000000 - 0xffffffbf01000000   (    16 MB actual)
[    0.000000]     memory  : 0xffffffc000000000 - 0xffffffc040000000   (  1024 MB)
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
[    0.000000] Preemptible hierarchical RCU implementation.
[    0.000000]  Build-time adjustment of leaf fanout to 64.
[    0.000000] NR_IRQS:64 nr_irqs:64 0
[    0.000000] clocksource: timer: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns
[    0.000000] arm_arch_timer: Architected cp15 timer(s) running at 24.00MHz (virt).
[    0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x588fe9dc0, max_idle_ns: 440795202592 ns
[    0.000004] sched_clock: 56 bits at 24MHz, resolution 41ns, wraps every 4398046511097ns
[    0.008148] Calibrating delay loop (skipped), value calculated using timer frequency.. 48.00 BogoMIPS (lpj=80000)
[    0.018200] pid_max: default: 32768 minimum: 301
[    0.023032] Security Framework initialized
[    0.026879] SELinux:  Initializing.
[    0.030473] SELinux:  Starting in permissive mode
[    0.035135] Mount-cache hash table entries: 2048 (order: 2, 16384 bytes)
[    0.041698] Mountpoint-cache hash table entries: 2048 (order: 2, 16384 bytes)
[    0.049568] ftrace: allocating 34576 entries in 136 pages
[    0.134306] sched-energy: CPU device node has no sched-energy-costs
[    0.134949] Invalid sched_group_energy for CPU0
[    0.139487] CPU0: update cpu_capacity 1024
[    0.153593] ASID allocator initialised with 32768 entries
[    0.172500] BOOTEVENT:       172.490624: ON
[    0.200562] Detected VIPT I-cache on CPU1
[    0.200612] Invalid sched_group_energy for CPU1
[    0.200615] CPU1: update cpu_capacity 1024
[    0.200618] CPU1: Booted secondary processor [410fd034]
[    0.223930] Detected VIPT I-cache on CPU2
[    0.223957] Invalid sched_group_energy for CPU2
[    0.223960] CPU2: update cpu_capacity 1024
[    0.223962] CPU2: Booted secondary processor [410fd034]
[    0.247343] Detected VIPT I-cache on CPU3
[    0.247368] Invalid sched_group_energy for CPU3
[    0.247371] CPU3: update cpu_capacity 1024
[    0.247374] CPU3: Booted secondary processor [410fd034]
[    0.247457] Brought up 4 CPUs
[    0.298093] SMP: Total of 4 processors activated.
[    0.302784] CPU features: detected feature: 32-bit EL0 Support
[    0.308590] CPU features: detected feature: Kernel page table isolation (KPTI)
[    0.319451] CPU: All CPU(s) started at EL1
[    0.319860] alternatives: patching kernel code
[    0.324468] Invalid sched_group_energy for CPU3
[    0.328787] CPU3: update max cpu_capacity 1024
[    0.333203] Invalid sched_group_energy for Cluster3
[    0.338055] Invalid sched_group_energy for CPU2
[    0.342562] Invalid sched_group_energy for Cluster2
[    0.347415] Invalid sched_group_energy for CPU1
[    0.351923] Invalid sched_group_energy for Cluster1
[    0.356775] Invalid sched_group_energy for CPU0
[    0.361282] Invalid sched_group_energy for Cluster0
[    0.366664] CPU1: update max cpu_capacity 1024
[    0.371280] devtmpfs: initialized
[    0.412713] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 6370867519511994 ns
[    0.416850] futex hash table entries: 1024 (order: 5, 131072 bytes)
[    0.423648] atomic64_test: passed
[    0.426348] pinctrl core: initialized pinctrl subsystem
[    0.433612] NET: Registered protocol family 16
[    0.437215] dump_class_init,861, success
[    0.453277] cpuidle: using governor menu
[    0.454604] sunxi iommu: irq = 9
[    0.455385] vdso: 2 pages (1 code @ ffffff8008bb8000, 1 data @ ffffff8009404000)
[    0.462180] hw-breakpoint: found 6 breakpoint and 4 watchpoint registers.
[    0.470358] DMA: preallocated 256 KiB pool for atomic allocations
[    0.477994] sun50iw10p1-r-pinctrl r_pio: initialized sunXi PIO driver
[    0.498165] sun50iw10p1-pinctrl pio: initialized sunXi PIO driver
[    0.502646] iommu: Adding device 1c0e000.ve to group 0
[    0.510962] iommu: Adding device 6000000.disp to group 0
[    0.511860] iommu: Adding device 6480000.g2d to group 0
[    0.519814] iommu: Adding device csi0 to group 0
[    0.520855] iommu: Adding device csi1 to group 0
[    0.526118] iommu: Adding device 2108000.tdm to group 0
[    0.530686] iommu: Adding device 2100000.isp to group 0
[    0.535895] iommu: Adding device 2102000.isp to group 0
[    0.540921] iommu: Adding device 2110000.scaler to group 0
[    0.546382] iommu: Adding device 2110400.scaler to group 0
[    0.551848] iommu: Adding device 2110800.scaler to group 0
[    0.557291] iommu: Adding device 2110c00.scaler to group 0
[    0.600707] pwm module init!
[    0.605767] sunxi-pm debug v3.10
[    0.607253] SCSI subsystem initialized
[    0.608153] usbcore: registered new interface driver usbfs
[    0.612647] usbcore: registered new interface driver hub
[    0.617975] usbcore: registered new device driver usb
[    0.623128] sunxi_i2c_adap_init()2541 - init
[    0.627692] sunxi_i2c_probe()2289 - [i2c0] twi_drv_used = 0
[    0.632689] sunxi_i2c_probe()2293 - [i2c0] twi_pkt_interval = 0
[    0.638579] twi0 supply twi not found, using dummy regulator
[    0.644293] twi_request_gpio()453 - [i2c0] init name: twi0
[    0.650381] sunxi_i2c_probe()2289 - [i2c1] twi_drv_used = 0
[    0.655220] sunxi_i2c_probe()2293 - [i2c1] twi_pkt_interval = 0
[    0.661120] twi1 supply twi not found, using dummy regulator
[    0.666814] twi_request_gpio()453 - [i2c1] init name: twi1
[    0.673029] sunxi_i2c_probe()2289 - [i2c2] twi_drv_used = 0
[    0.677755] sunxi_i2c_probe()2293 - [i2c2] twi_pkt_interval = 0
[    0.683642] twi2 supply twi not found, using dummy regulator
[    0.689344] twi_request_gpio()453 - [i2c2] init name: twi2
[    0.695318] sunxi_i2c_probe()2289 - [i2c3] twi_drv_used = 0
[    0.700284] sunxi_i2c_probe()2293 - [i2c3] twi_pkt_interval = 0
[    0.706174] twi3 supply twi not found, using dummy regulator
[    0.711895] twi_request_gpio()453 - [i2c3] init name: twi3
[    0.717830] media: Linux media interface: v0.10
[    0.721836] Linux video capture interface: v2.00
[    0.727372] ion_parse_dt_heap_common: id 0 type 0 name sys_user align 1000
[    0.733437] ion_parse_dt_heap_common: id 4 type 4 name cma align 1000
[    0.739800] ion_parse_dt_heap_common: id 6 type 6 name secure align 1000
[    0.746618] drm config service not available: FFFFFFFF
[    0.751674] Advanced Linux Sound Architecture Driver Initialized.
[    0.758204] Bluetooth: Core ver 2.22
[    0.761081] NET: Registered protocol family 31
[    0.765453] Bluetooth: HCI device and connection manager initialized
[    0.771784] Bluetooth: HCI socket layer initialized
[    0.776638] Bluetooth: L2CAP socket layer initialized
[    0.781699] Bluetooth: SCO socket layer initialized
[    0.787283] ncs8801s init:*************************
[    0.791515] script_ncs8801s_gpio_init: ncs8801s is not used
[    0.797408] clocksource: Switched to clocksource arch_sys_counter
[    0.880067] VFS: Disk quotas dquot_6.6.0
[    0.880209] VFS: Dquot-cache hash table entries: 512 (order 0, 4096 bytes)
[    0.888007] udc_init,0
[    0.889217] NET: Registered protocol family 2
[    0.904277] TCP established hash table entries: 8192 (order: 4, 65536 bytes)
[    0.905752] TCP bind hash table entries: 8192 (order: 5, 131072 bytes)
[    0.912341] TCP: Hash tables configured (established 8192 bind 8192)
[    0.918594] UDP hash table entries: 512 (order: 2, 16384 bytes)
[    0.924446] UDP-Lite hash table entries: 512 (order: 2, 16384 bytes)
[    0.931083] NET: Registered protocol family 1
[    0.935380] Trying to unpack rootfs image as initramfs...
[    1.090254] Freeing initrd memory: 2544K
[    1.091674] hw perfevents: enabled with armv8_pmuv3 PMU driver, 7 counters available
[    1.098906] audit: initializing netlink subsys (disabled)
[    1.101725] audit: type=2000 audit(0.930:1): initialized
[    1.108074] workingset: timestamp_bits=45 max_order=18 bucket_order=0
[    1.125195] Registering sdcardfs 0.1
[    1.125754] ntfs: driver 2.1.32 [Flags: R/W].
[    1.127958] fuse init (API version 7.26)
[    1.133557] SELinux:  Registering netfilter hooks
[    1.140640] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 250)
[    1.143450] io scheduler noop registered
[    1.147340] io scheduler deadline registered
[    1.151849] io scheduler cfq registered (default)
[    1.157892] [DISP]disp_module_init
[    1.160793] [DISP] disp_init,line:2260:
[    1.163270] smooth display screen:1 type:1 mode:4
[    1.251503] [DISP] lcd_clk_config,line:665:
[    1.251550]▒ʂ▒▒▒▒▒▒Jj
                        [    1.251550]      clk real:pll(492000000),clk(492000000),dclk(70285714) dsi_rate(0)
[    1.254601] [DISP]disp_module_init finish
[    1.256651] uart uart0: get regulator failed
[    1.256666] uart0 supply uart not found, using dummy regulator
[    1.256930] uart0: ttyS0 at MMIO 0x5000000 (irq = 349, base_baud = 1500000) is a SUNXI
[    1.256949] sw_console_setup()1731 - console setup baud 115200 parity n bits 8, flow n
[    1.289884] console [ttyS0] enabled
[    1.289884] console [ttyS0] enabled
[    1.299414] bootconsole [earlycon0] disabled
[    1.299414] bootconsole [earlycon0] disabled
[    1.308491] uart uart1: get regulator failed
[    1.316710] uart1 supply uart not found, using dummy regulator
[    1.323535] uart1: ttyS1 at MMIO 0x5000400 (irq = 350, base_baud = 1500000) is a SUNXI
[    1.333434] misc dump reg init
[    1.337990] G2D: Module initialized.major:246
[    1.344217] [drm] Initialized
[    1.347743] Unable to detect cache hierarchy for CPU 0
[    1.367056] brd: module loaded
[    1.386024] loop: module loaded
[    1.390441] zram: Added device: zram0
[    1.394826] [NAND][NE] Not found valid nand node on dts
[    1.401763] sunxi-wlan soc@03000000:wlan@0: wlan_busnum (1)
[    1.408105] sunxi-wlan soc@03000000:wlan@0: Missing wlan_power.
[    1.414785] sunxi-wlan soc@03000000:wlan@0: wlan_power_name ((null))
[    1.421953] sunxi-wlan soc@03000000:wlan@0: Missing wlan_io_regulator.
[    1.429313] sunxi-wlan soc@03000000:wlan@0: io_regulator_name ((null))
[    1.436721] sunxi-wlan soc@03000000:wlan@0: wlan_regon gpio=357  mul-sel=1  pull=-1  drv_level=-1  data=0
[    1.447527] sunxi-wlan soc@03000000:wlan@0: get gpio chip_en failed
[    1.454593] sunxi-wlan soc@03000000:wlan@0: get gpio power_en failed
[    1.461775] sunxi-wlan soc@03000000:wlan@0: wlan_hostwake gpio=358  mul-sel=1  pull=-1  drv_level=-1  data=0
[    1.472927] sunxi-wlan soc@03000000:wlan@0: clk not config
[    1.479119] sunxi-wlan soc@03000000:wlan@0: dcxo not config
[    1.485423] sunxi-wlan soc@03000000:wlan@0: pinctrl_lookup_state(default) failed! return ffffffffffffffed
[    1.497256] [ADDR_MGT] addr_mgt_probe: success.
[    1.504437] it6612_init-<629>:it6612 init:*************************
[    1.512198] it6612_probe-<497>:it6612 probe:*************************
[    1.525407] twi_stop()514 - [i2c0] STOP can't sendout!
[    1.531183] sunxi_i2c_core_process()1751 - [i2c0] STOP failed!
[    1.537762] sunxi_i2c_do_xfer()1946 - [i2c0] incomplete xfer (status: 0x20, dev addr: 0x4c)
[    1.550267] twi_stop()524 - [i2c1] i2c state(0x0) isn't idle(0xf8)
[    1.557214] sunxi_i2c_core_process()1751 - [i2c1] STOP failed!
[    1.563828] sunxi_i2c_do_xfer()1946 - [i2c1] incomplete xfer (status: 0xff, dev addr: 0x4c)
[    1.586546] twi_stop()524 - [i2c2] i2c state(0x0) isn't idle(0xf8)
[    1.593493] sunxi_i2c_core_process()1751 - [i2c2] STOP failed!
[    1.600094] sunxi_i2c_do_xfer()1946 - [i2c2] incomplete xfer (status: 0xff, dev addr: 0x4c)
[    1.609737] sunxi_i2c_do_xfer()1946 - [i2c3] incomplete xfer (status: 0x20, dev addr: 0x4c)
[    1.619857] libphy: Fixed MDIO Bus: probed
[    1.624499] tun: Universal TUN/TAP device driver, 1.6
[    1.630191] tun: (C) 1999-2004 Max Krasnyansky <maxk@qualcomm.com>
[    1.638995] gmac-power0: NULL
[    1.642352] gmac-power1: NULL
[    1.645699] gmac-power2: NULL
[    1.649945] PPP generic driver version 2.4.2
[    1.655038] PPP BSD Compression module registered
[    1.660345] PPP Deflate Compression module registered
[    1.666050] PPP MPPE Compression module registered
[    1.671465] NET: Registered protocol family 24
[    1.676463] PPTP driver version 0.8.5
[    1.680959] usbcore: registered new interface driver rtl8150
[    1.687451] usbcore: registered new interface driver r8152
[    1.693703] usbcore: registered new interface driver asix
[    1.699847] usbcore: registered new interface driver ax88179_178a
[    1.706774] usbcore: registered new interface driver cdc_ether
[    1.713424] usbcore: registered new interface driver smsc75xx
[    1.719975] usbcore: registered new interface driver smsc95xx
[    1.726516] usbcore: registered new interface driver net1080
[    1.732949] usbcore: registered new interface driver cdc_subset
[    1.739685] usbcore: registered new interface driver zaurus
[    1.746019] usbcore: registered new interface driver MOSCHIP usb-ethernet driver
[    1.754450] usbcore: registered new interface driver cdc_ncm
[    1.760828] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    1.768546] get ehci0-controller, regulator_io is no nocare
[    1.774836] get ehci0-controller wakeup-source is fail.
[    1.780968] sunxi ehci0-controller don't init wakeup source
[    1.787258] [sunxi-ehci0]: probe, pdev->name: 5101000.ehci0-controller, sunxi_ehci: 0xffffff80096a7ac0, 0x:ffffff80097d6000, irq_no:164
[    1.800969] [sunxi-ehci0]: Not init ehci0
[    1.805620] get ehci1-controller, regulator_io is no nocare
[    1.812097] [sunxi-ehci1]: probe, pdev->name: 5200000.ehci1-controller, sunxi_ehci: 0xffffff80096a7e48, 0x:ffffff80097f1000, irq_no:166
[    1.825829] 5200000.ehci1-controller supply drvvbus not found, using dummy regulator
[    1.834680] sunxi-ehci 5200000.ehci1-controller: SW USB2.0 'Enhanced' Host Controller (EHCI) Driver
[    1.844899] sunxi-ehci 5200000.ehci1-controller: new USB bus registered, assigned bus number 1
[    1.855124] sunxi-ehci 5200000.ehci1-controller: irq 358, io mem 0xffffffc03daa8410
[    1.874097] sunxi-ehci 5200000.ehci1-controller: USB 0.0 started, EHCI 1.00
[    1.883019] hub 1-0:1.0: USB hub found
[    1.887292] hub 1-0:1.0: 1 port detected
[    1.892591] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[    1.899905] get ohci0-controller, regulator_io is no nocare
[    1.906203] get ohci0-controller wakeup-source is fail.
[    1.912304] sunxi ohci0-controller don't init wakeup source
[    1.918713] [sunxi-ohci0]: probe, pdev->name: 5101000.ohci0-controller, sunxi_ohci: 0xffffff80096a8558
[    1.929194] [sunxi-ohci0]: Not init ohci0
[    1.933850] get ohci1-controller, regulator_io is no nocare
[    1.940414] [sunxi-ohci1]: probe, pdev->name: 5200000.ohci1-controller, sunxi_ohci: 0xffffff80096a88e0
[    1.950925] 5200000.ohci1-controller supply drvvbus not found, using dummy regulator
[    1.959777] sunxi-ohci 5200000.ohci1-controller: SW USB2.0 'Open' Host Controller (OHCI) Driver
[    1.969602] sunxi-ohci 5200000.ohci1-controller: new USB bus registered, assigned bus number 2
[    1.979378] sunxi-ohci 5200000.ohci1-controller: irq 359, io mem 0xffffffc03daa8800
[    2.049105] hub 2-0:1.0: USB hub found
[    2.053374] hub 2-0:1.0: 1 port detected
[    2.058958] usbcore: registered new interface driver uas
[    2.065074] usbcore: registered new interface driver usb-storage
[    2.071905] usbcore: registered new interface driver ums-alauda
[    2.078628] usbcore: registered new interface driver ums-cypress
[    2.085454] usbcore: registered new interface driver ums-datafab
[    2.092273] usbcore: registered new interface driver ums_eneub6250
[    2.099292] usbcore: registered new interface driver ums-freecom
[    2.106110] usbcore: registered new interface driver ums-isd200
[    2.112841] usbcore: registered new interface driver ums-jumpshot
[    2.119758] usbcore: registered new interface driver ums-karma
[    2.126387] usbcore: registered new interface driver ums-onetouch
[    2.133324] usbcore: registered new interface driver ums-realtek
[    2.140149] usbcore: registered new interface driver ums-sddr09
[    2.146872] usbcore: registered new interface driver ums-sddr55
[    2.153599] usbcore: registered new interface driver ums-usbat
[    2.160302] usbcore: registered new interface driver usbserial
[    2.167079] usbcore: registered new interface driver option
[    2.173407] usbserial: USB Serial support registered for GSM modem (1-port)
[    2.181515] usb_serial_number:20080411
[    2.186509] sunxikbd_key_init: key0 vol= 210 code= 115
[    2.192313] sunxikbd_key_init: key1 vol= 410 code= 114
[    2.198105] sunxikbd_key_init: key2 vol= 590 code= 139
[    2.203900] sunxikbd_key_init: key3 vol= 750 code= 28
[    2.209599] sunxikbd_key_init: key4 vol= 880 code= 102
[    2.215720] input: sunxi-keyboard as /devices/virtual/input/input0
[    2.224761] sunxi-rtc rtc: rtc core: registered sunxi-rtc as rtc0
[    2.231696] sunxi-rtc rtc: RTC enabled
[    2.236225] i2c /dev entries driver
[    2.241140] sunxi cedar version 0.1
[    2.245222] VE: install start!!!
[    2.245222]
[    2.250657] cedar_ve: cedar-ve the get irq is 347
[    2.256355] VE: get debugfs_mpp_root is NULL, please check mpp
[    2.256355]
[    2.264593] VE: sunxi ve debug register driver failed!
[    2.264593]
[    2.274256] device-mapper: uevent: version 1.0.3
[    2.279979] device-mapper: ioctl: 4.35.0-ioctl (2016-06-23) initialised: dm-devel@redhat.com
[    2.289663] device-mapper: verity-avb: AVB error handler initialized with vbmeta device:
[    2.298884] Bluetooth: HCI UART driver ver 2.3
[    2.303901] Bluetooth: HCI UART protocol H4 registered
[    2.309695] Bluetooth: HCI UART protocol LL registered
[    2.315483] Bluetooth: HCI UART protocol Three-wire (H5) registered
[    2.323590] sunxi_cpufreq_init: only one opp_table
[    2.329005] [cpu_freq] ERR: DEBUG: get cpu 0 device
[    2.334548] [cpu_freq] ERR: Unable to get regulator, use the dummy
[    2.341575] cpu0 supply dummy not found, using dummy regulator
[    2.348224] core: (null) get dummy regulator
[    2.354139] cpu cpu0: _set_opp_voltage: failed to set voltage (0 0 0 mV): -22
[    2.365620] sunxi-mmc sdc2: SD/MMC/SDIO Host Controller Driver(v3.46 2020-6-1 11:33-202006021635)
[    2.375745] sunxi-mmc sdc2: No vmmc regulator found
[    2.381246] sunxi-mmc sdc2: No vqmmc regulator found
[    2.386834] sunxi-mmc sdc2: No vdmmc regulator found
[    2.392426] sunxi-mmc sdc2: No vd33sw regulator found
[    2.398110] sunxi-mmc sdc2: No vd18sw regulator found
[    2.403799] sunxi-mmc sdc2: No vq33sw regulator found
[    2.409486] sunxi-mmc sdc2: No vq18sw regulator found
[    2.415796] sunxi-mmc sdc2: set host busy
[    2.420383] mmc:failed to get gpios
[    2.424562] sunxi-mmc sdc2: sdc set ios:clk 0Hz bm PP pm UP vdd 21 width 1 timing LEGACY(SDR12) dt B
[    2.450758] sunxi-mmc sdc2: sdc set ios:clk 400000Hz bm PP pm ON vdd 21 width 1 timing LEGACY(SDR12) dt B
[    2.477436] sunxi-mmc sdc2: detmode:alway in(non removable)
[    2.477457] sunxi-mmc sdc2: sdc set ios:clk 400000Hz bm PP pm ON vdd 21 width 1 timing LEGACY(SDR12) dt B
[    2.485809] sunxi-mmc sdc2: sdc set ios:clk 400000Hz bm PP pm ON vdd 21 width 1 timing LEGACY(SDR12) dt B
[    2.486871] sunxi-mmc sdc2: sdc set ios:clk 400000Hz bm OD pm ON vdd 21 width 1 timing LEGACY(SDR12) dt B
[    2.497706] sunxi-mmc sdc2: sdc set ios:clk 400000Hz bm OD pm ON vdd 21 width 1 timing LEGACY(SDR12) dt B
[    2.497766] sunxi-mmc sdc2: sdc set ios:clk 400000Hz bm OD pm ON vdd 21 width 1 timing LEGACY(SDR12) dt B
[    2.510593] sunxi-mmc sdc2: sdc set ios:clk 400000Hz bm OD pm ON vdd 21 width 1 timing LEGACY(SDR12) dt B
[    2.555116] sun50iw10p1-pinctrl pio: expect_func as:uart0_jtag, but muxsel(3) is func:jtag0
[    2.564538] sun50iw10p1-pinctrl pio: expect_func as:uart0_jtag, but muxsel(3) is func:jtag0
[    2.573941] sunxi-mmc sdc2: sdc set ios:clk 400000Hz bm PP pm ON vdd 21 width 1 timing LEGACY(SDR12) dt B
[    2.584794] sun50iw10p1-pinctrl pio: expect_func as:uart0_jtag, but muxsel(3) is func:uart0
[    2.594224] sun50iw10p1-pinctrl pio: expect_func as:uart0_jtag, but muxsel(3) is func:jtag0
[    2.603624] sun50iw10p1-pinctrl pio: expect_func as:uart0_jtag, but muxsel(3) is func:uart0
[    2.613047] sun50iw10p1-pinctrl pio: expect_func as:uart0_jtag, but muxsel(3) is func:jtag0
[    2.622726] sunxi-mmc sdc0: SD/MMC/SDIO Host Controller Driver(v3.46 2020-6-1 11:33-202006021635)
[    2.632803] sunxi-mmc sdc0: ***ctl-spec-caps*** 8
[    2.638105] sunxi-mmc sdc2: sdc set ios:clk 400000Hz bm PP pm ON vdd 21 width 1 timing MMC-HS(SDR20) dt B
[    2.648947] sunxi-mmc sdc2: sdc set ios:clk 50000000Hz bm PP pm ON vdd 21 width 1 timing MMC-HS(SDR20) dt B
[    2.660177] sunxi-mmc sdc2: sdc set ios:clk 50000000Hz bm PP pm ON vdd 21 width 8 timing MMC-HS(SDR20) dt B
[    2.671141] sunxi-mmc sdc0: No vmmc regulator found
[    2.671145] sunxi-mmc sdc0: No vqmmc regulator found
[    2.671149] sunxi-mmc sdc0: No vdmmc regulator found
[    2.671152] sunxi-mmc sdc0: No vd33sw regulator found
[    2.671156] sunxi-mmc sdc0: No vd18sw regulator found
[    2.671159] sunxi-mmc sdc0: No vq33sw regulator found
[    2.671163] sunxi-mmc sdc0: No vq18sw regulator found
[    2.676926] sunxi-mmc sdc0: set host busy
[    2.676986] sunxi-mmc sdc0: Got CD GPIO
[    2.677305] sunxi-mmc sdc0: sdc set ios:clk 0Hz bm PP pm UP vdd 21 width 1 timing LEGACY(SDR12) dt B
[    2.677329] sunxi-mmc sdc0: no vqmmc,Check if there is regulator
[    2.690822] sunxi-mmc sdc0: sdc set ios:clk 400000Hz bm PP pm ON vdd 21 width 1 timing LEGACY(SDR12) dt B
[    2.707696] sunxi-mmc sdc0: detmode:gpio irq
[    2.707719] sunxi-mmc sdc0: sdc set ios:clk 0Hz bm PP pm OFF vdd 0 width 1 timing LEGACY(SDR12) dt B
[    2.709234] sunxi-mmc sdc1: SD/MMC/SDIO Host Controller Driver(v3.46 2020-6-1 11:33-202006021635)
[    2.709310] sunxi-mmc sdc1: ***ctl-spec-caps*** 8
[    2.709356] sunxi-mmc sdc1: No vmmc regulator found
[    2.709359] sunxi-mmc sdc1: No vqmmc regulator found
[    2.709363] sunxi-mmc sdc1: No vdmmc regulator found
[    2.709366] sunxi-mmc sdc1: No vd33sw regulator found
[    2.709370] sunxi-mmc sdc1: No vd18sw regulator found
[    2.709373] sunxi-mmc sdc1: No vq33sw regulator found
[    2.709377] sunxi-mmc sdc1: No vq18sw regulator found
[    2.709898] sunxi-mmc sdc1: set host busy
[    2.709961] mmc:failed to get gpios
[    2.709982] sunxi-mmc sdc1: min-frequency:400000
[    2.710191] sunxi-mmc sdc1: sdc set ios:clk 0Hz bm PP pm UP vdd 21 width 1 timing LEGACY(SDR12) dt B
[    2.710213] sunxi-mmc sdc1: no vqmmc,Check if there is regulator
[    2.724152] sunxi-mmc sdc1: sdc set ios:clk 400000Hz bm PP pm ON vdd 21 width 1 timing LEGACY(SDR12) dt B
[    2.740827] sunxi-mmc sdc1: detmode:manually by software
[    2.741536] sunxi-mmc sdc1: sdc set ios:clk 400000Hz bm PP pm ON vdd 21 width 1 timing LEGACY(SDR12) dt B
[    2.743984] sunxi-mmc sdc1: sdc set ios:clk 400000Hz bm PP pm ON vdd 21 width 1 timing LEGACY(SDR12) dt B
[    2.745100] hidraw: raw HID events driver (C) Jiri Kosina
[    2.745632] sunxi-mmc sdc1: card claims to support voltages below defined range
[    2.748392] usbcore: registered new interface driver usbhid
[    2.748395] usbhid: USB HID core driver
[    2.748785] ashmem: initialized
[    2.750212] optee: probing for conduit method from DT.
[    2.750220] optee: api uid mismatch
[    2.750589] usbcore: registered new interface driver snd-usb-audio
[    2.752204] u32 classifier
[    2.752214]     Actions configured
[    2.752224] Netfilter messages via NETLINK v0.30.
[    2.752240] nfnl_acct: registering with nfnetlink.
[    2.752512] nf_conntrack version 0.5.0 (8192 buckets, 32768 max)
[    2.752722] ctnetlink v0.93: registering with nfnetlink.
[    2.753191] xt_time: kernel timezone is -0000
[    2.753286] ipip: IPv4 and MPLS over IPv4 tunneling driver
[    2.753944] gre: GRE over IPv4 demultiplexor driver
[    2.753947] ip_gre: GRE over IPv4 tunneling driver
[    2.755128] IPv4 over IPsec tunneling driver
[    2.755567] sunxi-mmc sdc1: sdc set ios:clk 400000Hz bm PP pm ON vdd 21 width 1 timing SD-HS(SDR25) dt B
[    2.755705] sunxi-mmc sdc1: sdc set ios:clk 50000000Hz bm PP pm ON vdd 21 width 1 timing SD-HS(SDR25) dt B
[    2.755880] sunxi-mmc sdc1: sdc set ios:clk 50000000Hz bm PP pm ON vdd 21 width 4 timing SD-HS(SDR25) dt B
[    2.756671] mmc2: new high speed SDIO card at address 0001
[    2.772606] ip_tables: (C) 2000-2006 Netfilter Core Team
[    2.772836] arp_tables: arp_tables: (C) 2002 David S. Miller
[    2.777839] Initializing XFRM netlink socket
[    2.777874] IPsec XFRM device driver
[    2.778560] NET: Registered protocol family 10
[    2.780144] mip6: Mobile IPv6
[    2.780172] ip6_tables: (C) 2000-2006 Netfilter Core Team
[    2.789904] sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
[    2.791247] NET: Registered protocol family 17
[    2.791275] NET: Registered protocol family 15
[    2.791307] l2tp_core: L2TP core driver, V2.0
[    2.791319] l2tp_ppp: PPPoL2TP kernel driver, V2.0
[    2.794507] Registered cp15_barrier emulation handler
[    2.794520] Registered setend emulation handler
[    2.795293] registered taskstats version 1
[    2.807574] cpu cpu1: dev_pm_opp_set_prop_name: Already have prop-name a0
[    2.807582] cpu cpu2: dev_pm_opp_set_prop_name: Already have prop-name a0
[    2.807587] cpu cpu3: dev_pm_opp_set_prop_name: Already have prop-name a0
[    2.808154] get usb_detect_mode is fail, 22
[    2.811589] sunxi-rtc rtc: setting system clock to 1970-01-01 00:03:54 UTC (234)
[    2.812556] usb1-vbus: disabling
[    2.812560] ALSA device list:
[    2.812562]   No soundcards found.
[    2.815076] Freeing unused kernel memory: 4416K
[    2.815146] Kernel init done
[    3.160156] sunxi-mmc sdc2: sdc set ios:clk 50000000Hz bm PP pm ON vdd 21 width 8 timing MMC-DDR52 dt B
[    3.171128] mmc0: new DDR MMC card at address 0001
[    3.177656] mmcblk0: mmc0:0001 AJTD4R 14.6 GiB
[/init]: getty is ttyS0
[    3.183829] mmcblk0boot0: mmc0:0001 AJTD4R partition 1 4.00 MiB
[/init]: RootDevice is "/dev/mmc[    3.192004] mmcblk0boot1: mmc0:0001 AJTD4R partition 2 4.00 MiB
blk0p4" , GPT_SUPPORT=1
[/init][    3.198163] random: fast init done
: Try to load EMMC ...
[/init]:[    3.207868] mmcblk0rpmb: mmc0:0001 AJTD4R partition 3 4.00 MiB
 Wait /dev/mmcblk0p4 ready ...
[    3.218609]  mmcblk0: p1 p2 p3 p4 p5 p6


e2fsck 1.42.12 (29-Aug-2014)
/dev/mmcblk0p4: recovering journal
/dev/mmcblk0p4: clean, 1167/8192 files, 28398/32768 blocks
[    4.212897] EXT4-fs (mmcblk0p4): barriers disabled
[    4.219477] EXT4-fs (mmcblk0p4): mounted filesystem with ordered data mode. Opts: noauto_da_alloc,barrier=0,data=ordered
mount: mounting proc on /proc failed: Device or resource busy
m[    4.326521] EXT4-fs (mmcblk0p4): re-mounted. Opts: nobarrier,noauto_da_alloc,data=ordered
ount: mounting sysfs on /sys failed: Device or resource busy
insmod: can't insert '/lib/modules/4.9.170/disp.ko': No such file or directory
boot-res device: /dev/mmcblk0p1
[    4.362603] FAT-fs (mmcblk0p1): Volume was not properly unmounted. Some data may be corrupt. Please run fsck.

login[1088]: root login on 'ttyS0'
nand activated #0
[    4.488990] get ctp_power is fail, -22
[    4.493264] sunxi_ctp_startup: ctp_power_io is invalid.
[    4.499206] get ctp_gesture_wakeup fail, no gesture wakeup
[    4.505396] 1-005d supply ctp not found, using dummy regulator
[    4.647197] twi_stop()524 - [i2c1] i2c state(0x0) isn't idle(0xf8)
[    4.654137] sunxi_i2c_core_process()1751 - [i2c1] STOP failed!
[    4.660773] sunxi_i2c_do_xfer()1946 - [i2c1] incomplete xfer (status: 0xff, dev addr: 0x5d)
[    4.673227] twi_stop()524 - [i2c1] i2c state(0x0) isn't idle(0xf8)
[    4.680166] sunxi_i2c_core_process()1751 - [i2c1] STOP failed!
[    4.686739] sunxi_i2c_do_xfer()1946 - [i2c1] incomplete xfer (status: 0xff, dev addr: 0x5d)
[    4.699397] twi_stop()524 - [i2c1] i2c state(0x0) isn't idle(0xf8)
[    4.706336] sunxi_i2c_core_process()1751 - [i2c1] STOP failed!
[    4.712911] sunxi_i2c_do_xfer()1946 - [i2c1] incomplete xfer (status: 0xff, dev addr: 0x5d)
[    4.725376] twi_stop()524 - [i2c1] i2c state(0x0) isn't idle(0xf8)
[    4.732315] sunxi_i2c_core_process()1751 - [i2c1] STOP failed!
[    4.738891] sunxi_i2c_do_xfer()1946 - [i2c1] incomplete xfer (status: 0xff, dev addr: 0x5d)
[    4.751377] twi_stop()524 - [i2c1] i2c state(0x0) isn't idle(0xf8)
[    4.758316] sunxi_i2c_core_process()1751 - [i2c1] STOP failed!
[    4.764894] sunxi_i2c_do_xfer()1946 - [i2c1] incomplete xfer (status: 0xff, dev addr: 0x5d)
[    4.774298] <<-GTP-ERROR->> I2C Read: 0x8140, 6 bytes failed, errcode: -70! Process reset.
[    4.877449] <<-GTP-ERROR->> GTP read version failed
[    4.882949] Read version failed.
[    4.889498] twi_stop()524 - [i2c1] i2c state(0x0) isn't idle(0xf8)
[    4.896635] sunxi_i2c_core_process()1751 - [i2c1] STOP failed!

[    4.903225] sunxi_i2c_do_xfer()1946 - [i2c1] incomplete xfer (status: 0xff, dev addr: 0x5d)
[    4.916026] twi_stop()524 - [i2c1] i2c state(0x0) isn't idle(0xf8)
[    4.922964] sunxi_i2c_core_process()1751 - [i2c1] STOP failed!
[    4.929537] sunxi_i2c_do_xfer()1946 - [i2c1] incomplete xfer (status: 0xff, dev addr: 0x5d)
[    4.942086] twi_stop()524 - [i2c1] i2c state(0x0) isn't idle(0xf8)
[    4.949025] sunxi_i2c_core_process()1751 - [i2c1] STOP failed!
[    4.955597] sunxi_i2c_do_xfer()1946 - [i2c1] incomplete xfer (status: 0xff, dev addr: 0x5d)
[    4.968198] twi_stop()524 - [i2c1] i2c state(0x0) isn't idle(0xf8)
[    4.975138] sunxi_i2c_core_process()1751 - [i2c1] STOP failed!
[    4.981713] sunxi_i2c_do_xfer()1946 - [i2c1] incomplete xfer (status: 0xff, dev addr: 0x5d)
[    4.994218] twi_stop()524 - [i2c1] i2c state(0x0) isn't idle(0xf8)
[    5.001157] sunxi_i2c_core_process()1751 - [i2c1] STOP failed!
[    5.007732] sunxi_i2c_do_xfer()1946 - [i2c1] incomplete xfer (status: 0xff, dev addr: 0x5d)
[    5.017135] <<-GTP-ERROR->> I2C Read: 0x8047, 240 bytes failed, errcode: -70! Process reset.
[    5.120780] <<-GTP-ERROR->> Read Config Failed, Using Default Resolution & INT Trigger!
[    5.144404] input: gt9xxnew_ts as /devices/virtual/input/input1
script_fetch device name is gt9xxnew_ts


Found tp device_name is gt9xxnew_ts, event num is 1
Found tp event num is /dev/input/event1
camera activated #0
camera not activated
root@dragonboard:~#
root@dragonboard:~#
root@dragonboard:~#
root@dragonboard:~# dragonboard(msg): core: parse script /boot/test_config.fex...
dragonboard(debug): the length of script is 10140
dragonboard(debug): allocate share memory segment for script buffer failed(Function not implemented)
dragonboard(error): core: parse script failed
[    9.260812]
[    9.260812] insmod_device_driver
[    9.260812]
-------swith to adb....
[   10.499075] file system registered
init adb main
[   10.525409] read descriptors
Handling main()
[   10.529305] read strings
-------swith to adb done!
[   11.696672] sunxi_set_cur_vol_work()403 WARN: get power supply failed
[   11.786942] android_work: sent uevent USB_STATE=CONNECTED
[   11.793039] sunxi_set_cur_vol_work()403 WARN: get power supply failed
[   11.919066] configfs-gadget gadget: high-speed config #1: c
[   11.925418] android_work: sent uevent USB_STATE=CONFIGURED
[   13.340062] adbd (1221): /proc/1221/oom_adj is deprecated, please use /proc/1221/oom_score_adj instead.

root@dragonboard:~#
root@dragonboard:~#

参考: Linux_U-Boot_开发指南.pdf

#38 Re: 全志 SOC » 刚刚收到的全志AIC800开发板,接个串口打印LOG 试一试 » 2022-02-07 23:53:22

X3

果然在这个文档 [D1_Tina_Linux_存储_开发指南.pdf](https://whycan.com/files/202108/d1/D1_Tina_Linux_存储_开发指南.pdf) 找到 rootfs_data 了。

在 A100 的 SDK也找到这玩意,

**target/allwinner/xxx-a3/base-files/etc/config/fstab**

config 'global'
        option  anon_swap       '0'
        option  anon_mount      '0'
        option  auto_swap       '1'
        option  auto_mount      '1'
        option  delay_root      '5'
        option  check_fs        '1'

config 'mount'
        option  target          '/boot-res'
        option  device          '/dev/by-name/boot-res'
        option  options         'ro,sync'
        option  enabled         '1'

config 'mount'
        option  target          '/mnt/UDISK'
        option  device          '/dev/by-name/UDISK'
        option  options         'rw,async'
        option  enabled         '1'

config 'mount'
        option  target          '/overlay'
        option  device          '/dev/by-name/rootfs_data'
        option  options         'rw,sync'
        option  enabled         '1'

config 'mount'
        option  target          '/mnt/SDCARD'
        option  device          '/dev/mmcblk1'

        option  options         'rw,async'
        option  enabled         '1'

config 'mount'
        option  target          '/mnt/SDCARD'
        option  device          '/dev/mmcblk1p1'
        option  options         'rw,async'
        option  enabled         '1'

config 'mount'
        option  target          '/mnt/exUDISK'
        option  device          '/dev/sda1'
        option  options         'rw,async'
        option  enabled         '1'

config 'mount'
        option  target          '/mnt/exUDISK'
        option  device          '/dev/sda'
        option  options         'rw,async'
        option  enabled         '1'

**./device/config/chips/xxx/configs/a3/linux/sys_partition.fex**

;---------------------------------------------------------------------------------------------------
; 说明: 脚本中的字符串区分大小写,用户可以修改"="后面的数值,但是不要修改前面的字符串
;---------------------------------------------------------------------------------------------------


;---------------------------------------------------------------------------------------------------
;                                   固件下载参数配置
;---------------------------------------------------------------------------------------------------
;***************************************************************************************************
;    mbr的大小, 以Kbyte为单位
;***************************************************************************************************
[mbr]
size = 512

;***************************************************************************************************
;                                              分区配置
;
;
;  partition 定义范例:
;    [partition]                ;  //表示是一个分区
;    name        = USERFS2      ; //分区名称
;    size        = 16384        ; //分区大小 单位: 扇区.分区表示个数最多2^31 * 512 = 2T
;    downloadfile = "123.fex"   ; //下载文件的路径和名称,可以使用相对路径,相对是指相对于image.cfg文件所在分区。也可以使用绝对路径
;    keydata     = 1            ; //私有数据分区,重新量产数据将不丢失
;    encrypt     = 1            ; //采用加密方式烧录,将提供数据加密,但损失烧录速度
;          = ?            ; //私有用法
;    verify      = 1            ; //要求量产完成后校验是否正确
;
; 注:1、name唯一, 不允许同名
;     2、name最大12个字符
;     3、size = 0, 将创建一个无大小的空分区
;     4、为了安全和效率考虑,分区大小最好保证为16M字节的整数倍
;***************************************************************************************************
[partition_start]

[partition]
    name         = boot-resource
    size         = 512
    downloadfile = "boot-resource.fex"
    user_type    = 0x8000

[partition]
    name         = env
    size         = 1024
    downloadfile = "env.fex"
    user_type    = 0x8000

[partition]
    name         = env-redund
    size         = 1024
    downloadfile = "env.fex"
    user_type    = 0x8000

[partition]
    name         = boot
    size         = 30720
    downloadfile = "boot.fex"
    user_type    = 0x8000

[partition]
    name         = rootfs
    size         = 131072
    downloadfile = "rootfs.fex"
    user_type    = 0x8000

[partition]
    name         = rootfs_data
    ;size         = 61440
    size         = 8192
    user_type    = 0x8000

[partition]
    name         = private
    size         = 1024
    user_type    = 0x8000

;   recovery分区说明
;   如果启用了OTA升级,默认以boot_initramfs.img作为recovery.fex,否则recovery.fex为空

[partition]
    name         = recovery
    size         = 32768
    downloadfile = "recovery.fex"
    user_type    = 0x8000

;[partition]
;    name         = misc
;    size         = 1024
;    user_type    = 0x8000

[partition]
    name         = UDISK
    user_type    = 0x8100

rootfs_data 只有 size,没有 downloadfile。

#39 Re: 全志 SOC » 刚刚收到的全志AIC800开发板,接个串口打印LOG 试一试 » 2022-02-07 22:14:57

X3

build/mkcommon.sh 添加:

rootfs)
                ACTION="mkrootfs;";
                module=rootfs;
                break;
                ;;

之后:

#!/bin/bash
#
# scripts/mkcommon.sh
# (c) Copyright 2013
# Allwinner Technology Co., Ltd. <www.allwinnertech.com>
# James Deng <csjamesdeng@allwinnertech.com>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.

export LC_ALL=C
BR_SCRIPTS_DIR=$(cd $(dirname $0) && pwd)
BUILD_CONFIG=$BR_SCRIPTS_DIR/../.buildconfig
SKIP_BR=0

# source shflags
source ${BR_SCRIPTS_DIR}/shflags

if [ -f ${BUILD_CONFIG} ]; then
	. ${BUILD_CONFIG}
	LICHEE_TOP_DIR_NEW=$(cd $BR_SCRIPTS_DIR/.. && pwd)
	if [ "$LICHEE_TOP_DIR_NEW" != "$LICHEE_TOP_DIR" ]; then
		sed -i "s|$LICHEE_TOP_DIR|$LICHEE_TOP_DIR_NEW|g" ${BUILD_CONFIG}
		. ${BUILD_CONFIG}
	fi
fi

# define option, format:
#   'long option' 'default value' 'help message' 'short option'
# WARN: Don't modify default value, because we will check it later
DEFINE_string  'ic'       ''          'ic to build, e.g. V316'             'i'
DEFINE_string  'kernel'   ''          'Kernel to build, e.g. 3.3'          'k'
DEFINE_string  'board'    ''          'Board to build, e.g. evb'           'b'
DEFINE_string  'flash'    'default'   'flash to build, e.g. nor'           'n'
DEFINE_string  'os'       ''          'os to build, e.g. android bsp'      'o'
DEFINE_string  'module'   'all'       'Module to build, e.g. buildroot, kernel, uboot, clean' 'm'

DEFINE_boolean 'config'   false       'Config compile platfom'             'c'
DEFINE_boolean 'force'    false       'Force to build, clean some old files. ex, rootfs/' 'f'

FLAGS_HELP="Top level build script for lichee

Examples:
  1. Build lichee, it maybe config platform options, if
     you first use it. And it will pack firmware use default
     argument.
      $ ./build.sh

  2. Configurate platform option
      $ ./build.sh config

  3. Autoconfigurete
      $ ./build.sh autoconfig -i V316 -o bsp -n nor -b perf1

  4. Pack linux, dragonboard image
      $ ./build.sh pack[_<option>] e.g. debug, dump, prvt, verity

  5. Build lichee using command argument
      $ ./build.sh -i <ic> e.g. V316

  6. Build module using command argument
      $ ./build.sh -m <module>

  7. Build special kernel
      $ ./build.sh -k <kernel directly>

  8. Build forcely to clean rootfs dir
      $ ./build.sh -f
"
# Include base command!
source ${BR_SCRIPTS_DIR}/mkcmd.sh

# parse the command-line
FLAGS "$@" || exit $?
eval set -- "${FLAGS_ARGV}"

ic=${FLAGS_ic}
platform=${FLAGS_os}
kernel=${FLAGS_kernel}
board=${FLAGS_board}
flash=${FLAGS_flash}
module=${FLAGS_module}
config=${FLAGS_config}
force=""

################ Preset an empty command #################
function nfunc(){
	echo "Begin Action"
}
ACTION=":;"

################ Parse other arguments ###################
while [ $# -gt 0 ]; do
	case "$1" in
	config*)
		opt=${1##*_};
		if [ "${opt}" == "all" ]; then
			export CONFIG_ALL=${FLAGS_TRUE};
		else
			export CONFIG_ALL=${FLAGS_FALSE};
		fi
		FLAGS_config=${FLAGS_TRUE};
		break;
		;;
	autoconfig)
		ACTION="mk_autoconfig;"
		FLAGS_config=${FLAGS_TRUE};
		break;
		;;
	saveconfig)
		if  [ -n "$LICHEE_KERN_DEFCONF_ABSOLUTE" ] && \
			[ -n "$LICHEE_KERN_DIR" ] && \
			[ -n "$LICHEE_ARCH" ]; then
			printf "\033[47;30mSave defconfig to $LICHEE_KERN_DEFCONF_ABSOLUTE...\033[0m\n"
			(cd $LICHEE_KERN_DIR && make ARCH=$LICHEE_ARCH savedefconfig && mv defconfig $LICHEE_KERN_DEFCONF_ABSOLUTE)
			if [ $? -ne 0 ]; then
				printf "\033[47;31mSave defconfig fail!!!\033[0m\n"
				exit 1
			fi
			printf "\033[47;30mComplete~\033[0m\n"
			exit 0
		fi
		;;
	gen*)
		opt=${1##*_};
		if [ "${opt}" == "config" ]; then
			cd kernel/${LICHEE_KERN_VER}/
			printf "\033[47;41mPrepare to use script to generate the android defconfig.\033[0m\n"
			ARCH=${LICHEE_ARCH} ./scripts/kconfig/merge_config.sh \
				 arch/${LICHEE_ARCH}/configs/${LICHEE_CHIP}smp_defconfig \
				 kernel/configs/android-base.config  \
				 kernel/configs/android-recommended.config  \
				 kernel/configs/sunxi-recommended.config
			if [ -f .config ]; then
				printf "\033[47;41mComplete the build config,save to ${LICHEE_KERN_VER}/.config !!!\033[0m\n"
				cp .config arch/${LICHEE_ARCH}/configs/${LICHEE_CHIP}smp_android_defconfig
			fi
			cd ..
			exit 0
		else
			echo "Do not support this command!!"
			exit 1
		fi
		break;
		;;

	pack*)
		optlist=$(echo ${1#pack} | sed 's/_/ /g')
		mode=""
		for opt in $optlist; do
			case "$opt" in
				debug)
					mode="$mode -d card0"
					;;
				dump)
					mode="$mode -m dump"
					;;
				prvt)
					mode="$mode -f prvt"
					;;
				secure)
					mode="$mode -v secure"
					;;
				prev)
					mode="$mode -s prev_refurbish"
					;;
				crash)
					mode="$mode -m crashdump"
					;;
				vsp)
					mode="$mode -t vsp"
					;;
				raw)
					mode="$mode -w programmer"
					;;
				verity)
					mode="$mode --verity"
					;;
				signfel)
					mode="$mode --signfel"
					;;
				*)
					mk_error "Invalid pack option $opt"
					exit 1
					;;
			esac
		done

		######### Don't build other module, if pack firmware ########
		ACTION="mkpack ${mode};";
		module="";
		break;
		;;
	buildroot)
		ACTION="mkbr;";
		module=buildroot;
		break;
		;;
        rootfs)
                ACTION="mkrootfs;";
                module=rootfs;
                break;
                ;;
		
	ramfs)
		ACTION="mkramfs;";
		module=ramfs;
		break;
		;;
	clean|distclean)
		ACTION="mk${1};";
		module="";
		break;
		;;
	bootloader)
		ACTION="mk${1};";
		module="bootloader";
		break;
		;;
	brandy)
		ACTION="mk${1};";
		module="brandy";
		break;
		;;
	kernel)
		ACTION="mkkernel;";
		module="kernel";
		break;
		;;
    dts)
        ACTION="mkdts;";
		module="";
        break
        ;;
	*) ;;
	esac;
	shift;
done

# if not .buildconfig or FLAGS_config equal FLAGS_TRUE, then mksetup.sh & exit
if [ ! -f ${BUILD_CONFIG}  -o  ${FLAGS_config} -eq ${FLAGS_TRUE} ]; then

	#
	# If we do config, it must be clean the old env var.
	#
	clean_old_env_var

	if [ "x$1" == "xautoconfig" ]; then
		tmp=${flash}
		source ${BR_SCRIPTS_DIR}/mkcmd.sh
		mk_autoconfig ${ic} ${platform} ${board} ${tmp} ${kernel}
		exit 0;
	fi
	. ${BR_SCRIPTS_DIR}/mksetup.sh

	if [ ${FLAGS_config} -eq ${FLAGS_TRUE} ]; then
		exit 0;
	fi
fi

if [ ${FLAGS_force} -eq ${FLAGS_TRUE} ]; then
	force="f";
fi

if [ "x${LICHEE_LINUX_DEV}" = "xlongan" -o "x${LICHEE_LINUX_DEV}" = "xtinyos" ] ; then
	SKIP_BR=0;
else
	SKIP_BR=1;
fi

if [ -n "${platform}" -o -n "${ic}" \
	-o -n "${kernel}" -o -n "${board}" ]; then \

	if [ "${platform}" = "${ic}" ] ; then \
		platform="linux";
	fi

	if ! init_ic ${ic} || \
		! init_platforms ${platform} ; then \
		mk_error "Invalid platform '${FLAGS_platform}'";
		exit 1;
	fi

	if ! init_kern_ver ${kernel} ; then \
		mk_error "Invalid kernel '${FLAGS_kernel}'";
		exit 1;
	fi

	if [ ${FLAGS_board} ] && \
		! init_boards ${LICHEE_CHIP} ${board} ; then \
		mk_error "Invalid board '${FLAGS_board}'";
		exit 1;
	fi
fi

# mkdir output dir
check_output_dir

############### Append ',' end character #################
module="${module},"
while [ -n "${module}" ]; do
	act=${module%%,*};
	case ${act} in
		all*)
			ACTION="mklichee;";
			module="";
			break;
			;;
		uboot)
			ACTION="${ACTION}mkboot;";
			;;
		clean)
			ACTION="mkclean;";
			module="";
			;;
		distclean)
			ACTION="distclean;";
			module="";
			;;
	esac
	module=${module#*,};
done


#
# Execute the action list.
#
echo "ACTION List: ${ACTION}========"
action_exit_status=$?
while [ -n "${ACTION}" ]; do
	act=${ACTION%%;*};
	echo "Execute command: ${act} ${force}"
	${act} ${force}
	action_exit_status=$?
	ACTION=${ACTION#*;};
done

exit ${action_exit_status}

编译根文件系统:

./build.sh rootfs

编译 Linux:

./build.sh kernel



修改文件 build/mkcmd.sh 函数的 mkrootfs( ),添加 rootfs_overlay/ 文件夹,这样每次执行 ./build.sh rootfs 都会把改文件夹的内容复制进去。

                        dragonboard)
                                prepare_dragonboard_toolchain
                                if [ -d ${LICHEE_DRAGONBAORD_DIR} ]; then
                                        echo "Regenerating dragonboard Rootfs..."
                                        (
                                        cd ${LICHEE_DRAGONBAORD_DIR}; \
                                                if [ ! -d "./rootfs" ]; then \
                                                        echo "extract dragonboard rootfs.tar.gz"; \
                                                        tar zxf ./common/rootfs/rootfs.tar.gz; \
                                                fi
                                        )
                                        echo ${LICHEE_DRAGONBAORD_DIR}/rootfs/lib/modules
                                        echo ${LICHEE_DRAGONBAORD_DIR}/rootfs_overlay/

                                        mkdir -p ${LICHEE_DRAGONBAORD_DIR}/rootfs_overlay/
                                        mkdir -p ${LICHEE_DRAGONBAORD_DIR}/rootfs/lib/modules
                                        rm -rf ${LICHEE_DRAGONBAORD_DIR}/rootfs/lib/modules/*
                                        cp -rf ${LICHEE_KERN_DIR}/output/lib/modules/* \
                                                ${LICHEE_DRAGONBAORD_DIR}/rootfs/lib/modules/

                                        cp -rf ${LICHEE_DRAGONBAORD_DIR}/rootfs_overlay/* \
                                                ${LICHEE_DRAGONBAORD_DIR}/rootfs/

                                        (cd ${LICHEE_DRAGONBAORD_DIR}/common/scripts; ./build.sh)
                                        [  $? -ne 0 ] && mk_error "build rootfs Failed" && return 1
                                        cp ${LICHEE_DRAGONBAORD_DIR}/rootfs.ext4 ${LICHEE_PLAT_OUT}
                                else
                                        mk_error "no ${LICHEE_PLATFORM} in lichee,please git clone it under lichee"
                                        exit 1
                                fi
                                ;;

#40 Re: 全志 SOC » 刚刚收到的全志AIC800开发板,接个串口打印LOG 试一试 » 2022-02-07 22:10:25

X3

配置:

./build.sh config

编译uboot:

./build.sh brandy

或:

./build.sh bootloader

编译 dts:

./build.sh dts

编译 Linux:

./build.sh kernel

#41 Re: 全志 SOC » 刚刚收到的全志AIC800开发板,接个串口打印LOG 试一试 » 2022-02-06 17:54:28

X3

_20220206173535.png

① ② 这个地方是对应 /dev/fb0  /dev/fb1 的

左边这个配置,lcd0,lcd1 对应 /dev/fb1,/dev/fb0
右边这个配置,lcd0,lcd1 对应 /dev/fb0,/dev/fb1


但是改成这样之后,

...
			dev0_screen_id           = <0>;
...
			dev1_screen_id           = <1>;
...

就变这样了:

root@TinaLinux:/# cat /sys/class/disp/disp/attr/disp
0

#42 Re: 全志 SOC » V3s tina 3.5 编译了一个固件,烧录不进去,请问是怎么回事呢? » 2021-10-09 08:00:08

X3

QQ截图20211009080750.png

[169]HELLO! BOOT0 is starting!
[173]boot0 commit : 95d7802c6274b07ba59a9e01ec45aaf4b81687cb

[211]rtc[0] value = 0x00000000
[214]rtc[1] value = 0x00000000
[217]rtc[2] value = 0x00000000
[220]rtc[3] value = 0x00000000
[223]rtc[4] value = 0x00000000
[226]rtc[5] value = 0x00000000
[228]rtc[6] value = 0x00000000
[231]rtc[7] value = 0x00000000
[234]key pressed value=0x00000010
[237]key pressed value=0x00000010
[281]key pressed value=0x0000000d
[325]key pressed value=0x0000000b
[369]key pressed value=0x0000000a
[413]key pressed value=0x0000000a
[457]key pressed value=0x00000009
[501]key pressed value=0x00000009
[545]key pressed value=0x00000009
[589]key pressed value=0x00000009
[633]key pressed value=0x00000009
[677]key pressed value=0x00000009
[721]key pressed value=0x00000009
[765]key pressed value=0x00000009
[809]key pressed value=0x00000009
[853]key pressed value=0x00000009
[897]key pressed value=0x00000009
[941]key pressed value=0x00000009
[985]key pressed value=0x00000009
[1029]key pressed value=0x00000009
[1073]key pressed value=0x00000009
[1117]key pressed value=0x00000009
[1161]key pressed value=0x00000009
[1205]key pressed value=0x00000009
[1249]key pressed value=0x00000009
[1293]key pressed value=0x00000009
[1337]key pressed value=0x00000009
[1381]key pressed value=0x00000009
[1425]key pressed value=0x00000009
[1469]key pressed value=0x00000009
[1513]key pressed value=0x00000009
[1557]key pressed value=0x00000009
[1601]key pressed value=0x00000009
[1645]key pressed value=0x00000009
[1689]key pressed value=0x00000009
[1733]key pressed value=0x00000009
[1777]key pressed value=0x00000009
[1821]key pressed value=0x00000009
[1865]key pressed value=0x00000009
[1909]key pressed value=0x00000009
[1953]key pressed value=0x00000009
[1997]key pressed value=0x00000009
[2041]key pressed value=0x00000009
[2085]key pressed value=0x00000009
[2129]key pressed value=0x00000009
[2173]key pressed value=0x00000009
[2217]key pressed value=0x00000009
[2261]key pressed value=0x00000009
[2305]key pressed value=0x00000009
[2349]key pressed value=0x00000009
[2393]key pressed value=0x00000009
[2437]key pressed value=0x00000009
[2481]key pressed value=0x00000009
[2525]key pressed value=0x00000009
[2569]key pressed value=0x00000009
[2613]key pressed value=0x00000009
[2657]key pressed value=0x00000009
[2701]key pressed value=0x00000009
[2745]key pressed value=0x00000009
[2789]key pressed value=0x00000009
[2833]key pressed value=0x00000009
[2877]key pressed value=0x00000009
[2921]key pressed value=0x00000009
[2965]key pressed value=0x00000009
[3009]key pressed value=0x00000009
[3053]key pressed value=0x00000009
[3097]key pressed value=0x00000009
[3141]key pressed value=0x00000009
[3185]key pressed value=0x00000009
[3229]key pressed value=0x00000009
[3273]key pressed value=0x00000009
[3317]key pressed value=0x00000009
[3361]key pressed value=0x00000009
[3405]key pressed value=0x00000009
[3449]key pressed value=0x00000009
[3493]key pressed value=0x00000009
[3537]key pressed value=0x00000009
[3581]key pressed value=0x00000009
[3625]key pressed value=0x00000009
[3669]key pressed value=0x00000009
[3713]key pressed value=0x00000009
[3757]key pressed value=0x00000009
[3801]key pressed value=0x00000009
[3845]key pressed value=0x00000009
[3889]key pressed value=0x00000009
[3933]key pressed value=0x00000009
[3977]key pressed value=0x00000009
[4021]key pressed value=0x00000009
[4065]key pressed value=0x00000009
[4109]key pressed value=0x00000009
[4153]key pressed value=0x00000009
[4197]key pressed value=0x00000009
[4241]key pressed value=0x00000009
[4285]key pressed value=0x00000009
[4329]key pressed value=0x00000009
[4373]key pressed value=0x00000009
[4417]key pressed value=0x00000009
[4461]key pressed value=0x00000009
[4505]key pressed value=0x00000009
[4549]key pressed value=0x00000009
[4593]key pressed value=0x00000009
[4637]key pressed value=0x00000009
[4681]key pressed value=0x00000009
[4725]key pressed value=0x00000009
[4769]key pressed value=0x00000009
[4813]key pressed value=0x00000009
[4857]key pressed value=0x00000009
[4901]key pressed value=0x00000009
[4945]key pressed value=0x00000009
[4989]key pressed value=0x00000009
[5033]key pressed value=0x00000009
[5077]key pressed value=0x00000009
[5121]key pressed value=0x00000009
[5165]key pressed value=0x00000009
[5209]key pressed value=0x00000009
[5253]key pressed value=0x00000009
[5297]key pressed value=0x00000009
[5341]key pressed value=0x00000009
[5385]key pressed value=0x00000009
[5429]key pressed value=0x00000009
[5473]key pressed value=0x00000009
[5517]key pressed value=0x00000009
[5561]key pressed value=0x00000009
[5605]key pressed value=0x00000009
[5649]key pressed value=0x00000009
[5693]key pressed value=0x00000009
[5737]key pressed value=0x00000009
[5781]key pressed value=0x00000009
[5825]key pressed value=0x00000009
[5869]key pressed value=0x00000009
[5913]key pressed value=0x00000009
[5957]key pressed value=0x00000009
[6001]key pressed value=0x00000009
[6045]key pressed value=0x00000009
[6089]key pressed value=0x00000009
[6133]key pressed value=0x00000009
[6177]key pressed value=0x00000009
[6221]key pressed value=0x00000009
[6265]key pressed value=0x00000009
[6309]key pressed value=0x00000009
[6353]key pressed value=0x00000009
[6397]key pressed value=0x00000009
[6441]key pressed value=0x00000009
[6485]key pressed value=0x00000009
[6529]key pressed value=0x00000009
[6573]key pressed value=0x00000009
[6617]key pressed value=0x00000009
[6661]key pressed value=0x00000009
[6705]key pressed value=0x00000009
[6749]key pressed value=0x00000009
[6793]key pressed value=0x00000009
[6837]key pressed value=0x00000009
[6881]key pressed value=0x00000009
[6925]key pressed value=0x00000009
[6969]key pressed value=0x00000009
[7013]key pressed value=0x00000009
[7057]key pressed value=0x00000009
[7101]key pressed value=0x00000009
[7145]key pressed value=0x00000009
[7189]key pressed value=0x00000009
[7233]key pressed value=0x00000009
[7277]key pressed value=0x00000009
[7321]key pressed value=0x00000009
[7365]key pressed value=0x00000009
[7409]key pressed value=0x00000009
[7453]key pressed value=0x00000009
[7497]key pressed value=0x00000009
[7541]key pressed value=0x00000009
[7585]key pressed value=0x00000009
[7629]key pressed value=0x00000009
[7673]key pressed value=0x00000009
[7717]key pressed value=0x00000009
[7761]key pressed value=0x00000009
[7805]key pressed value=0x00000009
[7849]key pressed value=0x00000009
[7893]key pressed value=0x00000009
[7938]key pressed value=0x00000009
[7982]key pressed value=0x00000009
[8026]key pressed value=0x00000009
[8070]key pressed value=0x00000009
[8114]key pressed value=0x00000009
[8158]key pressed value=0x00000009
[8202]key pressed value=0x00000009
[8246]key pressed value=0x00000009
[8290]key pressed value=0x00000009
[8334]key pressed value=0x00000009
[8378]key pressed value=0x00000009
[8422]key pressed value=0x00000009
[8466]key pressed value=0x00000009
[8510]key pressed value=0x00000009
[8554]key pressed value=0x00000009
[8598]key pressed value=0x00000009
[8642]key pressed value=0x00000009
[8686]key pressed value=0x00000009
[8730]key pressed value=0x00000009
[8774]key pressed value=0x00000009
[8818]key pressed value=0x00000009
[8862]key pressed value=0x00000009
[8906]key pressed value=0x00000009
[8950]key pressed value=0x00000009
[8994]key pressed value=0x00000009
[9038]key pressed value=0x00000009
[9082]time out
[9083]DRAM DRIVE INFO: V0.9
[9086]DRAM Type = 3 (2:DDR2,3:DDR3,6:LPDDR2,7:LPDDR3)
[9091]DRAM CLK = 408 MHz
[9093]DRAM zq value: 000039bb
[9119]DRAM size = 128 MB
[9127]dram size =128
[9130]Succeed in reading toc file head.
[9133]The size of toc is 00064000.
[9218]Entry_name        = u-boot
[9226]Entry_name        = soc-cfg
[9230]Entry_name        = dtb
[9233]Ready to disable icache.
[9236]Jump to secend Boot.


U-Boot 2014.07 (Oct 07 2021 - 23:16:17) Allwinner Technology

uboot commit : f1592db8c49aaedd6895f7e0f90caa123f0a3d5a

normal mode
i2c_init: by cpux
i2c_init ok
[9.250]pmbus:   ready
axp read error
probe axp failed
axp_probe error
[9.361]PMU: pll1 912 Mhz,PLL6=600 Mhz
AXI=304 Mhz,AHB=200 Mhz, APB1=100 Mhz
fel key detected
initcall sequence 409455e8 failed at call 40904878
set next system status
reset cpu
[169]HELLO! BOOT0 is starting!
[173]boot0 commit : 95d7802c6274b07ba59a9e01ec45aaf4b81687cb

[211]rtc[0] value = 0x00000000
[214]rtc[1] value = 0x00000000
[217]rtc[2] value = 0x5aa5a55a
[220]rtc[3] value = 0x00000000
[223]rtc[4] value = 0x00000000
[226]rtc[5] value = 0x00000000
[228]rtc[6] value = 0x00000000
[231]rtc[7] value = 0x00000000
[234]eraly jump fel

bangu-h300 可以烧完,但是烧完启动就是上面的模样。

#44 Re: 全志 SOC » V3s tina 3.5 编译了一个固件,烧录不进去,请问是怎么回事呢? » 2021-10-08 12:07:24

X3
TeveT 说:

大佬你是要烧录到哪里
显然,烧录的存储介质没找到。
如果是要进SD卡,要小改一下下。

感谢大佬回复


这是 target/allwinner/bangu-h300/configs/sys_config.fex

;---------------------------------------------------------------------------------------------------------
; port configuration:
; port_name = port:GPIO<mux><pull up/down><driver level><default value>
; mux: GPIO function configuration, 0-input, 1-output, 2+: special funciton for modules
; pull up/down: 1-pull up, 2-pull down
; driver level: 0,1,2,3. 2 is recommended
; default value: default output value when this IO is configured as an output IO
;---------------------------------------------------------------------------------------------------------

[product]
version = "100"
machine = "bangu_h300"

[platform]
eraseflag   = 1
debug_mode = 1

;----------------------------------------------------------------------------------
;[target]  system bootup configuration
;boot_clock     = CPU boot frequency, Unit: MHz
;storage_type   = boot medium, 0-nand, 1-sd, 2-emmc, 3-nor, 4-emmc3, 5-spinand -1(defualt)auto scan
;----------------------------------------------------------------------------------
[target]
boot_clock      = 912
storage_type    = 3
burn_key = 0

[norflash]
size     = 16

;----------------------------------------------------------------------------------
;dcdc2_vol      ---set dcdc2 voltage,mV,700-2275,25mV/step
;dcdc3_vol      ---set dcdc3 voltage,mV,700-3500,25mV/step
;ldo1_vol       ---set ldo1 voltage,mV,3300-3300,0mV/step
;ldo2_vol       ---set ldo2 voltage,mV,1800-3300,100mV/step
;ldo3_vol       ---set ldo3 voltage,mV,1250-3300,25mV/step
;ldo4_vol       ---set ldo4 voltage,mV,700-3300,[1.25,1.3,1.4,1.5,1.6,1.7,1.8,1.9,2.0,
;                                                       2.5,2.7,2.8,3.0,3.1,3.2,3.3]
;ldoio0_vol     ---set ldoio0 voltage,mV,1800-3300,100mV/step
;----------------------------------------------------------------------------------
[power_sply]
dcdc2_vol      = 1001250
dcdc3_vol      = 1003300
ldo1_vol       = 3300
ldo2_vol       = 1003000
ldo3_vol       = 2800
ldo4_vol       = 1800
gpio0_vol      = 2800

;---------------------------------------------------------------------------------
; uboot key detect enable
; keyen_flag = 1-support key detect 0-not support key detect
;---------------------------------------------------------------------------------
[key_detect_en]
keyen_flag = 1

;---------------------------------------------------------------------------------
; fel key adc value
; value should between 0 to 0x3f, when no key pressed, value is 0x3f
; when fel_key_min<=key_value<=fel_key_max, uboot will jump to fel
;---------------------------------------------------------------------------------
[fel_key]
fel_key_max = 0x3f
fel_key_min = 0

[sdc0]
sdc0_used               = 1
bus-width               = 4
sdc0_d1                 = port:PF00<2><1><2><default>
sdc0_d0                 = port:PF01<2><1><2><default>
sdc0_clk                = port:PF02<2><1><2><default>
sdc0_cmd                = port:PF03<2><1><2><default>
sdc0_d3                 = port:PF04<2><1><2><default>
sdc0_d2                 = port:PF05<2><1><2><default>
cd-gpios                = port:PF06<6><1><2><default>
;card-pwr-gpios         = port:PH11<1><1><2><default>
;broken-cd                      =
sunxi-power-save-mode   =
;sunxi-dis-signal-vol-sw =
cap-sd-highspeed =
;no-sdio =
;no-mmc =
;sd-uhs-sdr12 =
;sd-uhs-sdr25 =
;sd-uhs-sdr50 =
;sd-uhs-sdr104 =
max-frequency           = 150000000
vmmc="vcc-sdc"
vqmmc="vcc-pf"
vdmmc="vcc-pf"

[sdc1]
sdc1_used               = 1
bus-width               = 4
sdc1_clk                = port:PG00<2><1><3><default>
sdc1_cmd                = port:PG01<2><1><3><default>
sdc1_d0                 = port:PG02<2><1><3><default>
sdc1_d1                 = port:PG03<2><1><3><default>
sdc1_d2                 = port:PG04<2><1><3><default>
sdc1_d3                 = port:PG05<2><1><3><default>
;sunxi-power-save-mode  =
;sd-uhs-sdr12 =
;sd-uhs-sdr25 =
;sd-uhs-sdr50 =
;sd-uhs-sdr104 =
cap-sdio-irq            =
keep-power-in-suspend   =
ignore-pm-notify        =
max-frequency           = 150000000

[sdc2]
sdc2_used               = 0
non-removable           =
bus-width               = 8
sdc2_cmd         = port:PC06<3><1><3><default>
sdc2_clk         = port:PC05<3><1><3><default>
sdc2_d0          = port:PC10<3><1><3><default>
sdc2_d1          = port:PC13<3><1><3><default>
sdc2_d2          = port:PC15<3><1><3><default>
sdc2_d3          = port:PC08<3><1><3><default>
sdc2_d4          = port:PC09<3><1><3><default>
sdc2_d5          = port:PC11<3><1><3><default>
sdc2_d6          = port:PC14<3><1><3><default>
sdc2_d7          = port:PC16<3><1><3><default>
sdc2_emmc_rst    = port:PC01<3><1><3><default>
sdc2_ds         = port:PC00<3><1><3><default>
cd-gpios                =
sunxi-power-save-mode   =
sunxi-dis-signal-vol-sw =
mmc-ddr-1_8v           =
mmc-hs200-1_8v         =
mmc-hs400-1_8v         =
max-frequency          = 150000000
sdc_tm4_sm0_freq0       = 0
sdc_tm4_sm0_freq1       = 0
sdc_tm4_sm1_freq0       = 0x00000000
sdc_tm4_sm1_freq1       = 0
sdc_tm4_sm2_freq0       = 0x00000000
sdc_tm4_sm2_freq1       = 0
sdc_tm4_sm3_freq0       = 0x05000000
sdc_tm4_sm3_freq1       = 0x00000405
sdc_tm4_sm4_freq0       = 0x00050000
sdc_tm4_sm4_freq1       = 0x00000408
vmmc="vcc-emmc"
vqmmc="vcc-pc"
vdmmc="none"

;----------------------------------------------------------------------------------
;[twi_para] twi for boot code
;twi_port       = twi controller ID
;----------------------------------------------------------------------------------
[twi_para]
twi_port        = 0
twi_scl         = port:PB06<2><default><default><default>
twi_sda         = port:PB07<2><default><default><default>

;----------------------------------------------------------------------------------
;[uart_para] boot debug port configuration
;uart_debug_port = uart port ID for boot debug
;----------------------------------------------------------------------------------
[uart_para]
;uart_debug_port = 2
;uart_debug_tx   = port:PB00<2><1><default><default>
;uart_debug_rx   = port:PB01<2><1><default><default>
uart_debug_port = 0
uart_debug_tx   = port:PB08<3><1><default><default>
uart_debug_rx   = port:PB09<3><1><default><default>
;uart_debug_port = 1
;uart_debug_tx   = port:PG6<2><1><default><default>
;uart_debug_rx   = port:PG7<2><1><default><default>


;----------------------------------------------------------------------------------
;[jtag_para] jtag configuration
;jtag_enable     = 0-disable jtag, 1-enable jtag
;----------------------------------------------------------------------------------
[jtag_para]
jtag_enable     = 0
jtag_ms         = port:PB10<2><default><default><default>
jtag_ck         = port:PB11<2><default><default><default>
jtag_do         = port:PB12<2><default><default><default>
jtag_di         = port:PB13<2><default><default><default>

;----------------------------------------------------------------------------------
;[clock] pll configuration
;----------------------------------------------------------------------------------
[clock]
pll3            = 297
pll4            = 300
pll6            = 600
pll8            = 360
pll9            = 480
pll10           = 297

pll_ve          = 360
pll_isp         = 360

;----------------------------------------------------------------------------------
;sys_pwr_dm_para
;this para is used to change default sys_pwr_dm config when necessary.
;   allowed sys_pwr_dm is such as follow:
;               vdd-cpua
;               vdd-cpub
;               vdd-gpu
;               vcc-dram
;               vdd-sys
;               which is compatible with pmu regu config. see: [pmu1_regu] for more info.
;   value: 0: del the pwr_dm from sys_pwr_dm_mask;
;          1: add the pwr_dm into sys_pwr_dm_mask;
;----------------------------------------------------------------------------------
[sys_pwr_dm_para]
vdd-cpua = 1
vdd-sys  = 1

;----------------------------------------------------------------------------------
;dynamic_standby_para
;   enable:
;       value: 0: all config is ignored.
;              1: all config is effective.
;   dram_selfresh_flag:
;       value: 0: dram will not enter selfresh,
;                   this config is used for stop dram entering selfresh, in case of dram memory have bug.
;              1: dram will enter slefresh.
;
;----------------------------------------------------------------------------------
[dynamic_standby_para]
enable = 0
dram_selfresh_flag = 1
vdd_cpua_vol     = 1200
vdd_sys_vol      = 1200

;*****************************************************************************
;sdram configuration
;
;*****************************************************************************
[dram_para]
dram_clk        = 408
dram_type       = 3
dram_zq         = 0x39bb
dram_odt_en     = 0
dram_para1      = 0x10E20000
dram_para2      = 0x0000
dram_mr0        = 0x1840
dram_mr1        = 0x4
dram_mr2        = 0x18
dram_mr3        = 0x4
dram_tpr0       = 0x00832087
dram_tpr1       = 0x01C24085
dram_tpr2       = 0x0002A01D
dram_tpr3       = 0x0
dram_tpr4       = 0x0
dram_tpr5       = 0x0
dram_tpr6       = 0x0
dram_tpr7       = 0x0
dram_tpr8       = 0x0
dram_tpr9       = 0x0
dram_tpr10      = 0x0
dram_tpr11      = 0x00
dram_tpr12      = 0x00100000
dram_tpr13      = 0x0d000000

;---------------------------------------------------------------------------------------------------------
; if 1 == standby_mode, then support super standby;
; else, support normal standby.
;---------------------------------------------------------------------------------------------------------
[pm_para]
standby_mode            = 1

;----------------------------------------------------------------------------------
;i2c configuration
; twi_used = twix enable
;----------------------------------------------------------------------------------
[twi0]
twi0_used        = 1
twi0_scl         = port:PB06<2><default><default><default>
twi0_sda         = port:PB07<2><default><default><default>

[twi0_suspend]
twi0_scl         = port:PB06<7><default><default><default>
twi0_sda         = port:PB07<7><default><default><default>

[twi1]
twi1_used        = 0
twi1_scl         = port:PB08<2><default><default><default>
twi1_sda         = port:PB09<2><default><default><default>

[twi1_suspend]
twi1_scl         = port:PB08<7><default><default><default>
twi1_sda         = port:PB09<7><default><default><default>

;----------------------------------------------------------------------------------
;uart configuration
;uart_used = uart x enable
;uart_type       = 2:2 wire,4:4 wire,8:8 wire, full function
;----------------------------------------------------------------------------------
[uart0]
uart0_used       = 1
uart0_type       = 2
uart0_port       = 0
;uart0_tx         = port:PF02<3><1><default><default>
;uart0_rx         = port:PF04<3><1><default><default>
uart0_tx   = port:PB08<3><1><default><default>
uart0_rx   = port:PB09<3><1><default><default>

[uart0_suspend]
uart0_tx         = port:PF02<7><1><default><default>
uart0_rx         = port:PF04<7><1><default><default>

[uart1]
uart1_used       = 1
uart1_type       = 2
uart1_port       = 1
uart1_tx         = port:PG6<2><1><default><default>
uart1_rx         = port:PG7<2><1><default><default>
;uart_tx         = port:PE21<4><1><default><default>
;uart_rx         = port:PE22<4><1><default><default>
;uart_rts        = port:PE23<4><1><default><default>
;uart_cts        = port:PE24<4><1><default><default>

[uart1_suspend]
uart1_tx         = port:PG6<7><1><default><default>
uart1_rx         = port:PG7<7><1><default><default>
;uart1_rts        = port:PE23<4><1><default><default>
;uart1_cts        = port:PE24<4><1><default><default>

[uart2]
uart2_used       = 0
uart2_type       = 2
uart2_port       = 2
uart2_tx         = port:PB00<2><1><default><default>
uart2_rx         = port:PB01<2><1><default><default>

[uart2_suspend]
uart2_tx         = port:PB00<7><1><default><default>
uart2_rx         = port:PB01<7><1><default><default>

;----------------------------------------------------------------------------------
;SPI controller configuration
;spi_used       = SPIx enable
;spi_cs_bitmap  = SPI bit mapping
;----------------------------------------------------------------------------------
[spi0]
spi0_used       = 1
spi0_cs_bitmap  = 1
spi0_mosi       = port:PC03<3><default><default><default>
spi0_miso       = port:PC00<3><default><default><default>
spi0_sclk       = port:PC01<3><default><default><default>
spi0_cs0        = port:PC02<3><1><default><default>

[spi0_suspend]
spi0_mosi       = port:PC03<7><default><default><default>
spi0_miso       = port:PC00<7><default><default><default>
spi0_sclk       = port:PC01<7><default><default><default>
spi0_cs0        = port:PC02<7><1><default><default>

;----------------------------------------------------------------------------------
;SPI device configuration
;spi_dev_num: number of spi devices
;----------------------------------------------------------------------------------
[spi_devices]
spi_dev_num = 1

;----------------------------------------------------------------------------------
;[spi_board0] spi device configuration
;modalias      = spi device name
;max_speed_hz  = max transfer speed
;bus_num       = bus ID
;chip_select   = chip select, 0,1
;mode          = SPI transfer mode
; sflash_size- 16 : 16M nor flash size , 8 : 8M nor flash size
;----------------------------------------------------------------------------------
;[spi_board0]
;modalias      = "at25df641"
;max_speed_hz  = 40000000
;bus_num       = 0
;chip_select   = 0
;mode          = 0
;sflash_size   = 32

[spi0/nor_flash]
compatible        = "jedec,spi-nor"
spi-max-frequency = 40000000
bus_num       = 0
chip_select   = 0
mode          = 0
reg           = 0
sflash_size   = 32

;----------------------------------------------------------------------------------
;capacitor tp configuration
;ctp_twi_id : twi controller ID
;ctp_twi_addr : I2C slave address, 7bit
;ctp_screen_max_x/_y : resolution of touch panel
;ctp_revert_x/_y_flag : whether need to revert x/y
;ctp_exchange_x_y_flag: whether need to exchange the value of x and y
;ctp_int_port : port for tp's interrupt signal
;ctp_wakeup : port for wakeup tp
;----------------------------------------------------------------------------------
[ctp_para]
ctp_used            = 0
ctp_name            = "mxt336t"
ctp_twi_id          = 0
ctp_twi_addr        = 0x4a
ctp_screen_max_x    = 800
ctp_screen_max_y    = 480
ctp_revert_x_flag   = 0
ctp_revert_y_flag   = 1
ctp_exchange_x_y_flag = 0

ctp_int_port        = port:PB01<6><1><default><default>
ctp_wakeup          = port:PB00<1><default><default><1>

;--------------------------------------------------------------------------------
; CTP automatic detection configuration
;ctp_detect_used  --- Whether startup automatic inspection function. 1:used,0:unused
;Module name postposition 1 said detection, 0 means no detection.
;--------------------------------------------------------------------------------
[ctp_list_para]
ctp_det_used              = 0
gt911_ts                  = 1
ft5x_ts                   = 1
gt82x                     = 1
gslX680                   = 1
gt9xx_ts                  = 1
gt811                     = 1
zet622x                   = 1
aw5306_ts                 = 1

;----------------------------------------------------------------------------------
;disp init configuration
;
;disp_mode             (0:screen0<screen0,fb0>)
;screenx_output_type   (0:none; 1:lcd; 3:hdmi;)
;screenx_output_mode   (used for hdmi output, 0:480i 1:576i 2:480p 3:576p 4:720p50)
;                      (5:720p60 6:1080i50 7:1080i60 8:1080p24 9:1080p50 10:1080p60)
;fbx format            (4:RGB655 5:RGB565 6:RGB556 7:ARGB1555 8:RGBA5551 9:RGB888 10:ARGB8888 12:ARGB4444)
;fbx pixel sequence    (0:ARGB 1:BGRA 2:ABGR 3:RGBA)
;fb0_scaler_mode_enable(scaler mode enable, used FE)
;fbx_width,fbx_height  (framebuffer horizontal/vertical pixels, fix to output resolution while equal 0)
;lcdx_backlight        (lcd init backlight,the range:[0,256],default:197
;lcdx_yy               (lcd init screen bright/contrast/saturation/hue, value:0~100, default:50/50/57/50)
;lcd0_contrast         (LCD contrast, 0~100)
;lcd0_saturation       (LCD saturation, 0~100)
;lcd0_hue              (LCD hue, 0~100)
;screenx_output_format     (0:RGB 1:yuv444 2:yuv422 3:yuv420)
;screenx_output_bits       (0:8bit 1:10bit 2:12bit 2:16bit)
;screenx_output_eotf       (0:reserve 4:SDR 16:HDR10 18:HLG)
;screenx_output_cs (0:undefined  257:BT709 260:BT601  263:BT2020)
;----------------------------------------------------------------------------------
[disp]
disp_init_enable         = 1
disp_mode                = 0

screen0_output_type      = 1
screen0_output_mode      = 4
screen0_output_format    = 0
screen0_output_bits      = 0
screen0_output_eotf      = 0
screen0_output_cs        = 260

screen1_output_type      = 1
screen1_output_mode      = 4
screen1_output_format    = 0
screen1_output_bits      = 0
screen1_output_eotf      = 0
screen1_output_cs        = 260

fb0_format               = 0
fb0_pixel_sequence       = 0
fb0_scaler_mode_enable   = 0
fb0_width                = 800
fb0_height               = 480

fb1_format               = 0
fb1_pixel_sequence       = 0
fb1_scaler_mode_enable   = 0
fb1_width                = 0
fb1_height               = 0

lcd0_backlight           = 50
lcd1_backlight           = 50

lcd0_bright              = 50
lcd0_contrast            = 50
lcd0_saturation          = 57
lcd0_hue                 = 50

lcd1_bright              = 50
lcd1_contrast            = 50
lcd1_saturation          = 57
lcd1_hue                 = 50

[boot_disp]
output_disp = 0
output_type = 1
output_mode = 4

;----------------------------------------------------------------------------------
;lcd0 configuration

;lcd_if:               0:hv(sync+de); 1:8080; 2:ttl; 3:lvds; 4:dsi; 5:edp; 6:extend dsi
;lcd_x:                lcd horizontal resolution
;lcd_y:                lcd vertical resolution
;lcd_width:            width of lcd in mm
;lcd_height:           height of lcd in mm
;lcd_dclk_freq:        in MHZ unit
;lcd_pwm_freq:         in HZ unit
;lcd_pwm_pol:          lcd backlight PWM polarity
;lcd_pwm_max_limit     lcd backlight PWM max limit(<=255)
;lcd_hbp:              hsync back porch
;lcd_ht:               hsync total cycle
;lcd_vbp:              vsync back porch
;lcd_vt:               vysnc total cycle
;lcd_hspw:             hsync plus width
;lcd_vspw:             vysnc plus width
;lcd_lvds_if:          0:single link;  1:dual link
;lcd_lvds_colordepth:  0:8bit; 1:6bit
;lcd_lvds_mode:        0:NS mode; 1:JEIDA mode
;lcd_frm:              0:disable; 1:enable rgb666 dither; 2:enable rgb656 dither
;lcd_io_phase:         0:noraml; 1:intert phase(0~3bit: vsync phase; 4~7bit:hsync phase;
;                      8~11bit:dclk phase; 12~15bit:de phase)
;lcd_gamma_en          lcd gamma correction enable
;lcd_bright_curve_en   lcd bright curve correction enable
;lcd_cmap_en           lcd color map function enable
;deu_mode              0:smoll lcd screen; 1:large lcd screen(larger than 10inch)
;lcdgamma4iep:         Smart Backlight parameter, lcd gamma vale * 10;
;                      decrease it while lcd is not bright enough; increase while lcd is too bright
;smart_color           90:normal lcd screen 65:retina lcd screen(9.7inch)
;lcd_tcon_mode         tcon_lcd mode. (0:normal mode
;                                      1:tcon master sync mode :sync at the first time
;                                      2:tcon master sync mode :sync every frame
;                                      3:tcon slave mode
;                                      4:one tcon driver two dsi(8 lane))
;lcd_sync_pixel_num    dual tcon sync pixel index.(only valid in tcon master mdoe)
;lcd_sync_line_num     dual tcon sync line index.(only valid in tcon master mdoe)
;lcd_slave_tcon_num    specified the slave tcon num if in master mode. (0 or 1)
;lcd_slave_stop_pos    dual tcon sync slave stop pos.(only valid in tcon slave mdoe)
;----------------------------------------------------------------------------------
[lcd0]
lcd_used            = 1
lcd_driver_name     = "default_lcd"
lcd_bl_0_percent    = 0
lcd_bl_40_percent   = 23
lcd_bl_100_percent  = 100

lcd_backlight       = 100

lcd_if              = 0
lcd_x               = 800
lcd_y               = 480
lcd_width           = 119
lcd_height          = 64
lcd_dclk_freq       = 33

lcd_pwm_used        = 1
lcd_pwm_ch          = 0
lcd_pwm_freq        = 50000
lcd_pwm_pol         = 1
lcd_pwm_max_limit   = 255

lcd_hbp             = 55
lcd_ht              = 1056
lcd_hspw            = 20
lcd_vbp             = 35
lcd_vt              = 525
lcd_vspw            = 10

lcd_frm             = 1
lcd_io_phase        = 0x0000
lcd_hv_clk_phase    = 0
lcd_hv_sync_polarity = 0
lcd_gamma_en        = 0
lcd_bright_curve_en = 1
lcd_cmap_en         = 0
lcd_rb_swap         = 0
lcdgamma4iep        = 22

lcd_tcon_mode       = 0
lcd_slave_stop_pos  = 0
lcd_sync_pixel_num  = 0
lcd_sync_line_num   = 0

lcd_bl_en           = port:PB02<1><0><default><0>
;lcd_gpio_0          = port:PB03<1><0><default><1>

lcdd2               = port:PD0<2><0><default><default>
lcdd3               = port:PD1<2><0><default><default>
lcdd4               = port:PD2<2><0><default><default>
lcdd5               = port:PD3<2><0><default><default>
lcdd6               = port:PD4<2><0><default><default>
lcdd7               = port:PD5<2><0><default><default>
lcdd10              = port:PD6<2><0><default><default>
lcdd11              = port:PD7<2><0><default><default>
lcdd12              = port:PD8<2><0><default><default>
lcdd13              = port:PD9<2><0><default><default>
lcdd14              = port:PD10<2><0><default><default>
lcdd15              = port:PD11<2><0><default><default>
lcdd18              = port:PD12<2><0><default><default>
lcdd19              = port:PD13<2><0><default><default>
lcdd20              = port:PD14<2><0><default><default>
lcdd21              = port:PD15<2><0><default><default>
lcdd22              = port:PD16<2><0><default><default>
lcdd23              = port:PD17<2><0><default><default>
lcdclk              = port:PD18<2><0><3><default>
lcdde               = port:PD19<2><0><3><default>
lcdhsync            = port:PD20<2><0><3><default>
lcdvsync            = port:PD21<2><0><3><default>

;------------------------------------------------------------------------------;
; 10/100/100Mbps Ethernet MAC Controller Configure                             ;
;------------------------------------------------------------------------------;
;   Options:                                                                   ;
;   gmac_used  ---  0: not used, 1: external phy, 2: internal phy              ;
;   gmac_powerx --  A[:B] A: axp channel, B: voltage value                     ;
:       If set gamc_phy to use internal PHY, do not config port                ;
;------------------------------------------------------------------------------;
;         MII        RMII         MII        RMII         MII        RMII      ;
;   PD00  *                 PD06   *           *    PD12   *           *       ;
;   PD01  *                 PD07   *                PD13   *           *       ;
;   PD02  *            *    PD08   *                PD14   *                   ;
;   PD03  *            *    PD09   *           *    PD15   *                   ;
;   PD04  *                 PD10   *           *    PD16   *           *       ;
;   PD05  *                 PD11   *           *    PD17   *           *       ;
;------------------------------------------------------------------------------;
[gmac0]
gmac0_used          = 0
gmac0_power1        =

;--------------------------------------------------------------------------------
;csi (COMS Sensor Interface) configuration
;csi(x)_dev(x)_used: 0:disable 1:enable
;csi(x)_dev(x)_isp_used 0:not use isp 1:use isp
;csi(x)_dev(x)_fmt: 0:yuv 1:bayer raw rgb
;csi(x)_dev(x)_stby_mode: 0:not shut down power at standby 1:shut down power at standby
;csi(x)_dev(x)_vflip: flip in vertical direction 0:disable 1:enable
;csi(x)_dev(x)_hflip: flip in horizontal direction 0:disable 1:enable
;csi(x)_dev(x)_iovdd: camera module io power handle string, pmu power supply
;csi(x)_dev(x)_iovdd_vol: camera module io power voltage, pmu power supply
;csi(x)_dev(x)_avdd:    camera module analog power handle string, pmu power supply
;csi(x)_dev(x)_avdd_vol:        camera module analog power voltage, pmu power supply
;csi(x)_dev(x)_dvdd:    camera module core power handle string, pmu power supply
;csi(x)_dev(x)_dvdd_vol:        camera module core power voltage, pmu power supply
;csi(x)_dev(x)_afvdd:   camera module vcm power handle string, pmu power supply
;csi(x)_dev(x)_afvdd_vol:       camera module vcm power voltage, pmu power supply
;fill voltage in uV, e.g. iovdd = 2.8V, csix_iovdd_vol = 2800000
;fill handle string as below:
;axp22_eldo3
;axp22_dldo4
;axp22_eldo2
;fill handle string "" when not using any pmu power supply
;csi0_dev0_fmt    0:yuv 1:bayer raw rgb
;--------------------------------------------------------------------------------

[csi0]
csi0_used               = 1
;csi0_sensor_list        = 0
csi0_mck                = port:PE20<3><default><default><default>
csi0_sck                = port:PE21<2><default><default><default>
csi0_sda                = port:PE22<2><default><default><default>

[csi0/csi0_dev0]
csi0_dev0_used          = 1
csi0_dev0_mname         = "gc1034_mipi"
csi0_dev0_twi_addr      = 0x42
csi0_dev0_pos           = "rear"
csi0_dev0_lane           = 1
csi0_dev0_twi_id         = 1
csi0_dev0_isp_used      = 1
csi0_dev0_fmt           = 1
csi0_dev0_stby_mode     = 0
csi0_dev0_vflip         = 0
csi0_dev0_hflip         = 0
csi0_dev0_iovdd         = "mipi-iovdd"
csi0_dev0_iovdd_vol     = 3300000
csi0_dev0_avdd          = "mipi-avdd"
csi0_dev0_avdd_vol      = 3300000
csi0_dev0_dvdd          = "mipi-dvdd"
csi0_dev0_dvdd_vol      = 1800000
csi0_dev0_afvdd         = ""
csi0_dev0_afvdd_vol     = 2800000
csi0_dev0_power_en      =
csi0_dev0_reset         = port:PE18<1><default><default><default>
csi0_dev0_pwdn          = port:PE19<1><default><default><default>
csi0_dev0_flash_used    = 0
csi0_dev0_flash_type    = 2
csi0_dev0_flash_en      =
csi0_dev0_flash_mode    =
csi0_dev0_flvdd         = ""
csi0_dev0_flvdd_vol     = 3300000
csi0_dev0_af_pwdn       =
csi0_dev0_act_used      = 0
csi0_dev0_act_name      = "ad5820_act"
csi0_dev0_act_slave     = 0x18

;----------------------------------------------------------------------------------
;usb configuration
;usb_used:          usb controller enable, 0-disable, 1-enable
;usb_port_type:     usb mode: 0-device, 1-host, 2-otg
;usb_detect_type:   usb hotplug detect mode, 0-none, 1-vbus/id detect, 2-id/dpdm detect
;usb_id_gpio:       usb id detect IO
;usb_det_vbus_gpio: usb vbus detect IO, "axp_ctrl" for axp
;usb_drv_vbus_gpio: usb dirve vbus IO
;usb_restrict_gpio: usb current restrict IO
;usb_restric_flag:  usb current restrict flag
;----------------------------------------------------------------------------------
[usbc0]
usbc0_used            = 1
usb_port_type       = 0
usb_detect_type     = 1
usb_id_gpio         =
usb_det_vbus_gpio   =
usb_drv_vbus_gpio   = port:PC05<1><0><default><0>
usb_host_init_state = 0
usb_regulator_io    = "nocare"
usb_regulator_vol   = 0
usb_wakeup_suspend  = 0
usb_luns            = 3
usb_serial_unique   = 0
usb_serial_number   = "20080411"

;--------------------------------------------------------------------------------
; G sensor configuration
; gs_twi_id     ---  TWI ID for controlling Gsensor (0: TWI0, 1: TWI1, 2: TWI2)
;--------------------------------------------------------------------------------
[gsensor_para]
gsensor_used        = 0
gsensor_twi_id      = 1
gsensor_twi_addr    = 0x18
gsensor_int1        = port:PB06<4><1><default><default>
gsensor_int2        =

;--------------------------------------------------------------------------------
; G sensor automatic detection configuration
;gsensor_detect_used  --- Whether startup automatic inspection function. 1:used,0:unused
;Module name postposition 1 said detection, 0 means no detection.
;--------------------------------------------------------------------------------
[gsensor_list_para]
gsensor_det_used          = 0
bma250                    = 1
mma8452                   = 1
mma7660                   = 1
mma865x                   = 1
afa750                    = 1
lis3de_acc                = 1
lis3dh_acc                = 1
kxtik                     = 1
dmard10                   = 0
dmard06                   = 1
mxc622x                   = 1
fxos8700                  = 1
lsm303d                   = 1

;--------------------------------------------------------------------------------
; gps gpio configuration
; gps_spi_id:     the index of SPI controller. 0: SPI0, 1: SPI1, 2: SPI2, 15: no SPI used
; gps_spi_cs_num: the chip select number of SPI controller. 0: SPI CS0, 1: SPI CS1
; gps_lradc:      the lradc number for GPS used. 0 and 1 is valid, set 2 if not use lradc
;--------------------------------------------------------------------------------
[gps_para]

;wlan configuration
;clocks:                            32k clk
;wlan_power_num:        the number of inputs for wifi power
;wlan_power(n):                 wifi power(n)
;wlan_io_regulator:     the power of wifi io
;wlan_busnum:                   no. of bus(usb or bus)
;wlan_regon:                    wifi function enable io
;wlan_hostwake:             wifi device wake-up host
;status:                            okay
;--------------------------------------------------------------------------------
[wlan]
wlan_used             = 1
compatible            = "allwinner,sunxi-wlan"
clocks                = "losc_out"
;wlan_power            = port:PC05<1><default><default><default>
;wlan_io_regulator     = "vcc-wifi-io"
wlan_busnum           = 1
wlan_regon            = port:PC06<1><1><1><0>
wlan_hostwake         = port:PB11<6><default><default><default>
chip_en               = port:PC05<1><default><default><0>
chip_en_invert        = 1

;--------------------------------------------------------------------------------
;bt configuration
;clocks:                            32k clk
;bt_power_num           the number of inputs for wifi power
;bt_power(n):                       bt power (n)
;wlan_io_regulator:     the power of bt io
;bt_rst_n:                  bt function enable io
;status:                            okay
;--------------------------------------------------------------------------------
[bt]
bt_used               = 0
compatible            = "allwinner,sunxi-bt"
clocks                = "losc_out"
pinctrl-names         = "default"
;clock_io             = port:PI12<4><0><0><0>
;bt_power              = "vcc-wifi"
;bt_io_regulator       = "vcc-wifi-io"
bt_rst_n              = port:PB03<1><1><1><0>

;--------------------------------------------------------------------------------
[btlpm]
btlpm_used            = 0
compatible            = "allwinner,sunxi-btlpm"
uart_index            = 1
bt_wake               = port:PC04<1><1><1><1>
;bt_hostwake                      = port:PB08<6><default><default><default>

;--------------------------------------------------------------------------------
;gyroscope
;--------------------------------------------------------------------------------
[gy_para]
gy_used             = 0
gy_twi_id           = 1
gy_twi_addr         = 0x6a
gy_int1             =
gy_int2             =

;--------------------------------------------------------------------------------
; Gyro automatic detection configuration
;gy_detect_used  --- Whether startup automatic inspection function. 1:used,0:unused
;Module name postposition 1 said detection, 0 means no detection.
;--------------------------------------------------------------------------------
[gy_list_para]
gy_det_used          = 0
l3gd20_gyr           = 1

;--------------------------------------------------------------------------------
;light sensor
;--------------------------------------------------------------------------------
[ls_para]
ls_used             = 0
ls_twi_id           = 1
ls_twi_addr         = 0x23
ls_int              = port:PB07<4><1><default><default>

;--------------------------------------------------------------------------------
; lsensor automatic detection configuration
;ls_detect_used  --- Whether startup automatic inspection function. 1:used,0:unused
;Module name postposition 1 said detection, 0 means no detection.
;--------------------------------------------------------------------------------
[ls_list_para]
ls_det_used          = 0
ltr_501als           = 1
jsa1212              = 1

;--------------------------------------------------------------------------------
;compass
;--------------------------------------------------------------------------------
[compass_para]
compass_used        = 0
compass_twi_id      = 1
compass_twi_addr    = 0x0d
compass_int         =

;--------------------------------------------------------------------------------
;daudio_master:1: SND_SOC_DAIFMT_CBM_CFM(codec clk & FRM master)        use
;                       2: SND_SOC_DAIFMT_CBS_CFM(codec clk slave & FRM master)  not use
;                       3: SND_SOC_DAIFMT_CBM_CFS(codec clk master & frame slave) not use
;                       4: SND_SOC_DAIFMT_CBS_CFS(codec clk & FRM slave)         use
;daudio_select:0 is pcm.1 is i2s
;audio_format: 1:SND_SOC_DAIFMT_I2S(standard i2s format).            use
;                          2:SND_SOC_DAIFMT_RIGHT_J(right justfied format).
;                          3:SND_SOC_DAIFMT_LEFT_J(left justfied format)
;                          4:SND_SOC_DAIFMT_DSP_A(pcm. MSB is available on 2nd BCLK rising edge after LRC rising edge). use
;                          5:SND_SOC_DAIFMT_DSP_B(pcm. MSB is available on 1nd BCLK rising edge after LRC rising edge)
;signal_inversion:1:SND_SOC_DAIFMT_NB_NF(normal bit clock + frame)  use
;                                 2:SND_SOC_DAIFMT_NB_IF(normal BCLK + inv FRM)
;                                 3:SND_SOC_DAIFMT_IB_NF(invert BCLK + nor FRM)  use
;                                 4:SND_SOC_DAIFMT_IB_IF(invert BCLK + FRM)
;over_sample_rate: support 128fs/192fs/256fs/384fs/512fs/768fs
;sample_resolution      :16bits/20bits/24bits
;word_select_size       :16bits/20bits/24bits/32bits
;pcm_sync_period        :16/32/64/128/256
;msb_lsb_first          :0: msb first; 1: lsb first
;sign_extend            :0: zero pending; 1: sign extend
;slot_index             :slot index: 0: the 1st slot - 3: the 4th slot
;slot_width             :8 bit width / 16 bit width
;frame_width            :0: long frame = 2 clock width;  1: short frame
;tx_data_mode           :0: 16bit linear PCM; 1: 8bit linear PCM; 2: 8bit u-law; 3: 8bit a-law
;rx_data_mode           :0: 16bit linear PCM; 1: 8bit linear PCM; 2: 8bit u-law; 3: 8bit a-law
;--------------------------------------------------------------------------------
[tdm0]
daudio_used         = 0
daudio_master           = 4
daudio_select           = 1
audio_format            = 1
signal_inversion        = 1
mclk_fs                         = 512
sample_resolution   = 16
slot_width_select       = 16
pcm_lrck_period         = 32
pcm_lrckr_period        = 1
msb_lsb_first       = 0
sign_extend             = 0
slot_index                  = 0
slot_width                  = 16
frame_width             = 1
tx_data_mode            = 0
rx_data_mode            = 0
;i2s_mclk            = port:PB08<2><1><default><default>
i2s_bclk            = port:PG11<2><1><default><default>
i2s_lrclk           = port:PG10<2><1><default><default>
i2s_dout0           = port:PG12<2><1><default><default>
i2s_dout1           =
i2s_dout2           =
i2s_dout3           =
i2s_din             = port:PG13<2><1><default><default>

;--------------------------------------------------------------------------------------
;pa_single_vol,pa_double_vol: 31 level,1.5db/step.0x1f is the large volume.
;cap_val:use for system record,0x0--0db,0x1--24db,0x2--27db,0x3--30db,0x4--33db,0x5--36db,0x6--39db,0x7--42db
;headphone_vol,earpiece_vol: must least than 0x3b. 0x1 is a step.
;headset_mic_vol: headset mic(mic2) vol,use for phone headset mic call
;main_mic_vol: main mic(mic1) vol,use for phone main mic call
;version_v3_used : 1:v3,0:v3s
[codec]
;audio_used             = 1
headphone_vol                   = 0x3b
pa_single_vol                   = 0x19
pa_double_vol                   = 0x1f
headphone_direct_used   = 0
phone_mic_vol = 0x6
version_v3_used = 1
;v3s
;audio_pa_ctrl          = port:PB00<1><default><default><0>
;v3
audio_pa_ctrl         = port:PB05<1><default><default><0>
audio_pa_always_on   = port:PB05<0><default><default><0>
adcagc_used       = 0
adcdrc_used       = 1
dacdrc_used       = 0
adchpf_used       = 1
dachpf_used       = 0

[pwr_ctrl]
pwr_ctrl_used     = 1
dect_pin          = port:PG13<0><default><default><default>
hold_time         = 2
pwr_pin           = port:PG12<1><default><default><1>

[lradc_bat_para]
used              = 0
charge_state      = port:PG08<0><default><default><default>


;--------------------------------------------------------------------------------------------------------
;compatible                  ---pmu0 name
;used                        ---0:not used,1:used
;pmu_id                      ---0:axp19x,1:axp20x,2:axp22x,3:axp806,4:axp808,5:axp809,6:axp803,7:axp813, 8:pmu1736
;reg                         ---pmu0 twi slave address
;pmu_vbusen_func             ---N_VBUSEN function select,0:as an output,1:as an input
;pmu_reset                   ---when power key press longer than 16's,PMU reset or not.0:not reset 1:reset
;pmu_irq_wakeup              ---press irq wakeup or not when sleep or power down.0:not wakeup 1:wakeup
;pmu_hot_shutdown            ---when PMU over temperature protect or not;0:disable 1:enable
;pmu_inshort                 ---ACIN and VBUS inshort or not by software;0:auto detect 1:inshort
;--------------------------------------------------------------------------------------------------------
[pmu0]
compatible                 = "axp203"
reg                        = 0x34
used                       = 1
pmu_id                     = 1
pmu_vbusen_func            = 0
pmu_reset                  = 0
pmu_irq_wakeup             = 1
pmu_hot_shutdown           = 1
pmu_inshort                = 0
pmu_irq_id                 = 64
pmu_irq_gpio               =

;--------------------------------------------------------------------------------------------------------
;compatible                  ---powerkey0 name
;pmu_powkey_off_time         ---set pek off time,ms, 4000/6000/8000/10000
;pmu_powkey_off_func         ---set pek off func, 0:shutdown,1:restart
;pmu_powkey_off_en           ---set pek offlevel powerdown or not, 0:not powerdown,1:powerdown
;pmu_powkey_long_time        ---set pek pek long irq time,ms,1000/1500/2000/2500
;pmu_powkey_on_time          ---set pek on time,ms,128/1000/2000/3000
;--------------------------------------------------------------------------------------------------------
[powerkey0]
compatible                 = "axp203-powerkey"
pmu_powkey_off_time        = 6000
pmu_powkey_off_func        = 0
pmu_powkey_off_en          = 1
pmu_powkey_long_time       = 1500
pmu_powkey_on_time         = 1000

;--------------------------------------------------------------------------------------------------------
;compatible                   ---regulator0 name
;regulator_count              ---pmu ldo count, changed with different pmu
;regulator(1~regulator_count) ---ldo details
;--------------------------------------------------------------------------------------------------------
[regulator0]
compatible      = "axp203-regulator"
regulator_count = 7
regulator1      = "axp20_dcdc2 none vdd-sys vdd-cpua vdd-ephy"
regulator2      = "axp20_dcdc3 none vcc-io hpvcc vcc-pd vcc-usb vcc-ephy vcc-mcsi vcc-lcd vcc-wifi vcc-device vcc-csi vcc-ctp"
regulator3      = "axp20_ldo1 none vcc-rtc"
regulator4      = "axp20_ldo2 none  vcc-avcc vcc-pll mipi-avdd"
regulator5      = "axp20_ldo3 none vcc-pe mipi-dvdd"
regulator6      = "axp20_ldo4 none mipi-iovdd"
regulator7      = "axp20_ldoio0 none"

;--------------------------------------------------------------------------------------------------------
;compatible                  ---axp_gpio0 name
;--------------------------------------------------------------------------------------------------------
[axp_gpio0]
compatible = "axp203-gpio"

;--------------------------------------------------------------------------------------------------------
;pmu_chg_ic_temp             ---intelligence charge pmu temperature. when it is 0, this function is closed.
;compatible                  ---charger0 name
;pmu_battery_rdc             ---battery initial resistance
;pmu_battery_cap             ---battery capability,mAh
;pmu_runtime_chgcur          ---set initial charging current limite,mA, 300/450/600/750/900/1050/1200/1350/1500/1650/1800/1950/
;pmu_suspend_chgcur          ---set suspend charging current limite,mA, 300/450/600/750/900/1050/1200/1350/1500/1650/1800/1950/
;pmu_shutdown_chgcur         ---set shutdown charging current limite,mA, 300/450/600/750/900/1050/1200/1350/1500/1650/1800/1950/
;pmu_init_chgvol             ---set initial charing target voltage,mV,4100/4150/4200/4350
;pmu_safe_vol                ---if lower than this value,system will not boot,mV, 3500 by default
;pmu_on_ctl                  ---bit[3]:vbus bit[2]:battery insert bit[1]:battery charge to normal bit[0] int pin
;pmu_boost_en                ---boost contorl bit 1:for enable by default 0:disable by default
;pmu_boost_cur_limit         ---boost cur limit,mA, 500/900/1500 -not limit
;pmu_boost_vol_limit         ---boost vol limit,mV, 4500~5510mV, default 5126
;pmu_boost_vol_hold          ---boost mode disable threshold,mV 2400/2600/2800/3000
;pmu_init_chg_pretime        ---pre chg timer setting,min, 40/50/60/70
;pmu_init_chg_csttime        ---constant chg timer setting,min, 300/480/720/1200
;pmu_ac_vol                  ---set usb-ac limited voltage level,mV,4000/4100/4200/4300/4400/4500/4600/4700,0 - not limite
;pmu_ac_cur                  ---set usb-ac limited current level,mA,1500/2000/2500/3000/3500/4000, 0 - not limite
;pmu_usbpc_vol               ---set usb-pc limited voltage level,mV,4000/4100/4200/4300/4400/4500/4600/4700,0 - not limite
;pmu_usbpc_cur               ---set usb-pc limited current level,mA,500/900, 0 - not limite
;pmu_pwroff_vol              ---set protect voltage when system start up,mV,2600/2700/2800/2900/3000/3100/3200/3300
;pmu_pwron_vol               ---set protect voltage after system start up,mV,2600/2700/2800/2900/3000/3100/3200/3300
;pmu_battery_warning_level1  ---low power warning high level,5%-20%,1%/step
;pmu_battery_warning_level2  ---low power warning low level,0%-15%,1%/step
;pmu_chgled_func             ---CHGKED pin control, 0:controlled by pmu,1:controlled by Charger
;pmu_chgled_type             ---CHGLED Type select when pmu_chgled_func=0,0:Type A, 1:type B
;power_start                 ---when system is in charging, shutdown is power off or resart;0:restart 1:poweroff
;pmu_ocv_en                  ---charge by ocv, 1:enable, must be enabled
;pmu_cou_en                  ---charge by cou, 0:disable, 1:enable
;pmu_update_min_time         ---min time for battery capatity percentage update,second, 0/5/10/20/30/60/120/164
;pmu_bat_para1               ---battery indication at 3.13V
;pmu_bat_para2               ---battery indication at 3.27V
;pmu_bat_para3               ---battery indication at 3.34V
;pmu_bat_para4               ---battery indication at 3.55V
;pmu_bat_para5               ---battery indication at 3.63V
;pmu_bat_para6               ---battery indication at 3.66V
;pmu_bat_para7               ---battery indication at 3.7V
;pmu_bat_para8               ---battery indication at 3.73V
;pmu_bat_para9               ---battery indication at 3.77V
;pmu_bat_para10              ---battery indication at 3.8V
;pmu_bat_para11              ---battery indication at 3.84V
;pmu_bat_para12              ---battery indication at 3.87V
;pmu_bat_para13              ---battery indication at 3.94V
;pmu_bat_para14              ---battery indication at 4.01V
;pmu_bat_para15              ---battery indication at 4.08V
;pmu_bat_para16              ---battery indication at 4.15V
;pmu_bat_temp_enable         ---battery temp detect enable
;pmu_bat_charge_ltf          ---charge battery temp low threshold voltage
;pmu_bat_charge_htf          ---charge battery temp high threshold voltage
;pmu_bat_shutdown_ltf        ---shutdown battery temp low threshold voltage
;pmu_bat_shutdown_htf        ---shutdown battery temp high threshold voltage
;pmu_bat_temp_para1          ---battery temp -25 voltage
;pmu_bat_temp_para2          ---battery temp -15 voltage
;pmu_bat_temp_para3          ---battery temp -10 voltage
;pmu_bat_temp_para4          ---battery temp -5  voltage
;pmu_bat_temp_para5          ---battery temp  0  voltage
;pmu_bat_temp_para6          ---battery temp  5  voltage
;pmu_bat_temp_para7          ---battery temp  10 voltage
;pmu_bat_temp_para8          ---battery temp  20 voltage
;pmu_bat_temp_para9          ---battery temp  30 voltage
;pmu_bat_temp_para10         ---battery temp  40 voltage
;pmu_bat_temp_para11         ---battery temp  45 voltage
;pmu_bat_temp_para12         ---battery temp  50 voltage
;pmu_bat_temp_para13         ---battery temp  55 voltage
;pmu_bat_temp_para14         ---battery temp  60 voltage
;pmu_bat_temp_para15         ---battery temp  70 voltage
;pmu_bat_temp_para16         ---battery temp  80 voltage
;--------------------------------------------------------------------------------------------------------
[charger0]
compatible                 = "axp203-charger"
pmu_bat_unused             = 0
pmu_chg_ic_temp            = 0
pmu_battery_rdc            = 100
pmu_battery_cap            = 2000
pmu_batdeten               = 1
pmu_runtime_chgcur         = 500
pmu_suspend_chgcur         = 500
pmu_shutdown_chgcur        = 500
pmu_init_chgvol            = 4200
pmu_usbpc_vol              = 4000
pmu_usbpc_cur              = 500
pmu_battery_warning_level1 = 15
pmu_battery_warning_level2 = 0
pmu_chgled_func            = 0
pmu_chgled_type            = 0
power_start                = 1
pmu_pwroff_vol              = 3300
pmu_pwron_vol              = 2900

pmu_bat_para1              = 0
pmu_bat_para2              = 0
pmu_bat_para3              = 0
pmu_bat_para4              = 0
pmu_bat_para5              = 6
pmu_bat_para6              = 13
pmu_bat_para7              = 21
pmu_bat_para8              = 29
pmu_bat_para9              = 37
pmu_bat_para10             = 44
pmu_bat_para11             = 52
pmu_bat_para12             = 59
pmu_bat_para13             = 72
pmu_bat_para14             = 83
pmu_bat_para15             = 92
pmu_bat_para16             = 100

;----------------------------------------------------------------------------------
;virtual device
;virtual device for pinctrl testing
;device have pin PA1 PA2
;----------------------------------------------------------------------------------
[Vdevice]
Vdevice_used        = 1
Vdevice_0           = port:PA01<5><1><2><default>
Vdevice_1           = port:PA02<5><1><2><default>

;--------------------------------------------------------------------------------
;leds
;--------------------------------------------------------------------------------
[led_para]
led_used                = 1
led_num                 = 1
led1                    = port:PB1<1><default><default><default>
led1_trigger           = "none"

我要烧到 SPI NOR, 芯片确认是焊好的,能跑主线Linux

#45 全志 SOC » V3s tina 3.5 编译了一个固件,烧录不进去,请问是怎么回事呢? » 2021-10-08 10:31:38

X3
回复: 9

V3s tina 3.5 编译了一个固件,烧录不进去,请问是怎么回事呢?

[1243]beign to init dram
[1245]DRAM DRIVE INFO: V0.9
[1248]DRAM Type = 3 (2:DDR2,3:DDR3,6:LPDDR2,7:LPDDR3)
[1253]DRAM CLK = 408 MHz
[1255]DRAM zq value: 000039bb
[1281]DRAM size = 128 MB
[1290]init dram ok


U-Boot 2014.07 (Oct 10 2018 - 17:15:36) Allwinner Technology

uboot commit : dd6d22b2a20bd0db1e5f9932edb94a81127900aa

normal mode
i2c_init: by cpux
i2c_init ok
[4.550]pmbus:   ready
axp read error
probe axp failed
axp_probe error
[4.661]PMU: pll1 912 Mhz,PLL6=600 Mhz
AXI=304 Mhz,AHB=200 Mhz, APB1=100 Mhz
DRAM:  64 MiB
[4.669]fdt addr: 0x429e8128
[4.670]gd->fdt_size: 0xbea0
Relocation Offset is: 033ff000
gic: normal mode
[4.718]flash init start
workmode = 16,storage type = 0
try card 1
[4.720][mmc]: mmc driver ver 2018-8-11 15:15:00
[4.724][mmc]: sdc_on error, 1

[4.727][mmc]: MMC Device 1 not found
try card 2
[4.731][mmc]: mmc driver ver 2018-8-11 15:15:00
[4.736][mmc]: get card0 para fail
[4.738][mmc]: mmc_update_timing_para: error sdc_no 2
SUNXI SD/MMC: 2
[4.750][mmc]: ************Try SD card 2************
[mmc]: mmc 2 cmd 8 timeout, err 2
[mmc]: smc 2 err, cmd 8,  RE
[mmc]: mmc 2 close bus gating and reset
[mmc]: mmc 2 mmc cmd 8 err 0x00000002
[4.762][mmc]: mmc send if cond failed
[mmc]: mmc 2 cmd 55 timeout, err 2
[mmc]: smc 2 err, cmd 55,  RE
[mmc]: mmc 2 close bus gating and reset
[mmc]: mmc 2 mmc cmd 55 err 0x00000002
[4.778][mmc]: send app cmd failed
[4.781][mmc]: ************Try MMC card 2************
[mmc]: mmc 2 cmd 1 timeout, err 2
[mmc]: smc 2 err, cmd 1,  RE
[mmc]: mmc 2 close bus gating and reset
[mmc]: mmc 2 mmc cmd 1 err 0x00000002
[4.798][mmc]: read op condition failed
[4.802][mmc]: mmc send op cond failed
Card did not respond to voltage select!
[4.809][mmc]: ************SD/MMC 2 init error!!!************
[4.814][mmc]: mmc_init_boot: mmc int fail
[4.818][mmc]: mmc_init: mmc init fail, err -17
MMC init failed
try emmc fail
NAND_UbootProbe start
NB1 : enter phy init
NandHwInit: Start Nand Hardware initializing .....
uboot:nand version: 2 4 20180905 1600
Reg 0x01c20848: 0x3333
Reg 0x01c2085c: 0x55
Reg 0x01c20864: 0x10
uboot nand_request_tx_dma: reqest genernal dma for nand success, 0x43db6eb4
request general tx dma channel ok!
uboot nand_request_tx_dma: reqest genernal dma for nand success, 0x43db6ed0
request general rx dma channel ok!
SPI nand ID: 20c21920 1920c219
_SearchNandArchi fail
[ERR]NandHwInit: SCN_AnalyzeNandSystem() failed!
NandHwInit: End Nand Hardware initializing ..... FAIL!
NB1 : nand phy init fail
NB1 : enter phy Exit
nand release dma:43db6eb4
nand release dma:0
NAND_UbootProbe end: 0xffffffff
try nand fail
flash size =0x8000 sectors
sunxi spinor is initing...OK
spinor id:0x1920c2
spi_freq = 40000000
spinor id is 1920c2
try nor successed
read mbr copy[0] failed
read mbr copy[1] failed
read mbr copy[2] failed
read mbr copy[3] failed
[4.909]flash init end
[4.911]try to burn key
Net:   usb_ether
[4.915]inter uboot shell
Hit any key to stop autoboot:  0
work mode=0x10
run usb efex
delay time 2500
weak:otg_phy_config
usb init ok
set address 0x6
set address 0x6 ok
SUNXI_EFEX_ERASE_TAG
erase_flag = 0x0
FEX_CMD_fes_verify_status
FEX_CMD_fes_verify last err=0

QQ截图20211008103354.png

#46 Re: 全志 SOC » 试一试 Ubuntu 18.04 编译f1c200s tina 3.x » 2021-10-07 19:02:02

X3
gcc -pthread -fno-strict-aliasing -O2 -I/opt/v3s/tina/tina/out/host/include -I/opt/v3s/tina/tina/out/host/usr/include -I/opt/v3s/tina/tina/out/bangu-h300/staging_dir/target/host/include -I/usr/include/ncursesw -I/usr/include/ncurses -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes  -I. -IInclude -I./Include -I/opt/v3s/tina/tina/out/host/include -I/opt/v3s/tina/tina/out/host/usr/include -I/opt/v3s/tina/tina/out/bangu-h300/staging_dir/target/host/include  -DPy_BUILD_CORE  -c ./Modules/zlibmodule.c -o Modules/zlibmodule.o
gcc -pthread -fno-strict-aliasing -O2 -I/opt/v3s/tina/tina/out/host/include -I/opt/v3s/tina/tina/out/host/usr/include -I/opt/v3s/tina/tina/out/bangu-h300/staging_dir/target/host/include -I/usr/include/ncursesw -I/usr/include/ncurses -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes  -I. -IInclude -I./Include -I/opt/v3s/tina/tina/out/host/include -I/opt/v3s/tina/tina/out/host/usr/include -I/opt/v3s/tina/tina/out/bangu-h300/staging_dir/target/host/include  -DPy_BUILD_CORE  -c ./Modules/xxsubtype.c -o Modules/xxsubtype.o
gcc -pthread -c -fno-strict-aliasing -O2 -I/opt/v3s/tina/tina/out/host/include -I/opt/v3s/tina/tina/out/host/usr/include -I/opt/v3s/tina/tina/out/bangu-h300/staging_dir/target/host/include -I/usr/include/ncursesw -I/usr/include/ncurses -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes  -I. -IInclude -I./Include -I/opt/v3s/tina/tina/out/host/include -I/opt/v3s/tina/tina/out/host/usr/include -I/opt/v3s/tina/tina/out/bangu-h300/staging_dir/target/host/include  -DPy_BUILD_CORE \
      -DGITVERSION="\"`LC_ALL=C `\"" \
      -DGITTAG="\"`LC_ALL=C `\"" \
      -DGITBRANCH="\"`LC_ALL=C `\"" \
      -o Modules/getbuildinfo.o ./Modules/getbuildinfo.c
./Modules/getbuildinfo.c: In function 'Py_GetBuildInfo':
./Modules/getbuildinfo.c:47:19: error: environment variable SOURCE_DATE_EPOCH must expand to a non-negative integer less than or equal to 253402300799
                   DATE, TIME);
                   ^~~~
Makefile:661: recipe for target 'Modules/getbuildinfo.o' failed
make[4]: *** [Modules/getbuildinfo.o] Error 1
make[4]: Leaving directory '/opt/v3s/tina/tina/out/bangu-h300/compile_dir/target/host/Python-2.7.15'
Makefile:246: recipe for target '/opt/v3s/tina/tina/out/bangu-h300/compile_dir/target/host/Python-2.7.15/.built' failed
make[3]: *** [/opt/v3s/tina/tina/out/bangu-h300/compile_dir/target/host/Python-2.7.15/.built] Error 2
make[3]: Leaving directory '/opt/v3s/tina/tina/package/lang/python'
package/Makefile:192: recipe for target 'package/lang/python/host/compile' failed
make[2]: *** [package/lang/python/host/compile] Error 2
make[2]: Leaving directory '/opt/v3s/tina/tina'
package/Makefile:189: recipe for target '/opt/v3s/tina/tina/out/bangu-h300/staging_dir/target/stamp/.package_compile' failed
make[1]: *** [/opt/v3s/tina/tina/out/bangu-h300/staging_dir/target/stamp/.package_compile] Error 2
make[1]: Leaving directory '/opt/v3s/tina/tina'
/opt/v3s/tina/tina/build/toplevel.mk:301: recipe for target 'world' failed
make: *** [world] Error 2

#### make failed to build some targets (14:20 (mm:ss)) ####

参考: https://blog.csdn.net/avit04322/article/details/106616424

原因: 查看 tina目录下 scripts/get_source_date_epoch.sh

解决方案: 可以修改在tina目录执行 date +%s > version.date 来生成一个日期值

#47 Re: 全志 SOC » 试一试 Ubuntu 18.04 编译f1c200s tina 3.x » 2021-10-07 18:32:55

X3

make降到3.81版本,没什么卵用。

最终修改 lichee/linux-4.9/drivers/char/sunxi-di/Makefile 屏蔽 -include $(obj)/$(sub_dir)/Makefile

#48 Re: 全志 SOC » 试一试 Ubuntu 18.04 编译f1c200s tina 3.x » 2021-10-07 18:07:40

X3
/opt/v3s/tina/tina$ FORCE_UNSAFE_CONFIGURE=1 FORCE=1 make
WARNING: your configuration is out of sync. Please run make menuconfig, oldconfig or defconfig!
make[1]: Entering directory '/opt/v3s/tina/tina'
make[2]: Entering directory '/opt/v3s/tina/tina'
make[3]: Entering directory '/opt/v3s/tina/tina/target/allwinner'
make[4]: Entering directory '/opt/v3s/tina/tina/target/allwinner/bangu-h300'
/opt/v3s/tina/tina/scripts/kconfig.pl  + /opt/v3s/tina/tina/target/allwinner/generic/config-4.9 /opt/v3s/tina/tina/target/allwinner/bangu-h300/config-4.9 > /opt/v3s/tina/tina/out/bangu-h300/compile_dir/target/linux-bangu-h300/linux-4.9.118/.config.target
awk '/^(#[[:space:]]+)?CONFIG_KERNEL/{sub("CONFIG_KERNEL_","CONFIG_");print}' /opt/v3s/tina/tina/.config >> /opt/v3s/tina/tina/out/bangu-h300/compile_dir/target/linux-bangu-h300/linux-4.9.118/.config.target
echo "# CONFIG_KALLSYMS_EXTRA_PASS is not set" >> /opt/v3s/tina/tina/out/bangu-h300/compile_dir/target/linux-bangu-h300/linux-4.9.118/.config.target
echo "# CONFIG_KALLSYMS_ALL is not set" >> /opt/v3s/tina/tina/out/bangu-h300/compile_dir/target/linux-bangu-h300/linux-4.9.118/.config.target
echo "CONFIG_KALLSYMS_UNCOMPRESSED=y" >> /opt/v3s/tina/tina/out/bangu-h300/compile_dir/target/linux-bangu-h300/linux-4.9.118/.config.target
/opt/v3s/tina/tina/scripts/metadata.pl kconfig /opt/v3s/tina/tina/tmp/.packageinfo /opt/v3s/tina/tina/.config 4.9 > /opt/v3s/tina/tina/out/bangu-h300/compile_dir/target/linux-bangu-h300/linux-4.9.118/.config.override
/opt/v3s/tina/tina/scripts/kconfig.pl 'm+' '+' /opt/v3s/tina/tina/out/bangu-h300/compile_dir/target/linux-bangu-h300/linux-4.9.118/.config.target /dev/null /opt/v3s/tina/tina/out/bangu-h300/compile_dir/target/linux-bangu-h300/linux-4.9.118/.config.override > /opt/v3s/tina/tina/out/bangu-h300/compile_dir/target/linux-bangu-h300/linux-4.9.118/.config.set
mv /opt/v3s/tina/tina/out/bangu-h300/compile_dir/target/linux-bangu-h300/linux-4.9.118/.config.set /opt/v3s/tina/tina/out/bangu-h300/compile_dir/target/linux-bangu-h300/linux-4.9.118/.config.old
grep -v INITRAMFS /opt/v3s/tina/tina/out/bangu-h300/compile_dir/target/linux-bangu-h300/linux-4.9.118/.config.old > /opt/v3s/tina/tina/out/bangu-h300/compile_dir/target/linux-bangu-h300/linux-4.9.118/.config.set
echo 'CONFIG_INITRAMFS_SOURCE=""' >> /opt/v3s/tina/tina/out/bangu-h300/compile_dir/target/linux-bangu-h300/linux-4.9.118/.config.set
rm -rf /opt/v3s/tina/tina/out/bangu-h300/compile_dir/target/linux-bangu-h300/modules
cmp -s /opt/v3s/tina/tina/out/bangu-h300/compile_dir/target/linux-bangu-h300/linux-4.9.118/.config.set /opt/v3s/tina/tina/out/bangu-h300/compile_dir/target/linux-bangu-h300/linux-4.9.118/.config.prev || { cp /opt/v3s/tina/tina/out/bangu-h300/compile_dir/target/linux-bangu-h300/linux-4.9.118/.config.set /opt/v3s/tina/tina/out/bangu-h300/compile_dir/target/linux-bangu-h300/linux-4.9.118/.config; cp /opt/v3s/tina/tina/out/bangu-h300/compile_dir/target/linux-bangu-h300/linux-4.9.118/.config.set /opt/v3s/tina/tina/out/bangu-h300/compile_dir/target/linux-bangu-h300/linux-4.9.118/.config.prev; }
export MAKEFLAGS= ; [ -d /opt/v3s/tina/tina/out/bangu-h300/compile_dir/target/linux-bangu-h300/linux-4.9.118/user_headers ] || make -C /opt/v3s/tina/tina/out/bangu-h300/compile_dir/target/linux-bangu-h300/linux-4.9.118 HOSTCFLAGS="-O2 -I/opt/v3s/tina/tina/out/host/include -I/opt/v3s/tina/tina/out/host/usr/include  -Wall -Wmissing-prototypes -Wstrict-prototypes" CROSS_COMPILE="arm-openwrt-linux-muslgnueabi-" ARCH="arm" KBUILD_HAVE_NLS=no KBUILD_BUILD_USER="" KBUILD_BUILD_HOST="" CONFIG_SHELL="bash" V=''  CC="arm-openwrt-linux-muslgnueabi-gcc" INSTALL_HDR_PATH=/opt/v3s/tina/tina/out/bangu-h300/compile_dir/target/linux-bangu-h300/linux-4.9.118/user_headers headers_install
. /opt/v3s/tina/tina/build/shell.sh; grep '=[ym]' /opt/v3s/tina/tina/out/bangu-h300/compile_dir/target/linux-bangu-h300/linux-4.9.118/.config.set | LC_ALL=C sort | md5s > /opt/v3s/tina/tina/out/bangu-h300/compile_dir/target/linux-bangu-h300/linux-4.9.118/.vermagic
touch /opt/v3s/tina/tina/out/bangu-h300/compile_dir/target/linux-bangu-h300/linux-4.9.118/.configured
rm -f /opt/v3s/tina/tina/out/bangu-h300/compile_dir/target/linux-bangu-h300/linux-4.9.118/vmlinux /opt/v3s/tina/tina/out/bangu-h300/compile_dir/target/linux-bangu-h300/linux-4.9.118/System.map
make -C /opt/v3s/tina/tina/out/bangu-h300/compile_dir/target/linux-bangu-h300/linux-4.9.118 HOSTCFLAGS="-O2 -I/opt/v3s/tina/tina/out/host/include -I/opt/v3s/tina/tina/out/host/usr/include  -Wall -Wmissing-prototypes -Wstrict-prototypes" CROSS_COMPILE="arm-openwrt-linux-muslgnueabi-" ARCH="arm" KBUILD_HAVE_NLS=no KBUILD_BUILD_USER="" KBUILD_BUILD_HOST="" CONFIG_SHELL="bash" V=''  CC="arm-openwrt-linux-muslgnueabi-gcc" modules
make[5]: Entering directory '/opt/v3s/tina/tina/lichee/linux-4.9'
  CHK     include/config/kernel.release
  CHK     include/generated/uapi/linux/version.h
  CHK     include/generated/utsrelease.h
  CHK     include/generated/bounds.h
  CHK     include/generated/timeconst.h
  CHK     include/generated/asm-offsets.h
  CALL    scripts/checksyscalls.sh
  CHK     scripts/mod/devicetable-offsets.h
drivers/char/sunxi-di//Makefile:43: *** Too many open files.  Stop.
scripts/Makefile.build:648: recipe for target 'drivers/char/sunxi-di' failed
make[7]: *** [drivers/char/sunxi-di] Error 2
scripts/Makefile.build:648: recipe for target 'drivers/char' failed
make[6]: *** [drivers/char] Error 2
Makefile:1083: recipe for target 'drivers' failed
make[5]: *** [drivers] Error 2
make[5]: Leaving directory '/opt/v3s/tina/tina/lichee/linux-4.9'
Makefile:26: recipe for target '/opt/v3s/tina/tina/out/bangu-h300/compile_dir/target/linux-bangu-h300/linux-4.9.118/.modules' failed
make[4]: *** [/opt/v3s/tina/tina/out/bangu-h300/compile_dir/target/linux-bangu-h300/linux-4.9.118/.modules] Error 2
make[4]: Leaving directory '/opt/v3s/tina/tina/target/allwinner/bangu-h300'
Makefile:13: recipe for target 'compile' failed
make[3]: *** [compile] Error 2
make[3]: Leaving directory '/opt/v3s/tina/tina/target/allwinner'
target/Makefile:21: recipe for target 'target/allwinner/compile' failed
make[2]: *** [target/allwinner/compile] Error 2
make[2]: Leaving directory '/opt/v3s/tina/tina'
target/Makefile:16: recipe for target '/opt/v3s/tina/tina/out/bangu-h300/staging_dir/target/stamp/.target_compile' failed
make[1]: *** [/opt/v3s/tina/tina/out/bangu-h300/staging_dir/target/stamp/.target_compile] Error 2
make[1]: Leaving directory '/opt/v3s/tina/tina'
/opt/v3s/tina/tina/build/toplevel.mk:301: recipe for target 'world' failed
make: *** [world] Error 2

#### make failed to build some targets (6 seconds) ####

ubuntu:/opt/v3s/tina/tina$

编译V3s tina出错,找到一个过期的网站:
https://webcache.googleusercontent.com/search?q=cache:k_4fXMgHGI0J:https://shengqian001.com/less/linux%25E9%2599%258D%25E4%25BD%258Emake%25E7%2589%2588%25E6%259C%25AC.html+&cd=2&hl=zh-CN&ct=clnk&gl=jp

linux降低make版本,【Linux】ubuntu 16.04版本上,降低make版本为3.81版本
最近编译服务器崩了,导致又重新搭建编译服务器。以往用的是ubuntu 12.04版本,重新安装后使用的是ubuntu 16.04版本,导致很多都不对了。具体什么情况我们来看下一。

安装make命令
sudo apt-get install make

编译报错
环境:全志H5芯片

但是编译Linux内核是报错如下:

Cleaning kernel ...drivers/video/sunxi/disp2/disp/de//Makefile:18: 
*** Too many open files.Stop.scripts/Makefile.clean:94: recipe for target 'drivers/video/sunxi/disp2/disp' failed
make[3]: *** [drivers/video/sunxi/disp2/disp] 
Error 2scripts/Makefile.clean:94: recipe for target 'drivers/video/sunxi' failed
make[2]: *** [drivers/video/sunxi] Error 2scripts/Makefile.clean:94: recipe for target 'drivers/video' failed
make[1]: *** [drivers/video] Error 2Makefile:1038: recipe for target '_clean_drivers' failed
make: *** [_clean_drivers] Error 2Building kernel/home/hudson/.hudson/jobs/AllWinnerH5/workspace/AllWinnerH5.Android5.1/lichee/linux-3.10/output/lib/modules/3.10.65
Copy rootfs.cpio.gz for arm64
HOSTCCscripts/basic/fixdep/bin/sh: 1: gcc: not foundscripts/Makefile.host:118: recipe for target 'scripts/basic/fixdep' faile
d
make[2]: *** [scripts/basic/fixdep] Error 127/home/hudson/.hudson/jobs/AllWinnerH5/workspace/AllWinnerH5.Android5.1/lichee/linux-3.10/Makefile:419: recipe for target 'scripts_basic' failed
make[1]: *** [scripts_basic] Error 2
make: *** No rule to make target 'include/config/auto.conf', needed by 'include/config/kernel.release'.Stop. 

解决方案
降低make命令版本

1、查看make版本命令
make -v

hudson@hudson121:~/.hudson/jobs/AllWinnerH5/workspace/AllWinnerH5.Android5.1/lichee$ make -vGNU Make 4.1Built for x86_64-pc-linux-gnuCopyright (C) 1988-2014 Free Software Foundation, Inc.License GPLv3+: GNU GPL version 3 or later This is free software: you are free to change and redistribute it.There is NO WARRANTY, to the extent permitted by law. 2、下载
地址:http://ftp.gnu.org/gnu/make/

命令:wget http://ftp.gnu.org/gnu/make/make-3.81.tar.gz

3、解压
命令: tar xf make-3.81.tar.gz

4、配置
./configure --prefix=/usr/local/make-3.81

5、编译
sh build.sh

6、替换
sudo cp make /usr/bin/make

结束语
再通过命令(make -v)查看你就会发现版本降到了3.81。这样就完成了make版本的降低。有什么不懂的,可以通过在下面留言。觉得对你有帮助,请留个小赞,谢谢!

#49 Re: 全志 SOC » 试一试 Ubuntu 18.04 编译f1c200s tina 3.x » 2021-10-07 17:05:30

X3

#34 @binbin


rt-linux-muslgnueabi-gcc" CXX="arm-openwrt-linux-muslgnueabi-g++" RANLIB="arm-openwrt-linux-muslgnueabi-ranlib" STRIP=arm-openwrt-linux-muslgnueabi-strip OBJCOPY=arm-openwrt-linux-muslgnueabi-objcopy OBJDUMP=arm-openwrt-linux-muslgnueabi-objdump SIZE=arm-openwrt-linux-muslgnueabi-size CROSS="arm-openwrt-linux-muslgnueabi-" ARCH="arm" ;
make[4]: Entering directory '/opt/v3s/tina/tina/out/violin-F1C200s/compile_dir/target/alsa-lib-1.1.4.1'
 cd . && automake-1.15 --foreign
configure.ac:39: warning: AC_LANG_CONFTEST: no AC_LANG_SOURCE call detected in body
../../lib/autoconf/lang.m4:193: AC_LANG_CONFTEST is expanded from...
../../lib/autoconf/general.m4:2661: _AC_LINK_IFELSE is expanded from...
../../lib/autoconf/general.m4:2678: AC_LINK_IFELSE is expanded from...
../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from...
../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from...
../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from...
m4/attributes.m4:87: CC_CHECK_LDFLAGS is expanded from...
m4/attributes.m4:104: CC_NOUNDEFINED is expanded from...
configure.ac:39: the top level
configure.ac:30: error: required file './compile' not found
configure.ac:30:   'automake --add-missing' can install 'compile'
modules/mixer/simple/Makefile.am:3: warning: pkglibdir was already defined in condition TRUE, which includes condition BUILD_PYTHON ...
/opt/v3s/tina/tina/out/host/share/automake-1.15/am/header-vars.am: ... 'pkglibdir' previously defined here
modules/mixer/simple/Makefile.am:9: error: Libtool library used but 'LIBTOOL' is undefined
modules/mixer/simple/Makefile.am:9:   The usual way to define 'LIBTOOL' is to add 'LT_INIT'
modules/mixer/simple/Makefile.am:9:   to 'configure.ac' and run 'aclocal' and 'autoconf' again.
modules/mixer/simple/Makefile.am:9:   If 'LT_INIT' is in 'configure.ac', make sure
modules/mixer/simple/Makefile.am:9:   its definition is in aclocal's search path.
src/Makefile.am:16: error: Libtool library used but 'LIBTOOL' is undefined
src/Makefile.am:16:   The usual way to define 'LIBTOOL' is to add 'LT_INIT'
src/Makefile.am:16:   to 'configure.ac' and run 'aclocal' and 'autoconf' again.
src/Makefile.am:16:   If 'LT_INIT' is in 'configure.ac', make sure
src/Makefile.am:16:   its definition is in aclocal's search path.
src/alisp/Makefile.am:1: error: Libtool library used but 'LIBTOOL' is undefined
src/alisp/Makefile.am:1:   The usual way to define 'LIBTOOL' is to add 'LT_INIT'
src/alisp/Makefile.am:1:   to 'configure.ac' and run 'aclocal' and 'autoconf' again.
src/alisp/Makefile.am:1:   If 'LT_INIT' is in 'configure.ac', make sure
src/alisp/Makefile.am:1:   its definition is in aclocal's search path.
src/control/Makefile.am:1: error: Libtool library used but 'LIBTOOL' is undefined
src/control/Makefile.am:1:   The usual way to define 'LIBTOOL' is to add 'LT_INIT'
src/control/Makefile.am:1:   to 'configure.ac' and run 'aclocal' and 'autoconf' again.
src/control/Makefile.am:1:   If 'LT_INIT' is in 'configure.ac', make sure
src/control/Makefile.am:1:   its definition is in aclocal's search path.
src/hwdep/Makefile.am:1: error: Libtool library used but 'LIBTOOL' is undefined
src/hwdep/Makefile.am:1:   The usual way to define 'LIBTOOL' is to add 'LT_INIT'
src/hwdep/Makefile.am:1:   to 'configure.ac' and run 'aclocal' and 'autoconf' again.
src/hwdep/Makefile.am:1:   If 'LT_INIT' is in 'configure.ac', make sure
src/hwdep/Makefile.am:1:   its definition is in aclocal's search path.
src/mixer/Makefile.am:1: error: Libtool library used but 'LIBTOOL' is undefined
src/mixer/Makefile.am:1:   The usual way to define 'LIBTOOL' is to add 'LT_INIT'
src/mixer/Makefile.am:1:   to 'configure.ac' and run 'aclocal' and 'autoconf' again.
src/mixer/Makefile.am:1:   If 'LT_INIT' is in 'configure.ac', make sure
src/mixer/Makefile.am:1:   its definition is in aclocal's search path.
src/pcm/Makefile.am:4: error: Libtool library used but 'LIBTOOL' is undefined
src/pcm/Makefile.am:4:   The usual way to define 'LIBTOOL' is to add 'LT_INIT'
src/pcm/Makefile.am:4:   to 'configure.ac' and run 'aclocal' and 'autoconf' again.
src/pcm/Makefile.am:4:   If 'LT_INIT' is in 'configure.ac', make sure
src/pcm/Makefile.am:4:   its definition is in aclocal's search path.
src/pcm/scopes/Makefile.am:5: error: Libtool library used but 'LIBTOOL' is undefined
src/pcm/scopes/Makefile.am:5:   The usual way to define 'LIBTOOL' is to add 'LT_INIT'
src/pcm/scopes/Makefile.am:5:   to 'configure.ac' and run 'aclocal' and 'autoconf' again.
src/pcm/scopes/Makefile.am:5:   If 'LT_INIT' is in 'configure.ac', make sure
src/pcm/scopes/Makefile.am:5:   its definition is in aclocal's search path.
src/rawmidi/Makefile.am:1: error: Libtool library used but 'LIBTOOL' is undefined
src/rawmidi/Makefile.am:1:   The usual way to define 'LIBTOOL' is to add 'LT_INIT'
src/rawmidi/Makefile.am:1:   to 'configure.ac' and run 'aclocal' and 'autoconf' again.
src/rawmidi/Makefile.am:1:   If 'LT_INIT' is in 'configure.ac', make sure
src/rawmidi/Makefile.am:1:   its definition is in aclocal's search path.
src/seq/Makefile.am:1: error: Libtool library used but 'LIBTOOL' is undefined
src/seq/Makefile.am:1:   The usual way to define 'LIBTOOL' is to add 'LT_INIT'
src/seq/Makefile.am:1:   to 'configure.ac' and run 'aclocal' and 'autoconf' again.
src/seq/Makefile.am:1:   If 'LT_INIT' is in 'configure.ac', make sure
src/seq/Makefile.am:1:   its definition is in aclocal's search path.
src/timer/Makefile.am:1: error: Libtool library used but 'LIBTOOL' is undefined
src/timer/Makefile.am:1:   The usual way to define 'LIBTOOL' is to add 'LT_INIT'
src/timer/Makefile.am:1:   to 'configure.ac' and run 'aclocal' and 'autoconf' again.
src/timer/Makefile.am:1:   If 'LT_INIT' is in 'configure.ac', make sure
src/timer/Makefile.am:1:   its definition is in aclocal's search path.
src/topology/Makefile.am:1: error: Libtool library used but 'LIBTOOL' is undefined
src/topology/Makefile.am:1:   The usual way to define 'LIBTOOL' is to add 'LT_INIT'
src/topology/Makefile.am:1:   to 'configure.ac' and run 'aclocal' and 'autoconf' again.
src/topology/Makefile.am:1:   If 'LT_INIT' is in 'configure.ac', make sure
src/topology/Makefile.am:1:   its definition is in aclocal's search path.
src/ucm/Makefile.am:1: error: Libtool library used but 'LIBTOOL' is undefined
src/ucm/Makefile.am:1:   The usual way to define 'LIBTOOL' is to add 'LT_INIT'
src/ucm/Makefile.am:1:   to 'configure.ac' and run 'aclocal' and 'autoconf' again.
src/ucm/Makefile.am:1:   If 'LT_INIT' is in 'configure.ac', make sure
src/ucm/Makefile.am:1:   its definition is in aclocal's search path.
parallel-tests: error: required file './test-driver' not found
parallel-tests:   'automake --add-missing' can install 'test-driver'
Makefile:290: recipe for target 'Makefile.in' failed
make[4]: *** [Makefile.in] Error 1
make[4]: Leaving directory '/opt/v3s/tina/tina/out/violin-F1C200s/compile_dir/target/alsa-lib-1.1.4.1'
Makefile:118: recipe for target '/opt/v3s/tina/tina/out/violin-F1C200s/compile_dir/target/alsa-lib-1.1.4.1/.built' failed
make[3]: *** [/opt/v3s/tina/tina/out/violin-F1C200s/compile_dir/target/alsa-lib-1.1.4.1/.built] Error 2
make[3]: Leaving directory '/opt/v3s/tina/tina/package/libs/alsa-lib'
package/Makefile:192: recipe for target 'package/libs/alsa-lib/compile' failed
make[2]: *** [package/libs/alsa-lib/compile] Error 2
make[2]: Leaving directory '/opt/v3s/tina/tina'
package/Makefile:189: recipe for target '/opt/v3s/tina/tina/out/violin-F1C200s/staging_dir/target/stamp/.package_compile' failed
make[1]: *** [/opt/v3s/tina/tina/out/violin-F1C200s/staging_dir/target/stamp/.package_compile] Error 2
make[1]: Leaving directory '/opt/v3s/tina/tina'
/opt/v3s/tina/tina/build/toplevel.mk:301: recipe for target 'world' failed
make: *** [world] Error 2

#### make failed to build some targets (14 seconds) ####

解决方案:

sudo apt-get install git-core gnupg flex bison gperf build-essential \
 zip curl zlib1g-dev gcc-multilib g++-multilib libc6-dev-i386 \
 lib32ncurses5-dev x11proto-core-dev libx11-dev lib32z1-dev ccache \
 libgl1-mesa-dev libxml2-utils xsltproc unzip u-boot-tools gawk \
build-essential subversion libncurses5-dev zlib1g-dev gawk gcc-multilib flex git-core gettext libssl-dev -y

然后清除alsa-lib,然后再编译他:

make package/libs/alsa-lib/clean
make package/libs/alsa-lib/compile

#51 Re: 全志 SOC » 全志A133/T509/AIC800 编译 longan SDK 出现这个错误 » 2021-10-02 12:30:55

X3

执行 ./build.sh rootfs 会把 out/t509/a3/bsp/rootfs_def 打包成 out/t509/a3/bsp/rootfs.ext4out/t509/a3/bsp/rootfs.squashfs,所以,如果要buildroot自己制作文件系统,那么需要把 output/target/* 复制到 out/t509/a3/bsp/rootfs_def

#52 Re: 全志 SOC » 全志A133/T509/AIC800 编译 longan SDK 出现这个错误 » 2021-10-02 10:24:57

X3

修改 build/mkcommon.sh

添加 rootfs 子命令:

...
        buildroot)
                ACTION="mkbr;";
                module=buildroot;
                break;
                ;;
        rootfs)
                ACTION="mkrootfs;";
                module=rootfs;
                break;
                ;;
        ramfs)
                ACTION="mkramfs;";
                module=ramfs;
                break;
                ;;
...

执行 ./build.sh rootfs 之后:

/opt/a133/longan$ ./build.sh rootfs
ACTION List: mkrootfs;========
Execute command: mkrootfs 
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
INFO: build rootfs ...
INFO: Build default rootfs ...
tune2fs 1.44.1 (24-Mar-2018)
tune2fs 1.44.1 (24-Mar-2018)

Please run e2fsck -f on the filesystem.

Creating journal inode: done
This filesystem will be automatically checked every 20 mounts or
0 days, whichever comes first.  Use tune2fs -c or -i to override.

mke2img: e2fsck was successfully run on '/opt/a133/longan/out/t509/a3/bsp/rootfs.ext4' (ext4)

tune2fs 1.44.1 (24-Mar-2018)
Setting maximal mount count to -1
Setting interval between checks to 0 seconds
Error: max_leb_cnt too low (200 needed)
rootdir=/opt/a133/longan/out/t509/a3/bsp/rootfs_def
table='/opt/a133/longan/device/config/rootfs_tar/_device_table.txt'
Parallel mksquashfs: Using 4 processors
Creating 4.0 filesystem on /opt/a133/longan/out/t509/a3/bsp/rootfs.squashfs, block size 131072.

Exportable Squashfs 4.0 filesystem, xz compressed, data block size 131072
	compressed data, compressed metadata, compressed fragments, no xattrs
	duplicates are removed
Filesystem size 31395.40 Kbytes (30.66 Mbytes)
	32.75% of uncompressed filesystem size (95855.94 Kbytes)
Inode table size 27310 bytes (26.67 Kbytes)
	23.06% of uncompressed inode table size (118406 bytes)
Directory table size 32446 bytes (31.69 Kbytes)
	47.24% of uncompressed directory table size (68683 bytes)
Number of duplicate files found 210
Number of inodes 3500
Number of files 2830
Number of fragments 239
Number of symbolic links  473
Number of device nodes 3
Number of fifo nodes 0
Number of socket nodes 0
Number of directories 194
Number of ids (unique uids + gids) 1
Number of uids 1
	root (0)
Number of gids 1
	root (0)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
X3@ubuntu:/opt/a133/longan$ 

重新构建了 rootfs.ext4 rootfs.squashfs 文件系统

#53 Re: 全志 SOC » 全志A133/T509/AIC800 编译 longan SDK 出现这个错误 » 2021-10-02 09:47:54

X3

开机画面直接替换: device/config/chips/t509/boot-resource/boot-resource/bootlogo.bmp

#54 Re: 全志 SOC » 全志A133/T509/AIC800 编译 longan SDK 出现这个错误 » 2021-10-01 16:34:00

X3

build/mkcmd.sh 里面定义了 kernel版本 / 系统结构 / gcc版本 / rootfs版本:

cross_compiler=(
'linux-3.4      arm      gcc-linaro.tar.bz2      target_arm.tar.bz2'
'linux-3.4      arm64   gcc-linaro-aarch64.tar.xz       target_arm64.tar.bz2'
'linux-3.10     arm      gcc-linaro-arm.tar.xz   target_arm.tar.bz2'
'linux-3.10     arm64   gcc-linaro-aarch64.tar.xz       target_arm64.tar.bz2'
'linux-4.4      arm       gcc-linaro-5.3.1-2016.05-x86_64_arm-linux-gnueabi.tar.xz        target-arm-linaro-5.3.tar.bz2'
'linux-4.4      arm64   gcc-linaro-5.3.1-2016.05-x86_64_aarch64-linux-gnu.tar.xz        target-arm64-linaro-5.3.tar.bz2'
'linux-4.9      arm       gcc-linaro-5.3.1-2016.05-x86_64_arm-linux-gnueabi.tar.xz        target-arm-linaro-5.3.tar.bz2'
'linux-4.9      arm64   gcc-linaro-5.3.1-2016.05-x86_64_aarch64-linux-gnu.tar.xz        target-arm64-linaro-5.3.tar.bz2'
)

#55 Re: 全志 SOC » 全志A133/T509/AIC800 编译 longan SDK 出现这个错误 » 2021-10-01 09:07:05

X3
cloudxxcloud 说:

搞定了?

搞定了:

me@ubuntu:/opt/a133/longan$ source build/envsetup.sh

Welcome to mkscript setup progress
All available platform:
   0. android
   1. linux
Choice [linux]: 1
All available linux_dev:
   0. bsp
   1. dragonboard
Choice [dragonboard]: 1
All available ic:
   0. a133
   1. t509
Choice [t509]: 1
All available board:
   0. a3
   1. demo
   2. demo2
   3. fpga
   4. qa
   5. srandway
   6. ver
Choice [a3]: 0
All available flash:
   0. default
   1. nor
Choice [default]: 0
INFO: kernel defconfig: generate /opt/a133/longan/kernel/linux-4.9/.config by /opt/a133/longan/kernel/linux-4.9/arch/arm64/configs/sun50iw10p1smp_t509_dragonboard_defconfig
  HOSTCC  scripts/basic/fixdep
  HOSTCC  scripts/basic/bin2c
  HOSTCC  scripts/kconfig/conf.o
  HOSTCC  scripts/kconfig/zconf.tab.o

先支持 ./build.sh ,再执行 ./build.sh pack :

me@ubuntu:/opt/a133/longan$ ./build.sh
ACTION List: mklichee;========
Execute command: mklichee
INFO: ----------------------------------------
INFO: build lichee ...
INFO: chip: sun50iw10p1
INFO: platform: linux
INFO: kernel: linux-4.9
INFO: board: a3
INFO: output: /opt/a133/longan/out/t509/a3/dragonboard
INFO: ----------------------------------------
INFO: build dtbo ...
debug: main,line:309
debug: main,line:311
debug: main,line:309
debug: main,line:311
debug: main,line:309
debug: main,line:311
debug: main,line:309
debug: main,line:311
debug: main,line:309
debug: main,line:311
debug: main,line:309
debug: main,line:311
debug: main,line:309
debug: main,line:311
debug: main,line:309
debug: main,line:311
INFO: mkdtbo: make  dtboimg start.
create image file: /opt/a133/longan/out/t509/a3/dragonboard/dtbo.img...
Total 8 entries.
dt_table_header:
               magic = d7b7ab1e
          total_size = 21012
         header_size = 32
       dt_entry_size = 32
      dt_entry_count = 8
   dt_entries_offset = 32
           page_size = 2048
         reserved[0] = 00000000
dt_table_entry[0]:
             dt_size = 480
           dt_offset = 288
                  id = 00000001
                 rev = 00000000
           custom[0] = 00000123
           custom[1] = 00000000
           custom[2] = 00000000
           custom[3] = 00000000
           (FDT)size = 480
     (FDT)compatible = board_manufacturer,board_model
dt_table_entry[1]:
             dt_size = 2880
           dt_offset = 768
                  id = 00000002
                 rev = 00000000
           custom[0] = 55551234
           custom[1] = 55551234
           custom[2] = 55551234
           custom[3] = 55551234
           (FDT)size = 2880
     (FDT)compatible = board_manufacturer,board_model
dt_table_entry[2]:
             dt_size = 2356
           dt_offset = 3648
                  id = 00000003
                 rev = 00000000
           custom[0] = 55551234
           custom[1] = 55551234
           custom[2] = 55551234
           custom[3] = 55551234
           (FDT)size = 2356
     (FDT)compatible = board_manufacturer,board_model
dt_table_entry[3]:
             dt_size = 1680
           dt_offset = 6004
                  id = 00000004
                 rev = 00000000
           custom[0] = 55551234
           custom[1] = 55551234
           custom[2] = 55551234
           custom[3] = 55551234
           (FDT)size = 1680
     (FDT)compatible = board_manufacturer,board_model
dt_table_entry[4]:
             dt_size = 728
           dt_offset = 7684
                  id = 00000005
                 rev = 00000000
           custom[0] = 55551234
           custom[1] = 55551234
           custom[2] = 55551234
           custom[3] = 55551234
           (FDT)size = 728
     (FDT)compatible = board_manufacturer,board_model
dt_table_entry[5]:
             dt_size = 2260
           dt_offset = 8412
                  id = 00000006
                 rev = 00000000
           custom[0] = 55551234
           custom[1] = 55551234
           custom[2] = 55551234
           custom[3] = 55551234
           (FDT)size = 2260
     (FDT)compatible = board_manufacturer,board_model
dt_table_entry[6]:
             dt_size = 4212
           dt_offset = 10672
                  id = 00000007
                 rev = 00000000
           custom[0] = 55551234
           custom[1] = 55551234
           custom[2] = 55551234
           custom[3] = 55551234
           (FDT)size = 4212
     (FDT)compatible = board_manufacturer,board_model
dt_table_entry[7]:
             dt_size = 6128
           dt_offset = 14884
                  id = 00000008
                 rev = 00000000
           custom[0] = 55551234
           custom[1] = 55551234
           custom[2] = 55551234
           custom[3] = 55551234
           (FDT)size = 6128
     (FDT)compatible = board_manufacturer,board_model
INFO: build arisc
make: Entering directory '/opt/a133/longan/brandy/arisc'
arisc defconfig: generate ar100s/.config by sun50iw10p1_defconfig
#
# configuration written to .config
#
  CHK     include/generated/conf.h
  CC       driver/intc/intc.o
  CC       driver/intc/intc_manager.o
  LD       driver/intc/obj-in.o
  CC       driver/pin/pin.o
  CC       driver/pin/pin_int.o
  LD       driver/pin/obj-in.o
  CC       driver/timer/timer.o
  CC       driver/timer/timer_cdelay.o
  CC       driver/timer/timer_delay.o
  LD       driver/timer/obj-in.o
  CC       driver/uart/uart.o
  LD       driver/uart/obj-in.o
  CC       driver/twi/twi.o
  LD       driver/twi/obj-in.o
  CC       driver/hwmsgbox/hwmsgbox.o
  LD       driver/hwmsgbox/obj-in.o
  CC       driver/pmu/pmu-sun50iw10p1/pmu.o
  LD       driver/pmu/pmu-sun50iw10p1/obj-in.o
  LD       driver/pmu/obj-in.o
  CC       driver/watchdog/watchdog.o
  LD       driver/watchdog/obj-in.o
  LD       driver/obj-in.o
  CC       library/library.o
  CC       library/string.o
  CC       library/libfdt/fdt.o
  CC       library/libfdt/fdt_ro.o
  CC       library/libfdt/fdt_strerror.o
  CC       library/libfdt/fdt_addresses.o
  LD       library/libfdt/obj-in.o
use lib
  LD       library/obj-in.o
  CC       service/standby/standby.o
  CC       service/standby/standby_dram_crc.o
  CC       service/standby/wakeup_source.o
  CC       service/standby/standby-sun50iw10p1/plat_standby.o
  LD       service/standby/standby-sun50iw10p1/obj-in.o
  LD       service/standby/obj-in.o
  LD       service/obj-in.o
  CC       system/notifier/notifier.o
  LD       system/notifier/obj-in.o
  CC       system/message_manager/message_manager.o
  LD       system/message_manager/obj-in.o
  CC       system/debugger/debugger.o
  LD       system/debugger/obj-in.o
  CC       system/daemon/daemon.o
  CC       system/daemon/para.o
  LD       system/daemon/obj-in.o
  LD       system/obj-in.o

        --- Linking ---
or32-elf-ld: total time in link: 0.006004
or32-elf-ld: data size 18060608
   text    data     bss     dec     hex filename
      0       0       0       0       0 arch/obj-in.o
  13238     736      20   13994    36aa driver/obj-in.o
  10105       0       0   10105    2779 library/obj-in.o
   6172      12     168    6352    18d0 service/obj-in.o
   3634     144     228    4006     fa6 system/obj-in.o
  62916     972    1968   65856   10140 scp.elf
be2le scp.raw scp.bin
open file: scp.raw
Open file: scp.bin
copy scp.bin to /opt/a133/longan/device/config/chips/t509/bin
make: Leaving directory '/opt/a133/longan/brandy/arisc'
INFO: build kernel ...
INFO: Prepare toolchain ...
build_system: longan
Building kernel
/opt/a133/longan/kernel/linux-4.9/output/lib/modules/4.9.170
  CHK     include/config/kernel.release
  CHK     include/generated/uapi/linux/version.h
  CHK     include/generated/utsrelease.h
  HOSTCC  scripts/kallsyms
  HOSTCC  scripts/mod/modpost.o
  CHK     scripts/mod/devicetable-offsets.h
  HOSTCC  scripts/mod/sumversion.o
  HOSTCC  scripts/dtc/dtc.o
  HOSTCC  scripts/dtc/fstree.o
  HOSTCC  scripts/dtc/data.o
  HOSTCC  scripts/dtc/flattree.o
  HOSTCC  scripts/dtc/livetree.o
  HOSTCC  scripts/dtc/treesource.o
  HOSTCC  scripts/dtc/updatetree.o
  HOSTCC  scripts/dtc/srcpos.o
  HOSTCC  scripts/dtc/checks.o
  HOSTCC  scripts/dtc/util.o
  HOSTCC  scripts/dtc/dtc-lexer.lex.o
  HOSTCC  scripts/dtc/dtc-parser.tab.o
  HOSTLD  scripts/mod/modpost
  HOSTLD  scripts/dtc/dtc
  CHK     include/generated/timeconst.h
  CHK     include/generated/bounds.h
  CHK     include/generated/asm-offsets.h
  CALL    scripts/checksyscalls.sh
  HOSTCC  usr/gen_init_cpio
  CHK     include/generated/compile.h
  UPD     include/generated/compile.h
  CC      init/version.o
  GEN     usr/initramfs_data.cpio.gz
  AS      usr/initramfs_data.o
  LD      usr/built-in.o
  LD      init/built-in.o
  CHK     kernel/config_data.h
  DTC     arch/arm64/boot/dts/sunxi/board.dtb
  GEN     .version
  LD      vmlinux.o
  MODPOST vmlinux.o
  CHK     include/generated/compile.h
  UPD     include/generated/compile.h
  CC      init/version.o
  LD      init/built-in.o
  KSYM    .tmp_kallsyms1.o
  KSYM    .tmp_kallsyms2.o
  LD      vmlinux
  SORTEX  vmlinux
  SYSMAP  System.map
  OBJCOPY arch/arm64/boot/Image
  Building modules, stage 2.
  MODPOST 29 modules
  GZIP    arch/arm64/boot/Image.gz
make: Nothing to be done for 'modules'.
Script_to_dts: use board special dts file board.dts
sunxi_dtb create
p=soc c=product state=0
p=soc c=platform state=0
p=soc c=target state=0
p=soc c=power_sply state=0
p=soc c=card_boot state=0
p=soc c=fastboot_key state=0
p=soc c=recovery_key state=0
p=soc c=pm_para state=0
p=soc c=card0_boot_para state=0
p=soc c=card2_boot_para state=0
p=soc c=gpio_bias state=0
p=soc c=auto_print state=0
p=soc c=uart_para state=0
p=soc c=jtag_para state=0
p=soc c=clock state=0
p=soc c=dram state=0
p=soc c=uart0 state=0
p=soc c=nand0 state=0
p=soc c=charger0 state=0
Conver script to dts ok.
'arch/arm64/boot/Image' -> 'output/bImage'
'arch/arm64/boot/Image.gz' -> 'output/Image.gz'
Copy rootfs.cpio.gz for arm64
Building modules
make: Entering directory '/opt/a133/longan/kernel/linux-4.9/modules/nand'
[NAND] NOT buid as ko
make: Leaving directory '/opt/a133/longan/kernel/linux-4.9/modules/nand'
[GPU]: No GPU type is configured in /opt/a133/longan/kernel/linux-4.9/.config.
regenerate rootfs cpio
15757 blocks
15758 blocks
build_ramfs
Copy boot.img to output directory ...
./scripts/build.sh

sun50iw10p1 compile Kernel successful


INFO: build kernel OK.
INFO: build rootfs ...
INFO: Prepare dragonboard toolchain ...
Regenerating dragonboard Rootfs...
extract dragonboard rootfs.tar.gz
  CC    adb.c
  CC    backup_service.c
  CC    fdevent.c
  CC    transport.c
  CC    transport_local.c
  CC    transport_usb.c
  CC    adb_auth_client.c
  CC    sockets.c
  CC    services.c
  CC    file_sync_service.c
  CC    jdwp_service.c
  CC    framebuffer_service.c
  CC    remount_service.c
  CC    usb_linux_client.c
  CC    log_service.c
  CC    utils.c
make -C libs/libcutils
make[1]: Entering directory '/opt/a133/longan/test/dragonboard/common/adb/libs/libcutils'
  CC    array.c
  CC    hashmap.c
  CC    native_handle.c
  CC    buffer.c
  CC    socket_inaddr_any_server.c
  CC    socket_local_client.c
  CC    socket_local_server.c
  CC    socket_loopback_client.c
  CC    socket_loopback_server.c
  CC    socket_network_client.c
  CC    sockets.c
  CC    config_utils.c
  CC    cpu_info.c
  CC    load_file.c
  CC    list.c
  CC    open_memstream.c
  CC    strdup16to8.c
  CC    strdup8to16.c
  CC    record_stream.c
  CC    process_name.c
  CC    qsort_r_compat.c
  CC    threads.c
  CC    sched_policy.c
  CC    iosched_policy.c
  CC    str_parms.c
  CC    properties.c
  CC    abort_socket.c
  CC    fs.c
  CC    selector.c
  CC    tztime.c
  CC    multiuser.c
  CC    zygote.c
  CC    android_reboot.c
  CC    ashmem-dev.c
  CC    debugger.c
  CC    klog.c
  CC    mq.c
  CC    partition_utils.c
  CC    qtaguid.c
  CC    uevent.c
  CC    misc_rw.c
  CC    memory.c
  AR    array.o
ar: creating libcutils.a
make[1]: Leaving directory '/opt/a133/longan/test/dragonboard/common/adb/libs/libcutils'
cp -f libs/libcutils/libcutils.a .
make -C libs/libmincrypt
make[1]: Entering directory '/opt/a133/longan/test/dragonboard/common/adb/libs/libmincrypt'
  LN    rsa.c -> rsa.o
  LN    rsa_e_3.c -> rsa_e_3.o
  LN    rsa_e_f4.c -> rsa_e_f4.o
  LN    sha.c -> sha.o
  AR    rsa.o rsa_e_3.o rsa_e_f4.o sha.o -> libmincrypt.a
ar: creating libmincrypt.a
make[1]: Leaving directory '/opt/a133/longan/test/dragonboard/common/adb/libs/libmincrypt'
cp -f libs/libmincrypt/libmincrypt.a .
  LN    adb.o backup_service.o fdevent.o transport.o transport_local.o transport_usb.o adb_auth_client.o sockets.o services.o file_sync_service.o jdwp_service.o framebuffer_service.o remount_service.o usb_linux_client.o log_service.o utils.o libcutils libmincrypt -> adbd
install adbd /opt/a133/longan/test/dragonboard/rootfs/bin
install scripts/adb_shell /opt/a133/longan/test/dragonboard/rootfs/bin
install scripts/adbd.init /opt/a133/longan/test/dragonboard/rootfs/etc/init.d
install scripts/adb_profile /opt/a133/longan/test/dragonboard/rootfs/etc
install scripts/start_adb.sh /opt/a133/longan/test/dragonboard/rootfs/bin
extract sysroot.tar.gz
  CC    core/script.c
  CC    core/audio_id.c
  AR    core/script.o core/audio_id.o -> libscript.a
  CC    core/core.c
  CC    core/script_parser.c
  CC    view/view.c
  CC    view/df_view_pad.c
  CC    view/tp_track.c
  CC    view/ion_alloc.c
  CC    view/camera_sun50iw10p1.c
  LN    core/core.o core/script_parser.o view/view.o view/df_view_pad.o view/tp_track.o view/ion_alloc.o view/camera_sun50iw10p1.o -> core
  CC    core/launcher.c
  LN    core/launcher.o -> launcher
make -C lib/"tinyalsa-master"
make[1]: Entering directory '/opt/a133/longan/test/dragonboard/src/lib/tinyalsa-master'
arm-linux-gnueabi-gcc --sysroot=/opt/a133/longan/test/dragonboard/sysroot -c -fPIC -Wall -O3 -Os -pipe -mtune=cortex-a8 -march=armv7-a -mabi=aapcs-linux -mfloat-abi=softfp -mfpu=neon -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -D_REENTRANT  mixer.c -Iinclude
arm-linux-gnueabi-gcc --sysroot=/opt/a133/longan/test/dragonboard/sysroot -c -fPIC -Wall -O3 -Os -pipe -mtune=cortex-a8 -march=armv7-a -mabi=aapcs-linux -mfloat-abi=softfp -mfpu=neon -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -D_REENTRANT  pcm.c -Iinclude
arm-linux-gnueabi-gcc --sysroot=/opt/a133/longan/test/dragonboard/sysroot -shared mixer.o pcm.o -o libtinyalsa.so
arm-linux-gnueabi-gcc --sysroot=/opt/a133/longan/test/dragonboard/sysroot -c -fPIC -Wall -O3 -Os -pipe -mtune=cortex-a8 -march=armv7-a -mabi=aapcs-linux -mfloat-abi=softfp -mfpu=neon -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -D_REENTRANT  tinyplay.c -Iinclude
arm-linux-gnueabi-gcc --sysroot=/opt/a133/longan/test/dragonboard/sysroot tinyplay.o -L. -ltinyalsa -o tinyplay
arm-linux-gnueabi-gcc --sysroot=/opt/a133/longan/test/dragonboard/sysroot -c -fPIC -Wall -O3 -Os -pipe -mtune=cortex-a8 -march=armv7-a -mabi=aapcs-linux -mfloat-abi=softfp -mfpu=neon -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -D_REENTRANT  tinycap.c -Iinclude
arm-linux-gnueabi-gcc --sysroot=/opt/a133/longan/test/dragonboard/sysroot tinycap.o -L. -ltinyalsa -o tinycap
arm-linux-gnueabi-gcc --sysroot=/opt/a133/longan/test/dragonboard/sysroot -c -fPIC -Wall -O3 -Os -pipe -mtune=cortex-a8 -march=armv7-a -mabi=aapcs-linux -mfloat-abi=softfp -mfpu=neon -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -D_REENTRANT  tinymix.c -Iinclude
arm-linux-gnueabi-gcc --sysroot=/opt/a133/longan/test/dragonboard/sysroot tinymix.o -L. -ltinyalsa -o tinymix
cp tinyplay tinycap tinymix /opt/a133/longan/test/dragonboard/output/bin/
cp libtinyalsa.so ./../../../sysroot/lib/
cp libtinyalsa.so ./../../../rootfs/lib/
make[1]: Leaving directory '/opt/a133/longan/test/dragonboard/src/lib/tinyalsa-master'
make -C testcases
make[1]: Entering directory '/opt/a133/longan/test/dragonboard/src/testcases'
cp script_parser.sh /opt/a133/longan/test/dragonboard/output/bin/
cp send_cmd_pipe.sh /opt/a133/longan/test/dragonboard/output/bin/
cp log.sh /opt/a133/longan/test/dragonboard/output/bin/
make -C gsensortester
make[2]: Entering directory '/opt/a133/longan/test/dragonboard/src/testcases/gsensortester'
  CC    gsensortester.c
  LN    gsensortester.o -> gsensortester
cp gsensortester.sh /opt/a133/longan/test/dragonboard/output/bin/
make[2]: Leaving directory '/opt/a133/longan/test/dragonboard/src/testcases/gsensortester'
make -C hdmitester
make[2]: Entering directory '/opt/a133/longan/test/dragonboard/src/testcases/hdmitester'
  CC    hdmitester.c
  LN    hdmitester.o -> hdmitester
cp hdmitester.sh /opt/a133/longan/test/dragonboard/output/bin/
make[2]: Leaving directory '/opt/a133/longan/test/dragonboard/src/testcases/hdmitester'
make -C irtester
make[2]: Entering directory '/opt/a133/longan/test/dragonboard/src/testcases/irtester'
  CC    irtester.c
  LN    irtester.o -> irtester
make[2]: Leaving directory '/opt/a133/longan/test/dragonboard/src/testcases/irtester'
make -C keytester
make[2]: Entering directory '/opt/a133/longan/test/dragonboard/src/testcases/keytester'
  CC    keytester.c
  LN    keytester.o -> keytester
make[2]: Leaving directory '/opt/a133/longan/test/dragonboard/src/testcases/keytester'
make -C memtester
make[2]: Entering directory '/opt/a133/longan/test/dragonboard/src/testcases/memtester'
cp memtester.sh /opt/a133/longan/test/dragonboard/output/bin/
make[2]: Leaving directory '/opt/a133/longan/test/dragonboard/src/testcases/memtester'
make -C mictester
make[2]: Entering directory '/opt/a133/longan/test/dragonboard/src/testcases/mictester'
  CC    mixer.c
  CC    pcm.c
  CC    tiny_cap_play_sun50iw10p.c
tiny_cap_play_sun50iw10p.c: In function 'main':
tiny_cap_play_sun50iw10p.c:317:15: warning: variable 'frames' set but not used [-Wunused-but-set-variable]
  unsigned int frames;
               ^
tiny_cap_play_sun50iw10p.c: In function 'cap_play_sample':
tiny_cap_play_sun50iw10p.c:539:7: warning: variable 'mic_passed' set but not used [-Wunused-but-set-variable]
  bool mic_passed =false;
       ^
  LN    mixer.o pcm.o tiny_cap_play_sun50iw10p.o -> mictester
make[2]: Leaving directory '/opt/a133/longan/test/dragonboard/src/testcases/mictester'
make -C mmctester
make[2]: Entering directory '/opt/a133/longan/test/dragonboard/src/testcases/mmctester'
cp mmctester.sh /opt/a133/longan/test/dragonboard/output/bin/
make[2]: Leaving directory '/opt/a133/longan/test/dragonboard/src/testcases/mmctester'
make -C nandtester
make[2]: Entering directory '/opt/a133/longan/test/dragonboard/src/testcases/nandtester'
  CC    nandrw.c
  LN    nandrw.o -> nandrw
cp nandtester.sh /opt/a133/longan/test/dragonboard/output/bin/
make[2]: Leaving directory '/opt/a133/longan/test/dragonboard/src/testcases/nandtester'
make -C rtctester
make[2]: Entering directory '/opt/a133/longan/test/dragonboard/src/testcases/rtctester'
cp rtctester.sh /opt/a133/longan/test/dragonboard/output/bin/
make[2]: Leaving directory '/opt/a133/longan/test/dragonboard/src/testcases/rtctester'
make -C udisktester
make[2]: Entering directory '/opt/a133/longan/test/dragonboard/src/testcases/udisktester'
cp udisktester.sh /opt/a133/longan/test/dragonboard/output/bin/
make[2]: Leaving directory '/opt/a133/longan/test/dragonboard/src/testcases/udisktester'
make -C wifitester
make[2]: Entering directory '/opt/a133/longan/test/dragonboard/src/testcases/wifitester'
cp wifitester.sh /opt/a133/longan/test/dragonboard/output/bin/
cp -rax firmware/* /opt/a133/longan/test/dragonboard/output/firmware/
make[2]: Leaving directory '/opt/a133/longan/test/dragonboard/src/testcases/wifitester'
make -C host1tester
make[2]: Entering directory '/opt/a133/longan/test/dragonboard/src/testcases/host1tester'
cp host1tester.sh /opt/a133/longan/test/dragonboard/output/bin/
make[2]: Leaving directory '/opt/a133/longan/test/dragonboard/src/testcases/host1tester'
make -C host2tester
make[2]: Entering directory '/opt/a133/longan/test/dragonboard/src/testcases/host2tester'
cp host2tester.sh /opt/a133/longan/test/dragonboard/output/bin/
make[2]: Leaving directory '/opt/a133/longan/test/dragonboard/src/testcases/host2tester'
make -C otgtester
make[2]: Entering directory '/opt/a133/longan/test/dragonboard/src/testcases/otgtester'
cp otgtester.sh /opt/a133/longan/test/dragonboard/output/bin/
make[2]: Leaving directory '/opt/a133/longan/test/dragonboard/src/testcases/otgtester'
make -C 2gtester
make[2]: Entering directory '/opt/a133/longan/test/dragonboard/src/testcases/2gtester'
  CC    2gtester.c
  LN    2gtester.o -> 2gtester
make[2]: Leaving directory '/opt/a133/longan/test/dragonboard/src/testcases/2gtester'
make -C bluetooth
make[2]: Entering directory '/opt/a133/longan/test/dragonboard/src/testcases/bluetooth'
cp bttester.sh /opt/a133/longan/test/dragonboard/output/bin/
cp -rax firmware/* /opt/a133/longan/test/dragonboard/output/firmware/
make[2]: Leaving directory '/opt/a133/longan/test/dragonboard/src/testcases/bluetooth'
make -C gyrotester
make[2]: Entering directory '/opt/a133/longan/test/dragonboard/src/testcases/gyrotester'
  CC    gyrotester.c
  LN    gyrotester.o -> gyrotester
cp gyrotester.sh /opt/a133/longan/test/dragonboard/output/bin/
make[2]: Leaving directory '/opt/a133/longan/test/dragonboard/src/testcases/gyrotester'
make -C gyroiiotester
make[2]: Entering directory '/opt/a133/longan/test/dragonboard/src/testcases/gyroiiotester'
  CC    gyroiiotester.c
  LN    gyroiiotester.o -> gyroiiotester
cp gyroiiotester.sh /opt/a133/longan/test/dragonboard/output/bin/
make[2]: Leaving directory '/opt/a133/longan/test/dragonboard/src/testcases/gyroiiotester'
make -C vrcmptester
make[2]: Entering directory '/opt/a133/longan/test/dragonboard/src/testcases/vrcmptester'
  CC    vrcmptester.c
  LN    vrcmptester.o -> vrcmptester
cp vrcmptester.sh /opt/a133/longan/test/dragonboard/output/bin/
make[2]: Leaving directory '/opt/a133/longan/test/dragonboard/src/testcases/vrcmptester'
make -C vrlstester
make[2]: Entering directory '/opt/a133/longan/test/dragonboard/src/testcases/vrlstester'
  CC    vrlstester.c
  LN    vrlstester.o -> vrlstester
cp vrlstester.sh /opt/a133/longan/test/dragonboard/output/bin/
make[2]: Leaving directory '/opt/a133/longan/test/dragonboard/src/testcases/vrlstester'
make -C vrpstester
make[2]: Entering directory '/opt/a133/longan/test/dragonboard/src/testcases/vrpstester'
  CC    vrpstester.c
  LN    vrpstester.o -> vrpstester
cp vrpstester.sh /opt/a133/longan/test/dragonboard/output/bin/
make[2]: Leaving directory '/opt/a133/longan/test/dragonboard/src/testcases/vrpstester'
make -C compasstester
make[2]: Entering directory '/opt/a133/longan/test/dragonboard/src/testcases/compasstester'
  CC    compasstester.c
  LN    compasstester.o -> compasstester
cp compasstester.sh /opt/a133/longan/test/dragonboard/output/bin/
cp compasstester /opt/a133/longan/test/dragonboard/output/bin/
make[2]: Leaving directory '/opt/a133/longan/test/dragonboard/src/testcases/compasstester'
make -C emmctester
make[2]: Entering directory '/opt/a133/longan/test/dragonboard/src/testcases/emmctester'
  CC    emmcrw.c
  LN    emmcrw.o -> emmcrw
cp emmctester.sh /opt/a133/longan/test/dragonboard/output/bin/
make[2]: Leaving directory '/opt/a133/longan/test/dragonboard/src/testcases/emmctester'
make -C ethtester
make[2]: Entering directory '/opt/a133/longan/test/dragonboard/src/testcases/ethtester'
cp ethtester.sh /opt/a133/longan/test/dragonboard/output/bin/
make[2]: Leaving directory '/opt/a133/longan/test/dragonboard/src/testcases/ethtester'
make -C pmutester
make[2]: Entering directory '/opt/a133/longan/test/dragonboard/src/testcases/pmutester'
cp pmutester.sh /opt/a133/longan/test/dragonboard/output/bin/
make[2]: Leaving directory '/opt/a133/longan/test/dragonboard/src/testcases/pmutester'
make -C brcm_patchram_plus
make[2]: Entering directory '/opt/a133/longan/test/dragonboard/src/testcases/brcm_patchram_plus'
  CC    brcm_patchram_plus.c
  LN    brcm_patchram_plus.o -> brcm_patchram_plus
make[2]: Leaving directory '/opt/a133/longan/test/dragonboard/src/testcases/brcm_patchram_plus'
make -C hcitools
make[2]: Entering directory '/opt/a133/longan/test/dragonboard/src/testcases/hcitools'
  CC    hciattach.c
  CC    hciattach_ath3k.c
  CC    hciattach_bcm43xx.c
  CC    hciattach_intel.c
  CC    hciattach_qualcomm.c
  CC    hciattach_st.c
  CC    hciattach_ti.c
  CC    hciattach_tialt.c
  CC    hciattach_rtk.c
  CC    hciattach_xr.c
  CC    hciattach_sprd.c
arm-linux-gnueabi-gcc --sysroot=/opt/a133/longan/test/dragonboard/sysroot -Wall -O3 -Os -pipe -mtune=cortex-a8 -march=armv7-a -mabi=aapcs-linux -mfloat-abi=softfp -mfpu=neon -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -D_REENTRANT -I. -Ilib -Wall -DVERSION=\"5.10\" -Wno-strict-aliasing -Ilib/bluetooth  -I/opt/a133/longan/test/dragonboard/src/include  -c -o lib/bluetooth.o lib/bluetooth.c
arm-linux-gnueabi-gcc --sysroot=/opt/a133/longan/test/dragonboard/sysroot -Wall -O3 -Os -pipe -mtune=cortex-a8 -march=armv7-a -mabi=aapcs-linux -mfloat-abi=softfp -mfpu=neon -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -D_REENTRANT -I. -Ilib -Wall -DVERSION=\"5.10\" -Wno-strict-aliasing -Ilib/bluetooth  -I/opt/a133/longan/test/dragonboard/src/include  -c -o lib/hci.o lib/hci.c
arm-linux-gnueabi-gcc --sysroot=/opt/a133/longan/test/dragonboard/sysroot -Wall -O3 -Os -pipe -mtune=cortex-a8 -march=armv7-a -mabi=aapcs-linux -mfloat-abi=softfp -mfpu=neon -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -D_REENTRANT -I. -Ilib -Wall -DVERSION=\"5.10\" -Wno-strict-aliasing -Ilib/bluetooth  -I/opt/a133/longan/test/dragonboard/src/include  -c -o lib/sdp.o lib/sdp.c
  LN    hciattach.o hciattach_ath3k.o hciattach_bcm43xx.o hciattach_intel.o hciattach_qualcomm.o hciattach_st.o hciattach_ti.o hciattach_tialt.o hciattach_rtk.o hciattach_xr.o hciattach_sprd.o lib/bluetooth.o lib/hci.o lib/sdp.o -> hciattach
  CC    hciconfig.c
  CC    csr.c
  LN    hciconfig.o csr.o lib/bluetooth.o lib/hci.o lib/sdp.o -> hciconfig
  CC    hcitool.c
  LN    hcitool.o lib/bluetooth.o lib/hci.o lib/sdp.o -> hcitool
  CC    monitor/main.c
  CC    monitor/mainloop.c
  CC    monitor/display.c
  CC    monitor/hcidump.c
  CC    monitor/btsnoop.c
  CC    monitor/control.c
  CC    monitor/packet.c
  CC    monitor/vendor.c
  CC    monitor/lmp.c
  CC    monitor/l2cap.c
  CC    monitor/uuid.c
  CC    monitor/sdp.c
  CC    monitor/crc.c
  CC    monitor/ll.c
  LN    monitor/main.o monitor/mainloop.o monitor/display.o monitor/hcidump.o monitor/btsnoop.o monitor/control.o monitor/packet.o monitor/vendor.o monitor/lmp.o monitor/l2cap.o monitor/uuid.o monitor/sdp.o monitor/crc.o monitor/ll.o lib/bluetooth.o lib/hci.o lib/sdp.o -> btmon
make[2]: Leaving directory '/opt/a133/longan/test/dragonboard/src/testcases/hcitools'
make -C getevent
make[2]: Entering directory '/opt/a133/longan/test/dragonboard/src/testcases/getevent'
  CC    getevent.c
  LN    getevent.o -> getevent
make[2]: Leaving directory '/opt/a133/longan/test/dragonboard/src/testcases/getevent'
make -C sensorhubtester
make[2]: Entering directory '/opt/a133/longan/test/dragonboard/src/testcases/sensorhubtester'
  CC    sensorhubtester.c
  LN    sensorhubtester.o -> sensorhubtester
cp sensorhub.sh  /opt/a133/longan/test/dragonboard/output/bin/
make[2]: Leaving directory '/opt/a133/longan/test/dragonboard/src/testcases/sensorhubtester'
make -C iperf
make[2]: Entering directory '/opt/a133/longan/test/dragonboard/src/testcases/iperf'
  CC    compat/Thread.c
  CC    compat/error.c
  CC    compat/delay.c
  CC    compat/gettimeofday.c
  CC    compat/inet_ntop.c
  CC    compat/inet_pton.c
  CC    compat/signal.c
  CC    compat/snprintf.c
  CC    compat/string.c
  CC    src/Extractor.c
  CC    src/Locale.c
  CC    src/ReportCSV.c
  CC    src/ReportDefault.c
  CC    src/Reporter.c
  CC    src/SocketAddr.c
  CC    src/gnu_getopt.c
  CC    src/gnu_getopt_long.c
  CC    src/histogram.c
  CC    src/service.c
  CC    src/sockets.c
  CC    src/stdio.c
  CC    src/tcp_window_size.c
  CC    src/checksums.c
  CC    src/pdfs.c
  CC    src/main.cpp
  CC    src/Settings.cpp
  CC    src/Server.cpp
  CC    src/Client.cpp
  CC    src/isochronous.cpp
  CC    src/Launch.cpp
  CC    src/List.cpp
  CC    src/Listener.cpp
  CC    src/PerfSocket.cpp
  LN    compat/Thread.o compat/error.o compat/delay.o compat/gettimeofday.o compat/inet_ntop.o compat/inet_pton.o compat/signal.o compat/snprintf.o compat/string.o src/Extractor.o src/Locale.o src/ReportCSV.o src/ReportDefault.o src/Reporter.o src/SocketAddr.o src/gnu_getopt.o src/gnu_getopt_long.o src/histogram.o src/service.o src/sockets.o src/stdio.o src/tcp_window_size.o src/checksums.o src/pdfs.o src/main.o src/Settings.o src/Server.o src/Client.o src/isochronous.o src/Launch.o src/List.o src/Listener.o src/PerfSocket.o -> iperf
make[2]: Leaving directory '/opt/a133/longan/test/dragonboard/src/testcases/iperf'
make -C ledtester
make[2]: Entering directory '/opt/a133/longan/test/dragonboard/src/testcases/ledtester'
cp ledtester.sh /opt/a133/longan/test/dragonboard/output/bin/
make[2]: Leaving directory '/opt/a133/longan/test/dragonboard/src/testcases/ledtester'
make -C tvtester
make[2]: Entering directory '/opt/a133/longan/test/dragonboard/src/testcases/tvtester'
cp tvtester.sh /opt/a133/longan/test/dragonboard/output/bin/
make[2]: Leaving directory '/opt/a133/longan/test/dragonboard/src/testcases/tvtester'
make -C spdiftester
make[2]: Entering directory '/opt/a133/longan/test/dragonboard/src/testcases/spdiftester'
cp spdiftester.sh /opt/a133/longan/test/dragonboard/output/bin/
make[2]: Leaving directory '/opt/a133/longan/test/dragonboard/src/testcases/spdiftester'
make -C fpgademo
make[2]: Entering directory '/opt/a133/longan/test/dragonboard/src/testcases/fpgademo'
  CC    fpgademo.c
  LN    fpgademo.o -> fpgademo
make[2]: Leaving directory '/opt/a133/longan/test/dragonboard/src/testcases/fpgademo'
make[1]: Leaving directory '/opt/a133/longan/test/dragonboard/src/testcases'
make -C view
make[1]: Entering directory '/opt/a133/longan/test/dragonboard/src/view'
#make -C stp_uart_launcher
#make -C write_devnode
cp -rf hawkview /opt/a133/longan/test/dragonboard/output/bin/
make[1]: Leaving directory '/opt/a133/longan/test/dragonboard/src/view'
generating rootfs...
blocks: 77M -> 96M
Creating filesystem with parameters:
    Size: 100663296
    Block size: 4096
    Blocks per group: 32768
    Inodes per group: 6144
    Inode size: 256
    Journal blocks: 1024
    Label:
    Blocks: 24576
    Block groups: 1
    Reserved block group size: 7
Created filesystem with 1143/6144 inodes and 21096/24576 blocks
e2fsck 1.44.1 (24-Mar-2018)
success in generating rootfs
Build at: Fri Oct  1 09:08:53 CST 2021
INFO: ----------------------------------------
INFO: build lichee OK.
INFO: ----------------------------------------
me@ubuntu:/opt/a133/longan$
me@ubuntu:/opt/a133/longan$
me@ubuntu:/opt/a133/longan$ ./build.sh pack
ACTION List: mkpack ;========
Execute command: mkpack
INFO: packing firmware ...
INFO: Use BIN_PATH: /opt/a133/longan/device/config/chips/t509//bin
copying tools file
copying configs file
copying product configs file
/opt/a133/longan/out/pack_out/aultls32.fex
/opt/a133/longan/out/pack_out/aultools.fex
/opt/a133/longan/out/pack_out/boot_package.cfg
/opt/a133/longan/out/pack_out/boot_package.fex
/opt/a133/longan/out/pack_out/boot_package_nor.cfg
/opt/a133/longan/out/pack_out/cardscript.fex
/opt/a133/longan/out/pack_out/cardscript_secure.fex
/opt/a133/longan/out/pack_out/cardtool.fex
/opt/a133/longan/out/pack_out/diskfs.fex
/opt/a133/longan/out/pack_out/dragon_toc.cfg
/opt/a133/longan/out/pack_out/dragon_toc_android.cfg
/opt/a133/longan/out/pack_out/dtboimg.cfg
/opt/a133/longan/out/pack_out/env.cfg
/opt/a133/longan/out/pack_out/env_burn.cfg
/opt/a133/longan/out/pack_out/env_dragon.cfg
/opt/a133/longan/out/pack_out/esm.fex
/opt/a133/longan/out/pack_out/image.cfg
/opt/a133/longan/out/pack_out/image_android.cfg
/opt/a133/longan/out/pack_out/image_crashdump.cfg
renamed '/opt/a133/longan/out/pack_out/image_dragonboard.cfg' -> '/opt/a133/longan/out/pack_out/image.cfg'
/opt/a133/longan/out/pack_out/image_linux.cfg
/opt/a133/longan/out/pack_out/image_nor.cfg
/opt/a133/longan/out/pack_out/parameter.fex
/opt/a133/longan/out/pack_out/split_xxxx.fex
/opt/a133/longan/out/pack_out/sunxi.fex
/opt/a133/longan/out/pack_out/sys_config.fex
/opt/a133/longan/out/pack_out/sys_partition.fex
/opt/a133/longan/out/pack_out/sys_partition_dump.fex
/opt/a133/longan/out/pack_out/sys_partition_private.fex
/opt/a133/longan/out/pack_out/sysrecovery.fex
/opt/a133/longan/out/pack_out/test_config.fex
/opt/a133/longan/out/pack_out/toc0.fex
/opt/a133/longan/out/pack_out/toc1.fex
/opt/a133/longan/out/pack_out/usbtool.fex
/opt/a133/longan/out/pack_out/usbtool_crash.fex
/opt/a133/longan/out/pack_out/usbtool_test.fex
/opt/a133/longan/out/pack_out/verity_block.fex
copying boot resource
copying boot file
Script_to_dts: use board special dts file board.dts
sunxi_dtb create
p=soc c=product state=0
p=soc c=platform state=0
p=soc c=target state=0
p=soc c=power_sply state=0
p=soc c=card_boot state=0
p=soc c=fastboot_key state=0
p=soc c=recovery_key state=0
p=soc c=pm_para state=0
p=soc c=card0_boot_para state=0
p=soc c=card2_boot_para state=0
p=soc c=gpio_bias state=0
p=soc c=auto_print state=0
p=soc c=uart_para state=0
p=soc c=jtag_para state=0
p=soc c=clock state=0
p=soc c=dram state=0
p=soc c=uart0 state=0
p=soc c=nand0 state=0
p=soc c=charger0 state=0
Conver script to dts ok.
update scp
update optee

sboot file Path=/opt/a133/longan/out/pack_out/sboot.bin
script file Path=/opt/a133/longan/out/pack_out/sys_config.bin

update:unable to open sboot file
script update sboot ok
do not set LINUX_DTBO_FILE
pack boot package
GetPrivateProfileSection read to end
content_count=4
packing for dragonboard
normal
this is not a partition key
gpt_head->header_crc32 = 0xe26cf7d0
GPT----part num 6---
gpt_entry: 128
gpt_header: 92
GPT:boot-resource: 8000          ffff
GPT:env         : 10000         17fff
GPT:boot        : 18000         27fff
GPT:rootfs      : 28000         127fff
GPT:klog        : 128000        12ffff
GPT:UDISK       : 130000        13000f
update gpt file ok
update mbr file ok
/opt/a133/longan/tools/pack/pctools/linux/eDragonEx/
/opt/a133/longan/out/pack_out
Begin Parse sys_partion.fex
Add partion boot-resource.fex BOOT-RESOURCE_FEX
Add partion very boot-resource.fex BOOT-RESOURCE_FEX
FilePath: boot-resource.fex
FileLength=91fc00Add partion env.fex ENV_FEX000000000
Add partion very env.fex ENV_FEX000000000
FilePath: env.fex
FileLength=20000Add partion boot.fex BOOT_FEX00000000
Add partion very boot.fex BOOT_FEX00000000
FilePath: boot.fex
FileLength=e6b000Add partion rootfs.fex ROOTFS_FEX000000
Add partion very rootfs.fex ROOTFS_FEX000000
FilePath: rootfs.fex
FileLength=6000000sys_config.fex Len: 0x1f47
board.fex Len: 0x400
config.fex Len: 0x2000
split_xxxx.fex Len: 0x200
sys_partition.fex Len: 0xaee
sunxi.fex Len: 0x1fe00
boot0_nand.fex Len: 0xc000
boot0_sdcard.fex Len: 0xc000
u-boot.fex Len: 0xa8000
u-boot-crash.fex Len: 0x25
toc1.fex Len: 0x8
toc0.fex Len: 0x8
fes1.fex Len: 0x6e80
boot_package.fex Len: 0xec000
usbtool.fex Len: 0x24400
usbtool_crash.fex Len: 0x97a00
aultools.fex Len: 0x28999
aultls32.fex Len: 0x25205
cardtool.fex Len: 0x11e00
cardscript.fex Len: 0x779
sunxi_gpt.fex Len: 0x2000
sunxi_mbr.fex Len: 0x10000
dlinfo.fex Len: 0x4000
arisc.fex Len: 0x6
boot-resource.fex Len: 0x91fc00
Vboot-resource.fex Len: 0x4
env.fex Len: 0x20000
Venv.fex Len: 0x4
boot.fex Len: 0xe6b000
Vboot.fex Len: 0x4
rootfs.fex Len: 0x6000000
Vrootfs.fex Len: 0x4
BuildImg 0
Dragon execute image.cfg SUCCESS !
----------image is at----------

/opt/a133/longan/out/t509_dragonboard_a3_uart0.img

pack finish
me@ubuntu:/opt/a133/longan$

#58 Re: 全志 SOC » 刚刚收到的全志AIC800开发板,接个串口打印LOG 试一试 » 2021-09-09 14:46:07

X3

QQ截图20210909144434.png

[  113.670028] pwm device hdl is NULL
[  113.911255] sun50iw10p1-pinctrl pio: expect_func as:lvds3, but muxsel(3) is func:lvds2
[  113.920206] sun50iw10p1-pinctrl pio: expect_func as:lvds3, but muxsel(3) is func:lvds2
[  113.929135] sun50iw10p1-pinctrl pio: expect_func as:lvds3, but muxsel(3) is func:lvds2
[  113.938061] sun50iw10p1-pinctrl pio: expect_func as:lvds3, but muxsel(3) is func:lvds2
[  113.946986] sun50iw10p1-pinctrl pio: expect_func as:lvds3, but muxsel(3) is func:lvds2
[  113.955912] sun50iw10p1-pinctrl pio: expect_func as:lvds3, but muxsel(3) is func:lvds2
[  113.964838] sun50iw10p1-pinctrl pio: expect_func as:lvds3, but muxsel(3) is func:lvds2
[  113.973763] sun50iw10p1-pinctrl pio: expect_func as:lvds3, but muxsel(3) is func:lvds2
[  113.982689] sun50iw10p1-pinctrl pio: expect_func as:lvds3, but muxsel(3) is func:lvds2
[  113.991615] sun50iw10p1-pinctrl pio: expect_func as:lvds3, but muxsel(3) is func:lvds2
[  114.524214] sunxi_ohci_hcd_shutdown, ohci0-controller is disable, need not shutdown
[  114.532867] sunxi_ehci_hcd_shutdown, ehci0-controller is disable, need not shutdown
[  114.541722] reboot: Restarting system with command 'efex'
[4037]HELLO! BOOT0 is starting!
[4040]BOOT0 commit : dc54be6
[4043]set pll start
[4045]periph0 has been enabled
[4049]set pll end
[4051][pmu]: bus read error
[4054][pmu]: bus read error
[4061]vaild para:1  select dram para0
[4065]board init ok
[4067]rtc[3] value = 0xa102
[4070]DRAM BOOT DRIVE INFO: V0.19
[4073]the chip id is 0x2400
[4076]the chip id is 0x2400
[4079]the chip id is 0x2400
[4081]the chip id is 0x2400
[4084]the chip id is 0x2400
[4087]chip id check OK
[4089]DRAM_VCC set to 1100 mv
[4092]DRAM CLK =792 MHZ
[4095]DRAM Type =8 (3:DDR3,4:DDR4,7:LPDDR3,8:LPDDR4)
[4103]DRAM SIZE =1024 MBytes, para1 = 30fa, para2 = 4000000, dram_tpr13 = 6063
[4115]DRAM simple test OK.
[4118]dram size =1024
[4120]chipid = 53002400
[4122]nsi init ok 2020-4-7
[4126]card no is 2
[4128]sdcard 2 line count 8
[4130][mmc]: mmc driver ver 2020-05-25 09:40
[4140][mmc]: Wrong media type 0x0
[4143][mmc]: ***Try SD card 2***
[4148][mmc]: mmc 2 cmd 8 timeout, err 100
[4152][mmc]: mmc 2 cmd 8 err 100
[4155][mmc]: mmc 2 send if cond failed
[4159][mmc]: mmc 2 cmd 55 timeout, err 100
[4164][mmc]: mmc 2 cmd 55 err 100
[4167][mmc]: mmc 2 send app cmd failed
[4171][mmc]: ***Try MMC card 2***
[4195][mmc]: RMCA OK!
[4198][mmc]: mmc 2 bias 4
[4201][mmc]: MMC 5.0
[4203][mmc]: HSSDR52/SDR25 8 bit
[4206][mmc]: 50000000 Hz
[4209][mmc]: 7456 MB
[4211][mmc]: ***SD/MMC 2 init OK!!!***
[4265]Loading boot-pkg Succeed(index=0).
[4269]Entry_name        = u-boot
[4276]Entry_name        = monitor
[4280]Entry_name        = scp
[4288]set arisc reset to de-assert state
[4292]Entry_name        = dtb
[4296]tunning data addr:0x4a0003e8
[4299]Jump to second Boot.
NOTICE:  BL3-1: v1.0(debug):cc1f5d7
NOTICE:  BL3-1: Built : 10:23:25, 2020-04-08
NOTICE:  BL3-1 commit: 8
ERROR:   Error initializing runtime service tspd_fast
NOTICE:  BL3-1: Preparing for EL3 exit to normal world
NOTICE:  BL3-1: Next image address = 0x4a000000
NOTICE:  BL3-1: Next image spsr = 0x1d3

U-Boot 2018.05-00002-g27dfc9348f (Nov 06 2020 - 08:19:02 +0000) Allwinner Technology

[04.377]CPU:   Allwinner Family
[04.380]Model: sun50iw10
I2C:   ready
[04.625]DRAM:  1 GiB
[04.628]Relocation Offset is: 35f17000
[04.657]secure enable bit: 0
[04.660][ARISC] :arisc initialize
[04.665][ARISC ERROR] :get [allwinner,sunxi-hwspinlock] device node error
CACHE: Misaligned operation at range [7ffa72c0, 7ffa75d8]
[04.676][ARISC] :arisc para ok
[SCP] :sunxi-arisc driver begin startup 2
[SCP] :0x1
[SCP] :arisc version: [9b9b85f5ab606cc93b4061ac38834cab8a191a28rid-]
[SCP] :arisc startup ready
[SCP] :arisc startup notify message feedback
[SCP] :send hard sync feedback message: 0x900200
[SCP] :sunxi-arisc driver v1.10 is starting
[04.706][ARISC] :sunxi-arisc driver startup succeeded
[04.712]pmu_axp81X_probe pmic_bus_read fail
[04.716]pmu_axp858_probe pmic_bus_read fail
[04.720]PMU: no found
[04.722]CPU=1008 MHz,PLL6=600 Mhz,AHB=200 Mhz, APB1=100Mhz  MBus=400Mhz
[04.729]init_clocks:finish
[04.731]not need merged sunxi overlay
[04.734]drv_disp_init
request pwm success, pwm8:pwm8:0x300a000.
pwm_request: err:this pwm has been requested!
[04.770]drv_disp_init finish
[04.778]gic: sec monitor mode
[04.780]flash init start
[04.783]workmode = 0,storage type = 2
[04.786][mmc]: mmc driver ver uboot2018:2020-5-25 9:26:00-20201021190
[04.800][mmc]: SUNXI SDMMC Controller Version:0x50300
[04.824][mmc]: Best spd md: 2-HSDDR52/DDR50, freq: 2-50000000, Bus width: 8
[04.831]sunxi flash init ok
[04.834]Loading Environment from SUNXI_FLASH... OK
[04.843]no secure os for keybox operation
[04.846]try to burn key
[04.849]out of usb burn from boot: not need burn key
[04.854]boot_gui_init:start
[04.858]set disp.dev2_output_type fail. using defval=0
[04.863]disp 1, clk: pll(490000000),clk(490000000),dclk(70000000) dsi_rate(490000000)
     clk real:pll(492000000),clk(492000000),dclk(70285714) dsi_rate(0)
[04.880]switch device: sel=1, type=1, mode=4, format=0, bits=0, eotf=4, cs=260
[04.887]boot_gui_init:finish
[04.890]bmp_name=bootlogo.bmp
2764856 bytes read in 32 ms (82.4 MiB/s)
[04.941]read item0 copy0
[04.944]Item0 (Map) magic is bad
[04.947]the secure storage item0 copy0 magic is bad
[04.951]Item0 (Map) magic is bad
[04.954]the secure storage item0 copy1 magic is bad
[04.959]Item0 (Map)[04.960]soc ic_ver:0x0, qa_val:0x0, markid:0x53002400 dclk[0-9999]
 magic is bad
[04.968]the secure storage map is empty
[04.971]no item name device_unlock in the map
[04.975]no item name fastboot_status_flag in the map
[04.980]sunxi secure storage has no flag
[04.985][mmc]: delete mmc-hs400-1_8v from dtb
[04.989][mmc]: delete mmc-hs200-1_8v from dtb
[04.993][mmc]: get max-frequency ok 50000000 Hz
[04.999](weak)update dtb dram start
[05.003]update dtb dram  end
[05.006]update dts
[05.008]no item name snum in the map
** Unrecognized filesystem type **
[05.021]load file(ULI/factory/snum.txt) error.
[05.025]no item name mac in the map
** Unrecognized filesystem type **
[05.038]load file(ULI/factory/mac.txt) error.
[05.042]no item name wifi_mac in the map
** Unrecognized filesystem type **
[05.055]load file(ULI/factory/wifi_mac.txt) error.
[05.060]no item name bt_mac in the map
[05.069]LCD open finish
** Unrecognized filesystem type **
[05.078]load file(ULI/factory/bt_mac.txt) error.
[05.082]no item name specialstr in the map
** Unrecognized filesystem type **
[05.096]load file(ULI/factory/specialstr.txt) error.
[05.109]update part info
[05.112]key 0
[05.115]misc partition found
[05.137]bootmode[2]:0x5a
[05.139][mmc]: mmc exit start
[05.158][mmc]: mmc 2 exit ok
[4037]HELLO! BOOT0 is starting!
[4040]BOOT0 commit : dc54be6
[4043]set pll start
[4045]periph0 has been enabled
[4049]set pll end
[4051][pmu]: bus read error
[4054][pmu]: bus read error
[4061]vaild para:1  select dram para0
[4065]board init ok
[4067]rtc[2] value = 0x5aa5a55a
[4070]rtc[3] value = 0xb00f
[4073]eraly jump fel

刷机失败???

#60 全志 SOC » 刚刚收到的全志AIC800开发板,接个串口打印LOG 试一试 » 2021-09-09 14:36:34

X3
回复: 43

全志AIC800 手册: aic800g3_datasheet_v1.4.pdf

A133 Datasheet: A133_documents/A133_Datasheet_V1.1.pdf

A133 User Manual: A133_documents/A133_User_Manual_V1.1.pdf

参考原理图1: SC3904Q-mb-V00-20112600.pdf (分立电源)

参考原理图2: aic800_ref_sip_lp4_32x1_v1_0.pdf (PMU AXP853)


开机log:

[94]HELLO! BOOT0 is starting!
[97]BOOT0 commit : dc54be6
[100]set pll start
[102]periph0 has been enabled
[105]set pll end
[107][pmu]: bus read error
[109][pmu]: bus read error
[117]vaild para:1  select dram para0
[121]board init ok
[123]DRAM BOOT DRIVE INFO: V0.19
[126]the chip id is 0x2400
[129]the chip id is 0x2400
[131]the chip id is 0x2400
[134]the chip id is 0x2400
[137]the chip id is 0x2400
[139]chip id check OK
[141]DRAM_VCC set to 1100 mv
[144]DRAM CLK =792 MHZ
[147]DRAM Type =8 (3:DDR3,4:DDR4,7:LPDDR3,8:LPDDR4)
[155]DRAM SIZE =1024 MBytes, para1 = 30fa, para2 = 4000000, dram_tpr13 = 6063
[167]DRAM simple test OK.
[170]dram size =1024
[172]chipid = 53002400
[174]nsi init ok 2020-4-7
[177]card no is 2
[179]sdcard 2 line count 8
[182][mmc]: mmc driver ver 2020-05-25 09:40
[191][mmc]: Wrong media type 0x0
[195][mmc]: ***Try SD card 2***
[198][mmc]: mmc 2 cmd 8 timeout, err 100
[202][mmc]: mmc 2 cmd 8 err 100
[206][mmc]: mmc 2 send if cond failed
[210][mmc]: mmc 2 cmd 55 timeout, err 100
[214][mmc]: mmc 2 cmd 55 err 100
[217][mmc]: mmc 2 send app cmd failed
[221][mmc]: ***Try MMC card 2***
[246][mmc]: RMCA OK!
[248][mmc]: mmc 2 bias 4
[251][mmc]: MMC 5.0
[253][mmc]: HSSDR52/SDR25 8 bit
[256][mmc]: 50000000 Hz
[259][mmc]: 7456 MB
[261][mmc]: ***SD/MMC 2 init OK!!!***
[315]Loading boot-pkg Succeed(index=0).
[319]Entry_name        = u-boot
[326]Entry_name        = monitor
[329]Entry_name        = scp
[337]set arisc reset to de-assert state
[341]Entry_name        = dtb
[345]tunning data addr:0x4a0003e8
[348]Jump to second Boot.
NOTICE:  BL3-1: v1.0(debug):cc1f5d7
NOTICE:  BL3-1: Built : 10:23:25, 2020-04-08
NOTICE:  BL3-1 commit: 8
ERROR:   Error initializing runtime service tspd_fast
NOTICE:  BL3-1: Preparing for EL3 exit to normal world
NOTICE:  BL3-1: Next image address = 0x4a000000
NOTICE:  BL3-1: Next image spsr = 0x1d3

U-Boot 2018.05-00002-g27dfc9348f (Nov 06 2020 - 08:19:02 +0000) Allwinner Technology

[00.428]CPU:   Allwinner Family
[00.431]Model: sun50iw10
I2C:   ready
[00.682]DRAM:  1 GiB
[00.685]Relocation Offset is: 35f17000
[00.714]secure enable bit: 0
[00.717][ARISC] :arisc initialize
[00.722][ARISC ERROR] :get [allwinner,sunxi-hwspinlock] device node error
CACHE: Misaligned operation at range [7ffa72c0, 7ffa75d8]
[00.733][ARISC] :arisc para ok
[SCP] :sunxi-arisc driver begin startup 2
[SCP] :0x1
[SCP] :arisc version: [9b9b85f5ab606cc93b4061ac38834cab8a191a28rid-]
[SCP] :arisc startup ready
[SCP] :arisc startup notify message feedback
[SCP] :send hard sync feedback message: 0x900200
[SCP] :sunxi-arisc driver v1.10 is starting
[00.763][ARISC] :sunxi-arisc driver startup succeeded
[00.769]pmu_axp81X_probe pmic_bus_read fail
[00.773]pmu_axp858_probe pmic_bus_read fail
[00.777]PMU: no found
[00.779]CPU=1008 MHz,PLL6=600 Mhz,AHB=200 Mhz, APB1=100Mhz  MBus=400Mhz
[00.786]init_clocks:finish
[00.788]not need merged sunxi overlay
[00.791]drv_disp_init
request pwm success, pwm8:pwm8:0x300a000.
pwm_request: err:this pwm has been requested!
[00.827]drv_disp_init finish
[00.835]gic: sec monitor mode
[00.838]flash init start
[00.840]workmode = 0,storage type = 2
[00.843][mmc]: mmc driver ver uboot2018:2020-5-25 9:26:00-20201021190
[00.857][mmc]: SUNXI SDMMC Controller Version:0x50300
[00.881][mmc]: Best spd md: 2-HSDDR52/DDR50, freq: 2-50000000, Bus width: 8
[00.888]sunxi flash init ok
[00.891]Loading Environment from SUNXI_FLASH... OK
[00.900]no secure os for keybox operation
[00.903]try to burn key
[00.907]out of usb burn from boot: not need burn key
[00.911]boot_gui_init:start
[00.915]set disp.dev2_output_type fail. using defval=0
[00.920]disp 1, clk: pll(490000000),clk(490000000),dclk(70000000) dsi_rate(490000000)
     clk real:pll(492000000),clk(492000000),dclk(70285714) dsi_rate(0)
[00.938]switch device: sel=1, type=1, mode=4, format=0, bits=0, eotf=4, cs=260
[00.944]boot_gui_init:finish
[00.947]bmp_name=bootlogo.bmp
2764856 bytes read in 32 ms (82.4 MiB/s)
[00.999]read item0 copy0
[01.001]Item0 (Map) magic is bad
[01.004]the secure storage item0 copy0 magic is bad
[01.009]Item0 (Map) magic is bad
[01.011]the secure storage item0 copy1 magic is bad
[01.016]Item0 (Ma[01.018]soc ic_ver:0x0, qa_val:0x0, markid:0x53002400 dclk[0-9999]
p) magic is bad
[01.025]the secure storage map is empty
[01.028]no item name device_unlock in the map
[01.032]no item name fastboot_status_flag in the map
[01.037]sunxi secure storage has no flag
[01.043][mmc]: delete mmc-hs400-1_8v from dtb
[01.047][mmc]: delete mmc-hs200-1_8v from dtb
[01.051][mmc]: get max-frequency ok 50000000 Hz
[01.057](weak)update dtb dram start
[01.061]update dtb dram  end
[01.063]update dts
[01.065]no item name snum in the map
** Unrecognized filesystem type **
[01.078]load file(ULI/factory/snum.txt) error.
[01.082]no item name mac in the map
** Unrecognized filesystem type **
[01.095]load file(ULI/factory/mac.txt) error.
[01.099]no item name wifi_mac in the map
** Unrecognized filesystem type **
[01.113]load file(ULI/factory/wifi_mac.txt) error.
[01.117]no item name bt_mac in the map
[01.126]LCD open finish
** Unrecognized filesystem type **
[01.135]load file(ULI/factory/bt_mac.txt) error.
[01.140]no item name specialstr in the map
** Unrecognized filesystem type **
[01.153]load file(ULI/factory/specialstr.txt) error.
[01.166]update part info
[01.169]key 0
[01.173]misc partition found
[01.196]update bootcmd
[01.197]serial num is: 0c001415a0c0873228d
Hit any key to stop autoboot:  0
[03.212]partinfo: name boot, start 0x2a000, size 0x10000
[03.504]read data in addr ret = 1
[03.507]magic = AVB0
[03.509]major version = 1  minor version = 0
[03.513]authentication_data_block_size = 240
[03.517]auxiliary_data_block_size = d40
[03.521]vbmeta_size = 4224
[03.523]algorithm_type = 0
[03.526]flag = 0
[03.527]release tool = avbtool 1.1.0
[03.544]read data in addr ret = 1
[03.547]magic = AVB0
[03.550]major version = 1  minor version = 0
[03.554]authentication_data_block_size = 140
[03.558]auxiliary_data_block_size = 3c0
[03.561]vbmeta_size = 1536
[03.564]algorithm_type = 0
[03.566]flag = 0
[03.568]release tool = avbtool 1.1.0
[03.585]read data in addr ret = 1
[03.588]magic = AVB0
[03.590]major version = 1  minor version = 0
[03.594]authentication_data_block_size = 140
[03.598]auxiliary_data_block_size = 340
[03.602]vbmeta_size = 1408
[03.605]algorithm_type = 0
[03.607]flag = 0
[03.609]release tool = avbtool 1.1.0
[03.612]total_size = 7168
[03.615]alloc block = 17
[03.658]vbmeta hash is 318f52cb3e903d5eacdc4fc4d4f9d9156a94d1d9142b53f3ed945c788a49ddf2[03.668]in boot normal mode,pass normal para to cmdline
[03.674]android.hardware = sun50iw10p1
[03.677]line:56 dtbo_idx= 0
[03.679]dtbo_idx= 64
[03.759]partinfo: name dtbo, start 0x8c2000, size 0x1000
[03.814]Starting kernel ...

[03.816][mmc]: mmc exit start
[03.835][mmc]: mmc 2 exit ok
[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 4.9.170 (keliang.liu@Exdroid019) (gcc version 5.3.1 20160412 (Linaro GCC 5.3-2016.05) ) #11 SMP PREEMPT Thu Aug 5 15:18:26 CST 2021
[    0.000000] Boot CPU: AArch64 Processor [410fd034]
[    0.000000] bootconsole [earlycon0] enabled
[    0.000000] disp reserve base 0x7bf65080 ,size 0x3e8000
[    0.000000] cma: Reserved 8 MiB at 0x000000007f800000
[    0.000000] On node 0 totalpages: 262144
[    0.000000]   DMA zone: 4096 pages used for memmap
[    0.000000]   DMA zone: 0 pages reserved
[    0.000000]   DMA zone: 262144 pages, LIFO batch:31
[    0.000000] psci: probing for conduit method from DT.
[    0.000000] psci: PSCIv1.0 detected in firmware.
[    0.000000] psci: Using standard PSCI v0.2 function IDs
[    0.000000] psci: Trusted OS migration not required
[    0.000000] psci: SMC Calling Convention v1.0
[    0.000000] percpu: Embedded 23 pages/cpu @ffffffc03f704000 s53376 r8192 d32640 u94208
[    0.000000] pcpu-alloc: s53376 r8192 d32640 u94208 alloc=23*4096
[    0.000000] pcpu-alloc: [0] 0 [0] 1 [0] 2 [0] 3
[    0.000000] Detected VIPT I-cache on CPU0
[    0.000000] CPU features: enabling workaround for ARM erratum 845719
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 258048
[    0.000000] Kernel command line: earlyprintk=sunxi-uart,0x05000000 initcall_debug=0 console=ttyS0,115200 loglevel=8 root=/dev/mmcblk0p4 init=/init partitions=bootloader@mmcblk0p1:env@mmcblk0p2:boot@mmcblk0p3:super@mmcblk0p4:misc@mmcblk0p5:recovery@mmcblk0p6:cache@mmcblk0p7:vbmeta@mmcblk0p8:vbmeta_system@mmcblk0p9:vbmeta_vendor@mmcblk0p10:metadata@mmcblk0p11:private@mmcblk0p12:frp@mmcblk0p13:empty@mmcblk0p14:dtbo@mmcblk0p15:media_data@mmcblk0p16:UDISK@mmcblk0p17 cma=8M snum=0c001415a0c0873228d mac_addr= wifi_mac= bt_mac= specialstr= gpt=1 androidboot.vbmeta.avb_version=2.0 androidboot.vbmeta.hash_alg=sha256 androidboot.vbmeta.size=7168 androidboot.vbmeta.digest=318f52cb3e903d5eacdc4fc4d4f9d9156a94d1d9142b53f3ed945c788a49ddf2 androidboot.vbmeta.device_state=locked androidboot.mode=normal androidboot.serialno=0c001415a0c0873228d androidboot.hardware=sun50iw10p1 boot_type=2 androidboot.boot_type=2 androidboot.secure_os_exist=0 androidboot.trustchain=false gpt=1 uboot_message=2018.05-00002-g[    0.000000] PID hash table entries: 4096 (order: 3, 32768 bytes)
[    0.000000] Dentry cache hash table entries: 131072 (order: 8, 1048576 bytes)
[    0.000000] Inode-cache hash table entries: 65536 (order: 7, 524288 bytes)
[    0.000000] Memory: 977432K/1048576K available (11390K kernel code, 2192K rwdata, 4040K rodata, 4416K init, 599K bss, 62952K reserved, 8192K cma-reserved)
[    0.000000] Virtual kernel memory layout:
[    0.000000]     modules : 0xffffff8000000000 - 0xffffff8008000000   (   128 MB)
[    0.000000]     vmalloc : 0xffffff8008000000 - 0xffffffbebfff0000   (   250 GB)
[    0.000000]       .text : 0xffffff8008080000 - 0xffffff8008ba0000   ( 11392 KB)
[    0.000000]     .rodata : 0xffffff8008ba0000 - 0xffffff8008fa0000   (  4096 KB)
[    0.000000]       .init : 0xffffff8008fa0000 - 0xffffff80093f0000   (  4416 KB)
[    0.000000]       .data : 0xffffff80093f0000 - 0xffffff8009614008   (  2193 KB)
[    0.000000]        .bss : 0xffffff8009614008 - 0xffffff80096a9f18   (   600 KB)
[    0.000000]     fixed   : 0xffffffbefe7fb000 - 0xffffffbefec00000   (  4116 KB)
[    0.000000]     PCI I/O : 0xffffffbefee00000 - 0xffffffbeffe00000   (    16 MB)
[    0.000000]     vmemmap : 0xffffffbf00000000 - 0xffffffc000000000   (     4 GB maximum)
[    0.000000]               0xffffffbf00000000 - 0xffffffbf01000000   (    16 MB actual)
[    0.000000]     memory  : 0xffffffc000000000 - 0xffffffc040000000   (  1024 MB)
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
[    0.000000] Preemptible hierarchical RCU implementation.
[    0.000000]  Build-time adjustment of leaf fanout to 64.
[    0.000000] NR_IRQS:64 nr_irqs:64 0
[    0.000000] clocksource: timer: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns
[    0.000000] arm_arch_timer: Architected cp15 timer(s) running at 24.00MHz (virt).
[    0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x588fe9dc0, max_idle_ns: 440795202592 ns
[    0.000004] sched_clock: 56 bits at 24MHz, resolution 41ns, wraps every 4398046511097ns
[    0.008151] Calibrating delay loop (skipped), value calculated using timer frequency.. 48.00 BogoMIPS (lpj=80000)
[    0.018200] pid_max: default: 32768 minimum: 301
[    0.023030] Security Framework initialized
[    0.026879] SELinux:  Initializing.
[    0.030473] SELinux:  Starting in permissive mode
[    0.035135] Mount-cache hash table entries: 2048 (order: 2, 16384 bytes)
[    0.041697] Mountpoint-cache hash table entries: 2048 (order: 2, 16384 bytes)
[    0.049571] ftrace: allocating 34487 entries in 135 pages
[    0.133140] sched-energy: CPU device node has no sched-energy-costs
[    0.133781] Invalid sched_group_energy for CPU0
[    0.138319] CPU0: update cpu_capacity 1024
[    0.152424] ASID allocator initialised with 32768 entries
[    0.171319] BOOTEVENT:       171.309206: ON
[    0.199393] Detected VIPT I-cache on CPU1
[    0.199444] Invalid sched_group_energy for CPU1
[    0.199447] CPU1: update cpu_capacity 1024
[    0.199449] CPU1: Booted secondary processor [410fd034]
[    0.222760] Detected VIPT I-cache on CPU2
[    0.222788] Invalid sched_group_energy for CPU2
[    0.222790] CPU2: update cpu_capacity 1024
[    0.222793] CPU2: Booted secondary processor [410fd034]
[    0.246173] Detected VIPT I-cache on CPU3
[    0.246199] Invalid sched_group_energy for CPU3
[    0.246202] CPU3: update cpu_capacity 1024
[    0.246205] CPU3: Booted secondary processor [410fd034]
[    0.246287] Brought up 4 CPUs
[    0.296922] SMP: Total of 4 processors activated.
[    0.301614] CPU features: detected feature: 32-bit EL0 Support
[    0.307419] CPU features: detected feature: Kernel page table isolation (KPTI)
[    0.318435] CPU: All CPU(s) started at EL1
[    0.318690] alternatives: patching kernel code
[    0.323300] Invalid sched_group_energy for CPU3
[    0.327617] CPU3: update max cpu_capacity 1024
[    0.332032] Invalid sched_group_energy for Cluster3
[    0.336885] Invalid sched_group_energy for CPU2
[    0.341392] Invalid sched_group_energy for Cluster2
[    0.346245] Invalid sched_group_energy for CPU1
[    0.350752] Invalid sched_group_energy for Cluster1
[    0.355604] Invalid sched_group_energy for CPU0
[    0.360112] Invalid sched_group_energy for Cluster0
[    0.365495] CPU1: update max cpu_capacity 1024
[    0.370110] devtmpfs: initialized
[    0.411511] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 6370867519511994 ns
[    0.415650] futex hash table entries: 1024 (order: 5, 131072 bytes)
[    0.422448] atomic64_test: passed
[    0.425146] pinctrl core: initialized pinctrl subsystem
[    0.432406] NET: Registered protocol family 16
[    0.436190] dump_class_init,861, success
[    0.452075] cpuidle: using governor menu
[    0.453372] sunxi iommu: irq = 9
[    0.454362] vdso: 2 pages (1 code @ ffffff8008ba8000, 1 data @ ffffff80093f4000)
[    0.460988] hw-breakpoint: found 6 breakpoint and 4 watchpoint registers.
[    0.469145] DMA: preallocated 256 KiB pool for atomic allocations
[    0.476973] sun50iw10p1-r-pinctrl r_pio: initialized sunXi PIO driver
[    0.497370] sun50iw10p1-pinctrl pio: initialized sunXi PIO driver
[    0.501908] iommu: Adding device 1c0e000.ve to group 0
[    0.510198] iommu: Adding device 6000000.disp to group 0
[    0.511091] iommu: Adding device 6480000.g2d to group 0
[    0.519109] iommu: Adding device csi0 to group 0
[    0.520097] iommu: Adding device csi1 to group 0
[    0.525349] iommu: Adding device 2108000.tdm to group 0
[    0.529935] iommu: Adding device 2100000.isp to group 0
[    0.535121] iommu: Adding device 2102000.isp to group 0
[    0.540159] iommu: Adding device 2110000.scaler to group 0
[    0.545620] iommu: Adding device 2110400.scaler to group 0
[    0.551078] iommu: Adding device 2110800.scaler to group 0
[    0.556531] iommu: Adding device 2110c00.scaler to group 0
[    0.600000] pwm module init!
[    0.605054] sunxi-pm debug v3.10
[    0.606600] SCSI subsystem initialized
[    0.607380] usbcore: registered new interface driver usbfs
[    0.611981] usbcore: registered new interface driver hub
[    0.617263] usbcore: registered new device driver usb
[    0.622367] sunxi_i2c_adap_init()2541 - init
[    0.626975] sunxi_i2c_probe()2289 - [i2c0] twi_drv_used = 0
[    0.631963] sunxi_i2c_probe()2293 - [i2c0] twi_pkt_interval = 0
[    0.637870] twi0 supply twi not found, using dummy regulator
[    0.643572] twi_request_gpio()453 - [i2c0] init name: twi0
[    0.649674] sunxi_i2c_probe()2289 - [i2c1] twi_drv_used = 0
[    0.654499] sunxi_i2c_probe()2293 - [i2c1] twi_pkt_interval = 0
[    0.660412] twi1 supply twi not found, using dummy regulator
[    0.666094] twi_request_gpio()453 - [i2c1] init name: twi1
[    0.672328] sunxi_i2c_probe()2289 - [i2c2] twi_drv_used = 0
[    0.677036] sunxi_i2c_probe()2293 - [i2c2] twi_pkt_interval = 0
[    0.682934] twi2 supply twi not found, using dummy regulator
[    0.688625] twi_request_gpio()453 - [i2c2] init name: twi2
[    0.694613] sunxi_i2c_probe()2289 - [i2c3] twi_drv_used = 0
[    0.699564] sunxi_i2c_probe()2293 - [i2c3] twi_pkt_interval = 0
[    0.705465] twi3 supply twi not found, using dummy regulator
[    0.711175] twi_request_gpio()453 - [i2c3] init name: twi3
[    0.717130] media: Linux media interface: v0.10
[    0.721121] Linux video capture interface: v2.00
[    0.726697] ion_parse_dt_heap_common: id 0 type 0 name sys_user align 1000
[    0.732719] ion_parse_dt_heap_common: id 4 type 4 name cma align 1000
[    0.739095] ion_parse_dt_heap_common: id 6 type 6 name secure align 1000
[    0.745898] drm config service not available: FFFFFFFF
[    0.750966] Advanced Linux Sound Architecture Driver Initialized.
[    0.757480] Bluetooth: Core ver 2.22
[    0.760371] NET: Registered protocol family 31
[    0.764732] Bluetooth: HCI device and connection manager initialized
[    0.771072] Bluetooth: HCI socket layer initialized
[    0.775919] Bluetooth: L2CAP socket layer initialized
[    0.780989] Bluetooth: SCO socket layer initialized
[    0.786576] ncs8801s init:*************************
[    0.790806] script_ncs8801s_gpio_init: ncs8801s is not used
[    0.796860] clocksource: Switched to clocksource arch_sys_counter
[    0.878522] VFS: Disk quotas dquot_6.6.0
[    0.878663] VFS: Dquot-cache hash table entries: 512 (order 0, 4096 bytes)
[    0.886439] udc_init,0
[    0.887689] NET: Registered protocol family 2
[    0.907057] TCP established hash table entries: 8192 (order: 4, 65536 bytes)
[    0.908533] TCP bind hash table entries: 8192 (order: 5, 131072 bytes)
[    0.915116] TCP: Hash tables configured (established 8192 bind 8192)
[    0.921381] UDP hash table entries: 512 (order: 2, 16384 bytes)
[    0.927224] UDP-Lite hash table entries: 512 (order: 2, 16384 bytes)
[    0.933870] NET: Registered protocol family 1
[    0.938155] Trying to unpack rootfs image as initramfs...
[    0.970882] Freeing initrd memory: 752K
[    0.972443] hw perfevents: enabled with armv8_pmuv3 PMU driver, 7 counters available
[    0.979415] audit: initializing netlink subsys (disabled)
[    0.982275] audit: type=2000 audit(0.809:1): initialized
[    0.988544] workingset: timestamp_bits=45 max_order=18 bucket_order=0
[    1.005716] Registering sdcardfs 0.1
[    1.006293] ntfs: driver 2.1.32 [Flags: R/W].
[    1.008505] fuse init (API version 7.26)
[    1.014127] SELinux:  Registering netfilter hooks
[    1.021080] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 250)
[    1.023966] io scheduler noop registered
[    1.027907] io scheduler deadline registered
[    1.032358] io scheduler cfq registered (default)
[    1.038427] [DISP]disp_module_init
[    1.041335] [DISP] disp_init,line:2214:
[    1.043821] smooth display screen:1 type:1 mode:4
[    1.122701] [DISP] lcd_clk_config,line:dlk(70000000) dsi_rate(490000000)
[    1.122747]      clk real:pll(492000000),clk(492000000),dclk(70285714) dsi_rate(0)
[    1.124067] [DISP]disp_module_init finish
[    1.126052] uart uart0: get regulator failed
[    1.126066] uart0 supply uart not found, using dummy regulator
[    1.126317] uart0: ttyS0 at MMIO 0x5000000 (irq = 349, base_baud = 1500000) is a SUNXI
[    1.126334] sw_console_setup()1731 - console setup baud 115200 parity n bits 8, flow n
[    1.161164] console [ttyS0] enabled
[    1.161164] console [ttyS0] enabled
[    1.170776] bootconsole [earlycon0] disabled
[    1.170776] bootconsole [earlycon0] disabled
[    1.179882] uart uart1: get regulator failed
[    1.188005] uart1 supply uart not found, using dummy regulator
[    1.194841] uart1: ttyS1 at MMIO 0x5000400 (irq = 350, base_baud = 1500000) is a SUNXI
[    1.204772] misc dump reg init
[    1.209335] G2D: Module initialized.major:246
[    1.215517] [drm] Initialized
[    1.219052] Unable to detect cache hierarchy for CPU 0
[    1.238438] brd: module loaded
[    1.257606] loop: module loaded
[    1.262054] zram: Added device: zram0
[    1.266389] [NAND][NE] Not found valid nand node on dts
[    1.273345] sunxi-wlan soc@03000000:wlan@0: wlan_busnum (1)
[    1.279645] sunxi-wlan soc@03000000:wlan@0: Missing wlan_power.
[    1.286343] sunxi-wlan soc@03000000:wlan@0: wlan_power_name ((null))
[    1.293553] sunxi-wlan soc@03000000:wlan@0: Missing wlan_io_regulator.
[    1.300911] sunxi-wlan soc@03000000:wlan@0: io_regulator_name ((null))
[    1.308323] sunxi-wlan soc@03000000:wlan@0: wlan_regon gpio=357  mul-sel=1  pull=-1  drv_level=-1  data=0
[    1.319127] sunxi-wlan soc@03000000:wlan@0: get gpio chip_en failed
[    1.326204] sunxi-wlan soc@03000000:wlan@0: get gpio power_en failed
[    1.333381] sunxi-wlan soc@03000000:wlan@0: wlan_hostwake gpio=358  mul-sel=1  pull=-1  drv_level=-1  data=0
[    1.344538] sunxi-wlan soc@03000000:wlan@0: clk not config
[    1.350724] sunxi-wlan soc@03000000:wlan@0: dcxo not config
[    1.357037] sunxi-wlan soc@03000000:wlan@0: pinctrl_lookup_state(default) failed! return ffffffffffffffed
[    1.368876] [ADDR_MGT] addr_mgt_probe: success.
[    1.376050] it6612_init-<629>:it6612 init:*************************
[    1.383867] it6612_probe-<497>:it6612 probe:*************************
[    1.395476] twi_stop()514 - [i2c0] STOP can't sendout!
[    1.401252] sunxi_i2c_core_process()1751 - [i2c0] STOP failed!
[    1.407837] sunxi_i2c_do_xfer()1946 - [i2c0] incomplete xfer (status: 0x20, dev addr: 0x4c)
[    1.417448] sunxi_i2c_do_xfer()1946 - [i2c1] incomplete xfer (status: 0x20, dev addr: 0x4c)
[    1.427095] sunxi_i2c_do_xfer()1946 - [i2c2] incomplete xfer (status: 0x20, dev addr: 0x4c)
[    1.436730] sunxi_i2c_do_xfer()1946 - [i2c3] incomplete xfer (status: 0x20, dev addr: 0x4c)
[    1.446839] libphy: Fixed MDIO Bus: probed
[    1.451464] tun: Universal TUN/TAP device driver, 1.6
[    1.457171] tun: (C) 1999-2004 Max Krasnyansky <maxk@qualcomm.com>
[    1.465922] gmac-power0: NULL
[    1.469303] gmac-power1: NULL
[    1.472652] gmac-power2: NULL
[    1.476934] PPP generic driver version 2.4.2
[    1.482023] PPP BSD Compression module registered
[    1.487343] PPP Deflate Compression module registered
[    1.493051] PPP MPPE Compression module registered
[    1.498453] NET: Registered protocol family 24
[    1.503470] PPTP driver version 0.8.5
[    1.507972] usbcore: registered new interface driver rtl8150
[    1.514429] usbcore: registered new interface driver r8152
[    1.520688] usbcore: registered new interface driver asix
[    1.526836] usbcore: registered new interface driver ax88179_178a
[    1.533758] usbcore: registered new interface driver cdc_ether
[    1.540418] usbcore: registered new interface driver smsc75xx
[    1.546965] usbcore: registered new interface driver smsc95xx
[    1.553506] usbcore: registered new interface driver net1080
[    1.559938] usbcore: registered new interface driver cdc_subset
[    1.566674] usbcore: registered new interface driver zaurus
[    1.573017] usbcore: registered new interface driver MOSCHIP usb-ethernet driver
[    1.581430] usbcore: registered new interface driver cdc_ncm
[    1.587814] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    1.595525] get ehci0-controller, regulator_io is no nocare
[    1.601813] get ehci0-controller wakeup-source is fail.
[    1.607936] sunxi ehci0-controller don't init wakeup source
[    1.614220] [sunxi-ehci0]: probe, pdev->name: 5101000.ehci0-controller, sunxi_ehci: 0xffffff8009695988, 0x:ffffff80097bc000, irq_no:164
[    1.627936] [sunxi-ehci0]: Not init ehci0
[    1.632585] get ehci1-controller, regulator_io is no nocare
[    1.639064] [sunxi-ehci1]: probe, pdev->name: 5200000.ehci1-controller, sunxi_ehci: 0xffffff8009695d10, 0x:ffffff80097d7000, irq_no:166
[    1.652795] 5200000.ehci1-controller supply drvvbus not found, using dummy regulator
[    1.661648] sunxi-ehci 5200000.ehci1-controller: SW USB2.0 'Enhanced' Host Controller (EHCI) Driver
[    1.671866] sunxi-ehci 5200000.ehci1-controller: new USB bus registered, assigned bus number 1
[    1.682114] sunxi-ehci 5200000.ehci1-controller: irq 358, io mem 0xffffffc03dab0810
[    1.703547] sunxi-ehci 5200000.ehci1-controller: USB 0.0 started, EHCI 1.00
[    1.712466] hub 1-0:1.0: USB hub found
[    1.716739] hub 1-0:1.0: 1 port detected
[    1.722051] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[    1.729362] get ohci0-controller, regulator_io is no nocare
[    1.735660] get ohci0-controller wakeup-source is fail.
[    1.741759] sunxi ohci0-controller don't init wakeup source
[    1.748166] [sunxi-ohci0]: probe, pdev->name: 5101000.ohci0-controller, sunxi_ohci: 0xffffff8009696420
[    1.758647] [sunxi-ohci0]: Not init ohci0
[    1.763278] get ohci1-controller, regulator_io is no nocare
[    1.769843] [sunxi-ohci1]: probe, pdev->name: 5200000.ohci1-controller, sunxi_ohci: 0xffffff80096967a8
[    1.780347] 5200000.ohci1-controller supply drvvbus not found, using dummy regulator
[    1.789192] sunxi-ohci 5200000.ohci1-controller: SW USB2.0 'Open' Host Controller (OHCI) Driver
[    1.799017] sunxi-ohci 5200000.ohci1-controller: new USB bus registered, assigned bus number 2
[    1.808791] sunxi-ohci 5200000.ohci1-controller: irq 359, io mem 0xffffffc03dab0c00
[    1.878552] hub 2-0:1.0: USB hub found
[    1.882821] hub 2-0:1.0: 1 port detected
[    1.888348] usbcore: registered new interface driver uas
[    1.894462] usbcore: registered new interface driver usb-storage
[    1.901298] usbcore: registered new interface driver ums-alauda
[    1.908023] usbcore: registered new interface driver ums-cypress
[    1.914849] usbcore: registered new interface driver ums-datafab
[    1.921669] usbcore: registered new interface driver ums_eneub6250
[    1.928688] usbcore: registered new interface driver ums-freecom
[    1.935508] usbcore: registered new interface driver ums-isd200
[    1.942234] usbcore: registered new interface driver ums-jumpshot
[    1.949152] usbcore: registered new interface driver ums-karma
[    1.955784] usbcore: registered new interface driver ums-onetouch
[    1.962721] usbcore: registered new interface driver ums-realtek
[    1.969549] usbcore: registered new interface driver ums-sddr09
[    1.976272] usbcore: registered new interface driver ums-sddr55
[    1.982999] usbcore: registered new interface driver ums-usbat
[    1.989701] usbcore: registered new interface driver usbserial
[    1.996477] usbcore: registered new interface driver option
[    2.002809] usbserial: USB Serial support registered for GSM modem (1-port)
[    2.010917] usb_serial_number:20080411
[    2.015900] sunxikbd_key_init: key0 vol= 210 code= 115
[    2.021704] sunxikbd_key_init: key1 vol= 410 code= 114
[    2.027496] sunxikbd_key_init: key2 vol= 590 code= 139
[    2.033292] sunxikbd_key_init: key3 vol= 750 code= 28
[    2.038985] sunxikbd_key_init: key4 vol= 880 code= 102
[    2.045114] input: sunxi-keyboard as /devices/virtual/input/input0
[    2.054173] sunxi-rtc rtc: rtc core: registered sunxi-rtc as rtc0
[    2.061111] sunxi-rtc rtc: RTC enabled
[    2.065641] i2c /dev entries driver
[    2.070579] sunxi cedar version 0.1
[    2.074654] VE: install start!!!
[    2.074654]
[    2.080088] cedar_ve: cedar-ve the get irq is 347
[    2.085789] VE: get debugfs_mpp_root is NULL, please check mpp
[    2.085789]
[    2.094033] VE: sunxi ve debug register driver failed!
[    2.094033]
[    2.103701] device-mapper: uevent: version 1.0.3
[    2.109414] device-mapper: ioctl: 4.35.0-ioctl (2016-06-23) initialised: dm-devel@redhat.com
[    2.119096] device-mapper: verity-avb: AVB error handler initialized with vbmeta device:
[    2.128320] Bluetooth: HCI UART driver ver 2.3
[    2.133336] Bluetooth: HCI UART protocol H4 registered
[    2.139125] Bluetooth: HCI UART protocol LL registered
[    2.144919] Bluetooth: HCI UART protocol Three-wire (H5) registered
[    2.156174] sunxi-mmc sdc2: SD/MMC/SDIO Host Controller Driver(v3.46 2020-6-1 11:33-202006021635)
[    2.166314] sunxi-mmc sdc2: No vmmc regulator found
[    2.171822] sunxi-mmc sdc2: No vqmmc regulator found
[    2.177418] sunxi-mmc sdc2: No vdmmc regulator found
[    2.183017] sunxi-mmc sdc2: No vd33sw regulator found
[    2.188708] sunxi-mmc sdc2: No vd18sw regulator found
[    2.194403] sunxi-mmc sdc2: No vq33sw regulator found
[    2.200094] sunxi-mmc sdc2: No vq18sw regulator found
[    2.206387] sunxi-mmc sdc2: set host busy
[    2.210991] mmc:failed to get gpios
[    2.215201] sunxi-mmc sdc2: sdc set ios:clk 0Hz bm PP pm UP vdd 21 width 1 timing LEGACY(SDR12) dt B
[    2.240217] sunxi-mmc sdc2: sdc set ios:clk 400000Hz bm PP pm ON vdd 21 width 1 timing LEGACY(SDR12) dt B
[    2.266897] sunxi-mmc sdc2: detmode:alway in(non removable)
[    2.266920] sunxi-mmc sdc2: sdc set ios:clk 400000Hz bm PP pm ON vdd 21 width 1 timing LEGACY(SDR12) dt B
[    2.275286] sunxi-mmc sdc2: sdc set ios:clk 400000Hz bm PP pm ON vdd 21 width 1 timing LEGACY(SDR12) dt B
[    2.276353] sunxi-mmc sdc2: sdc set ios:clk 400000Hz bm OD pm ON vdd 21 width 1 timing LEGACY(SDR12) dt B
[    2.287208] sunxi-mmc sdc2: sdc set ios:clk 400000Hz bm OD pm ON vdd 21 width 1 timing LEGACY(SDR12) dt B
[    2.287276] sunxi-mmc sdc2: sdc set ios:clk 400000Hz bm OD pm ON vdd 21 width 1 timing LEGACY(SDR12) dt B
[    2.300121] sunxi-mmc sdc2: sdc set ios:clk 400000Hz bm OD pm ON vdd 21 width 1 timing LEGACY(SDR12) dt B
[    2.344626] sun50iw10p1-pinctrl pio: expect_func as:uart0_jtag, but muxsel(3) is func:jtag0
[    2.354060] sun50iw10p1-pinctrl pio: expect_func as:uart0_jtag, but muxsel(3) is func:jtag0
[    2.363474] sunxi-mmc sdc2: sdc set ios:clk 400000Hz bm PP pm ON vdd 21 width 1 timing LEGACY(SDR12) dt B
[    2.374356] sun50iw10p1-pinctrl pio: expect_func as:uart0_jtag, but muxsel(3) is func:uart0
[    2.383796] sun50iw10p1-pinctrl pio: expect_func as:uart0_jtag, but muxsel(3) is func:jtag0
[    2.393207] sun50iw10p1-pinctrl pio: expect_func as:uart0_jtag, but muxsel(3) is func:uart0
[    2.402643] sun50iw10p1-pinctrl pio: expect_func as:uart0_jtag, but muxsel(3) is func:jtag0
[    2.412374] sunxi-mmc sdc0: SD/MMC/SDIO Host Controller Driver(v3.46 2020-6-1 11:33-202006021635)
[    2.422465] sunxi-mmc sdc0: ***ctl-spec-caps*** 8
[    2.427776] sunxi-mmc sdc2: sdc set ios:clk 400000Hz bm PP pm ON vdd 21 width 1 timing MMC-HS(SDR20) dt B
[    2.438629] sunxi-mmc sdc2: sdc set ios:clk 50000000Hz bm PP pm ON vdd 21 width 1 timing MMC-HS(SDR20) dt B
[    2.449890] sunxi-mmc sdc2: sdc set ios:clk 50000000Hz bm PP pm ON vdd 21 width 8 timing MMC-HS(SDR20) dt B
[    2.460871] sunxi-mmc sdc0: No vmmc regulator found
[    2.460875] sunxi-mmc sdc0: No vqmmc regulator found
[    2.460880] sunxi-mmc sdc0: No vdmmc regulator found
[    2.460884] sunxi-mmc sdc0: No vd33sw regulator found
[    2.460888] sunxi-mmc sdc0: No vd18sw regulator found
[    2.460892] sunxi-mmc sdc0: No vq33sw regulator found
[    2.460896] sunxi-mmc sdc0: No vq18sw regulator found
[    2.466681] sunxi-mmc sdc0: set host busy
[    2.466745] sunxi-mmc sdc0: Got CD GPIO
[    2.467140] sunxi-mmc sdc0: sdc set ios:clk 0Hz bm PP pm UP vdd 21 width 1 timing LEGACY(SDR12) dt B
[    2.467167] sunxi-mmc sdc0: no vqmmc,Check if there is regulator
[    2.483616] sunxi-mmc sdc0: sdc set ios:clk 400000Hz bm PP pm ON vdd 21 width 1 timing LEGACY(SDR12) dt B
[    2.500583] sunxi-mmc sdc0: detmode:gpio irq
[    2.500610] sunxi-mmc sdc0: sdc set ios:clk 0Hz bm PP pm OFF vdd 0 width 1 timing LEGACY(SDR12) dt B
[    2.502210] sunxi-mmc sdc1: SD/MMC/SDIO Host Controller Driver(v3.46 2020-6-1 11:33-202006021635)
[    2.502287] sunxi-mmc sdc1: ***ctl-spec-caps*** 8
[    2.502341] sunxi-mmc sdc1: No vmmc regulator found
[    2.502346] sunxi-mmc sdc1: No vqmmc regulator found
[    2.502350] sunxi-mmc sdc1: No vdmmc regulator found
[    2.502354] sunxi-mmc sdc1: No vd33sw regulator found
[    2.502358] sunxi-mmc sdc1: No vd18sw regulator found
[    2.502362] sunxi-mmc sdc1: No vq33sw regulator found
[    2.502366] sunxi-mmc sdc1: No vq18sw regulator found
[    2.502869] sunxi-mmc sdc1: set host busy
[    2.502944] mmc:failed to get gpios
[    2.502969] sunxi-mmc sdc1: min-frequency:400000
[    2.503199] sunxi-mmc sdc1: sdc set ios:clk 0Hz bm PP pm UP vdd 21 width 1 timing LEGACY(SDR12) dt B
[    2.503223] sunxi-mmc sdc1: no vqmmc,Check if there is regulator
[    2.517000] sunxi-mmc sdc1: sdc set ios:clk 400000Hz bm PP pm ON vdd 21 width 1 timing LEGACY(SDR12) dt B
[    2.533617] sunxi-mmc sdc1: detmode:manually by software
[    2.534454] sunxi-mmc sdc1: smc 2 p1 err, cmd 52, RTO !!
[    2.534965] hidraw: raw HID events driver (C) Jiri Kosina
[    2.535286] sunxi-mmc sdc1: smc 2 p1 err, cmd 52, RTO !!
[    2.535312] sunxi-mmc sdc1: sdc set ios:clk 400000Hz bm PP pm ON vdd 21 width 1 timing LEGACY(SDR12) dt B
[    2.537808] sunxi-mmc sdc1: sdc set ios:clk 400000Hz bm PP pm ON vdd 21 width 1 timing LEGACY(SDR12) dt B
[    2.539712] sunxi-mmc sdc1: smc 2 p1 err, cmd 5, RTO !!
[    2.540540] sunxi-mmc sdc1: smc 2 p1 err, cmd 5, RTO !!
[    2.541368] sunxi-mmc sdc1: smc 2 p1 err, cmd 5, RTO !!
[    2.542193] sunxi-mmc sdc1: smc 2 p1 err, cmd 5, RTO !!
[    2.542231] sunxi-mmc sdc1: sdc set ios:clk 0Hz bm PP pm OFF vdd 0 width 1 timing LEGACY(SDR12) dt B
[    2.543879] usbcore: registered new interface driver usbhid
[    2.543881] usbhid: USB HID core driver
[    2.544434] ashmem: initialized
[    2.546264] optee: probing for conduit method from DT.
[    2.546271] optee: api uid mismatch
[    2.546694] usbcore: registered new interface driver snd-usb-audio
[    2.548450] u32 classifier
[    2.548453]     Actions configured
[    2.548464] Netfilter messages via NETLINK v0.30.
[    2.548481] nfnl_acct: registering with nfnetlink.
[    2.548796] nf_conntrack version 0.5.0 (8192 buckets, 32768 max)
[    2.549034] ctnetlink v0.93: registering with nfnetlink.
[    2.549626] xt_time: kernel timezone is -0000
[    2.549730] ipip: IPv4 and MPLS over IPv4 tunneling driver
[    2.550499] gre: GRE over IPv4 demultiplexor driver
[    2.550503] ip_gre: GRE over IPv4 tunneling driver
[    2.551719] IPv4 over IPsec tunneling driver
[    2.567675] ip_tables: (C) 2000-2006 Netfilter Core Team
[    2.567939] arp_tables: arp_tables: (C) 2002 David S. Miller
[    2.573110] Initializing XFRM netlink socket
[    2.573144] IPsec XFRM device driver
[    2.574268] NET: Registered protocol family 10
[    2.576111] mip6: Mobile IPv6
[    2.576145] ip6_tables: (C) 2000-2006 Netfilter Core Team
[    2.585456] sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
[    2.586908] NET: Registered protocol family 17
[    2.586941] NET: Registered protocol family 15
[    2.586975] l2tp_core: L2TP core driver, V2.0
[    2.586989] l2tp_ppp: PPPoL2TP kernel driver, V2.0
[    2.589982] Registered cp15_barrier emulation handler
[    2.590001] Registered setend emulation handler
[    2.590946] registered taskstats version 1
[    2.605774] get usb_detect_mode is fail, 22
[    2.607059] sunxi-rtc rtc: setting system clock to 1970-01-01 00:00:05 UTC (5)
[    2.608114] usb1-vbus: disabling
[    2.608119] ALSA device list:
[    2.608122]   No soundcards found.
[    2.917934] sunxi-mmc sdc2: sdc set ios:clk 50000000Hz bm PP pm ON vdd 21 width 8 timing MMC-DDR52 dt B
[    2.920431] Freeing unused kernel memory: 4416K
[    2.920525] Kernel init done
[    2.928995] init: init first stage started!
[    2.930355] init: [libfs_mgr]ReadFstabFromDt(): failed to read fstab from dt
[    2.932911] init: Using Android DT directory /proc/device-tree/firmware/android/
[    2.958459] mmc0: new DDR MMC card at address 0001
[    2.968423] mmcblk0: mmc0:0001 8WPD3R 7.28 GiB
[    2.977357] mmcblk0boot0: mmc0:0001 8WPD3R partition 1 4.00 MiB
[    2.987815] mmcblk0boot1: mmc0:0001 8WPD3R partition 2 4.00 MiB
[    2.998267] mmcblk0rpmb: mmc0:0001 8WPD3R partition 3 512 KiB
[    3.007053]  mmcblk0: p1 p2 p3 p4 p5 p6 p7 p8 p9 p10 p11 p12 p13 p14 p15 p16 p17
[    3.033971] init: [libfs_mgr]Created logical partition system on device /dev/block/dm-0
[    3.045005] init: [libfs_mgr]Created logical partition vendor on device /dev/block/dm-1
[    3.055862] init: [libfs_mgr]Created logical partition product on device /dev/block/dm-2
[    3.065980] init: [libfs_mgr]superblock s_max_mnt_count:65535,/dev/block/by-name/metadata
[    3.075358] init: [libfs_mgr]Filesystem on /dev/block/by-name/metadata was not cleanly shutdown; state flags: 0x1, incompat feature flags: 0x46
[    3.090468] init: [libfs_mgr]check_fs(): mount(/dev/block/by-name/metadata,/metadata,ext4)=-1: No such file or directory
[    3.102913] init: [libfs_mgr]Not running /system/bin/e2fsck on /dev/block/mmcblk0p11 (executable not in system image)
[    3.121076] EXT4-fs (mmcblk0p11): recovery complete
[    3.127172] EXT4-fs (mmcblk0p11): mounted filesystem with ordered data mode. Opts: errors=panic
[    3.144387] EXT4-fs (dm-0): mounted filesystem without journal. Opts: barrier=1
[    3.163297] EXT4-fs (dm-1): mounted filesystem without journal. Opts: barrier=1
[    3.175873] EXT4-fs (dm-2): mounted filesystem without journal. Opts: barrier=1
[    3.203165] init: 12 output lines suppressed due to ratelimiting
[    3.218400] random: init: uninitialized urandom read (40 bytes read)
[    3.370630] random: init: uninitialized urandom read (40 bytes read)
[    3.395100] init: Loading SELinux policy
[    3.420120] SELinux: 8192 avtab hash slots, 22205 rules.
[    3.443382] SELinux: 8192 avtab hash slots, 22205 rules.
[    3.449411] SELinux:  1 users, 4 roles, 1369 types, 0 bools, 1 sens, 1024 cats
[    3.457596] SELinux:  97 classes, 22205 rules
[    3.467126] SELinux:  Completing initialization.
[    3.472360] SELinux:  Setting up existing superblocks.
[    3.611267] audit: type=1403 audit(6.503:2): policy loaded auid=4294967295 ses=4294967295
[    3.620814] selinux: SELinux: Loaded policy from /vendor/etc/selinux/precompiled_sepolicy
[    3.620814]
[    3.640703] selinux: SELinux:  Skipping /product/etc/selinux/product_file_contexts:  empty file
[    3.640703]
[    3.652508] selinux: SELinux: Loaded file_contexts
[    3.652508]
[    3.667333] random: init: uninitialized urandom read (40 bytes read)
[    3.733358] init: init second stage started!
[    3.787961] init: Using Android DT directory /proc/device-tree/firmware/android/
[    3.805203] selinux: SELinux:  Skipping /product/etc/selinux/product_file_contexts:  empty file
[    3.805203]
[    3.817106] selinux: SELinux: Loaded file_contexts
[    3.817106]
[    3.824233] init: Running restorecon...
[    3.850150] init: Overriding previous 'ro.' property 'pm.dexopt.shared':'speed' with new value 'quicken'
[    3.864801] selinux: avc:  denied  { set } for  scontext=u:r:vendor_init:s0 tcontext=u:object_r:default_prop:s0 tclass=property_service permissive=1
[    3.864801]
[    3.882627] selinux: avc:  denied  { set } for  scontext=u:r:vendor_init:s0 tcontext=u:object_r:dalvik_prop:s0 tclass=property_service permissive=1
[    3.882627]
[    3.899392] init: Overriding previous 'ro.' property 'pm.dexopt.boot':'verify' with new value 'extract'
[    3.910084] init: Overriding previous 'ro.' property 'dalvik.vm.heapsize':'256m' with new value '512m'
[    4.138138] ueventd: ueventd started!
[    4.148831] selinux: SELinux:  Skipping /product/etc/selinux/product_file_contexts:  empty file
[    4.148831]
[    4.160705] selinux: SELinux: Loaded file_contexts
[    4.160705]
[    4.162085] apexd: Bootstrap subcommand detected
[    4.171959] apexd: Scanning /system/apex for embedded keys
[    4.174140] apexd: Scanning /product/apex for embedded keys
[    4.174358] apexd: ... does not exist. Skipping
[    4.174571] apexd: Scanning /system/apex looking for APEX packages.
[    4.174939] apexd: Found /system/apex/com.android.media
[    4.175407] apexd: Skipped when bootstrapping
[    4.175620] apexd: Found /system/apex/com.android.resolv
[    4.176075] apexd: Skipped when bootstrapping
[    4.176288] apexd: Found /system/apex/com.android.runtime.release
[    4.183055] apexd: 9 output lines suppressed due to ratelimiting
[    4.233369] ueventd: Parsing file /ueventd.rc...
[    4.240231] ueventd: Parsing file /vendor/ueventd.rc...
[    4.247299] ueventd: Parsing file /odm/ueventd.rc...
[    4.252990] ueventd: Unable to read config file '/odm/ueventd.rc': open() failed: No such file or directory
[    4.264050] ueventd: Parsing file /ueventd.sun50iw10p1.rc...
[    4.270511] ueventd: Unable to read config file '/ueventd.sun50iw10p1.rc': open() failed: No such file or directory
[    4.552809] ueventd: Coldboot took 0.268 seconds
[    4.595741] Registered swp emulation handler
[    4.674570] init: wait for '/dev/block/by-name/media_data' took 0ms
[    4.691638] FAT-fs (mmcblk0p16): bogus number of reserved sectors
[    4.698657] FAT-fs (mmcblk0p16): Can't find a valid FAT filesystem
[    4.707430] random: fast init done
[    4.749983] logd.auditd: start
[    4.779235] fsck.f2fs: Info: Fix the reported corruption.
[    4.779235]
[    4.787216] fsck.f2fs:       Info: No support kernel version!
[    4.787216]
[    4.795082] fsck.f2fs: Info: Segments per section = 1
[    4.795082]
[    4.802565] fsck.f2fs: Info: Sections per zone = 1
[    4.802565]
[    4.809892] fsck.f2fs: Info: sector size = 512
[    4.809892]
[    4.816651] fsck.f2fs: Info: total sectors = 6049759 (2953 MB)
[    4.816651]
[    4.824925] fsck.f2fs: Info: MKFS version
[    4.824925]
[    4.831180] fsck.f2fs:   "4.9.170 #11 SMP PREEMPT Thu Aug 5 15:18:26 CST 2021"
[    4.831180]
[    4.841122] fsck.f2fs: Info: FSCK version
[    4.841122]
[    4.847446] fsck.f2fs:   from "4.9.170 #11 SMP PREEMPT Thu Aug 5 15:18:26 CST 2021"
[    4.847446]
[    4.980878] F2FS-fs (mmcblk0p17): recover_inode: ino = 1b39, name = 46.proto, inline = b
[    4.990535] F2FS-fs (mmcblk0p17): recover_dentry: ino = 1b39, name = 46.proto, dir = cdb, err = 0
[    5.000564] F2FS-fs (mmcblk0p17): recover_data: ino = 1b39 (i_size: recover) recovered = 0, err = 0
[    5.010763] F2FS-fs (mmcblk0p17): recover_inode: ino = 1b3b, name = drop37.tmp, inline = b
[    5.022535] F2FS-fs (mmcblk0p17): recover_dentry: ino = 1b3b, name = drop37.tmp, dir = 58, err = 0
[    5.032665] F2FS-fs (mmcblk0p17): recover_data: ino = 1b3b (i_size: recover) recovered = 0, err = 0
[    5.042865] F2FS-fs (mmcblk0p17): recover_inode: ino = 1b3c, name = log-files.xml, inline = 1
[    5.053354] F2FS-fs (mmcblk0p17): recover_dentry: ino = 1b3c, name = log-files.xml, dir = 57, err = 0
[    5.063813] F2FS-fs (mmcblk0p17): recover_data: ino = 1b3c (i_size: recover) recovered = 1, err = 0
[    5.074018] F2FS-fs (mmcblk0p17): recover_inode: ino = 1b3e, name = drop37.tmp, inline = b
[    5.083380] F2FS-fs (mmcblk0p17): recover_dentry: ino = 1b3e, name = drop37.tmp, dir = 58, err = 0
[    5.093559] F2FS-fs (mmcblk0p17): recover_data: ino = 1b3e (i_size: recover) recovered = 0, err = 0
[    5.103763] F2FS-fs (mmcblk0p17): recover_inode: ino = 1b3f, name = log-files.xml, inline = 1
[    5.113389] F2FS-fs (mmcblk0p17): recover_dentry: ino = 1b3f, name = log-files.xml, dir = 57, err = 0
[    5.123828] F2FS-fs (mmcblk0p17): recover_data: ino = 1b3f (i_size: recover) recovered = 1, err = 0
[    5.134030] F2FS-fs (mmcblk0p17): recover_inode: ino = 1b40, name = 46_task.xml, inline = b
[    5.144205] F2FS-fs (mmcblk0p17): recover_dentry: ino = 1b40, name = 46_task.xml, dir = 87d, err = 0
[    5.154535] F2FS-fs (mmcblk0p17): recover_data: ino = 1b40 (i_size: recover) recovered = 0, err = 0
[    5.164738] F2FS-fs (mmcblk0p17): recover_inode: ino = 1b44, name = drop37.tmp, inline = b
[    5.174086] F2FS-fs (mmcblk0p17): recover_dentry: ino = 1b44, name = drop37.tmp, dir = 58, err = 0
[    5.184204] F2FS-fs (mmcblk0p17): recover_data: ino = 1b44 (i_size: recover) recovered = 0, err = 0
[    5.194406] F2FS-fs (mmcblk0p17): recover_inode: ino = 1b45, name = log-files.xml, inline = 1
[    5.204036] F2FS-fs (mmcblk0p17): recover_dentry: ino = 1b45, name = log-files.xml, dir = 57, err = 0
[    5.214474] F2FS-fs (mmcblk0p17): recover_data: ino = 1b45 (i_size: recover) recovered = 1, err = 0
[    5.224706] F2FS-fs (mmcblk0p17): recover_inode: ino = 1b47, name = drop37.tmp, inline = b
[    5.234055] F2FS-fs (mmcblk0p17): recover_dentry: ino = 1b47, name = drop37.tmp, dir = 58, err = 0
[    5.244165] F2FS-fs (mmcblk0p17): recover_data: ino = 1b47 (i_size: recover) recovered = 0, err = 0
[    5.254367] F2FS-fs (mmcblk0p17): recover_inode: ino = 1b48, name = log-files.xml, inline = 1
[    5.263987] F2FS-fs (mmcblk0p17): recover_dentry: ino = 1b48, name = log-files.xml, dir = 57, err = 0
[    5.274418] F2FS-fs (mmcblk0p17): recover_data: ino = 1b48 (i_size: recover) recovered = 1, err = 0
[    5.284620] F2FS-fs (mmcblk0p17): recover_inode: ino = 1b4a, name = drop37.tmp, inline = b
[    5.293959] F2FS-fs (mmcblk0p17): recover_dentry: ino = 1b4a, name = drop37.tmp, dir = 58, err = 0
[    5.304074] F2FS-fs (mmcblk0p17): recover_data: ino = 1b4a (i_size: recover) recovered = 0, err = 0
[    5.314276] F2FS-fs (mmcblk0p17): recover_inode: ino = 1b4b, name = log-files.xml, inline = 1
[    5.323898] F2FS-fs (mmcblk0p17): recover_dentry: ino = 1b4b, name = log-files.xml, dir = 57, err = 0
[    5.334335] F2FS-fs (mmcblk0p17): recover_data: ino = 1b4b (i_size: recover) recovered = 1, err = 0
[    5.351490] F2FS-fs (mmcblk0p17): checkpoint: version = 6e8c2f39
[    5.358441] F2FS-fs (mmcblk0p17): Mounted with checkpoint version = 6e8c2f39
[    5.369023] EXT4-fs (mmcblk0p7): Ignoring removed nomblk_io_submit option
[    5.382881] EXT4-fs (mmcblk0p7): recovery complete
[    5.388774] EXT4-fs (mmcblk0p7): mounted filesystem with ordered data mode. Opts: errors=remount-ro,nomblk_io_submit
[    5.516141] EXT4-fs (mmcblk0p7): Ignoring removed nomblk_io_submit option
[    5.525855] EXT4-fs (mmcblk0p7): mounted filesystem with ordered data mode. Opts: barrier=1,data=ordered,nomblk_io_submit,noauto_da_alloc,errors=panic
[    5.569367] init: 14 output lines suppressed due to ratelimiting
[    5.583708] zram0: detected capacity change from 0 to 760926208
[    5.627711] mkswap: Swapspace size: 743088k, UUID=b7c67a4f-02ba-4a2c-a078-0c665891b1c2
[    5.637636] Adding 743088k swap on /dev/block/zram0.  Priority:-1 extents:1 across:743088k SS
console:/ $ [    6.012945] usbcore: registered new interface driver uvcvideo
[    6.019484] USB Video Class driver (1.1.1)
[    6.251270] apexd: Marking APEXd as starting
[    6.257255] apexd: Scanning /system/apex for embedded keys
[    6.266316] apexd: Scanning /product/apex for embedded keys
[    6.272787] apexd: ... does not exist. Skipping
[    6.278024] apexd: Populating APEX database from mounts...
[    6.284849] apexd: Failed to walk /product/apex : Can't open /product/apex for reading : No such file or directory
[    6.297545] apexd: Found "/apex/com.android.runtime@1"
[    6.303622] apexd: Found "/apex/com.android.tzdata@290000000"
[    6.310561] apexd: 2 packages restored.
[    6.315174] apexd: Scanning /data/apex/sessions looking for sessions to be activated.
[    6.411385] vdc: Waited 0ms for vold
[    6.518051] type=1400 audit(9.410:3): avc: denied { setattr } for comm="init" name="audio_d" dev="mmcblk0p17" ino=118 scontext=u:r:vendor_init:s0 tcontext=u:object_r:audio_rw_data_file:s0 tclass=dir permissive=1
[    6.744413] logd.daemon: reinit
[    6.879128] treadahead: go to process_files
[    7.144183] file system registered
[    7.196410] using random self ethernet address
[    7.216963] using random host ethernet address
[    7.258698] healthd: No battery devices found
[    7.269546] healthd: battery none chg=
[    7.399923] Bluetooth: XRadio Bluetooth LPM Mode Driver Ver 01.00.06
[    7.624607] read descriptors
[    7.630433] read strings
[    7.694204] type=1400 audit(9.410:3): avc: denied { setattr } for comm="init" name="audio_d" dev="mmcblk0p17" ino=118 scontext=u:r:vendor_init:s0 tcontext=u:object_r:audio_rw_data_file:s0 tclass=dir permissive=1
[    7.716467] type=1400 audit(10.576:4): avc: denied { create } for comm="audio@2.0-servi" scontext=u:r:hal_audio_default:s0 tcontext=u:r:hal_audio_default:s0 tclass=tcp_socket permissive=1
[    7.735545] type=1400 audit(10.576:4): avc: denied { create } for comm="audio@2.0-servi" scontext=u:r:hal_audio_default:s0 tcontext=u:r:hal_audio_default:s0 tclass=tcp_socket permissive=1
[    7.754430] type=1400 audit(10.576:5): avc: denied { setopt } for comm="audio@2.0-servi" scontext=u:r:hal_audio_default:s0 tcontext=u:r:hal_audio_default:s0 tclass=tcp_socket permissive=1
[    7.773487] type=1400 audit(10.576:5): avc: denied { setopt } for comm="audio@2.0-servi" scontext=u:r:hal_audio_default:s0 tcontext=u:r:hal_audio_default:s0 tclass=tcp_socket permissive=1
[    7.792400] type=1400 audit(10.576:6): avc: denied { bind } for comm="audio@2.0-servi" scontext=u:r:hal_audio_default:s0 tcontext=u:r:hal_audio_default:s0 tclass=tcp_socket permissive=1
[    7.811260] type=1400 audit(10.576:6): avc: denied { bind } for comm="audio@2.0-servi" scontext=u:r:hal_audio_default:s0 tcontext=u:r:hal_audio_default:s0 tclass=tcp_socket permissive=1
[    9.047565]
[    9.047565] insmod_device_driver
[    9.047565]
[    9.447247] init: Received control message 'interface_start' for 'android.hardware.camera.provider@2.4::ICameraProvider/legacy/0' from pid: 1636 (/system/bin/hwservicemanager)
[    9.468869] init: starting service 'vendor.camera-provider-2-4'...
[    9.482033] init: couldn't write 1968 to /dev/cpuset/camera-daemon/tasks: No such file or directory
[    9.484341] init: Received control message 'interface_start' for 'android.hardware.camera.provider@2.4::ICameraProvider/legacy/0' from pid: 1636 (/system/bin/hwservicemanager)
[   10.880660] init: Service 'treadahead_process' (pid 1793) exited with status 0
[   10.889032] init: Sending signal 9 to service 'treadahead_process' (pid 1793) process group...
[   10.899342] libprocessgroup: Successfully killed process cgroup uid 0 pid 1793 in 0ms
[   11.063476] init: Opened file '/d/mmc0/mmc0:0001/ext_csd', flags 0
[   11.074690] pvrsrvkm: loading out-of-tree module taints kernel.
[   11.183654] pvrsrvkm gpu: set gpu core rate:504000000 freq:504000000-950000uV dfs:0x00000001
[   11.193185] pvrsrvkm gpu: set gpu core rate:504000000 freq:472500000-950000uV dfs:0x00000002
[   11.202727] pvrsrvkm gpu: set gpu core rate:504000000 freq:441000000-950000uV dfs:0x00000004
[   11.212273] pvrsrvkm gpu: set gpu core rate:252000000 freq:252000000-950000uV dfs:0x00000001
[   11.222109] pvrsrvkm gpu: idle:0 dvfs:0 power:0 No mode:1 volt:0 core:504000000
[   11.230481] PVR_K:  1815: Read BVNC 22.102.54.38 from HW device registers
[   11.238168] PVR_K:  1815: RGX Device registered with BVNC 22.102.54.38
[   11.246635] pvrsrvkm gpu: opp[1/4]: (252000000 Hz, 950000 uV)
[   11.253161] pvrsrvkm gpu: opp[2/4]: (441000000 Hz, 950000 uV)
[   11.259664] pvrsrvkm gpu: opp[3/4]: (472500000 Hz, 950000 uV)
[   11.266168] pvrsrvkm gpu: opp[4/4]: (504000000 Hz, 950000 uV)
[   11.273254] pvrsrvkm gpu: Cooling: power ops not registered, not enabling cooling
[   11.287553] [drm] Initialized pvr 1.11.5516664 20170530 on minor 0
[   11.297429] type=1400 audit(11.226:9): avc: denied { write } for comm="radio_monitor" name="uevent" dev="sysfs" ino=17766 scontext=u:r:radio_monitor:s0 tcontext=u:object_r:sysfs_usb:s0 tclass=file permissive=1
[   11.318545] type=1400 audit(14.186:10): avc: denied { read } for comm="pvrsrvctl" name="modules" dev="proc" ino=4026532037 scontext=u:r:pvr:s0 tcontext=u:object_r:proc_modules:s0 tclass=file permissive=1
[   11.320455] init: Service 'pvrsrvinit' (pid 1815) exited with status 0
[   11.320495] init: Sending signal 9 to service 'pvrsrvinit' (pid 1815) process group...
[   11.356477] type=1400 audit(14.186:10): avc: denied { read } for comm="pvrsrvctl" name="modules" dev="proc" ino=4026532037 scontext=u:r:pvr:s0 tcontext=u:object_r:proc_modules:s0 tclass=file permissive=1
[   11.377249] type=1400 audit(14.210:11): avc: denied { open } for comm="pvrsrvctl" path="/proc/modules" dev="proc" ino=4026532037 scontext=u:r:pvr:s0 tcontext=u:object_r:proc_modules:s0 tclass=file permissive=1
[   11.398756] type=1400 audit(14.210:11): avc: denied { open } for comm="pvrsrvctl" path="/proc/modules" dev="proc" ino=4026532037 scontext=u:r:pvr:s0 tcontext=u:object_r:proc_modules:s0 tclass=file permissive=1
[   11.419976] type=1400 audit(14.210:12): avc: denied { getattr } for comm="pvrsrvctl" path="/proc/modules" dev="proc" ino=4026532037 scontext=u:r:pvr:s0 tcontext=u:object_r:proc_modules:s0 tclass=file permissive=1
[   11.442822] PVR_K:  1820: RGX Firmware image 'rgx.fw.22.102.54.38' loaded
[   11.531105] random: crng init done
[   11.534939] random: 7 urandom warning(s) missed due to ratelimiting
[   15.118719] healthd: battery none chg=
[   15.136022] healthd: battery none chg=
[   15.143077] healthd: battery none chg=
[   15.512728] type=1400 audit(14.210:12): avc: denied { getattr } for comm="pvrsrvctl" path="/proc/modules" dev="proc" ino=4026532037 scontext=u:r:pvr:s0 tcontext=u:object_r:proc_modules:s0 tclass=file permissive=1
[   15.535725] type=1400 audit(1628148019.150:13): avc: denied { read } for comm="android.ui" name="state" dev="sysfs" ino=17470 scontext=u:r:system_server:s0 tcontext=u:object_r:sysfs:s0 tclass=file permissive=1
[   15.557312] type=1400 audit(1628148019.150:13): avc: denied { read } for comm="android.ui" name="state" dev="sysfs" ino=17470 scontext=u:r:system_server:s0 tcontext=u:object_r:sysfs:s0 tclass=file permissive=1
[   15.587460] init: processing action (sys.sysctl.extra_free_kbytes=*) from (/init.rc:806)
[   15.588917] binder: undelivered transaction 3238, process died.
[   15.592211] init: Service 'vendor.camera-provider-2-4' (pid 1968) exited with status 0
[   15.592271] init: Sending signal 9 to service 'vendor.camera-provider-2-4' (pid 1968) process group...
[   15.595255] libprocessgroup: Successfully killed process cgroup uid 1047 pid 1968 in 0ms
[   15.648771] type=1400 audit(1628148019.156:14): avc: denied { open } for comm="android.ui" path="/sys/devices/platform/ite66121/extcon/hdmi/state" dev="sysfs" ino=17470 scontext=u:r:system_server:s0 tcontext=u:object_r:sysfs:s0 tclass=file permissive=1
[   16.595374] acc_open
[   16.597964] acc_release
[   16.898462] init: Received control message 'interface_start' for 'android.hardware.wifi@1.0::IWifi/default' from pid: 1636 (/system/bin/hwservicemanager)
[   16.918746] init: starting service 'vendor.wifi_hal_legacy'...
[   16.932312] init: Received control message 'interface_start' for 'android.hardware.wifi@1.0::IWifi/default' from pid: 1636 (/system/bin/hwservicemanager)
[   17.201150] libphy: gmac0: probed
[   17.313934] sunxi-gmac gmac0 eth0: eth0: Type(7) PHY ID 001cc916 at 0 IRQ poll (gmac0-0:00)
[   17.787532] ======== XRADIO WIFI OPEN ========
[   17.807533] [XRADIO] Driver Label:XR_V02.16.84_P2P_HT40_01.40  Aug  5 2021 15:18:13
[   17.823649] [XRADIO] Allocated hw_priv @ ffffffc01a21d7a0
[   17.857781] sunxi-wlan soc@03000000:wlan@0: bus_index: 1
[   17.944695] [XRADIO] Detect SDIO card 1
[   17.944741] sunxi-mmc sdc1: sdc set ios:clk 0Hz bm PP pm UP vdd 21 width 1 timing LEGACY(SDR12) dt B
[   17.944868] sunxi-mmc sdc1: no vqmmc,Check if there is regulator
[   17.963108] sunxi-mmc sdc1: sdc set ios:clk 400000Hz bm PP pm ON vdd 21 width 1 timing LEGACY(SDR12) dt B
[   17.985035] sunxi-mmc sdc1: sdc set ios:clk 400000Hz bm PP pm ON vdd 21 width 1 timing LEGACY(SDR12) dt B
[   17.987594] sunxi-mmc sdc1: sdc set ios:clk 400000Hz bm PP pm ON vdd 21 width 1 timing LEGACY(SDR12) dt B
[   18.034429] sunxi-mmc sdc1: sdc set ios:clk 400000Hz bm PP pm ON vdd 21 width 1 timing SD-HS(SDR25) dt B
[   18.107520] sunxi-mmc sdc1: sdc set ios:clk 50000000Hz bm PP pm ON vdd 21 width 1 timing SD-HS(SDR25) dt B
[   18.123847] sunxi-mmc sdc1: sdc set ios:clk 50000000Hz bm PP pm ON vdd 21 width 4 timing SD-HS(SDR25) dt B
[   18.142165] mmc2: new high speed SDIO card at address 0001
[   18.162442] [SBUS] XRadio Device:sdio clk=50000000
[   18.185826] [XRADIO] XRADIO_HW_REV 1.0 detected.
[   18.227511] [XRADIO] xradio_update_dpllctrl: DPLL_CTRL Sync=0x01400000.
[   18.364005] [XRADIO] Bootloader complete
[   18.604222] [XRADIO] Firmware completed.
[   18.614345] [WSM] Firmware Label:XR_C09.08.52.64_DBG_02.100 2GHZ HT40 Jan  3 2020 13:14:37
[   18.634046] [XRADIO] Firmware Startup Done.
[   18.639208] [XRADIO_WRN] enable Multi-Rx!
[   18.653164] ieee80211 phy0: Selected rate control algorithm 'minstrel_ht'
[   18.744291] init: Received control message 'interface_start' for 'android.hardware.wifi.supplicant@1.0::ISupplicant/default' from pid: 1636 (/system/bin/hwservicemanager)
[   18.799602] init: starting service 'wpa_supplicant'...
[   18.836102] init: Created socket '/dev/socket/wpa_wlan0', mode 660, user 1010, group 1010
[   19.011470] capability: warning: `wpa_supplicant' uses 32-bit capabilities (legacy support in use)
[   19.164709] ieee80211_do_open: vif_type=2, p2p=0, ch=3, addr=94:17:db:1b:c0:08
[   19.180766] [STA] !!!xradio_vif_setup: id=0, type=2, p2p=0, addr=94:17:db:1b:c0:08
[   19.201771] [AP_WRN] BSS_CHANGED_ASSOC but driver is unjoined.
[   19.228723] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
[   19.620774] ieee80211_do_open: vif_type=10, p2p=0, ch=3, addr=94:17:db:1b:c0:09
[   19.630571] [STA] !!!xradio_vif_setup: id=2, type=10, p2p=0, addr=94:17:db:1b:c0:09
[   22.321365] init: processing action (sys.boot_completed=1) from (/init.rc:800)
[   22.337111] init: processing action (sys.boot_completed=1) from (/vendor/etc/init/hw/init.device.rc:44)
[   22.338745] sdcardfs version 2.0
[   22.338750] sdcardfs: dev_name -> /data/media
[   22.338754] sdcardfs: options -> fsuid=1023,fsgid=1023,multiuser,derive_gid,default_normal,unshared_obb,mask=6,userid=0,gid=1015
[   22.338760] sdcardfs: mnt -> ffffffc0169e8c60
[   22.338853] sdcardfs: mounted on top of /data/media type f2fs
[   22.342429] Remount options were mask=23,gid=9997 for vfsmnt ffffffc00ca5e720.
[   22.342445] sdcardfs : options - debug:1
[   22.342448] sdcardfs : options - gid:9997
[   22.342451] sdcardfs : options - mask:23
[   22.346855] Remount options were mask=7,gid=9997 for vfsmnt ffffffc00ca5f6e0.
[   22.346988] sdcardfs : options - debug:1
[   22.346993] sdcardfs : options - gid:9997
[   22.346995] sdcardfs : options - mask:7
[   22.348066] Remount options were mask=7,gid=9997 for vfsmnt ffffffc00ca60720.
[   22.348078] sdcardfs : options - debug:1
[   22.348082] sdcardfs : options - gid:9997
[   22.348085] sdcardfs : options - mask:7
[   22.519998] get ctp_power is fail, -22
[   22.539240] sunxi_ctp_startup: ctp_power_io is invalid.
[   22.545797] get ctp_gesture_wakeup fail, no gesture wakeup
[   22.566117] 1-005d supply ctp not found, using dummy regulator
[   22.739588] input: gt9xxnew_ts as /devices/virtual/input/input1
[   22.747633] <<-GTP-ERROR->> File PID != Ic PID, update aborted!
[   22.752218] init: Command 'insmod /vendor/modules/gt9xxnew_ts.ko' action=sys.boot_completed=1 (/vendor/etc/init/hw/init.device.rc:46) took 280ms and succeeded
[   22.795783] <<-GTP-ERROR->> [update_proc]Check *.bin file fail.
[   22.810689] init: Command 'insmod /vendor/modules/gt9xxnewdup_ts.ko' action=sys.boot_completed=1 (/vendor/etc/init/hw/init.device.rc:47) took 57ms and failed: finit_module for "/vendor/modules/gt9xxnewdup_ts.ko" failed: Operation not permitted
[   22.852183] selinux: SELinux: Skipping restorecon on directory(/data/system_ce/0)
[   22.852183]
[   22.870931] init: processing action (sys.boot_completed=1) from (/system/etc/init/aw_thermal.rc:10)
[   22.887257] init: starting service 'aw_thermal'...
[   22.948185] init: Command 'start aw_thermal' action=sys.boot_completed=1 (/system/etc/init/aw_thermal.rc:11) took 65ms and succeeded
[   23.010700] init: Async property child exited with status 0
[   23.027486] init: processing action (sys.boot_completed=1 && sys.logbootcomplete=1) from (/system/etc/init/bootstat.rc:78)
[   23.413615] [DISP] de_enhance_set_mode,line:474:
[   23.420573] para excess! mode = 0, enhance_mode = 0, format=255
[   23.433630] [DISP] de_enhance_set_mode,line:474:
[   23.438699] para excess! mode = 0, enhance_mode = 0, format=255
[   23.446241] [DISP] de_enhance_set_mode,line:474:
[   23.451289] para excess! mode = 0, enhance_mode = 0, format=255
[   23.458288] [DISP] de_enhance_set_mode,line:474:
[   23.463786] para excess! mode = 0, enhance_mode = 1, format=255
[   23.470716] [DISP] de_enhance_set_mode,line:474:
[   23.476049] para excess! mode = 0, enhance_mode = 0, format=255
[   23.483492] [DISP] de_enhance_set_mode,line:474:
[   23.488825] para excess! mode = 0, enhance_mode = 0, format=255
[   23.495781] [DISP] de_enhance_set_mode,line:474:
[   23.501095] para excess! mode = 0, enhance_mode = 1, format=255
[   23.508037] [DISP] de_enhance_set_mode,line:474:
[   23.513330] para excess! mode = 0, enhance_mode = 0, format=255
[   23.520781] [DISP] de_enhance_set_mode,line:474:
[   23.526116] para excess! mode = 0, enhance_mode = 0, format=255
[   23.533102] [DISP] de_enhance_set_mode,line:474:
[   23.538644] para excess! mode = 0, enhance_mode = 1, format=255
[   23.545640] [DISP] de_enhance_set_mode,line:474:
[   23.550909] para excess! mode = 0, enhance_mode = 0, format=255
[   23.573475] logd: logdr: UID=1036 GID=1023 PID=1890 b tail=0 logMask=19 pid=0 start=1628148019759408000ns timeout=0ns
[   25.334748] BOOTEVENT:     25334.731777: OFF
[   27.229633] apexd: Can't open /product/apex for reading : No such file or directory
[   27.851087] init: Received control message 'start' for 'gsid' from pid: 2014 (system_server)
[   27.861864] init: starting service 'gsid'...
[   27.940771] init: Received control message 'stop' for 'gsid' from pid: 2014 (system_server)
[   27.950691] init: Sending signal 9 to service 'gsid' (pid 3418) process group...
[   27.965229] libprocessgroup: Successfully killed process cgroup uid 0 pid 3418 in 5ms
[   27.979021] init: Service 'gsid' (pid 3418) received signal 9
[   28.008625] type=1400 audit(1628148019.156:15): avc: denied { getattr } for comm="android.ui" path="/sys/devices/platform/ite66121/extcon/hdmi/state" dev="sysfs" ino=17470 scontext=u:r:system_server:s0 tcontext=u:object_r:sysfs:s0 tclass=file permissive=1
[   28.036386] type=1400 audit(1628148031.653:16): avc: granted { read } for comm="main" name="u:object_r:net_dns_prop:s0" dev="tmpfs" ino=9680 scontext=u:r:untrusted_app_25:s0:c512,c768 tcontext=u:object_r:net_dns_prop:s0 tclass=file app=com.android.email
[   33.185142] type=1400 audit(1628148031.653:16): avc: granted { read } for comm="main" name="u:object_r:net_dns_prop:s0" dev="tmpfs" ino=9680 scontext=u:r:untrusted_app_25:s0:c512,c768 tcontext=u:object_r:net_dns_prop:s0 tclass=file app=com.android.email
[   33.210512] type=1400 audit(1628148036.830:17): avc: denied { dac_override } for comm="irqbalance" capability=1 scontext=u:r:shell:s0 tcontext=u:r:shell:s0 tclass=capability permissive=1

console:/ $
console:/ $
console:/ $

出厂固件是andorid

#62 Re: 全志 SOC » 全志A133/T509/AIC800 编译 longan SDK 出现这个错误 » 2021-09-09 12:57:25

X3

QQ图片20210909125508.png

ubuntu:/opt/a133/longan$ ./build.sh config

Welcome to mkscript setup progress
All available platform:
   0. android
   1. linux
Choice [linux]: 1
All available linux_dev:
   0. bsp
   1. dragonboard
Choice [dragonboard]: 0
All available kern_ver:
   0. linux-4.9
Choice [linux-4.9]: 0
All available ic:
   0. aic800
Choice [aic800]: 0
All available board:
   0. demo
   1. demo_nopmu
Choice [demo_nopmu]: 0
All available flash:
   0. default
   1. nor
Choice [nor]: 0
INFO: kernel defconfig: generate /opt/a133/longan/kernel/linux-4.9/.config by /opt/a133/longan/kernel/linux-4.9/arch/arm64/configs/sun50iw10p1smp_defconfig
INFO: Prepare toolchain ...
*** Default configuration is based on 'sun50iw10p1smp_defconfig'
#
# configuration written to .config
#
INFO: skip buildroot

简直就像走迷宫一样:

$ ./build.sh pack
ACTION List: mkpack ;========
Execute command: mkpack
INFO: packing firmware ...
INFO: Use BIN_PATH: /opt/a133/longan/device/config/chips/aic800//bin
copying tools file
copying configs file
copying product configs file
/opt/a133/longan/out/pack_out/aultls32.fex
/opt/a133/longan/out/pack_out/aultools.fex
/opt/a133/longan/out/pack_out/boot_package.cfg
/opt/a133/longan/out/pack_out/boot_package.fex
/opt/a133/longan/out/pack_out/boot_package_nor.cfg
/opt/a133/longan/out/pack_out/cardscript.fex
/opt/a133/longan/out/pack_out/cardscript_secure.fex
/opt/a133/longan/out/pack_out/cardtool.fex
/opt/a133/longan/out/pack_out/diskfs.fex
/opt/a133/longan/out/pack_out/dragon_toc.cfg
/opt/a133/longan/out/pack_out/dragon_toc_android.cfg
/opt/a133/longan/out/pack_out/env.cfg
/opt/a133/longan/out/pack_out/env_burn.cfg
/opt/a133/longan/out/pack_out/env_dragon.cfg
/opt/a133/longan/out/pack_out/esm.fex
/opt/a133/longan/out/pack_out/image.cfg
/opt/a133/longan/out/pack_out/image_android.cfg
/opt/a133/longan/out/pack_out/image_crashdump.cfg
/opt/a133/longan/out/pack_out/image_dragonboard.cfg
renamed '/opt/a133/longan/out/pack_out/image_linux.cfg' -> '/opt/a133/longan/out/pack_out/image.cfg'
/opt/a133/longan/out/pack_out/image_nor.cfg
/opt/a133/longan/out/pack_out/parameter.fex
/opt/a133/longan/out/pack_out/split_xxxx.fex
/opt/a133/longan/out/pack_out/sunxi.fex
/opt/a133/longan/out/pack_out/sys_config.fex
/opt/a133/longan/out/pack_out/sys_partition.fex
/opt/a133/longan/out/pack_out/sys_partition_dump.fex
/opt/a133/longan/out/pack_out/sys_partition_private.fex
/opt/a133/longan/out/pack_out/sysrecovery.fex
/opt/a133/longan/out/pack_out/toc0.fex
/opt/a133/longan/out/pack_out/toc1.fex
/opt/a133/longan/out/pack_out/usbtool.fex
/opt/a133/longan/out/pack_out/usbtool_crash.fex
/opt/a133/longan/out/pack_out/usbtool_test.fex
/opt/a133/longan/out/pack_out/verity_block.fex
copying boot resource
copying boot file
Script_to_dts: use board special dts file board.dts
sunxi_dtb create
p=soc c=product state=0
p=soc c=platform state=0
p=soc c=target state=0
p=soc c=power_sply state=0
p=soc c=card_boot state=0
p=soc c=fastboot_key state=0
p=soc c=recovery_key state=0
p=soc c=pm_para state=0
p=soc c=card0_boot_para state=0
p=soc c=card2_boot_para state=0
p=soc c=gpio_bias state=0
p=soc c=auto_print state=0
p=soc c=uart_para state=0
p=soc c=jtag_para state=0
p=soc c=clock state=0
p=soc c=dram state=0
p=soc c=uart0 state=0
p=soc c=nand0 state=0
p=soc c=charger0 state=0
Conver script to dts ok.
update scp
update optee

sboot file Path=/opt/a133/longan/out/pack_out/sboot.bin
script file Path=/opt/a133/longan/out/pack_out/sys_config.bin

update:unable to open sboot file
script update sboot ok
pack boot package
GetPrivateProfileSection read to end
content_count=4
packing for linux
normal
this is not a partition key
gpt_head->header_crc32 = 0xdf85ff9d
GPT----part num 5---
gpt_entry: 128
gpt_header: 92
GPT:boot-resource: 8000          17fff
GPT:env         : 18000         1ffff
GPT:boot        : 20000         3ffff
GPT:rootfs      : 40000         13ffff
GPT:UDISK       : 140000        14000f
update gpt file ok
update mbr file ok
/opt/a133/longan/tools/pack/pctools/linux/eDragonEx/
/opt/a133/longan/out/pack_out
Begin Parse sys_partion.fex
Add partion boot-resource.fex BOOT-RESOURCE_FEX
Add partion very boot-resource.fex BOOT-RESOURCE_FEX
FilePath: boot-resource.fex
FileLength=91ac00Add partion env.fex ENV_FEX000000000
Add partion very env.fex ENV_FEX000000000
FilePath: env.fex
FileLength=20000Add partion boot.fex BOOT_FEX00000000
Add partion very boot.fex BOOT_FEX00000000
FilePath: boot.fex
FileLength=e62800Add partion rootfs.fex ROOTFS_FEX000000
Add partion very rootfs.fex ROOTFS_FEX000000
FilePath: rootfs.fex
FileLength=7039800sys_config.fex Len: 0x1f43
config.fex Len: 0x2000
board.fex Len: 0x400
split_xxxx.fex Len: 0x200
sys_partition.fex Len: 0xa55
sunxi.fex Len: 0x21400
boot0_nand.fex Len: 0xc000
boot0_sdcard.fex Len: 0xc000
u-boot.fex Len: 0xa8000
u-boot-crash.fex Len: 0x25
toc1.fex Len: 0x8
toc0.fex Len: 0x8
fes1.fex Len: 0x6e80
boot_package.fex Len: 0xf0000
usbtool.fex Len: 0x24400
usbtool_crash.fex Len: 0x97a00
aultools.fex Len: 0x2897d
aultls32.fex Len: 0x251f1
cardtool.fex Len: 0x11e00
cardscript.fex Len: 0x779
sunxi_gpt.fex Len: 0x2000
sunxi_mbr.fex Len: 0x10000
dlinfo.fex Len: 0x4000
arisc.fex Len: 0x6
vmlinux.fex Len: 0x2ef126d
boot-resource.fex Len: 0x91ac00
Vboot-resource.fex Len: 0x4
env.fex Len: 0x20000
Venv.fex Len: 0x4
boot.fex Len: 0xe62800
Vboot.fex Len: 0x4
rootfs.fex Len: 0x7039800
Vrootfs.fex Len: 0x4
BuildImg 0
Dragon execute image.cfg SUCCESS !
----------image is at----------

/opt/a133/longan/out/aic800_linux_demo_uart0.img

pack finish

#63 全志 SOC » 全志A133/T509/AIC800 编译 longan SDK 出现这个错误 » 2021-09-09 12:17:56

X3
回复: 16

全志AIC800 手册: aic800g3_datasheet_v1.4.pdf

原理图: SC3904Q-mb-V00-20112600.pdf


LCD手册: B070EW01-V0-AUO.pdf

a_support.o
  CC [M]  /opt/a133/longan/kernel/linux-4.9/modules/gpu/img-rgx/linux/rogue_km/binary_sunxi_linux_release/target_aarch64/kbuild/services/system/common/vz_physheap_                  generic.o
  CC [M]  /opt/a133/longan/kernel/linux-4.9/modules/gpu/img-rgx/linux/rogue_km/binary_sunxi_linux_release/target_aarch64/kbuild/services/system/common/vz_physheap_                  common.o
  CC [M]  /opt/a133/longan/kernel/linux-4.9/modules/gpu/img-rgx/linux/rogue_km/binary_sunxi_linux_release/target_aarch64/kbuild/services/system/common/vmm_pvz_clie                  nt.o
  CC [M]  /opt/a133/longan/kernel/linux-4.9/modules/gpu/img-rgx/linux/rogue_km/binary_sunxi_linux_release/target_aarch64/kbuild/services/system/common/vmm_pvz_serv                  er.o
  CC [M]  /opt/a133/longan/kernel/linux-4.9/modules/gpu/img-rgx/linux/rogue_km/binary_sunxi_linux_release/target_aarch64/kbuild/services/system/common/vz_vmm_pvz.o
  CC [M]  /opt/a133/longan/kernel/linux-4.9/modules/gpu/img-rgx/linux/rogue_km/binary_sunxi_linux_release/target_aarch64/kbuild/services/system/common/vz_vmm_vm.o
  CC [M]  /opt/a133/longan/kernel/linux-4.9/modules/gpu/img-rgx/linux/rogue_km/binary_sunxi_linux_release/target_aarch64/kbuild/services/system/common/vz_support.o
  CC [M]  /opt/a133/longan/kernel/linux-4.9/modules/gpu/img-rgx/linux/rogue_km/binary_sunxi_linux_release/target_aarch64/kbuild/services/system/common/vmm_type_stu                  b.o
  CC [M]  /opt/a133/longan/kernel/linux-4.9/modules/gpu/img-rgx/linux/rogue_km/binary_sunxi_linux_release/target_aarch64/kbuild/services/3rdparty/dc_sunxi/dc_sunxi                  .o
In file included from ./include/linux/mm.h:9:0,
                 from /opt/a133/longan/kernel/linux-4.9/modules/gpu/img-rgx/linux/rogue_km/binary_sunxi_linux_release/target_aarch64/kbuild/services/system/common/                  env/linux/dma_support.c:44:
/opt/a133/longan/kernel/linux-4.9/modules/gpu/img-rgx/linux/rogue_km/binary_sunxi_linux_release/target_aarch64/kbuild/services/system/common/env/linux/dma_support.                  c: In function 'SysDmaAllocMem':
/opt/a133/longan/kernel/linux-4.9/modules/gpu/img-rgx/linux/rogue_km/binary_sunxi_linux_release/target_aarch64/kbuild/services/system/common/env/linux/dma_support.                  c:205:45: error: implicit declaration of function '__get_order' [-Werror=implicit-function-declaration]
  else if ((psPage = alloc_pages(GFP_KERNEL, __get_order(uiSize))))
                                             ^
./include/linux/gfp.h:478:46: note: in definition of macro 'alloc_pages'
   alloc_pages_node(numa_node_id(), gfp_mask, order)
                                              ^
cc1: some warnings being treated as errors
scripts/Makefile.build:334: recipe for target '/opt/a133/longan/kernel/linux-4.9/modules/gpu/img-rgx/linux/rogue_km/binary_sunxi_linux_release/target_aarch64/kbuil                  d/services/system/common/env/linux/dma_support.o' failed
make[4]: *** [/opt/a133/longan/kernel/linux-4.9/modules/gpu/img-rgx/linux/rogue_km/binary_sunxi_linux_release/target_aarch64/kbuild/services/system/common/env/linu                  x/dma_support.o] Error 1
make[4]: *** Waiting for unfinished jobs....
Makefile:1615: recipe for target '_module_/opt/a133/longan/kernel/linux-4.9/modules/gpu/img-rgx/linux/rogue_km/binary_sunxi_linux_release/target_aarch64/kbuild' fa                  iled
make[3]: *** [_module_/opt/a133/longan/kernel/linux-4.9/modules/gpu/img-rgx/linux/rogue_km/binary_sunxi_linux_release/target_aarch64/kbuild] Error 2
build/linux/kbuild/kbuild.mk:64: recipe for target 'kbuild' failed
make[2]: *** [kbuild] Error 2
../config/core.mk:1862: recipe for target 'build' failed
make[1]: *** [build] Error 2
make[1]: Leaving directory '/opt/a133/longan/kernel/linux-4.9/modules/gpu/img-rgx/linux/rogue_km/build/linux/sunxi_linux'
Makefile:122: recipe for target 'build' failed
make: *** [build] Error 2
make: Leaving directory '/opt/a133/longan/kernel/linux-4.9/modules/gpu'
ERROR: build kernel Failed
INFO: mkkernel failed

参考1: https://licheeone.readthedocs.io/zh/latest/camdroid/camdroid_build.html
参考2: https://www.jianshu.com/p/8bd49a3e721f

#65 Re: 全志 SOC » F133 跑 D1 的Tina Linux挂了,这是什么情况? » 2021-09-02 18:43:13

X3

最终修改两个文件即可:


device/config/chips/d1/configs/nezha/sys_config.fex

;sunxi platform application
;---------------------------------------------------------------------------------------------------------
; 说明: 脚本中的字符串区分大小写,用户可以修改"="后面的数值,但是不要修改前面的字符串
; 描述gpio的形式:Port:端口+组内序号<功能分配><内部电阻状态><驱动能力><输出电平状态>
;---------------------------------------------------------------------------------------------------------

;---------------------------------------------------------------------------------
; version:版本1.00
; machine:板级文件名
;---------------------------------------------------------------------------------
[product]
version = "100"
machine = "nezha"


;----------------------------------------------------------------------------------
;debug_mode     = 0-close printf, > 0-open printf
;----------------------------------------------------------------------------------
[platform]
debug_mode  = 8

;----------------------------------------------------------------------------------
;storage_type   = boot medium, 0-nand, 1-sd, 2-emmc, 3-nor, 4-emmc3, 5-spinand -1(defualt)auto scan
;----------------------------------------------------------------------------------
[target]
storage_type    = 5


;----------------------------------------------------------------------------------
;card_ctrl              -卡量产相关的控制器选择0      |
;card_high_speed        -速度模式 0为低速,1为高速|
;card_line              -4:4线卡,8:8线卡|
;sdc_d1                 -sdc卡数据1线信号的GPIO配置     |
;sdc_d0                 -sdc卡数据0线信号的GPIO配置  |
;sdc_clk                -sdc卡时钟信号的GPIO配置   |
;sdc_cmd                -sdc命令信号的GPIO配置|
;sdc_d3                 -sdc卡数据3线信号的GPIO配置    |
;sdc_d2                 -sdc卡数据2线信号的GPIO配置  |
;----------------------------------------------------------------------------------
[card0_boot_para]
card_ctrl       = 0
card_high_speed = 1
card_line       = 4
sdc_d1          = port:PF0<2><1><2><default>
sdc_d0          = port:PF1<2><1><2><default>
sdc_clk         = port:PF2<2><1><2><default>
sdc_cmd         = port:PF3<2><1><2><default>
sdc_d3          = port:PF4<2><1><2><default>
sdc_d2          = port:PF5<2><1><2><default>
bus-width = 4
cap-sd-highspeed =
cap-wait-while-busy =
no-sdio =
no-mmc =
sunxi-power-save-mode =


;----------------------------------------------------------------------------------
;card_ctrl              -卡启动控制器选择2
;card_high_speed        -速度模式 0为低速,1为高速
;card_line              -4:4线卡,8:8线卡
;sdc_ds                 -ds信号的GPIO配置
;sdc_d1                 -sdc卡数据1线信号的GPIO配置
;sdc_d0                 -sdc卡数据0线信号的GPIO配置
;sdc_clk                -sdc卡时钟信号的GPIO配置
;sdc_cmd                -sdc命令信号的GPIO配置
;sdc_d3                 -sdc卡数据3线信号的GPIO配置
;sdc_d2                 -sdc卡数据2线信号的GPIO配置
;sdc_d4                 -sdc卡数据4线信号的GPIO配置
;sdc_d5                 -sdc卡数据5线信号的GPIO配置
;sdc_d6                 -sdc卡数据6线信号的GPIO配置
;sdc_d7                 -sdc卡数据7线信号的GPIO配置
;sdc_emmc_rst           -emmc_rst信号的GPIO配置
;sdc_ex_dly_used        -ex_dly_used信号
;sdc_io_1v8             -sdc_io_1v8高速emmc模式配置
;----------------------------------------------------------------------------------
[card2_boot_para]
card_ctrl       = 2
card_high_speed = 1
card_line       = 8
sdc_clk         = port:PF25<2><1><3><default>
sdc_cmd         = port:PF24<2><1><3><default>
sdc_d0          = port:PF16<2><1><3><default>
sdc_d1          = port:PF17<2><1><3><default>
sdc_d2          = port:PF18<2><1><3><default>
sdc_d3          = port:PF19<2><1><3><default>
sdc_d4          = port:PF20<2><1><3><default>
sdc_d5          = port:PF21<2><1><3><default>
sdc_d6          = port:PF22<2><1><3><default>
sdc_d7          = port:PF23<2><1><3><default>
sdc_emmc_rst    = port:PF31<2><1><3><default>
sdc_ds          = port:PF27<2><1><3><default>



;----------------------------------------------------------------------------------
;jtag_enable    |JTAG使能   |
;jtag_ms        |测试模式选择输入(TMS) 的GPIO配置|
;jtag_ck        |测试时钟输入(CLK) 的GPIO配置    |
;jtag_do        |测试数据输出(TDO) 的GPIO配置     |
;jtag_di        |测试数据输出(TDI) 的GPIO配置     |
;----------------------------------------------------------------------------------
[jtag_para]
jtag_enable     = 0
jtag_ms         = port:PF0<4><default><default><default>
jtag_ck         = port:PF5<4><default><default><default>
jtag_do         = port:PF3<4><default><default><default>
jtag_di         = port:PF1<4><default><default><default>

;*****************************************************************************
;
;dram select configuration
;
;select_mode    :       dram模式选择,   0:不进行自动识别
;                                       1:gpio识别模式(dram_para, dram_para1-15, 共16组有效)
;                                       2:gpadc识别模式(dram_para, dram_para1-7, 共8组有效)
;                                       3:1个IO+gpadc识别模式(dram_para, dram_para1-15, 共16组有效)。其中IO配置优先级按select_gpio0>select_gpio1>select_gpio2>select_gpio3
;gpadc_channel  :       选择gpadc通道   有效值(0-3)
;select_gpio1-4 :       选择gpio pin
;*****************************************************************************


[dram_select_para]
select_mode     = 0
gpadc_channel   = 1
select_gpio0    = port:PB7<0><1><default><default>
select_gpio1    = port:PB4<0><1><default><default>
select_gpio2    = port:PH1<0><1><default><default>
select_gpio3    = port:PH0<0><1><default><default>


;*****************************************************************************
;sdram configuration
;
;*****************************************************************************
[dram_para]
dram_clk            = 528
dram_type           = 2
dram_zq             = 0x07b7bf9
dram_odt_en         = 0x00
dram_para1          = 0x000000d2
dram_para2          = 0x00000000
dram_mr0            = 0x00000E73
dram_mr1            = 0x02
dram_mr2            = 0x0
dram_mr3            = 0x0
dram_tpr0           = 0x00471992
dram_tpr1           = 0x0131A10C
dram_tpr2           = 0x00057041
dram_tpr3           = 0xB4787896
dram_tpr4           = 0x0
dram_tpr5           = 0x48484848
dram_tpr6           = 0x48
dram_tpr7           = 0x1621121e
dram_tpr8           = 0x0
dram_tpr9           = 0x0
dram_tpr10          = 0x00000000
dram_tpr11          = 0x00030010
dram_tpr12          = 0x00000035
dram_tpr13          = 0x34000000

[dram_para1]

dram_clk       = 672
dram_type      = 7
dram_dx_odt    = 0x06060606
dram_dx_dri    = 0x0c0c0c0c
dram_ca_dri    = 0x1919
dram_para0     = 0x16171411
dram_para1     = 0x30eb
dram_para2     = 0x0000
dram_mr0       = 0x0
dram_mr1       = 0xc3
dram_mr2       = 0x6
dram_mr3       = 0x2
dram_mr4       = 0x0
dram_mr5       = 0x0
dram_mr6       = 0x0
dram_mr11      = 0x0
dram_mr12      = 0x0
dram_mr13      = 0x0
dram_mr14      = 0x0
dram_mr16      = 0x0
dram_mr17      = 0x0
dram_mr22      = 0x0
dram_tpr0      = 0x0
dram_tpr1      = 0x0
dram_tpr2      = 0x0
dram_tpr3      = 0x0
dram_tpr6      = 0x2fb48080
dram_tpr10     = 0x002f876b
dram_tpr11     = 0x10120c05
dram_tpr12     = 0x12121111
dram_tpr13     = 0x61
dram_tpr14     = 0x211e1e22

[dram_para2]

dram_clk       = 672
dram_type      = 7
dram_dx_odt    = 0x06060606
dram_dx_dri    = 0x0c0c0c0c
dram_ca_dri    = 0x1919
dram_para0     = 0x16171411
dram_para1     = 0x30eb
dram_para2     = 0x0000
dram_mr0       = 0x0
dram_mr1       = 0xc3
dram_mr2       = 0x6
dram_mr3       = 0x2
dram_mr4       = 0x0
dram_mr5       = 0x0
dram_mr6       = 0x0
dram_mr11      = 0x0
dram_mr12      = 0x0
dram_mr13      = 0x0
dram_mr14      = 0x0
dram_mr16      = 0x0
dram_mr17      = 0x0
dram_mr22      = 0x0
dram_tpr0      = 0x0
dram_tpr1      = 0x0
dram_tpr2      = 0x0
dram_tpr3      = 0x0
dram_tpr6      = 0x2fb48080
dram_tpr10     = 0x002f876b
dram_tpr11     = 0x10120c05
dram_tpr12     = 0x12121111
dram_tpr13     = 0x61
dram_tpr14     = 0x211e1e22

[dram_para3]

dram_clk       = 672
dram_type      = 7
dram_dx_odt    = 0x06060606
dram_dx_dri    = 0x0c0c0c0c
dram_ca_dri    = 0x1919
dram_para0     = 0x16171411
dram_para1     = 0x30eb
dram_para2     = 0x0000
dram_mr0       = 0x0
dram_mr1       = 0xc3
dram_mr2       = 0x6
dram_mr3       = 0x2
dram_mr4       = 0x0
dram_mr5       = 0x0
dram_mr6       = 0x0
dram_mr11      = 0x0
dram_mr12      = 0x0
dram_mr13      = 0x0
dram_mr14      = 0x0
dram_mr16      = 0x0
dram_mr17      = 0x0
dram_mr22      = 0x0
dram_tpr0      = 0x0
dram_tpr1      = 0x0
dram_tpr2      = 0x0
dram_tpr3      = 0x0
dram_tpr6      = 0x2fb48080
dram_tpr10     = 0x002f876b
dram_tpr11     = 0x10120c05
dram_tpr12     = 0x12121111
dram_tpr13     = 0x61
dram_tpr14     = 0x211e1e22

[dram_para4]

dram_clk       = 672
dram_type      = 7
dram_dx_odt    = 0x06060606
dram_dx_dri    = 0x0c0c0c0c
dram_ca_dri    = 0x1919
dram_para0     = 0x16171411
dram_para1     = 0x30eb
dram_para2     = 0x0000
dram_mr0       = 0x0
dram_mr1       = 0xc3
dram_mr2       = 0x6
dram_mr3       = 0x2
dram_mr4       = 0x0
dram_mr5       = 0x0
dram_mr6       = 0x0
dram_mr11      = 0x0
dram_mr12      = 0x0
dram_mr13      = 0x0
dram_mr14      = 0x0
dram_mr16      = 0x0
dram_mr17      = 0x0
dram_mr22      = 0x0
dram_tpr0      = 0x0
dram_tpr1      = 0x0
dram_tpr2      = 0x0
dram_tpr3      = 0x0
dram_tpr6      = 0x2fb48080
dram_tpr10     = 0x002f876b
dram_tpr11     = 0x10120c05
dram_tpr12     = 0x12121111
dram_tpr13     = 0x61
dram_tpr14     = 0x211e1e22

[dram_para5]

dram_clk       = 672
dram_type      = 7
dram_dx_odt    = 0x06060606
dram_dx_dri    = 0x0c0c0c0c
dram_ca_dri    = 0x1919
dram_para0     = 0x16171411
dram_para1     = 0x30eb
dram_para2     = 0x0000
dram_mr0       = 0x0
dram_mr1       = 0xc3
dram_mr2       = 0x6
dram_mr3       = 0x2
dram_mr4       = 0x0
dram_mr5       = 0x0
dram_mr6       = 0x0
dram_mr11      = 0x0
dram_mr12      = 0x0
dram_mr13      = 0x0
dram_mr14      = 0x0
dram_mr16      = 0x0
dram_mr17      = 0x0
dram_mr22      = 0x0
dram_tpr0      = 0x0
dram_tpr1      = 0x0
dram_tpr2      = 0x0
dram_tpr3      = 0x0
dram_tpr6      = 0x2fb48080
dram_tpr10     = 0x002f876b
dram_tpr11     = 0x10120c05
dram_tpr12     = 0x12121111
dram_tpr13     = 0x61
dram_tpr14     = 0x211e1e22

[dram_para6]

dram_clk       = 672
dram_type      = 7
dram_dx_odt    = 0x06060606
dram_dx_dri    = 0x0c0c0c0c
dram_ca_dri    = 0x1919
dram_para0     = 0x16171411
dram_para1     = 0x30eb
dram_para2     = 0x0000
dram_mr0       = 0x0
dram_mr1       = 0xc3
dram_mr2       = 0x6
dram_mr3       = 0x2
dram_mr4       = 0x0
dram_mr5       = 0x0
dram_mr6       = 0x0
dram_mr11      = 0x0
dram_mr12      = 0x0
dram_mr13      = 0x0
dram_mr14      = 0x0
dram_mr16      = 0x0
dram_mr17      = 0x0
dram_mr22      = 0x0
dram_tpr0      = 0x0
dram_tpr1      = 0x0
dram_tpr2      = 0x0
dram_tpr3      = 0x0
dram_tpr6      = 0x2fb48080
dram_tpr10     = 0x002f876b
dram_tpr11     = 0x10120c05
dram_tpr12     = 0x12121111
dram_tpr13     = 0x61
dram_tpr14     = 0x211e1e22

[dram_para7]

dram_clk       = 672
dram_type      = 7
dram_dx_odt    = 0x06060606
dram_dx_dri    = 0x0c0c0c0c
dram_ca_dri    = 0x1919
dram_para0     = 0x16171411
dram_para1     = 0x30eb
dram_para2     = 0x0000
dram_mr0       = 0x0
dram_mr1       = 0xc3
dram_mr2       = 0x6
dram_mr3       = 0x2
dram_mr4       = 0x0
dram_mr5       = 0x0
dram_mr6       = 0x0
dram_mr11      = 0x0
dram_mr12      = 0x0
dram_mr13      = 0x0
dram_mr14      = 0x0
dram_mr16      = 0x0
dram_mr17      = 0x0
dram_mr22      = 0x0
dram_tpr0      = 0x0
dram_tpr1      = 0x0
dram_tpr2      = 0x0
dram_tpr3      = 0x0
dram_tpr6      = 0x2fb48080
dram_tpr10     = 0x002f876b
dram_tpr11     = 0x10120c05
dram_tpr12     = 0x12121111
dram_tpr13     = 0x61
dram_tpr14     = 0x211e1e22

[dram_para8]

dram_clk       = 672
dram_type      = 7
dram_dx_odt    = 0x06060606
dram_dx_dri    = 0x0c0c0c0c
dram_ca_dri    = 0x1919
dram_para0     = 0x16171411
dram_para1     = 0x30eb
dram_para2     = 0x0000
dram_mr0       = 0x0
dram_mr1       = 0xc3
dram_mr2       = 0x6
dram_mr3       = 0x2
dram_mr4       = 0x0
dram_mr5       = 0x0
dram_mr6       = 0x0
dram_mr11      = 0x0
dram_mr12      = 0x0
dram_mr13      = 0x0
dram_mr14      = 0x0
dram_mr16      = 0x0
dram_mr17      = 0x0
dram_mr22      = 0x0
dram_tpr0      = 0x0
dram_tpr1      = 0x0
dram_tpr2      = 0x0
dram_tpr3      = 0x0
dram_tpr6      = 0x2fb48080
dram_tpr10     = 0x002f876b
dram_tpr11     = 0x10120c05
dram_tpr12     = 0x12121111
dram_tpr13     = 0x61
dram_tpr14     = 0x211e1e22

[dram_para9]

dram_clk       = 672
dram_type      = 7
dram_dx_odt    = 0x06060606
dram_dx_dri    = 0x0c0c0c0c
dram_ca_dri    = 0x1919
dram_para0     = 0x16171411
dram_para1     = 0x30eb
dram_para2     = 0x0000
dram_mr0       = 0x0
dram_mr1       = 0xc3
dram_mr2       = 0x6
dram_mr3       = 0x2
dram_mr4       = 0x0
dram_mr5       = 0x0
dram_mr6       = 0x0
dram_mr11      = 0x0
dram_mr12      = 0x0
dram_mr13      = 0x0
dram_mr14      = 0x0
dram_mr16      = 0x0
dram_mr17      = 0x0
dram_mr22      = 0x0
dram_tpr0      = 0x0
dram_tpr1      = 0x0
dram_tpr2      = 0x0
dram_tpr3      = 0x0
dram_tpr6      = 0x2fb48080
dram_tpr10     = 0x002f876b
dram_tpr11     = 0x10120c05
dram_tpr12     = 0x12121111
dram_tpr13     = 0x61
dram_tpr14     = 0x211e1e22

[dram_para10]

dram_clk       = 672
dram_type      = 7
dram_dx_odt    = 0x06060606
dram_dx_dri    = 0x0c0c0c0c
dram_ca_dri    = 0x1919
dram_para0     = 0x16171411
dram_para1     = 0x30eb
dram_para2     = 0x0000
dram_mr0       = 0x0
dram_mr1       = 0xc3
dram_mr2       = 0x6
dram_mr3       = 0x2
dram_mr4       = 0x0
dram_mr5       = 0x0
dram_mr6       = 0x0
dram_mr11      = 0x0
dram_mr12      = 0x0
dram_mr13      = 0x0
dram_mr14      = 0x0
dram_mr16      = 0x0
dram_mr17      = 0x0
dram_mr22      = 0x0
dram_tpr0      = 0x0
dram_tpr1      = 0x0
dram_tpr2      = 0x0
dram_tpr3      = 0x0
dram_tpr6      = 0x2fb48080
dram_tpr10     = 0x002f876b
dram_tpr11     = 0x10120c05
dram_tpr12     = 0x12121111
dram_tpr13     = 0x61
dram_tpr14     = 0x211e1e22

[dram_para11]

dram_clk       = 672
dram_type      = 7
dram_dx_odt    = 0x06060606
dram_dx_dri    = 0x0c0c0c0c
dram_ca_dri    = 0x1919
dram_para0     = 0x16171411
dram_para1     = 0x30eb
dram_para2     = 0x0000
dram_mr0       = 0x0
dram_mr1       = 0xc3
dram_mr2       = 0x6
dram_mr3       = 0x2
dram_mr4       = 0x0
dram_mr5       = 0x0
dram_mr6       = 0x0
dram_mr11      = 0x0
dram_mr12      = 0x0
dram_mr13      = 0x0
dram_mr14      = 0x0
dram_mr16      = 0x0
dram_mr17      = 0x0
dram_mr22      = 0x0
dram_tpr0      = 0x0
dram_tpr1      = 0x0
dram_tpr2      = 0x0
dram_tpr3      = 0x0
dram_tpr6      = 0x2fb48080
dram_tpr10     = 0x002f876b
dram_tpr11     = 0x10120c05
dram_tpr12     = 0x12121111
dram_tpr13     = 0x61
dram_tpr14     = 0x211e1e22

[dram_para12]

dram_clk       = 672
dram_type      = 7
dram_dx_odt    = 0x06060606
dram_dx_dri    = 0x0c0c0c0c
dram_ca_dri    = 0x1919
dram_para0     = 0x16171411
dram_para1     = 0x30eb
dram_para2     = 0x0000
dram_mr0       = 0x0
dram_mr1       = 0xc3
dram_mr2       = 0x6
dram_mr3       = 0x2
dram_mr4       = 0x0
dram_mr5       = 0x0
dram_mr6       = 0x0
dram_mr11      = 0x0
dram_mr12      = 0x0
dram_mr13      = 0x0
dram_mr14      = 0x0
dram_mr16      = 0x0
dram_mr17      = 0x0
dram_mr22      = 0x0
dram_tpr0      = 0x0
dram_tpr1      = 0x0
dram_tpr2      = 0x0
dram_tpr3      = 0x0
dram_tpr6      = 0x2fb48080
dram_tpr10     = 0x002f876b
dram_tpr11     = 0x10120c05
dram_tpr12     = 0x12121111
dram_tpr13     = 0x61
dram_tpr14     = 0x211e1e22

[dram_para13]

dram_clk       = 672
dram_type      = 7
dram_dx_odt    = 0x06060606
dram_dx_dri    = 0x0c0c0c0c
dram_ca_dri    = 0x1919
dram_para0     = 0x16171411
dram_para1     = 0x30eb
dram_para2     = 0x0000
dram_mr0       = 0x0
dram_mr1       = 0xc3
dram_mr2       = 0x6
dram_mr3       = 0x2
dram_mr4       = 0x0
dram_mr5       = 0x0
dram_mr6       = 0x0
dram_mr11      = 0x0
dram_mr12      = 0x0
dram_mr13      = 0x0
dram_mr14      = 0x0
dram_mr16      = 0x0
dram_mr17      = 0x0
dram_mr22      = 0x0
dram_tpr0      = 0x0
dram_tpr1      = 0x0
dram_tpr2      = 0x0
dram_tpr3      = 0x0
dram_tpr6      = 0x2fb48080
dram_tpr10     = 0x002f876b
dram_tpr11     = 0x10120c05
dram_tpr12     = 0x12121111
dram_tpr13     = 0x61
dram_tpr14     = 0x211e1e22

[dram_para14]

dram_clk       = 672
dram_type      = 7
dram_dx_odt    = 0x06060606
dram_dx_dri    = 0x0c0c0c0c
dram_ca_dri    = 0x1919
dram_para0     = 0x16171411
dram_para1     = 0x30eb
dram_para2     = 0x0000
dram_mr0       = 0x0
dram_mr1       = 0xc3
dram_mr2       = 0x6
dram_mr3       = 0x2
dram_mr4       = 0x0
dram_mr5       = 0x0
dram_mr6       = 0x0
dram_mr11      = 0x0
dram_mr12      = 0x0
dram_mr13      = 0x0
dram_mr14      = 0x0
dram_mr16      = 0x0
dram_mr17      = 0x0
dram_mr22      = 0x0
dram_tpr0      = 0x0
dram_tpr1      = 0x0
dram_tpr2      = 0x0
dram_tpr3      = 0x0
dram_tpr6      = 0x2fb48080
dram_tpr10     = 0x002f876b
dram_tpr11     = 0x10120c05
dram_tpr12     = 0x12121111
dram_tpr13     = 0x61
dram_tpr14     = 0x211e1e22

[dram_para15]

dram_clk       = 672
dram_type      = 7
dram_dx_odt    = 0x06060606
dram_dx_dri    = 0x0c0c0c0c
dram_ca_dri    = 0x1919
dram_para0     = 0x16171411
dram_para1     = 0x30eb
dram_para2     = 0x0000
dram_mr0       = 0x0
dram_mr1       = 0xc3
dram_mr2       = 0x6
dram_mr3       = 0x2
dram_mr4       = 0x0
dram_mr5       = 0x0
dram_mr6       = 0x0
dram_mr11      = 0x0
dram_mr12      = 0x0
dram_mr13      = 0x0
dram_mr14      = 0x0
dram_mr16      = 0x0
dram_mr17      = 0x0
dram_mr22      = 0x0
dram_tpr0      = 0x0
dram_tpr1      = 0x0
dram_tpr2      = 0x0
dram_tpr3      = 0x0
dram_tpr6      = 0x2fb48080
dram_tpr10     = 0x002f876b
dram_tpr11     = 0x10120c05
dram_tpr12     = 0x12121111
dram_tpr13     = 0x61
dram_tpr14     = 0x211e1e22


;----------------------------------------------------------------------------------
;twi configuration
;twi_used       0:关闭, 1:打开
;twi_port       0:twi0,  1:twi1, 2:twi2, 3:twi3, 4:twi4, 5:twi5, 6:r_twi0, 7:r_twi1
;twi_scl        boot0 scl的GPIO配置
;twi_sda        boot0 sda的GPIO配置
;----------------------------------------------------------------------------------
[twi_para]
twi_used = 0
twi_port = 2
twi_scl  = port:PG14<3><1><default><default>
twi_sda  = port:PG15<3><1><default><default>

;----------------------------------------------------------------------------------
;uart configuration
;uart_debug_port  |Boot串口控制器编号        |
;uart_debug_tx       |Boot串口发送的GPIO配置|
;uart_debug_rx  |Boot串口接收的GPIO配置     |
;----------------------------------------------------------------------------------
[uart_para]
uart_debug_port = 0
uart_debug_tx   = port:PE02<6><1><default><default>
uart_debug_rx   = port:PE03<6><1><default><default>


;----------------------------------------------------------------------------------
;dram_region_mbytes :设置drm大小以bytes为单位
;----------------------------------------------------------------------------------
[secure]
dram_region_mbytes       = 80
drm_region_mbytes        = 0
drm_region_start_mbytes  = 0

device/config/chips/d1/configs/nezha/board.dts

/*
 * Allwinner Technology CO., Ltd. sun20iw1p1 fpga.
 *
 * fpga support.
 */

/dts-v1/;

#include "sun20iw1p1.dtsi"

/{
        compatible = "allwinner,d1", "arm,sun20iw1p1", "allwinner,sun20iw1p1";

        aliases {
                dsp0 = &dsp0;
                dsp0_gpio_int= &dsp0_gpio_int;
        };

        dsp0: dsp0 {
                compatible = "allwinner,sun20iw1-dsp";
                status = "okay";
        };

        dsp0_gpio_int: dsp0_gpio_int {
                compatible = "allwinner,sun20iw1-dsp-gpio-int";
                pin-group = "PB", "PC", "PD", "PE";
                status = "disabled";
        };

        reg_vdd_cpu: vdd-cpu {
                compatible = "sunxi-pwm-regulator";
                pwms = <&pwm 0 5000 0>;
                regulator-name = "vdd_cpu";
                regulator-min-microvolt = <810000>;
                regulator-max-microvolt = <1160000>;
                regulator-ramp-delay = <25>;
                regulator-always-on;
                regulator-boot-on;
                status = "okay";
        };

        reg_usb1_vbus: usb1-vbus {
                compatible = "regulator-fixed";
                regulator-name = "usb1-vbus";
                regulator-min-microvolt = <5000000>;
                regulator-max-microvolt = <5000000>;
                regulator-enable-ramp-delay = <1000>;
                gpio = <&pio PD 19 GPIO_ACTIVE_HIGH>;
                enable-active-high;
        };
};

&CPU0 {
        cpu-supply = <&reg_vdd_cpu>;
};

&pio {
        sdc0_pins_a: sdc0@0 {
                allwinner,pins = "PF0", "PF1", "PF2",
                                 "PF3", "PF4", "PF5";
                allwinner,function = "sdc0";
                allwinner,muxsel = <2>;
                allwinner,drive = <3>;
                allwinner,pull = <1>;
                pins = "PF0", "PF1", "PF2",
                       "PF3", "PF4", "PF5";
                function = "sdc0";
                drive-strength = <30>;
                bias-pull-up;
                power-source = <3300>;
        };


        sdc0_pins_b: sdc0@1 {
                pins = "PF0", "PF1", "PF2",
                       "PF3", "PF4", "PF5";
                function = "sdc0";
                drive-strength = <30>;
                bias-pull-up;
                power-source = <1800>;
        };

        sdc0_pins_c: sdc0@2 {
                pins = "PF0", "PF1", "PF2",
                        "PF3", "PF4", "PF5";
                function = "gpio_in";
        };

        /* TODO: add jtag pin */
        sdc0_pins_d: sdc0@3 {
                pins = "PF2", "PF4";
                function = "uart0";
                drive-strength = <10>;
                bias-pull-up;
        };

        sdc0_pins_e: sdc0@4 {
                pins = "PF0", "PF1", "PF3",
                        "PF5";
                function = "jtag";
                drive-strength = <10>;
                bias-pull-up;
        };


        sdc1_pins_a: sdc1@0 {
                pins = "PG0", "PG1", "PG2",
                       "PG3", "PG4", "PG5";
                function = "sdc1";
                drive-strength = <30>;
                bias-pull-up;
        };

        sdc1_pins_b: sdc1@1 {
                pins = "PG0", "PG1", "PG2",
                       "PG3", "PG4", "PG5";
                        function = "gpio_in";
        };

        sdc2_pins_a: sdc2@0 {
                allwinner,pins = "PC2", "PC3", "PC4",
                                 "PC5", "PC6", "PC7";
                allwinner,function = "sdc2";
                allwinner,muxsel = <3>;
                allwinner,drive = <3>;
                allwinner,pull = <1>;
                pins = "PC2", "PC3", "PC4",
                        "PC5", "PC6", "PC7";
                function = "sdc2";
                drive-strength = <30>;
                bias-pull-up;
        };

        sdc2_pins_b: sdc2@1 {
                pins = "PC2", "PC3", "PC4",
                       "PC5", "PC6", "PC7";
                function = "gpio_in";
        };

        wlan_pins_a:wlan@0 {
                pins = "PG11";
                function = "clk_fanout1";
        };

        uart0_pins_a: uart0_pins@0 {  /* For nezha board */
                pins = "PB8", "PB9";
                function = "uart0";
                drive-strength = <10>;
                bias-pull-up;
        };

        uart0_pins_b: uart0_pins@1 {  /* For nezha board */
                pins = "PB8", "PB9";
                function = "gpio_in";
        };

        uart1_pins_a: uart1_pins@0 {  /* For EVB1 board */
                pins = "PG6", "PG7", "PG8", "PG9";
                function = "uart1";
                drive-strength = <10>;
                bias-pull-up;
        };

        uart1_pins_b: uart1_pins {  /* For EVB1 board */
                pins = "PG6", "PG7", "PG8", "PG9";
                function = "gpio_in";
        };

        uart2_pins_a: uart2_pins@0 {  /* For EVB1 board */
                pins = "PC0", "PC1";
                function = "uart2";
                drive-strength = <10>;
                bias-pull-up;
        };

        uart2_pins_b: uart2_pins@1 {  /* For EVB1 board */
                pins = "PC0", "PC1";
                function = "gpio_in";
        };

        uart3_pins_a: uart3_pins@0 {  /* For EVB1 board */
                pins = "PD10", "PD11";
                function = "uart3";
                muxsel = <5>;
                drive-strength = <10>;
                bias-pull-up;
        };

        twi0_pins_a: twi0@0 {
                pins = "PB10", "PB11";  /*sck sda*/
                function = "twi0";
                drive-strength = <10>;
        };

        twi0_pins_b: twi0@1 {
                pins = "PB10", "PB11";
                function = "gpio_in";
        };

        twi1_pins_a: twi1@0 {
                pins = "PB4", "PB5";
                function = "twi1";
                drive-strength = <10>;
        };

        twi1_pins_b: twi1@1 {
                pins = "PB4", "PB5";
                function = "gpio_in";
        };

        twi2_pins_a: twi2@0 {
                pins = "PB0", "PB1";
                function = "twi2";
                drive-strength = <10>;
        };

        twi2_pins_b: twi2@1 {
                pins = "PB0", "PB1";
                function = "gpio_in";
        };

        twi3_pins_a: twi3@0 {
                pins = "PB6", "PB7";
                function = "twi3";
                drive-strength = <10>;
        };

        twi3_pins_b: twi3@1 {
                pins = "PB6", "PB7";
                function = "gpio_in";
        };

        gmac_pins_a: gmac@0 {
                pins = "PE0", "PE1", "PE2", "PE3",
                       "PE4", "PE5", "PE6", "PE7",
                       "PE8", "PE9", "PE10", "PE11",
                       "PE12", "PE13", "PE14", "PE15";
                function = "gmac0";
                drive-strength = <10>;
        };

        gmac_pins_b: gmac@1 {
                pins = "PE0", "PE1", "PE2", "PE3",
                       "PE4", "PE5", "PE6", "PE7",
                       "PE8", "PE9", "PE10", "PE11",
                       "PE12", "PE13", "PE14", "PE15";
                function = "gpio_in";
        };

        dmic_pins_a: dmic@0 {
                /* DMIC_PIN: CLK, DATA0, DATA1, DATA2 */
                pins = "PE17", "PB11", "PB10", "PD17";
                function = "dmic";
                drive-strength = <20>;
                bias-disable;
        };

        dmic_pins_b: dmic@1 {
                pins = "PE17", "PB11", "PB10", "PD17";
                function = "io_disabled";
                drive-strength = <20>;
                bias-disable;
        };

        daudio0_pins_a: daudio0@0 {
                pins = "PE17", "PE16", "PE15", "PE14", "PE13";
                function = "i2s0";
                drive-strength = <20>;
                bias-disable;
        };

        daudio0_pins_b: daudio0_sleep@0 {
                pins = "PE17", "PE16", "PE15", "PE14", "PE13";
                function = "io_disabled";
                drive-strength = <20>;
                bias-disable;
        };

        daudio1_pins_a: daudio1@0 {
                pins = "PG11", "PG12", "PG13", "PG14", "PG15";
                function = "i2s1";
                drive-strength = <20>;
                bias-disable;
        };

        daudio1_pins_b: daudio1_sleep@0 {
                pins = "PG11", "PG12", "PG13", "PG14", "PG15";
                function = "io_disabled";
                drive-strength = <20>;
                bias-disable;
        };

        daudio2_pins_a: daudio2@0 {
                /* I2S_PIN: MCLK, BCLK, LRCK */
                pins = "PB7", "PB5", "PB6";
                function = "i2s2";
                drive-strength = <20>;
                bias-disable;
        };

        daudio2_pins_b: daudio2@1 {
                /* I2S_PIN: DOUT0 */
                pins = "PB4";
                function = "i2s2_dout";
                drive-strength = <20>;
                bias-disable;
        };

        daudio2_pins_c: daudio2@2 {
                /* I2S_PIN: DIN0 */
                pins = "PB3";
                function = "i2s2_din";
                drive-strength = <20>;
                bias-disable;
        };

        daudio2_pins_d: daudio2_sleep@0 {
                pins = "PB7", "PB5", "PB6", "PB4", "PB3";
                function = "io_disabled";
                drive-strength = <20>;
                bias-disable;
        };

        spdif_pins_a: spdif@0 {
                /* SPDIF_PIN: SPDIF_OUT */
                pins = "PB0";
                function = "spdif";
                drive-strength = <20>;
                bias-disable;
        };

        spdif_pins_b: spdif_sleep@0 {
                pins = "PB0";
                function = "io_disabled";
                drive-strength = <20>;
                bias-disable;
        };

        spi0_pins_a: spi0@0 {
                pins = "PC2", "PC4", "PC5","PC7", "PC6"; /*clk mosi miso hold wp*/
                function = "spi0";
                muxsel = <2>;
                drive-strength = <10>;
        };

        spi0_pins_b: spi0@1 {
                pins = "PC3", "PC7", "PC6";
                function = "spi0";
                muxsel = <2>;
                drive-strength = <10>;
                bias-pull-up;   /* only CS should be pulled up */
        };

        spi0_pins_c: spi0@2 {
                pins = "PC2", "PC3", "PC4", "PC5","PC6", "PC7";
                function = "gpio_in";
                muxsel = <0>;
                drive-strength = <10>;
        };

        spi1_pins_a: spi1@0 {
                pins = "PD11", "PD12", "PD13","PD14", "PD15"; /*clk mosi miso hold wp*/
                function = "spi1";
                drive-strength = <10>;
        };

        spi1_pins_b: spi1@1 {
                pins = "PD10";
                function = "spi1";
                drive-strength = <10>;
                bias-pull-up;   // only CS should be pulled up
        };

        spi1_pins_c: spi1@2 {
                pins = "PD10", "PD11", "PD12", "PD13","PD14", "PD15";
                function = "gpio_in";
                drive-strength = <10>;
        };

        ledc_pins_a: ledc@0 {
                pins = "PC0";
                function = "ledc";
                drive-strength = <10>;
        };

        ledc_pins_b: ledc@1 {
                pins = "PC0";
                function = "gpio_in";
        };

        pwm0_pin_a: pwm0@0 {
                pins = "PD16";
                function = "pwm0";
                drive-strength = <10>;
                bias-pull-up;
        };

        pwm0_pin_b: pwm0@1 {
                pins = "PD16";
                function = "gpio_in";
                bias-disable;
        };

        pwm2_pin_a: pwm2@0 {
                pins = "PD18";
                function = "pwm2";
                drive-strength = <10>;
                bias-pull-up;
        };

        pwm2_pin_b: pwm2@1 {
                pins = "PD18";
                function = "gpio_in";
        };

/*
        pwm7_pin_a: pwm7@0 {
                pins = "PD22";
                function = "pwm7";
                drive-strength = <10>;
                bias-pull-up;
        };

        pwm7_pin_b: pwm7@1 {
                pins = "PD22";
                function = "gpio_in";
        };
*/

        s_cir0_pins_a: s_cir@0 {
                pins = "PB12";
                function = "ir";
                drive-strength = <10>;
                bias-pull-up;
        };

        s_cir0_pins_b: s_cir@1 {
                pins = "PB12";
                function = "gpio_in";
        };

        ir1_pins_a: ir1@0 {
                pins = "PB0";
                function = "ir";
                drive-strength = <10>;
                bias-pull-up;
        };

        ir1_pins_b: ir1@1 {
                pins = "PB0";
                function = "gpio_in";
        };
};

&uart0 {
        pinctrl-names = "default", "sleep";
        pinctrl-0 = <&uart0_pins_a>;
        pinctrl-1 = <&uart0_pins_b>;
        status = "okay";
};

&uart1 {
        pinctrl-names = "default", "sleep";
        pinctrl-0 = <&uart1_pins_a>;
        pinctrl-1 = <&uart1_pins_b>;
        status = "okay";
};

&uart2 {
        pinctrl-names = "default", "sleep";
        pinctrl-0 = <&uart2_pins_a>;
        pinctrl-1 = <&uart2_pins_b>;
        status = "disabled";
};

&uart3 {
        /*compatible = "allwinner,sun20iw1-dsp-uart";*/
        pinctrl-names = "default", "sleep";
        pinctrl-0 = <&uart3_pins_a>;
        pinctrl-1 = <&uart3_pins_a>;
        status = "disabled";
};

&soc {
        card0_boot_para@2 {
                /*
                 * Avoid dtc compiling warnings.
                 * @TODO: Developer should modify this to the actual value
                 */
                reg = <0x0 0x2 0x0 0x0>;
                device_type = "card0_boot_para";
                card_ctrl = <0x0>;
                card_high_speed = <0x1>;
                card_line = <0x4>;
                pinctrl-0 = <&sdc0_pins_a>;
        };

        card2_boot_para@3 {
                /*
                 * Avoid dtc compiling warnings.
                 * @TODO: Developer should modify this to the actual value
                 */
                reg = <0x0 0x3 0x0 0x0>;
                device_type = "card2_boot_para";
                card_ctrl = <0x2>;
                card_high_speed = <0x1>;
                card_line = <0x4>;
                pinctrl-0 = <&sdc2_pins_a>;
                /*pinctrl-0 = <&sdc0_pins_a>;*/
                /*sdc_ex_dly_used = <0x2>;*/
                sdc_io_1v8 = <0x1>;
                /*sdc_type = "tm4";*/
                sdc_tm4_hs200_max_freq = <150>;
                sdc_tm4_hs400_max_freq = <100>;
                sdc_ex_dly_used = <2>;
                /*sdc_tm4_win_th = <8>;*/
                /*sdc_dis_host_caps = <0x180>;*/
        };

        rfkill: rfkill@0 {
                compatible    = "allwinner,sunxi-rfkill";
                chip_en;
                power_en;
                status        = "okay";

                wlan: wlan@0 {
                        compatible    = "allwinner,sunxi-wlan";
                        pinctrl-0 = <&wlan_pins_a>;
                        pinctrl-names = "default";
                        clock-names = "32k-fanout1";
                        clocks = <&ccu CLK_FANOUT1_OUT>;
                        wlan_busnum    = <0x1>;
                        wlan_regon    = <&pio PG 12 GPIO_ACTIVE_HIGH>;
                        wlan_hostwake  = <&pio PG 10 GPIO_ACTIVE_HIGH>;
                        /*wlan_power    = "VCC-3V3";*/
                        /*wlan_power_vol = <3300000>;*/
                        /*interrupt-parent = <&pio>;
                        interrupts = < PG 10 IRQ_TYPE_LEVEL_HIGH>;*/
                        wakeup-source;

                };

                bt: bt@0 {
                        compatible    = "allwinner,sunxi-bt";
                        pinctrl-0 = <&wlan_pins_a>;
                        pinctrl-names = "default";
                        clock-names = "32k-fanout1";
                        clocks = <&ccu CLK_FANOUT1_OUT>;
                        /*bt_power_num = <0x01>;*/
                        /*bt_power      = "axp803-dldo1";*/
                        /*bt_io_regulator = "axp803-dldo1";*/
                        /*bt_io_vol = <3300000>;*/
                        /*bt_power_vol = <330000>;*/
                        bt_rst_n      = <&pio PG 18 GPIO_ACTIVE_LOW>;
                        status        = "okay";
                };
        };

        btlpm: btlpm@0 {
                compatible  = "allwinner,sunxi-btlpm";
                uart_index  = <0x1>;
                bt_wake     = <&pio PG 16 GPIO_ACTIVE_HIGH>;
                bt_hostwake = <&pio PG 17 GPIO_ACTIVE_HIGH>;
                status      = "okay";
        };

        addr_mgt: addr_mgt@0 {
                compatible     = "allwinner,sunxi-addr_mgt";
                type_addr_wifi = <0x0>;
                type_addr_bt   = <0x0>;
                type_addr_eth  = <0x0>;
                status         = "okay";
        };
};

&sdc2 {
        non-removable;
        bus-width = <4>;
        mmc-ddr-1_8v;
        mmc-hs200-1_8v;
        no-sdio;
        no-sd;
        ctl-spec-caps = <0x308>;
        cap-mmc-highspeed;
        sunxi-power-save-mode;
        sunxi-dis-signal-vol-sw;
        mmc-bootpart-noacc;
        max-frequency = <150000000>;
        /*vmmc-supply = <&reg_dcdc1>;*/
        /*emmc io vol 3.3v*/
        /*vqmmc-supply = <&reg_aldo1>;*/
        /*emmc io vol 1.8v*/
        /*vqmmc-supply = <&reg_eldo1>;*/
        status = "disabled";
};

&sdc0 {
        bus-width = <4>;
        cd-gpios = <&pio PF 6 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
        /*non-removable;*/
        /*broken-cd;*/
        /*cd-inverted*/;
        /*data3-detect;*/
        /*card-pwr-gpios = <&pio PH 14 1 1 2 0xffffffff>;*/
        cd-used-24M;
        cap-sd-highspeed;
        /*sd-uhs-sdr50;*/
        /*sd-uhs-ddr50;*/
        /*sd-uhs-sdr104;*/
        no-sdio;
        no-mmc;
        sunxi-power-save-mode;
        /*sunxi-dis-signal-vol-sw;*/
        max-frequency = <150000000>;
        ctl-spec-caps = <0x8>;
        /*vmmc-supply = <&reg_dcdc1>;*/
        /*vqmmc33sw-supply = <&reg_dcdc1>;*/
        /*vdmmc33sw-supply = <&reg_dcdc1>;*/
        /*vqmmc18sw-supply = <&reg_eldo1>;*/
        /*vdmmc18sw-supply = <&reg_eldo1>;*/
        status = "okay";
};

&sdc1 {
        bus-width = <4>;
        no-mmc;
        no-sd;
        cap-sd-highspeed;
        /*sd-uhs-sdr12*/
        /*sd-uhs-sdr25;*/
        /*sd-uhs-sdr50;*/
        /*sd-uhs-ddr50;*/
        /*sd-uhs-sdr104;*/
        /*sunxi-power-save-mode;*/
        /*sunxi-dis-signal-vol-sw;*/
        cap-sdio-irq;
        keep-power-in-suspend;
        ignore-pm-notify;
        max-frequency = <150000000>;
        ctl-spec-caps = <0x8>;
        status = "okay";
};


/*
tvd configuration
used                   (create device, 0: do not create device, 1: create device)
agc_auto_enable        (0: agc manual mode,agc_manual_value is valid; 1: agc auto mode)
agc_manual_value       (agc manual value, default value is 64)
cagc_enable            (cagc        0: disable, 1: enable)
fliter_used            (3d fliter   0: disable, 1: enable)
support two PMU power  (tvd_power0, tvd_power1)
support two GPIO power (tvd_gpio0, tvd_gpio1)
NOTICE: If tvd need pmu power or gpio power,params need be configured under [tvd]
tvd_sw                 (the switch of all tvd driver.)
tvd_interface          (0: cvbs, 1: ypbpr,)
tvd_format             (0:TVD_PL_YUV420 , 1: MB_YUV420, 2: TVD_PL_YUV422)
tvd_system             (0:ntsc, 1:pal)
tvd_row                (total row number in multi channel mode 1-2)
tvd_column             (total column number in multi channel mode 1-2)
tvd_channelx_en        (0:disable, 1~4:position in multi channel mode,In single channel
                       mode,mean enable)
tvd_row*tvd_column is the total tvd channel number to be used in multichannel mode
+--------------------+--------------------+
|                    |                    |
|                    |                    |
|         1          |         2          |
|                    |                    |
|                    |                    |
+--------------------+--------------------+
|                    |                    |
|                    |                    |
|         3          |         4          |
|                    |                    |
|                    |                    |
+--------------------+--------------------+
*/

&tvd {
        tvd_sw          = <1>;
        tvd_interface   = <0>;
        tvd_format      = <0>;
        tvd_system      = <1>;
        tvd_row         = <1>;
        tvd_column      = <1>;
        tvd_channel0_en = <1>;
        tvd_channel1_en = <0>;
        tvd_channel2_en = <0>;
        tvd_channel3_en = <0>;
        /*tvd_gpio0 = <&pio PD 22 GPIO_ACTIVE_HIGH>;*/
        /*tvd_gpio1 = <&pio PD 23 GPIO_ACTIVE_HIGH>;*/
        /*tvd_gpio2 = <&pio PD 24 GPIO_ACTIVE_HIGH>;*/
        /*      dc1sw-supply = <&reg_dc1sw>;*/
        /*      eldo3-supply = <&reg_eldo3>;*/
        /*tvd_power0      = "dc1sw"*/
        /*tvd_power1      = "eldo3"*/
};

&tvd0 {
        used                    = <1>;
        agc_auto_enable         = <1>;
        agc_manual_value        = <64>;
        cagc_enable             = <1>;
        fliter_used             = <1>;
};

/* Audio Driver modules */
&sunxi_rpaf_dsp0 {
        status = "okay";
};

/* if audiocodec is used, sdc0 and uart0 should be closed to enable PA. */
&codec {
        /* MIC and headphone gain setting */
        mic1gain        = <0x13>;
        mic2gain        = <0x13>;
        mic3gain        = <0x13>;
        /* ADC/DAC DRC/HPF func enabled */
        /* 0x1:DAP_HP_EN; 0x2:DAP_SPK_EN; 0x3:DAP_HPSPK_EN */
        adcdrc_cfg      = <0x0>;
        adchpf_cfg      = <0x1>;
        dacdrc_cfg      = <0x0>;
        dachpf_cfg      = <0x0>;
        /* Volume about */
        digital_vol     = <0x00>;
        lineout_vol     = <0x1a>;
        headphonegain   = <0x03>;
        /* Pa enabled about */
        pa_level        = <0x01>;
        pa_pwr_level    = <0x01>;
        pa_msleep_time  = <0x78>;
        /* gpio-spk     = <&pio PF 2 GPIO_ACTIVE_HIGH>; */
        /* gpio-spk-pwr = <&pio PF 4 GPIO_ACTIVE_HIGH>; */
        /* regulator about */
        /* avcc-supply  = <&reg_aldo1>; */
        /* hpvcc-supply = <&reg_eldo1>; */
        status = "okay";
};

&sndcodec {
        hp_detect_case  = <0x01>;
        jack_enable     = <0x01>;
        status = "okay";
};

&dummy_cpudai {
        /* CMA config about */
        playback_cma    = <128>;
        capture_cma     = <256>;
        status = "okay";
};

&dmic {
        pinctrl-names   = "default","sleep";
        pinctrl-0       = <&dmic_pins_a>;
        pinctrl-1       = <&dmic_pins_b>;
        status = "okay";
};

&sounddmic {
        status = "okay";
};

&dmic_codec {
        status = "okay";
};

/*-----------------------------------------------------------------------------
 * pcm_lrck_period      16/32/64/128/256
 *                      (set 0x20 for HDMI audio out)
 * slot_width_select    16bits/20bits/24bits/32bits
 *                      (set 0x20 for HDMI audio out)
 * frametype            0 --> short frame = 1 clock width;
 *                      1 --> long frame = 2 clock width;
 * tdm_config           0 --> pcm
 *                      1 --> i2s
 *                      (set 0x01 for HDMI audio out)
 * mclk_div             0 --> not output
 *                      1/2/4/6/8/12/16/24/32/48/64/96/128/176/192
 *                      (set mclk as external codec clk source, freq is pll_audio/mclk_div)
 * pinctrl_used         0 --> I2S/PCM use for internal (e.g. HDMI)
 *                      1 --> I2S/PCM use for external audio
 * daudio_type:         0 --> external audio type
 *                      1 --> HDMI audio type
 *---------------------------------------------------------------------------*/
&daudio0 {
        mclk_div        = <0x01>;
        frametype       = <0x00>;
        tdm_config      = <0x01>;
        sign_extend     = <0x00>;
        msb_lsb_first   = <0x00>;
        pcm_lrck_period = <0x80>;
        slot_width_select = <0x20>;
        pinctrl-names   = "default", "sleep";
        pinctrl-0       = <&daudio0_pins_a>;
        pinctrl-1       = <&daudio0_pins_b>;
        pinctrl_used    = <0x0>;
        status = "disabled";
};

/*-----------------------------------------------------------------------------
 * simple-audio-card,name       name of sound card, e.g.
 *                              "snddaudio0" --> use for external audio
 *                              "sndhdmi" --> use for HDMI audio
 * sound-dai                    "snd-soc-dummy" --> use for I2S
 *                              "hdmiaudio" --> use for HDMI audio
 *                              "ac108" --> use for external audio of ac108
 *---------------------------------------------------------------------------*/
&sounddaudio0 {
        /* simple-audio-card,format = "i2s"; */
        /* simple-audio-card,frame-master = <&daudio0_master>; */
        /* simple-audio-card,bitclock-master = <&daudio0_master>; */
        /* simple-audio-card,bitclock-inversion; */
        /* simple-audio-card,frame-inversion; */
        status = "disabled";
        daudio0_master: simple-audio-card,codec {
                /* sound-dai = <&ac108>; */
        };
};

&daudio1 {
        mclk_div        = <0x01>;
        frametype       = <0x00>;
        tdm_config      = <0x01>;
        sign_extend     = <0x00>;
        msb_lsb_first   = <0x00>;
        pcm_lrck_period = <0x80>;
        slot_width_select = <0x20>;
        pinctrl-names   = "default", "sleep";
        pinctrl-0       = <&daudio1_pins_a>;
        pinctrl-1       = <&daudio1_pins_b>;
        pinctrl_used    = <0x0>;
        status = "disabled";
};

&sounddaudio1 {
        status = "disabled";
        daudio1_master: simple-audio-card,codec {
                /* sound-dai = <&ac108>; */
        };
};

&daudio2 {
        mclk_div        = <0x00>;
        frametype       = <0x00>;
        tdm_config      = <0x01>;
        sign_extend     = <0x00>;
        tx_data_mode    = <0x00>;
        rx_data_mode    = <0x00>;
        msb_lsb_first   = <0x00>;
        pcm_lrck_period = <0x20>;
        slot_width_select = <0x20>;
        asrc_function_en  = <0x00>;
        pinctrl-names   = "default", "sleep";
        /*pinctrl-0       = <&daudio2_pins_a &daudio2_pins_b &daudio2_pins_c>;*/
        /*pinctrl-1       = <&daudio2_pins_d>;*/
        /* HDMI audio, no need pin */
        pinctrl-0;
        pinctrl-1;
        pinctrl_used    = <0x0>;
        daudio_type     = <0x1>;
        status = "okay";
};

/* if HDMI audio is used, daudio2 should be enable. */
&hdmiaudio {
        status = "okay";
};

&sounddaudio2 {
        status = "okay";
        simple-audio-card,name = "sndhdmi";
        daudio2_master: simple-audio-card,codec {
                sound-dai = <&hdmiaudio>;
        };
};

&spdif {
        pinctrl-names   = "default","sleep";
        pinctrl-0       = <&spdif_pins_a>;
        pinctrl-1       = <&spdif_pins_b>;
        status = "disabled";
};

&soundspdif {
        status = "disabled";
};

/*
 *usb_port_type: usb mode. 0-device, 1-host, 2-otg.
 *usb_detect_type: usb hotplug detect mode. 0-none, 1-vbus/id detect, 2-id/dpdm detect.
 *usb_detect_mode: 0-thread scan, 1-id gpio interrupt.
 *usb_id_gpio: gpio for id detect.
 *usb_det_vbus_gpio: gpio for id detect. gpio or "axp_ctrl";
 *usb_wakeup_suspend:0-SUPER_STANDBY, 1-USB_STANDBY.
 */
&usbc0 {
        device_type = "usbc0";
        usb_port_type = <0x2>;
        usb_detect_type = <0x1>;
        usb_detect_mode = <0>;
        usb_id_gpio = <&pio PD 21 GPIO_ACTIVE_HIGH>;
        enable-active-high;
        usb_det_vbus_gpio = <&pio PD 20 GPIO_ACTIVE_HIGH>;
        usb_wakeup_suspend = <0>;
        usb_serial_unique = <0>;
        usb_serial_number = "20080411";
        rndis_wceis = <1>;
        status = "okay";
};

&ehci0 {
        drvvbus-supply = <&reg_usb1_vbus>;
};

&ohci0 {
        drvvbus-supply = <&reg_usb1_vbus>;
};

&usbc1 {
        device_type = "usbc1";
        usb_regulator_io = "nocare";
        usb_wakeup_suspend = <0>;
        status = "okay";
};

&ehci1 {
        status = "okay";
};

&ohci1 {
        status = "okay";
};

&twi0 {
        clock-frequency = <400000>;
        pinctrl-0 = <&twi0_pins_a>;
        pinctrl-1 = <&twi0_pins_b>;
        pinctrl-names = "default", "sleep";
        status = "disabled";

        eeprom@50 {
                compatible = "atmel,24c16";
                reg = <0x50>;
                status = "disabled";
        };
};

&twi1 {
        clock-frequency = <400000>;
        pinctrl-0 = <&twi1_pins_a>;
        pinctrl-1 = <&twi1_pins_b>;
        pinctrl-names = "default", "sleep";
        status = "disabled";
};

&twi2 {
        clock-frequency = <400000>;
        pinctrl-0 = <&twi2_pins_a>;
        pinctrl-1 = <&twi2_pins_b>;
        pinctrl-names = "default", "sleep";
        dmas = <&dma 45>, <&dma 45>;
        dma-names = "tx", "rx";
        status = "okay";

        /* pcf8574-usage:
         * only use gpio0~7, 0 means PP0.
         * pin set:
         * gpios = <&pcf8574 0 GPIO_ACTIVE_LOW>;
         * interrupt set:
         * interrupt-parent = <&pcf8574>;
         * interrupts = <0 IRQ_TYPE_EDGE_FALLING>;
         */
        pcf8574: gpio@38 {
                compatible = "nxp,pcf8574";
                reg = <0x38>;
                gpio_base = <2020>;
                gpio-controller;
                #gpio-cells = <2>;
                interrupt-controller;
                #interrupt-cells = <2>;
                interrupt-parent = <&pio>;
                interrupts = <PB 2 IRQ_TYPE_EDGE_FALLING>;
                status = "okay";
        };

        ctp@14 {
                compatible = "allwinner,goodix";
                device_type = "ctp";
                reg = <0x14>;
                status = "disabled";
                ctp_name = "gt9xxnew_ts";
                ctp_twi_id = <0x2>;
                ctp_twi_addr = <0x14>;
                ctp_screen_max_x = <0x320>;
                ctp_screen_max_y = <0x500>;
                ctp_revert_x_flag = <0x0>;
                ctp_revert_y_flag = <0x0>;
                ctp_exchange_x_y_flag = <0x0>;
                ctp_int_port = <&pio PG 14 GPIO_ACTIVE_HIGH>;
                ctp_wakeup = <&pio PG 15 GPIO_ACTIVE_HIGH>;
        };
};

&twi3 {
        clock-frequency = <400000>;
        pinctrl-0 = <&twi3_pins_a>;
        pinctrl-1 = <&twi3_pins_b>;
        pinctrl-names = "default", "sleep";
        status = "disabled";
};

&gmac0 {
        phy-mode = "rgmii";
        use_ephy25m = <1>;
        pinctrl-0 = <&gmac_pins_a>;
        pinctrl-1 = <&gmac_pins_b>;
        pinctrl-names = "default", "sleep";
        phy-rst = <&pio PE 16 GPIO_ACTIVE_HIGH>;
        tx-delay = <3>; /*2~4*/
        rx-delay = <0>;
        status = "disable";
};

&spi0 {
        clock-frequency = <100000000>;
        pinctrl-0 = <&spi0_pins_a &spi0_pins_b>;
        pinctrl-1 = <&spi0_pins_c>;
        pinctrl-names = "default", "sleep";
        /*spi-supply = <&reg_dcdc1>;*/
        spi_slave_mode = <0>;
        spi0_cs_number = <1>;
        spi0_cs_bitmap = <1>;
        status = "disabled";

        spi-nand@0 {
                compatible = "spi-nand";
                spi-max-frequency=<0x5F5E100>;
                reg = <0x0>;
                spi-rx-bus-width=<0x04>;
                spi-tx-bus-width=<0x04>;
                status="disabled";
        };
};

&spi1 {
        clock-frequency = <100000000>;
        pinctrl-0 = <&spi1_pins_a &spi1_pins_b>;
        pinctrl-1 = <&spi1_pins_c>;
        pinctrl-names = "default", "sleep";
        spi_slave_mode = <0>;
        status = "disabled";

        spi_board1@0 {
                device_type = "spi_board1";
                compatible = "rohm,dh2228fv";
                spi-max-frequency = <0x5f5e100>;
                reg = <0x0>;
                spi-rx-bus-width = <0x4>;
                spi-tx-bus-width = <0x4>;
                status = "disabled";
        };
};

&ledc {
        pinctrl-names = "default", "sleep";
        pinctrl-0 = <&ledc_pins_a>;
        pinctrl-1 = <&ledc_pins_b>;
        led_count = <12>;
        output_mode = "GRB";
        reset_ns = <84>;
        t1h_ns = <800>;
        t1l_ns = <320>;
        t0h_ns = <300>;
        t0l_ns = <800>;
        wait_time0_ns = <84>;
        wait_time1_ns = <84>;
        wait_data_time_ns = <600000>;
        status  = "okay";
};

&keyboard0 {
        key0 = <210 0x160>;
        wakeup-source;
        status = "okay";
};

/*----------------------------------------------------------------------------------
disp init configuration

disp_mode             (0:screen0<screen0,fb0>)
screenx_output_type   (0:none; 1:lcd; 2:tv; 3:hdmi;5:vdpo)
screenx_output_mode   (used for hdmi output, 0:480i 1:576i 2:480p 3:576p 4:720p50)
                      (5:720p60 6:1080i50 7:1080i60 8:1080p24 9:1080p50 10:1080p60)
screenx_output_format (for hdmi, 0:RGB 1:yuv444 2:yuv422 3:yuv420)
screenx_output_bits   (for hdmi, 0:8bit 1:10bit 2:12bit 2:16bit)
screenx_output_eotf   (for hdmi, 0:reserve 4:SDR 16:HDR10 18:HLG)
screenx_output_cs     (for hdmi, 0:undefined  257:BT709 260:BT601  263:BT2020)
screenx_output_dvi_hdmi (for hdmi, 0:undefined 1:dvi mode 2:hdmi mode)
screen0_output_range   (for hdmi, 0:default 1:full 2:limited)
screen0_output_scan    (for hdmi, 0:no data 1:overscan 2:underscan)
screen0_output_aspect_ratio  (for hdmi, 8-same as original picture 9-4:3 10-16:9 11-14:9)
fbx format            (4:RGB655 5:RGB565 6:RGB556 7:ARGB1555 8:RGBA5551 9:RGB888 10:ARGB8888 12:ARGB4444)
fbx pixel sequence    (0:ARGB 1:BGRA 2:ABGR 3:RGBA)
fb0_scaler_mode_enable(scaler mode enable, used FE)
fbx_width,fbx_height  (framebuffer horizontal/vertical pixels, fix to output resolution while equal 0)
lcdx_backlight        (lcd init backlight,the range:[0,256],default:197
lcdx_yy               (lcd init screen bright/contrast/saturation/hue, value:0~100, default:50/50/57/50)
lcd0_contrast         (LCD contrast, 0~100)
lcd0_saturation       (LCD saturation, 0~100)
lcd0_hue              (LCD hue, 0~100)
framebuffer software rotation setting:
disp_rotation_used:   (0:disable; 1:enable,you must set fbX_width to lcd_y,
set fbX_height to lcd_x)
degreeX:              (X:screen index; 0:0 degree; 1:90 degree; 3:270 degree)
degreeX_Y:            (X:screen index; Y:layer index 0~15; 0:0 degree; 1:90 degree; 3:270 degree)
devX_output_type : config output type in bootGUI framework in UBOOT-2018.
                                   (0:none; 1:lcd; 2:tv; 4:hdmi;)
devX_output_mode : config output resolution(see include/video/sunxi_display2.h) of bootGUI framework in UBOOT-2018
devX_screen_id   : config display index of bootGUI framework in UBOOT-2018
devX_do_hpd      : whether do hpd detectation or not in UBOOT-2018
chn_cfg_mode     : Hardware DE channel allocation config. 0:single display with 6
                                   channel, 1:dual display with 4 channel in main display and 2 channel in second
                   display, 2:dual display with 3 channel in main display and 3 channel in second
                   in display.
----------------------------------------------------------------------------------*/
&disp {
        disp_init_enable         = <1>;
        disp_mode                = <0>;

        screen0_output_type      = <1>;
        screen0_output_mode      = <4>;

        screen1_output_type      = <3>;
        screen1_output_mode      = <10>;

        screen1_output_format    = <0>;
        screen1_output_bits      = <0>;
        screen1_output_eotf      = <4>;
        screen1_output_cs        = <257>;
        screen1_output_dvi_hdmi  = <2>;
        screen1_output_range     = <2>;
        screen1_output_scan      = <0>;
        screen1_output_aspect_ratio = <8>;

        dev0_output_type         = <1>;
        dev0_output_mode         = <4>;
        dev0_screen_id           = <0>;
        dev0_do_hpd              = <0>;

        dev1_output_type         = <4>;
        dev1_output_mode         = <10>;
        dev1_screen_id           = <1>;
        dev1_do_hpd              = <1>;

        def_output_dev           = <0>;
        hdmi_mode_check          = <1>;

        fb0_format               = <0>;
        fb0_width                = <0>;
        fb0_height               = <0>;

        fb1_format               = <0>;
        fb1_width                = <0>;
        fb1_height               = <0>;
        chn_cfg_mode             = <1>;

        disp_para_zone           = <1>;
        /*VCC-LCD*/
/*      dc1sw-supply = <&reg_dc1sw>;*/
        /*VCC-DSI*/
/*      eldo3-supply = <&reg_eldo3>;*/
        /*VCC-PD*/
/*      dcdc1-supply = <&reg_dcdc1>;*/
};

/*----------------------------------------------------------------------------------
;lcd0 configuration

;lcd_if:               0:hv(sync+de); 1:8080; 2:ttl; 3:lvds; 4:dsi; 5:edp; 6:extend dsi
;lcd_hv_if             0:Parallel RGB; 8:Serial RGB; 10:Dummy RGB; 11: RGB Dummy;12:CCIR656
;lcd_hv_clk_phase      0:0 degree;1:90 degree;2:180 degree;3:270 degree
;lcd_hv_sync_polarity  0:vs low,hs low; 1:vs high,hslow; 2:vs low,hs high; 3:vs high,hs high
;lcd_hv_syuv_seq       0:YUYV; 1:YVYU; 2:UYVY; 3:VYUY
;lcd_cpu_if            0:18bit/1 cycle parallel(RGB666); 4:16bit/1cycle parallel (RGB565)
;                      6:18bit/3 cycle parallel(RGB666); 7:16bit/2cycle parallel (RGB565)
;lcd_cpu_te            0:frame auto trigger; 1:frame triggered by te rising edge; 2:frame triggered by te falling edge;
;lcd_dsi_if            0:video mode; 1: Command mode; 2:video burst mode
;lcd_dsi_te            0:frame auto trigger; 1:frame triggered by te rising edge; 2:frame triggered by te falling edge;
;lcd_x:                lcd horizontal resolution
;lcd_y:                lcd vertical resolution
;lcd_width:            width of lcd in mm
;lcd_height:           height of lcd in mm
;lcd_dclk_freq:        in MHZ unit
;lcd_pwm_freq:         in HZ unit
;lcd_pwm_pol:          lcd backlight PWM polarity
;lcd_pwm_max_limit     lcd backlight PWM max limit(<=255)
;lcd_hbp:              hsync back porch(pixel) + hsync plus width(pixel);
;lcd_ht:               hsync total cycle(pixel)
;lcd_vbp:              vsync back porch(line) + vysnc plus width(line)
;lcd_vt:               vysnc total cycle(line)
;lcd_hspw:             hsync plus width(pixel)
;lcd_vspw:             vysnc plus width(pixel)
;lcd_lvds_if:          0:single link;  1:dual link
;lcd_lvds_colordepth:  0:8bit; 1:6bit
;lcd_lvds_mode:        0:NS mode; 1:JEIDA mode
;lcd_frm:              0:disable; 1:enable rgb666 dither; 2:enable rgb656 dither
;lcd_io_phase:         0:noraml; 1:intert phase(0~3bit: vsync phase; 4~7bit:hsync phase;
;                      8~11bit:dclk phase; 12~15bit:de phase)
;lcd_gamma_en          lcd gamma correction enable
;lcd_bright_curve_en   lcd bright curve correction enable
;lcd_cmap_en           lcd color map function enable
;deu_mode              0:smoll lcd screen; 1:large lcd screen(larger than 10inch)
;lcdgamma4iep:         Smart Backlight parameter, lcd gamma vale * 10;
;                      decrease it while lcd is not bright enough; increase while lcd is too bright
;smart_color           90:normal lcd screen 65:retina lcd screen(9.7inch)
;Pin setting for special function ie.LVDS, RGB data or vsync
;   name(donot care) = port:PD12<pin function><pull up or pull down><drive ability><output level>
;Pin setting for gpio:
;   lcd_gpio_X     = port:PD12<pin function><pull up or pull down><drive ability><output level>
;Pin setting for backlight enable pin
;   lcd_bl_en     = port:PD12<pin function><pull up or pull down><drive ability><output level>
;fsync setting, pulse to csi
;lcd_fsync_en          (0:disable fsync,1:enable)
;lcd_fsync_act_time    (active time of fsync, unit:pixel)
;lcd_fsync_dis_time    (disactive time of fsync, unit:pixel)
;lcd_fsync_pol         (0:positive;1:negative)
;gpio config: <&pio for cpu or &r_pio for cpus, port, port num, pio function,
pull up or pull down(default 0), driver level(default 1), data>
;For dual link lvds: use lvds2link_pins_a  and lvds2link_pins_b instead
;For rgb24: use rgb24_pins_a  and rgb24_pins_b instead
;For lvds1: use lvds1_pins_a  and lvds1_pins_b instead
;For lvds0: use lvds0_pins_a  and lvds0_pins_b instead
;----------------------------------------------------------------------------------*/
&lcd0 {
        lcd_used            = <1>;

        lcd_driver_name     = "tft08006";
        lcd_backlight       = <100>;
        lcd_if              = <4>;

        lcd_x               = <800>;
        lcd_y               = <1280>;
        lcd_width           = <52>;
        lcd_height          = <52>;
        lcd_dclk_freq       = <70>;

        lcd_pwm_used        = <1>;
        lcd_pwm_ch          = <2>;
        lcd_pwm_freq        = <1000>;
        lcd_pwm_pol         = <0>;
        lcd_pwm_max_limit   = <255>;

        lcd_hbp             = <32>;
        lcd_ht              = <868>;
        lcd_hspw            = <4>;
        lcd_vbp             = <12>;
        lcd_vt              = <1311>;
        lcd_vspw            = <4>;

        lcd_dsi_if          = <0>;
        lcd_dsi_lane        = <4>;
        lcd_lvds_if         = <0>;
        lcd_lvds_colordepth = <0>;
        lcd_lvds_mode       = <0>;
        lcd_frm             = <0>;
        lcd_hv_clk_phase    = <0>;
        lcd_hv_sync_polarity= <0>;
        lcd_io_phase        = <0x0000>;
        lcd_gamma_en        = <0>;
        lcd_bright_curve_en = <0>;
        lcd_cmap_en         = <0>;
        lcd_fsync_en        = <0>;
        lcd_fsync_act_time  = <1000>;
        lcd_fsync_dis_time  = <1000>;
        lcd_fsync_pol       = <0>;

        deu_mode            = <0>;
        lcdgamma4iep        = <22>;
        smart_color         = <90>;

        lcd_gpio_0 =  <&pio PG 13 GPIO_ACTIVE_HIGH>;
        pinctrl-0 = <&dsi4lane_pins_a>;
        pinctrl-1 = <&dsi4lane_pins_b>;
};

&hdmi {
        hdmi_used = <1>;
        hdmi_power_cnt = <0>;
        hdmi_cts_compatibility = <1>;
        hdmi_hdcp_enable = <1>;
        hdmi_hdcp22_enable = <0>;
        hdmi_cec_support = <1>;
        hdmi_cec_super_standby = <0>;

        ddc_en_io_ctrl = <0>;
        power_io_ctrl = <0>;
};

&pwm0 {
        pinctrl-names = "active", "sleep";
        pinctrl-0 = <&pwm0_pin_a>;
        pinctrl-1 = <&pwm0_pin_b>;
        status = "okay";
};

&pwm2 {
        pinctrl-names = "active", "sleep";
        pinctrl-0 = <&pwm2_pin_a>;
        pinctrl-1 = <&pwm2_pin_b>;
        status = "okay";
};
/*
&pwm7 {
        pinctrl-names = "active", "sleep";
        pinctrl-0 = <&pwm7_pin_a>;
        pinctrl-1 = <&pwm7_pin_b>;
        status = "okay";
};
*/

&rtp {
        allwinner,tp-sensitive-adjust = <0xf>;
        allwinner,filter-type = <0x1>;
        allwinner,ts-attached;
        status = "disabled";
};

&gpadc {
        channel_num = <2>;
        channel_select = <3>;
        channel_data_select = <3>;
        channel_compare_select = <3>;
        channel_cld_select = <3>;
        channel_chd_select = <3>;
        channel0_compare_lowdata = <1700000>;
        channel0_compare_higdata = <1200000>;
        channel1_compare_lowdata = <460000>;
        channel1_compare_higdata = <1200000>;
        status = "disabled";
};

&s_cir0 {
        pinctrl-names = "default", "sleep";
        pinctrl-0 = <&s_cir0_pins_a>;
        pinctrl-1 = <&s_cir0_pins_b>;
        status = "disabled";
};

&ir1 {
        pinctrl-names = "default", "sleep";
        pinctrl-0 = <&ir1_pins_a>;
        pinctrl-1 = <&ir1_pins_b>;
        status = "disabled";
};

用烧卡工具烧到TF卡启动:
QQ图片20210902184833.png

固件下载: tina_d1-nezha_uart0_f133_nolcd.7z

LCD 还没有测试。

#66 Re: 全志 SOC » F133 跑 D1 的Tina Linux挂了,这是什么情况? » 2021-09-02 17:05:22

X3

屏蔽 /*cd-inverted;*/ 切换cd引脚逻辑

或者无需检测cd引脚:
        /*cd-gpios = <&pio PF 6 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
        /*non-removable;*/
        broken-cd;

&sdc0 {
        bus-width = <4>;
        cd-gpios = <&pio PF 6 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
        /*non-removable;*/
        /*broken-cd;*/
        /*cd-inverted;*/
        /*data3-detect;*/
        /*card-pwr-gpios = <&pio PH 14 1 1 2 0xffffffff>;*/
        cd-used-24M;
        cap-sd-highspeed;
        /*sd-uhs-sdr50;*/
        /*sd-uhs-ddr50;*/
        /*sd-uhs-sdr104;*/
        no-sdio;
        no-mmc;
        sunxi-power-save-mode;
        /*sunxi-dis-signal-vol-sw;*/
        max-frequency = <150000000>;
        ctl-spec-caps = <0x8>;
        /*vmmc-supply = <&reg_dcdc1>;*/
        /*vqmmc33sw-supply = <&reg_dcdc1>;*/
        /*vdmmc33sw-supply = <&reg_dcdc1>;*/
        /*vqmmc18sw-supply = <&reg_eldo1>;*/
        /*vdmmc18sw-supply = <&reg_eldo1>;*/
        status = "okay";
};

这样,就能顺利启动了:

root@TinaLinux:/#
root@TinaLinux:/#
root@TinaLinux:/# cat /proc/interrupts
           CPU0
  1:          0  SiFive PLIC  77  sunxikbd
  4:          0  SiFive PLIC  80  2010000.iommu
  6:          0  SiFive PLIC  82  cedar_dev
  8:          0  SiFive PLIC 160  7090000.rtc
 18:        260  SiFive PLIC  18  uart0
 26:          0  SiFive PLIC 102  3003000.msgbox
 27:          2  SiFive PLIC  27  twi2
 29:          0  SiFive PLIC 105  5410000.g2d
 32:     101832  SiFive PLIC 108  dispaly
 36:          0  SiFive PLIC  36  ledcirq
 41:          1  SiFive PLIC  41  audio jack irq
 49:          0  SiFive PLIC  49  ehci_hcd:usb1
 50:          0  SiFive PLIC  50  ohci_hcd:usb2
 56:       2057  SiFive PLIC  56  mmc0
 57:         62  SiFive PLIC  57  mmc1
 64:          0  SiFive PLIC 140  3003000.msgbox
 66:        389  SiFive PLIC  66  3002000.dma-controller
 70:          0  SiFive PLIC 144  3003000.msgbox
 75:          0  SiFive PLIC  75  timer@2050000
root@TinaLinux:/#
root@TinaLinux:/#
root@TinaLinux:/#
root@TinaLinux:/# cat /proc/meminfo
MemTotal:          50600 kB
MemFree:           10944 kB
MemAvailable:      25120 kB
Buffers:            5188 kB
Cached:             8908 kB
SwapCached:            0 kB
Active:            12464 kB
Inactive:           4476 kB
Active(anon):       2860 kB
Inactive(anon):       28 kB
Active(file):       9604 kB
Inactive(file):     4448 kB
Unevictable:           0 kB
Mlocked:               0 kB
SwapTotal:             0 kB
SwapFree:              0 kB
Dirty:                 0 kB
Writeback:             0 kB
AnonPages:          2892 kB
Mapped:             3396 kB
Shmem:                44 kB
KReclaimable:       3708 kB
Slab:              14092 kB
SReclaimable:       3708 kB
SUnreclaim:        10384 kB
KernelStack:         944 kB
PageTables:          304 kB
NFS_Unstable:          0 kB
Bounce:                0 kB
WritebackTmp:          0 kB
CommitLimit:       25300 kB
Committed_AS:      56192 kB
VmallocTotal:   67108863 kB
VmallocUsed:        2340 kB
VmallocChunk:          0 kB
Percpu:               32 kB
CmaTotal:           8192 kB
CmaFree:            5388 kB
root@TinaLinux:/#
root@TinaLinux:/#
root@TinaLinux:/# top
Mem: 39616K used, 10984K free, 44K shrd, 5188K buff, 8912K cached
CPU:   0% usr   9% sys   0% nic  90% idle   0% io   0% irq   0% sirq
Load average: 1.09 1.03 0.85 1/59 758
  PID  PPID USER     STAT   VSZ %VSZ %CPU COMMAND
  758   120 root     R     2620   5%   5% top
  663     1 root     S     1496   3%   5% /sbin/swupdate-progress -w
  270     1 root     S     217m 440%   0% /bin/adbd -D
  704     1 root     S    85548 169%   0% tt
  644     1 root     S     9820  19%   0% /usr/sbin/MtpDaemon -D
  145   140 root     S     5260  10%   0% /usr/bin/lvgl_demo
  695     1 root     S<    2708   5%   0% /usr/sbin/ntpd -n -N -S /usr/sbin/ntpd
  120     1 root     S     2684   5%   0% /bin/ash --login
  140     1 root     S     2620   5%   0% {S99lvgldemo} /bin/sh /etc/rc.common /
  261     1 root     S     2096   4%   0% /usr/sbin/dbus-daemon --system
    1     0 root     S     2092   4%   0% /sbin/procd
  622     1 root     S     1760   3%   0% /sbin/netifd
  108     1 root     S     1660   3%   0% /sbin/ubusd
  121     1 root     S     1624   3%   0% /sbin/askfirst /bin/ash --login
   10     2 root     IW       0   0%   0% [rcu_preempt]
   63     2 root     SW       0   0%   0% [cec thread]
   13     2 root     IW       0   0%   0% [kworker/0:1-eve]
   62     2 root     SW       0   0%   0% [hdmi proc]
  750     2 root     IW       0   0%   0% [kworker/0:2-eve]
  58     2 root     IW<      0   0%   0% [kworker/0:1H-kb]

#67 Re: 全志 SOC » F133 跑 D1 的Tina Linux挂了,这是什么情况? » 2021-09-02 16:03:11

X3

感谢楼上的朋友,board.dts 屏蔽了 gmac,然后这样了:

[85]HELLO! BOOT0 is starting!
[88]BOOT0 commit : 27369ab
[91]set pll start
[93]periph0 has been enabled
[95]set pll end
[97][pmu]: bus read error
[99]board init ok
[101]ZQ value = 0x32***********
[104]get_pmu_exist() = -1
[107]ddr_efuse_type: 0x0
[109][AUTO DEBUG] single rank and full DQ!
[113]ddr_efuse_type: 0x0
[116][AUTO DEBUG] rank 0 row = 13
[119][AUTO DEBUG] rank 0 bank = 4
[123][AUTO DEBUG] rank 0 page size = 2 KB
[126]DRAM BOOT DRIVE INFO: V0.24
[129]DRAM CLK = 528 MHz
[132]DRAM Type = 2 (2:DDR2,3:DDR3)
[135]DRAMC read ODT  off.
[137]DRAM ODT off.
[139]ddr_efuse_type: 0x0
[142]DRAM SIZE =64 M
[146]DRAM simple test OK.
[148]dram size =64
[150]card no is 0
[152]sdcard 0 line count 4
[154][mmc]: mmc driver ver 2021-04-2 16:45
[163][mmc]: Wrong media type 0x0
[166][mmc]: ***Try SD card 0***
[179][mmc]: HSSDR52/SDR25 4 bit
[182][mmc]: 50000000 Hz
[184][mmc]: 1876 MB
[186][mmc]: ***SD/MMC 0 init OK!!!***
[243]Loading boot-pkg Succeed(index=0).
[247]Entry_name        = opensbi
[250]Entry_name        = u-boot
[254]Entry_name        = dtb
[256]mmc not para
[258]Jump to second Boot.

OpenSBI v0.6
   ____                    _____ ____ _____
  / __ \                  / ____|  _ \_   _|
 | |  | |_ __   ___ _ __ | (___ | |_) || |
 | |  | | '_ \ / _ \ '_ \ \___ \|  _ < | |
 | |__| | |_) |  __/ | | |____) | |_) || |_
  \____/| .__/ \___|_| |_|_____/|____/_____|
        | |
        |_|

Platform Name          : T-HEAD Xuantie Platform
Platform HART Features : RV64ACDFIMSUVX
Platform Max HARTs     : 1
Current Hart           : 0
Firmware Base          : 0x40000400
Firmware Size          : 75 KB
Runtime SBI Version    : 0.2

MIDELEG : 0x0000000000000222
MEDELEG : 0x000000000000b1ff
PMP0    : 0x0000000040000000-0x000000004001ffff (A)
PMP1    : 0x0000000040000000-0x000000007fffffff (A,R,W,X)
PMP2    : 0x0000000080000000-0x00000000bfffffff (A,R,W,X)
PMP3    : 0x0000000000020000-0x0000000000027fff (A,▒

U-Boot 2018.05-g0a88ac9-dirty (Sep 02 2021 - 15:47:05 +0800) Allwinner Technology

[00.341]DRAM:  64 MiB
[00.343]Relocation Offset is: 01ef0000
[00.348]secure enable bit: 0
[00.350]CPU=1008 MHz,PLL6=600 Mhz,AHB=200 Mhz, APB1=100Mhz  MBus=300Mhz
[00.357]flash init start
[00.359]workmode = 0,storage type = 1
[00.362][mmc]: mmc driver ver uboot2018:2021-04-16 14:23:00-1
[00.368][mmc]: get sdc_type fail and use default host:tm1.
[00.374][mmc]: can't find node "mmc0",will add new node
[00.379][mmc]: fdt err returned <no error>
[00.383][mmc]: Using default timing para
[00.386][mmc]: SUNXI SDMMC Controller Version:0x50310
[00.407][mmc]: card_caps:0x3000000a
[00.410][mmc]: host_caps:0x3000003f
[00.415]sunxi flash init ok
[00.417]line:714 init_clocks
__clk_init: clk pll_periph0x2 already initialized
register fix_factor clk error
[00.427]drv_disp_init
request pwm success, pwm2:pwm2:0x2000c00.
[00.444]drv_disp_init finish
[00.447]boot_gui_init:start
[00.450]set disp.dev2_output_type fail. using defval=0
[00.641]boot_gui_init:finish
sunxi_partition_get_partno_byname: try part 1, ret = 0
sunxi_partition_get_partno_byname: try part 2, ret = 0
sunxi_partition_get_partno_byname: try part 3, ret = 0
sunxi_partition_get_partno_byname: try part 4, ret = 0
sunxi_partition_get_partno_byname: try part 5, ret = 0
sunxi_partition_get_partno_byname: try part 6, ret = 0
sunxi_partition_get_partno_byname: try part 7, ret = 0
sunxi_partition_get_partno_byname: try part 8, ret = 0
sunxi_partition_get_partno_byname: try part 9, ret = -1
partno erro : can't find partition bootloader
sunxi_partition_get_partno_byname: try part 1, ret = 0
54 bytes read [01.053]LCD open finish
in 3 ms (17.6 KiB/s)
[01.057]bmp_name=bootlogo.bmp size 307254
307254 bytes read in 20 ms (14.7 MiB/s)
[01.100]Loading Environment from SUNXI_FLASH... OK
[01.123]out of usb burn from boot: not need burn key
root_partition is rootfs
set root to /dev/mmcblk0p5
[01.133]update part info
[01.136]update bootcmd
[01.140]change working_fdt 0x42aafda8 to 0x42a8fda8
[01.161]update dts
Hit any key to stop autoboot:  0
Android's image name: d1-nezha
No reserved memory region found in source FDT
[01.647]
Starting kernel ...

[01.649][mmc]: MMC Device 2 not found
[01.653][mmc]: mmc 2 not find, so not exit
[    0.000000] OF: fdt: Ignoring memory range 0x40000000 - 0x40200000
[    0.000000] Linux version 5.4.61 (cube@ubuntu) (riscv64-unknown-linux-gnu-gcc (C-SKY RISCV Tools V1.8.4 B20200702) 8.1.0, GNU ld (GNU Binutils) 2.32) #41 PREEMPT Thu Sep 2 07:48:48 UTC 2021
[    0.000000] cma: Reserved 8 MiB at 0x0000000043800000
[    0.000000] Zone ranges:
[    0.000000]   DMA32    [mem 0x0000000040200000-0x0000000043ffffff]
[    0.000000]   Normal   empty
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000040200000-0x0000000043ffffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000040200000-0x0000000043ffffff]
[    0.000000] On node 0 totalpages: 15872
[    0.000000]   DMA32 zone: 217 pages used for memmap
[    0.000000]   DMA32 zone: 0 pages reserved
[    0.000000]   DMA32 zone: 15872 pages, LIFO batch:3
[    0.000000] elf_hwcap is 0x20112d
[    0.000000] pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768
[    0.000000] pcpu-alloc: [0] 0
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 15655
[    0.000000] Kernel command line: earlyprintk=sunxi-uart,0x02500000 clk_ignore_unused initcall_debug=0 console=ttyS0,115200 loglevel=8 root=/dev/mmcblk0p5 init=/sbin/init partitions=boot-resource@mmcblk0p1:env@mmcblk0p2:env-redund@mmcblk0p3:boot@mmcblk0p4:rootfs@mmcblk0p5:dsp0@mmcblk0p6:recovery@mmcblk0p7:UDISK@mmcblk0p8 cma=8M snum= mac_addr= wifi_mac= bt_mac= specialstr= gpt=1 androidboot.mode=normal androidboot.hardware=sun20iw1p1 boot_type=1 androidboot.boot_type=1 gpt=1 uboot_message=2018.05-g0a88ac9-dirty(09/02/2021-15:47:05) mbr_off
[    0.000000] Dentry cache hash table entries: 8192 (order: 4, 65536 bytes, linear)
[    0.000000] Inode-cache hash table entries: 4096 (order: 3, 32768 bytes, linear)
[    0.000000] Sorting __ex_table...
[    0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[    0.000000] Memory: 42216K/63488K available (6067K kernel code, 663K rwdata, 2093K rodata, 192K init, 254K bss, 13080K reserved, 8192K cma-reserved)
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] rcu: Preemptible hierarchical RCU implementation.
[    0.000000]  Tasks RCU enabled.
[    0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 10 jiffies.
[    0.000000] NR_IRQS: 0, nr_irqs: 0, preallocated irqs: 0
[    0.000000] plic: mapped 200 interrupts with 1 handlers for 2 contexts.
[    0.000000] riscv_timer_init_dt: Registering clocksource cpuid [0] hartid [0]
[    0.000000] clocksource: riscv_clocksource: mask: 0xffffffffffffffff max_cycles: 0x588fe9dc0, max_idle_ns: 440795202592 ns
[    0.000007] sched_clock: 64 bits at 24MHz, resolution 41ns, wraps every 4398046511097ns
[    0.000029] riscv_timer_clockevent depends on broadcast, but no broadcast function available
[    0.000374] clocksource: timer: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns
[    0.001013] Console: colour dummy device 80x25
[    0.001059] Calibrating delay loop (skipped), value calculated using timer frequency.. 48.00 BogoMIPS (lpj=240000)
[    0.001079] pid_max: default: 32768 minimum: 301
[    0.001291] Mount-cache hash table entries: 512 (order: 0, 4096 bytes, linear)
[    0.001311] Mountpoint-cache hash table entries: 512 (order: 0, 4096 bytes, linear)
[    0.003374] ASID allocator initialised with 65536 entries
[    0.003579] rcu: Hierarchical SRCU implementation.
[    0.004322] devtmpfs: initialized
[    0.022703] random: get_random_u32 called from bucket_table_alloc.isra.31+0x4e/0x15e with crng_init=0
[    0.023675] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.023711] futex hash table entries: 256 (order: 0, 6144 bytes, linear)
[    0.024282] pinctrl core: initialized pinctrl subsystem
[    0.025827] NET: Registered protocol family 16
[    0.027875] DMA: preallocated 256 KiB pool for atomic allocations
[    0.028642] cpuidle: using governor menu
[    0.074668] rtc_ccu: sunxi ccu init OK
[    0.082594] clock: sunxi ccu init OK
[    0.083772] clock: sunxi ccu init OK
[    0.125148] iommu: Default domain type: Translated
[    0.125349] sunxi iommu: irq = 4
[    0.126654] SCSI subsystem initialized
[    0.127057] usbcore: registered new interface driver usbfs
[    0.127154] usbcore: registered new interface driver hub
[    0.127277] usbcore: registered new device driver usb
[    0.127483] mc: Linux media interface: v0.10
[    0.127587] videodev: Linux video capture interface: v2.00
[    0.128887] sunxi-msgbox-amp 3003000.msgbox: invalid resource
[    0.129658] Advanced Linux Sound Architecture Driver Initialized.
[    0.130319] Bluetooth: Core ver 2.22
[    0.130415] NET: Registered protocol family 31
[    0.130428] Bluetooth: HCI device and connection manager initialized
[    0.130455] Bluetooth: HCI socket layer initialized
[    0.130609] Bluetooth: L2CAP socket layer initialized
[    0.130665] Bluetooth: SCO socket layer initialized
[    0.131002] pwm module init!
[    0.132757] g2d 5410000.g2d: Adding to iommu group 0
[    0.133340] G2D: rcq version initialized.major:250
[    0.134145] input: sunxi-keyboard as /devices/virtual/input/input0
[    0.135721] clocksource: Switched to clocksource riscv_clocksource
[    0.149343] sun8iw20-pinctrl 2000000.pinctrl: initialized sunXi PIO driver
[    0.167933] thermal_sys: Registered thermal governor 'step_wise'
[    0.167940] thermal_sys: Registered thermal governor 'user_space'
[    0.168548] NET: Registered protocol family 2
[    0.169461] tcp_listen_portaddr_hash hash table entries: 256 (order: 0, 4096 bytes, linear)
[    0.169513] TCP established hash table entries: 512 (order: 0, 4096 bytes, linear)
[    0.169535] TCP bind hash table entries: 512 (order: 0, 4096 bytes, linear)
[    0.169552] TCP: Hash tables configured (established 512 bind 512)
[    0.169737] UDP hash table entries: 256 (order: 1, 8192 bytes, linear)
[    0.169785] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes, linear)
[    0.170056] NET: Registered protocol family 1
[    0.172913] Initialise system trusted keyrings
[    0.173240] workingset: timestamp_bits=62 max_order=14 bucket_order=0
[    0.181176] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.202194] Key type asymmetric registered
[    0.202212] Asymmetric key parser 'x509' registered
[    0.202240] io scheduler mq-deadline registered
[    0.202250] io scheduler kyber registered
[    0.202273] atomic64_test: passed
[    0.203688] [DISP]disp_module_init
[    0.204346] disp 5000000.disp: Adding to iommu group 0
[    0.205006] [DISP] disp_init,line:2385:
[    0.205012] smooth display screen:0 type:1 mode:4
[    0.245011] display_fb_request,fb_id:0
[    0.261161] disp_al_manager_apply ouput_type:1
[    0.261348] [DISP] lcd_clk_config,line:731:
[    0.261362] disp 0, clk: pll(816000000),clk(816000000),dclk(34000000) dsi_rate(34000000)
[    0.261362]      clk real:pll(816000000),clk(816000000),dclk(204000000) dsi_rate(150000000)
[    0.261783] sun8iw20-pinctrl 2000000.pinctrl: 2000000.pinctrl supply vcc-pd not found, using dummy regulator
[    0.262849] [DISP]disp_module_init finish
[    0.263879] sunxi_sid_init()506 - insmod ok
[    0.264539] pwm-regulator: supplied by regulator-dummy
[    0.273185] sun8iw20-pinctrl 2000000.pinctrl: 2000000.pinctrl supply vcc-pb not found, using dummy regulator
[    0.273685] uart uart0: get regulator failed
[    0.273718] uart uart0: uart0 supply uart not found, using dummy regulator
[    0.274118] uart0: ttyS0 at MMIO 0x2500000 (irq = 18, base_baud = 1500000) is a SUNXI
[    0.274150] sw_console_setup()1808 - console setup baud 115200 parity n bits 8, flow n
[    1.037858] printk: console [ttyS0] enabled
[    1.043524] sun8iw20-pinctrl 2000000.pinctrl: 2000000.pinctrl supply vcc-pg not found, using dummy regulator
[    1.055126] uart uart1: get regulator failed
[    1.059974] uart uart1: uart1 supply uart not found, using dummy regulator
[    1.068114] uart1: ttyS1 at MMIO 0x2500400 (irq = 19, base_baud = 1500000) is a SUNXI
[    1.078191] misc dump reg init
[    1.082606] sunxi-rfkill soc@3000000:rfkill@0: module version: v1.0.9
[    1.089867] sunxi-rfkill soc@3000000:rfkill@0: devm_pinctrl_get() failed!
[    1.097547] sunxi-rfkill soc@3000000:rfkill@0: get gpio chip_en failed
[    1.104840] sunxi-rfkill soc@3000000:rfkill@0: get gpio power_en failed
[    1.112307] sunxi-rfkill soc@3000000:rfkill@0: wlan_busnum (1)
[    1.118855] sunxi-rfkill soc@3000000:rfkill@0: Missing wlan_power.
[    1.125848] sunxi-rfkill soc@3000000:rfkill@0: wlan clock[0] (32k-fanout1)
[    1.133584] sunxi-rfkill soc@3000000:rfkill@0: wlan_regon gpio=204 assert=1
[    1.141469] sunxi-rfkill soc@3000000:rfkill@0: wlan_hostwake gpio=202 assert=1
[    1.149674] sunxi-rfkill soc@3000000:rfkill@0: wakeup source is enabled
[    1.157397] sunxi-rfkill soc@3000000:rfkill@0: Missing bt_power.
[    1.164163] sunxi-rfkill soc@3000000:rfkill@0: bt clock[0] (32k-fanout1)
[    1.171729] sunxi-rfkill soc@3000000:rfkill@0: bt_rst gpio=210 assert=0
[    1.180198] [ADDR_MGT] addr_mgt_probe: module version: v1.0.9
[    1.187920] [ADDR_MGT] addr_mgt_probe: success.
[    1.194491] libphy: Fixed MDIO Bus: probed
[    1.199252] CAN device driver interface
[    1.203920] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    1.211260] sunxi-ehci: EHCI SUNXI driver
[    1.216496] get ehci1-controller wakeup-source is fail.
[    1.222445] sunxi ehci1-controller don't init wakeup source
[    1.228787] [sunxi-ehci1]: probe, pdev->name: 4200000.ehci1-controller, sunxi_ehci: 0xffffffe0008fbf20, 0x:ffffffd004078000, irq_no:31
[    1.242385] sunxi-ehci 4200000.ehci1-controller: 4200000.ehci1-controller supply drvvbus not found, using dummy regulator
[    1.255043] sunxi-ehci 4200000.ehci1-controller: EHCI Host Controller
[    1.262332] sunxi-ehci 4200000.ehci1-controller: new USB bus registered, assigned bus number 1
[    1.272306] sunxi-ehci 4200000.ehci1-controller: irq 49, io mem 0x04200000
[    1.305772] sunxi-ehci 4200000.ehci1-controller: USB 2.0 started, EHCI 1.00
[    1.314699] hub 1-0:1.0: USB hub found
[    1.319081] hub 1-0:1.0: 1 port detected
[    1.324437] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[    1.331541] sunxi-ohci: OHCI SUNXI driver
[    1.336717] get ohci1-controller wakeup-source is fail.
[    1.342674] sunxi ohci1-controller don't init wakeup source
[    1.349011] [sunxi-ohci1]: probe, pdev->name: 4200400.ohci1-controller, sunxi_ohci: 0xffffffe0008fca60
[    1.359501] sunxi-ohci 4200400.ohci1-controller: 4200400.ohci1-controller supply drvvbus not found, using dummy regulator
[    1.372104] sunxi-ohci 4200400.ohci1-controller: OHCI Host Controller
[    1.379391] sunxi-ohci 4200400.ohci1-controller: new USB bus registered, assigned bus number 2
[    1.389296] sunxi-ohci 4200400.ohci1-controller: irq 50, io mem 0x04200400
[    1.470823] hub 2-0:1.0: USB hub found
[    1.475075] hub 2-0:1.0: 1 port detected
[    1.480869] usbcore: registered new interface driver uas
[    1.487088] usbcore: registered new interface driver usb-storage
[    1.493915] usbcore: registered new interface driver ums-alauda
[    1.500728] usbcore: registered new interface driver ums-cypress
[    1.507640] usbcore: registered new interface driver ums-datafab
[    1.514438] usbcore: registered new interface driver ums_eneub6250
[    1.521540] usbcore: registered new interface driver ums-freecom
[    1.528384] usbcore: registered new interface driver ums-isd200
[    1.535105] usbcore: registered new interface driver ums-jumpshot
[    1.542041] usbcore: registered new interface driver ums-karma
[    1.548765] usbcore: registered new interface driver ums-onetouch
[    1.555661] usbcore: registered new interface driver ums-realtek
[    1.562572] usbcore: registered new interface driver ums-sddr09
[    1.569318] usbcore: registered new interface driver ums-sddr55
[    1.576126] usbcore: registered new interface driver ums-usbat
[    1.583938] sunxi_gpadc_init,1968, success
[    1.589596] sunxi-rtc 7090000.rtc: errata__fix_alarm_day_reg_default_value(): ALARM0_DAY_REG=0, set it to 1
[    1.602045] sunxi-rtc 7090000.rtc: registered as rtc0
[    1.607891] sunxi-rtc 7090000.rtc: setting system clock to 1970-01-01T00:00:03 UTC (3)
[    1.616859] sunxi-rtc 7090000.rtc: sunxi rtc probed
[    1.622743] i2c /dev entries driver
[    1.626886] IR NEC protocol handler initialized
[    1.632709] sunxi cedar version 1.1
[    1.637085] sunxi-cedar 1c0e000.ve: Adding to iommu group 0
[    1.643333] VE: install start!!!
[    1.643333]
[    1.648942] VE: cedar-ve the get irq is 6
[    1.648942]
[    1.655384] VE: ve_debug_proc_info:(____ptrval____), data:(____ptrval____), lock:(____ptrval____)
[    1.655384]
[    1.667042] VE: install end!!!
[    1.667042]
[    1.673651] sunxi-wdt 6011000.watchdog: Watchdog enabled (timeout=16 sec, nowayout=0)
[    1.682944] Bluetooth: HCI UART driver ver 2.3
[    1.687963] Bluetooth: HCI UART protocol H4 registered
[    1.693725] Bluetooth: HCI UART protocol BCSP registered
[    1.699685] Bluetooth: XRadio Bluetooth LPM Mode Driver Ver 1.0.10
[    1.707105] [XR_BT_LPM] bluesleep_probe: bt_wake polarity: 1
[    1.713490] [XR_BT_LPM] bluesleep_probe: host_wake polarity: 1
[    1.720164] [XR_BT_LPM] bluesleep_probe: wakeup source is disabled!
[    1.720164]
[    1.728847] [XR_BT_LPM] bluesleep_probe: uart_index(1)
[    1.737987] sunxi-mmc 4020000.sdmmc: SD/MMC/SDIO Host Controller Driver(v4.19 2021-03-24 19:50)
[    1.748073] sunxi-mmc 4020000.sdmmc: ***ctl-spec-caps*** 8
[    1.754249] sunxi-mmc 4020000.sdmmc: No vmmc regulator found
[    1.760668] sunxi-mmc 4020000.sdmmc: No vqmmc regulator found
[    1.767108] sunxi-mmc 4020000.sdmmc: No vdmmc regulator found
[    1.773540] sunxi-mmc 4020000.sdmmc: No vd33sw regulator found
[    1.780079] sunxi-mmc 4020000.sdmmc: No vd18sw regulator found
[    1.786648] sunxi-mmc 4020000.sdmmc: No vq33sw regulator found
[    1.793155] sunxi-mmc 4020000.sdmmc: No vq18sw regulator found
[    1.800268] sunxi-mmc 4020000.sdmmc: Got CD GPIO
[    1.805808] sunxi-mmc 4020000.sdmmc: set cd-gpios as 24M fail
[    1.812527] sunxi-mmc 4020000.sdmmc: sdc set ios:clk 0Hz bm PP pm UP vdd 21 width 1 timing LEGACY(SDR12) dt B
[    1.823746] sunxi-mmc 4020000.sdmmc: no vqmmc,Check if there is regulator
[    1.843915] sunxi-mmc 4020000.sdmmc: sdc set ios:clk 400000Hz bm PP pm ON vdd 21 width 1 timing LEGACY(SDR12) dt B
[    1.868460] sunxi-mmc 4020000.sdmmc: detmode:gpio irq
[    1.874140] sunxi-mmc 4020000.sdmmc: sdc set ios:clk 0Hz bm PP pm OFF vdd 0 width 1 timing LEGACY(SDR12) dt B
[    1.886077] sunxi-mmc 4021000.sdmmc: SD/MMC/SDIO Host Controller Driver(v4.19 2021-03-24 19:50)
[    1.896158] sunxi-mmc 4021000.sdmmc: ***ctl-spec-caps*** 8
[    1.902371] sunxi-mmc 4021000.sdmmc: No vmmc regulator found
[    1.908851] sunxi-mmc 4021000.sdmmc: No vqmmc regulator found
[    1.915343] sunxi-mmc 4021000.sdmmc: No vdmmc regulator found
[    1.921791] sunxi-mmc 4021000.sdmmc: No vd33sw regulator found
[    1.928375] sunxi-mmc 4021000.sdmmc: No vd18sw regulator found
[    1.934883] sunxi-mmc 4021000.sdmmc: No vq33sw regulator found
[    1.941493] sunxi-mmc 4021000.sdmmc: No vq18sw regulator found
[    1.948071] sunxi-mmc 4021000.sdmmc: Cann't get pin bias hs pinstate,check if needed
[    1.957703] sunxi-mmc 4021000.sdmmc: sdc set ios:clk 0Hz bm PP pm UP vdd 21 width 1 timing LEGACY(SDR12) dt B
[    1.968927] sunxi-mmc 4021000.sdmmc: no vqmmc,Check if there is regulator
[    1.989096] sunxi-mmc 4021000.sdmmc: sdc set ios:clk 400000Hz bm PP pm ON vdd 21 width 1 timing LEGACY(SDR12) dt B
[    2.013371] sunxi-mmc 4021000.sdmmc: detmode:manually by software
[    2.021064] sunxi-mmc 4021000.sdmmc: smc 1 p1 err, cmd 52, RTO !!
[    2.028396] sun8iw20-pinctrl 2000000.pinctrl: 2000000.pinctrl supply vcc-pc not found, using dummy regulator
[    2.039386] sunxi-mmc 4021000.sdmmc: smc 1 p1 err, cmd 52, RTO !!
[    2.046333] sunxi-mmc 4021000.sdmmc: sdc set ios:clk 400000Hz bm PP pm ON vdd 21 width 1 timing LEGACY(SDR12) dt B
[    2.058239] sunxi_led_probe()1715 - start
[    2.062790] sunxi_get_str_of_property()1560 - failed to get the string of propname led_regulator!
[    2.072890] sunxi_register_led_classdev()1448 - led_classdev start
[    2.081591] sunxi-mmc 4021000.sdmmc: sdc set ios:clk 400000Hz bm PP pm ON vdd 21 width 1 timing LEGACY(SDR12) dt B
[    2.096819] sunxi_led_probe()1820 - finish
[    2.102212] usbcore: registered new interface driver usbhid
[    2.108617] usbhid: USB HID core driver
[    2.113760] sunxi-mmc 4021000.sdmmc: smc 1 p1 err, cmd 5, RTO !!
[    2.121373] sunxi-mmc 4021000.sdmmc: smc 1 p1 err, cmd 5, RTO !!
[    2.128694] usbcore: registered new interface driver snd-usb-audio
[    2.135618] sunxi-mmc 4021000.sdmmc: smc 1 p1 err, cmd 5, RTO !!
[    2.143260] sunxi-mmc 4021000.sdmmc: smc 1 p1 err, cmd 5, RTO !!
[    2.150080] sunxi-mmc 4021000.sdmmc: sdc set ios:clk 0Hz bm PP pm OFF vdd 0 width 1 timing LEGACY(SDR12) dt B
[    2.163749] sun8iw20-pinctrl 2000000.pinctrl: 2000000.pinctrl supply vcc-pe not found, using dummy regulator
[    2.176561] sunxi-daudio 2034000.daudio: regulator missing or invalid
[    2.185013] [AUDIOCODEC][sunxi_codec_parse_params][2094]:digital_vol:0, lineout_vol:26, mic1gain:19, mic2gain:19 pa_msleep:120, pa_level:1, pa_pwr_level:1
[    2.185013]
[    2.202212] [AUDIOCODEC][sunxi_codec_parse_params][2130]:adcdrc_cfg:0, adchpf_cfg:1, dacdrc_cfg:0, dachpf:0
[    2.213648] [AUDIOCODEC][sunxi_internal_codec_probe][2266]:codec probe finished
[    2.223441] debugfs: Directory '203034c.dummy_cpudai' with parent 'audiocodec' already present!
[    2.233333] [SNDCODEC][sunxi_card_init][583]:card init finished
[    2.242759] sunxi-codec-machine 2030340.sound: 2030000.codec <-> 203034c.dummy_cpudai mapping ok
[    2.254213] input: audiocodec sunxi Audio Jack as /devices/platform/soc@3000000/2030340.sound/sound/card0/input1
[    2.266522] [SNDCODEC][sunxi_card_dev_probe][832]:register card finished
[    2.274901] sunxi-rpaf-dsp soc@3000000:rpaf-dsp@203034c: register device finished!
[    2.283411] sunxi-rpaf-dsp soc@3000000:rpaf-dsp@203034c: [rpaf_dsp0] probe finished!
[    2.292613] rpmsg_hifi 3003000.msgbox.sunxi,dsp-msgbox.514.258: id:sunxi,dsp-msgbox new channel: 0x202 -> 0x102!
[    2.304277] rpmsg_hifi 3003000.msgbox.sunxi,dsp-msgbox.514.258: rpmsg hifi[0] client driver is probed
[    2.316620] NET: Registered protocol family 10
[    2.323096] Segment Routing with IPv6
[    2.327583] sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
[    2.335099] NET: Registered protocol family 17
[    2.340297] can: controller area network core (rev 20170425 abi 9)
[    2.347397] NET: Registered protocol family 29
[    2.352401] can: raw protocol (rev 20170425)
[    2.357216] can: broadcast manager protocol (rev 20170425 t)
[    2.363543] can: netlink gateway (rev 20190810) max_hops=1
[    2.370123] Bluetooth: RFCOMM TTY layer initialized
[    2.375585] Bluetooth: RFCOMM socket layer initialized
[    2.381519] Bluetooth: RFCOMM ver 1.11
[    2.386913] Loading compiled-in X.509 certificates
[    2.395163] HDMI 2.0 driver init start!
[    2.399574] boot_hdmi=false
[    2.402765] ERROR: pinctrl_get for HDMI2.0 DDC fail
[    2.410033] HDMI2.0 module init end
[    2.438387] twi twi2: twi2 supply twi not found, using dummy regulator
[    2.454847] twi_stop()488 - [i2c2] i2c state(0x0) isn't idle(0xf8)
[    2.461748] sunxi_i2c_core_process()1632 - [i2c2] STOP failed!
[    2.468359] sunxi_i2c_do_xfer()1816 - [i2c2] incomplete xfer (status: 0xff, dev addr: 0x38)
[    2.477808] pcf857x: probe of 2-0038 failed with error -70
[    2.483983] sunxi_i2c_probe()2262 - [i2c2] probe success
[    2.494810] debugfs: Directory '2031000.dmic' with parent 'snddmic' already present!
[    2.505479] sunxi-audio-card 2031060.sounddmic: dmic-hifi <-> 2031000.dmic mapping ok
[    2.516251] debugfs: Directory '2034000.daudio' with parent 'sndhdmi' already present!
[    2.527376] sunxi-audio-card 20340a0.sounddaudio2: 20340a4.hdmiaudio <-> 2034000.daudio mapping ok
[    2.539020] get ehci0-controller wakeup-source is fail.
[    2.544972] sunxi ehci0-controller don't init wakeup source
[    2.551313] [sunxi-ehci0]: probe, pdev->name: 4101000.ehci0-controller, sunxi_ehci: 0xffffffe0008fbb60, 0x:ffffffd004b72000, irq_no:2e
[    2.564883] [sunxi-ehci0]: Not init ehci0
[    2.569954] get ohci0-controller wakeup-source is fail.
[    2.575993] sunxi ohci0-controller don't init wakeup source
[    2.582253] [sunxi-ohci0]: probe, pdev->name: 4101400.ohci0-controller, sunxi_ohci: 0xffffffe0008fc6a0
[    2.592737] [sunxi-ohci0]: Not init ohci0
[    2.599841] cfg80211: Loading compiled-in X.509 certificates for regulatory database
[    2.611098] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7'
[    2.618846] platform regulatory.0: Direct firmware load for regulatory.db failed with error -2
[    2.628550] clk: Not disabling unused clocks
[    2.633360] ALSA device list:
[    2.636834] cfg80211: failed to load regulatory.db
[    2.642278]   #0: audiocodec
[    2.645526]   #1: snddmic
[    2.648534]   #2: sndhdmi
[    2.651470] alloc_fd: slot 0 not NULL!
[    2.656222] VFS: Cannot open root device "mmcblk0p5" or unknown-block(0,0): error -6
[    2.664900] Please append a correct "root=" boot option; here are the available partitions:
[    2.674362] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
[    2.683590] CPU: 0 PID: 1 Comm: swapper Not tainted 5.4.61 #41
[    2.690088] Call Trace:
[    2.692829] [<ffffffe0000323ce>] walk_stackframe+0x0/0xa0
[    2.698850] [<ffffffe0000325b0>] show_stack+0x2a/0x34
[    2.704494] [<ffffffe00060231c>] dump_stack+0x20/0x28
[    2.710129] [<ffffffe000037376>] panic+0xee/0x2b6
[    2.715376] [<ffffffe000000eda>] mount_block_root+0x1ee/0x28a
[    2.721782] [<ffffffe000000ffc>] mount_root+0x86/0x90
[    2.727414] [<ffffffe000001116>] prepare_namespace+0x110/0x152
[    2.733916] [<ffffffe000000b78>] kernel_init_freeable+0x17e/0x19a
[    2.740713] [<ffffffe000615c2a>] kernel_init+0x12/0xee
[    2.746442] [<ffffffe000031018>] ret_from_exception+0x0/0xc
[    2.752658] ---[ end Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0) ]---

#68 全志 SOC » F133 跑 D1 的Tina Linux挂了,这是什么情况? » 2021-09-02 15:19:02

X3
回复: 5
[98]HELLO! BOOT0 is starting!
[101]BOOT0 commit : 27369ab
[104]set pll start
[106]periph0 has been enabled
[109]set pll end
[110][pmu]: bus read error
[113]board init ok
[114]ZQ value = 0x32***********
[117]get_pmu_exist() = -1
[120]ddr_efuse_type: 0x0
[123][AUTO DEBUG] single rank and full DQ!
[127]ddr_efuse_type: 0x0
[130][AUTO DEBUG] rank 0 row = 13
[133][AUTO DEBUG] rank 0 bank = 4
[136][AUTO DEBUG] rank 0 page size = 2 KB
[140]DRAM BOOT DRIVE INFO: V0.24
[143]DRAM CLK = 528 MHz
[145]DRAM Type = 2 (2:DDR2,3:DDR3)
[148]DRAMC read ODT  off.
[151]DRAM ODT off.
[153]ddr_efuse_type: 0x0
[155]DRAM SIZE =64 M
[159]DRAM simple test OK.
[161]dram size =64
[163]card no is 0
[165]sdcard 0 line count 4
[167][mmc]: mmc driver ver 2021-04-2 16:45
[177][mmc]: Wrong media type 0x0
[180][mmc]: ***Try SD card 0***
[192][mmc]: HSSDR52/SDR25 4 bit
[195][mmc]: 50000000 Hz
[197][mmc]: 1876 MB
[199][mmc]: ***SD/MMC 0 init OK!!!***
[257]Loading boot-pkg Succeed(index=0).
[261]Entry_name        = opensbi
[264]Entry_name        = u-boot
[268]Entry_name        = dtb
[270]mmc not para
[272]Jump to second Boot.

OpenSBI v0.6
   ____                    _____ ____ _____
  / __ \                  / ____|  _ \_   _|
 | |  | |_ __   ___ _ __ | (___ | |_) || |
 | |  | | '_ \ / _ \ '_ \ \___ \|  _ < | |
 | |__| | |_) |  __/ | | |____) | |_) || |_
  \____/| .__/ \___|_| |_|_____/|____/_____|
        | |
        |_|

Platform Name          : T-HEAD Xuantie Platform
Platform HART Features : RV64ACDFIMSUVX
Platform Max HARTs     : 1
Current Hart           : 0
Firmware Base          : 0x40000400
Firmware Size          : 75 KB
Runtime SBI Version    : 0.2

MIDELEG : 0x0000000000000222
MEDELEG : 0x000000000000b1ff
PMP0    : 0x0000000040000000-0x000000004001ffff (A)
PMP1    : 0x0000000040000000-0x000000007fffffff (A,R,W,X)
PMP2    : 0x0000000080000000-0x00000000bfffffff (A,R,W,X)
PMP3    : 0x0000000000020000-0x0000000000027fff (A,▒

U-Boot 2018.05-g0a88ac9-dirty (Aug 30 2021 - 18:24:19 +0800) Allwinner Technology

[00.355]DRAM:  64 MiB
[00.357]Relocation Offset is: 01ef0000
[00.362]secure enable bit: 0
[00.364]CPU=1008 MHz,PLL6=600 Mhz,AHB=200 Mhz, APB1=100Mhz  MBus=300Mhz
[00.371]flash init start
[00.373]workmode = 0,storage type = 1
[00.376][mmc]: mmc driver ver uboot2018:2021-04-16 14:23:00-1
[00.382][mmc]: get sdc_type fail and use default host:tm1.
[00.388][mmc]: can't find node "mmc0",will add new node
[00.393][mmc]: fdt err returned <no error>
[00.397][mmc]: Using default timing para
[00.400][mmc]: SUNXI SDMMC Controller Version:0x50310
[00.421][mmc]: card_caps:0x3000000a
[00.424][mmc]: host_caps:0x3000003f
[00.429]sunxi flash init ok
[00.431]line:714 init_clocks
__clk_init: clk pll_periph0x2 already initialized
register fix_factor clk error
[00.441]drv_disp_init
request pwm success, pwm2:pwm2:0x2000c00.
[00.458]drv_disp_init finish
[00.461]boot_gui_init:start
[00.463]set disp.dev2_output_type fail. using defval=0
[00.655]boot_gui_init:finish
sunxi_partition_get_partno_byname: try part 1, ret = 0
sunxi_partition_get_partno_byname: try part 2, ret = 0
sunxi_partition_get_partno_byname: try part 3, ret = 0
sunxi_partition_get_partno_byname: try part 4, ret = 0
sunxi_partition_get_partno_byname: try part 5, ret = 0
sunxi_partition_get_partno_byname: try part 6, ret = 0
sunxi_partition_get_partno_byname: try part 7, ret = 0
sunxi_partition_get_partno_byname: try part 8, ret = 0
sunxi_partition_get_partno_byname: try part 9, ret = -1
partno erro : can't find partition bootloader
sunxi_partition_get_partno_byname: try part 1, ret = 0
54 bytes read in 2 ms [01.067]LCD open finish
(26.4 KiB/s)
[01.070]bmp_name=bootlogo.bmp size 307254
307254 bytes read in 19 ms (15.4 MiB/s)
[01.112]Loading Environment from SUNXI_FLASH... OK
[01.136]out of usb burn from boot: not need burn key
root_partition is rootfs
set root to /dev/mmcblk0p5
[01.146]update part info
[01.149]update bootcmd
[01.153]change working_fdt 0x42aafda8 to 0x42a8fda8
[01.174]update dts
Hit any key to stop autoboot:  0
Android's image name: d1-nezha
No reserved memory region found in source FDT
[01.678]
Starting kernel ...

[01.680][mmc]: MMC Device 2 not found
[01.684][mmc]: mmc 2 not find, so not exit
[    0.000000] OF: fdt: Ignoring memory range 0x40000000 - 0x40200000
[    0.000000] Linux version 5.4.61 (cube@ubuntu) (riscv64-unknown-linux-gnu-gcc (C-SKY RISCV Tools V1.8.4 B20200702) 8.1.0, GNU ld (GNU Binutils) 2.32) #40 PREEMPT Sat Aug 28 01:37:30 UTC 2021
[    0.000000] cma: Reserved 8 MiB at 0x0000000043800000
[    0.000000] Zone ranges:
[    0.000000]   DMA32    [mem 0x0000000040200000-0x0000000043ffffff]
[    0.000000]   Normal   empty
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000040200000-0x0000000043ffffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000040200000-0x0000000043ffffff]
[    0.000000] On node 0 totalpages: 15872
[    0.000000]   DMA32 zone: 217 pages used for memmap
[    0.000000]   DMA32 zone: 0 pages reserved
[    0.000000]   DMA32 zone: 15872 pages, LIFO batch:3
[    0.000000] elf_hwcap is 0x20112d
[    0.000000] pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768
[    0.000000] pcpu-alloc: [0] 0
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 15655
[    0.000000] Kernel command line: earlyprintk=sunxi-uart,0x02500000 clk_ignore_unused initcall_debug=0 console=ttyS0,115200 loglevel=8 root=/dev/mmcblk0p5 init=/sbin/init partitions=boot-resource@mmcblk0p1:env@mmcblk0p2:env-redund@mmcblk0p3:boot@mmcblk0p4:rootfs@mmcblk0p5:dsp0@mmcblk0p6:recovery@mmcblk0p7:UDISK@mmcblk0p8 cma=8M snum= mac_addr= wifi_mac= bt_mac= specialstr= gpt=1 androidboot.mode=normal androidboot.hardware=sun20iw1p1 boot_type=1 androidboot.boot_type=1 gpt=1 uboot_message=2018.05-g0a88ac9-dirty(08/30/2021-18:24:19) mbr_off
[    0.000000] Dentry cache hash table entries: 8192 (order: 4, 65536 bytes, linear)
[    0.000000] Inode-cache hash table entries: 4096 (order: 3, 32768 bytes, linear)
[    0.000000] Sorting __ex_table...
[    0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[    0.000000] Memory: 42216K/63488K available (6067K kernel code, 663K rwdata, 2093K rodata, 192K init, 254K bss, 13080K reserved, 8192K cma-reserved)
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] rcu: Preemptible hierarchical RCU implementation.
[    0.000000]  Tasks RCU enabled.
[    0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 10 jiffies.
[    0.000000] NR_IRQS: 0, nr_irqs: 0, preallocated irqs: 0
[    0.000000] plic: mapped 200 interrupts with 1 handlers for 2 contexts.
[    0.000000] riscv_timer_init_dt: Registering clocksource cpuid [0] hartid [0]
[    0.000000] clocksource: riscv_clocksource: mask: 0xffffffffffffffff max_cycles: 0x588fe9dc0, max_idle_ns: 440795202592 ns
[    0.000007] sched_clock: 64 bits at 24MHz, resolution 41ns, wraps every 4398046511097ns
[    0.000029] riscv_timer_clockevent depends on broadcast, but no broadcast function available
[    0.000371] clocksource: timer: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns
[    0.001010] Console: colour dummy device 80x25
[    0.001056] Calibrating delay loop (skipped), value calculated using timer frequency.. 48.00 BogoMIPS (lpj=240000)
[    0.001075] pid_max: default: 32768 minimum: 301
[    0.001291] Mount-cache hash table entries: 512 (order: 0, 4096 bytes, linear)
[    0.001312] Mountpoint-cache hash table entries: 512 (order: 0, 4096 bytes, linear)
[    0.003350] ASID allocator initialised with 65536 entries
[    0.003556] rcu: Hierarchical SRCU implementation.
[    0.004298] devtmpfs: initialized
[    0.022812] random: get_random_u32 called from bucket_table_alloc.isra.31+0x4e/0x15e with crng_init=0
[    0.023781] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.023817] futex hash table entries: 256 (order: 0, 6144 bytes, linear)
[    0.024389] pinctrl core: initialized pinctrl subsystem
[    0.025926] NET: Registered protocol family 16
[    0.027969] DMA: preallocated 256 KiB pool for atomic allocations
[    0.028729] cpuidle: using governor menu
[    0.075867] rtc_ccu: sunxi ccu init OK
[    0.083712] clock: sunxi ccu init OK
[    0.084890] clock: sunxi ccu init OK
[    0.125048] iommu: Default domain type: Translated
[    0.125252] sunxi iommu: irq = 4
[    0.126569] SCSI subsystem initialized
[    0.126961] usbcore: registered new interface driver usbfs
[    0.127055] usbcore: registered new interface driver hub
[    0.127198] usbcore: registered new device driver usb
[    0.127417] mc: Linux media interface: v0.10
[    0.127489] videodev: Linux video capture interface: v2.00
[    0.128800] sunxi-msgbox-amp 3003000.msgbox: invalid resource
[    0.129560] Advanced Linux Sound Architecture Driver Initialized.
[    0.130259] Bluetooth: Core ver 2.22
[    0.130360] NET: Registered protocol family 31
[    0.130373] Bluetooth: HCI device and connection manager initialized
[    0.130400] Bluetooth: HCI socket layer initialized
[    0.130418] Bluetooth: L2CAP socket layer initialized
[    0.130461] Bluetooth: SCO socket layer initialized
[    0.130942] pwm module init!
[    0.132670] g2d 5410000.g2d: Adding to iommu group 0
[    0.133234] G2D: rcq version initialized.major:250
[    0.134042] input: sunxi-keyboard as /devices/virtual/input/input0
[    0.135604] clocksource: Switched to clocksource riscv_clocksource
[    0.149142] sun8iw20-pinctrl 2000000.pinctrl: initialized sunXi PIO driver
[    0.167834] thermal_sys: Registered thermal governor 'step_wise'
[    0.167842] thermal_sys: Registered thermal governor 'user_space'
[    0.168448] NET: Registered protocol family 2
[    0.169367] tcp_listen_portaddr_hash hash table entries: 256 (order: 0, 4096 bytes, linear)
[    0.169418] TCP established hash table entries: 512 (order: 0, 4096 bytes, linear)
[    0.169442] TCP bind hash table entries: 512 (order: 0, 4096 bytes, linear)
[    0.169458] TCP: Hash tables configured (established 512 bind 512)
[    0.169643] UDP hash table entries: 256 (order: 1, 8192 bytes, linear)
[    0.169690] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes, linear)
[    0.169978] NET: Registered protocol family 1
[    0.172838] Initialise system trusted keyrings
[    0.173153] workingset: timestamp_bits=62 max_order=14 bucket_order=0
[    0.181146] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.201370] Key type asymmetric registered
[    0.201389] Asymmetric key parser 'x509' registered
[    0.201417] io scheduler mq-deadline registered
[    0.201426] io scheduler kyber registered
[    0.201449] atomic64_test: passed
[    0.202868] [DISP]disp_module_init
[    0.203493] disp 5000000.disp: Adding to iommu group 0
[    0.204178] [DISP] disp_init,line:2385:
[    0.204186] smooth display screen:0 type:1 mode:4
[    0.244375] display_fb_request,fb_id:0
[    0.260591] disp_al_manager_apply ouput_type:1
[    0.260777] [DISP] lcd_clk_config,line:731:
[    0.260792] disp 0, clk: pll(816000000),clk(816000000),dclk(34000000) dsi_rate(34000000)
[    0.260792]      clk real:pll(816000000),clk(816000000),dclk(204000000) dsi_rate(150000000)
[    0.261216] sun8iw20-pinctrl 2000000.pinctrl: 2000000.pinctrl supply vcc-pd not found, using dummy regulator
[    0.262259] [DISP]disp_module_init finish
[    0.263326] sunxi_sid_init()506 - insmod ok
[    0.263955] pwm-regulator: supplied by regulator-dummy
[    0.272677] sun8iw20-pinctrl 2000000.pinctrl: 2000000.pinctrl supply vcc-pb not found, using dummy regulator
[    0.273174] uart uart0: get regulator failed
[    0.273206] uart uart0: uart0 supply uart not found, using dummy regulator
[    0.273564] uart0: ttyS0 at MMIO 0x2500000 (irq = 18, base_baud = 1500000) is a SUNXI
[    0.273596] sw_console_setup()1808 - console setup baud 115200 parity n bits 8, flow n
[    1.037526] printk: console [ttyS0] enabled
[    1.043195] sun8iw20-pinctrl 2000000.pinctrl: 2000000.pinctrl supply vcc-pg not found, using dummy regulator
[    1.054801] uart uart1: get regulator failed
[    1.059644] uart uart1: uart1 supply uart not found, using dummy regulator
[    1.067795] uart1: ttyS1 at MMIO 0x2500400 (irq = 19, base_baud = 1500000) is a SUNXI
[    1.077950] misc dump reg init
[    1.082320] sunxi-rfkill soc@3000000:rfkill@0: module version: v1.0.9
[    1.089648] sunxi-rfkill soc@3000000:rfkill@0: devm_pinctrl_get() failed!
[    1.097268] sunxi-rfkill soc@3000000:rfkill@0: get gpio chip_en failed
[    1.104584] sunxi-rfkill soc@3000000:rfkill@0: get gpio power_en failed
[    1.112011] sunxi-rfkill soc@3000000:rfkill@0: wlan_busnum (1)
[    1.118594] sunxi-rfkill soc@3000000:rfkill@0: Missing wlan_power.
[    1.125514] sunxi-rfkill soc@3000000:rfkill@0: wlan clock[0] (32k-fanout1)
[    1.133301] sunxi-rfkill soc@3000000:rfkill@0: wlan_regon gpio=204 assert=1
[    1.141181] sunxi-rfkill soc@3000000:rfkill@0: wlan_hostwake gpio=202 assert=1
[    1.149387] sunxi-rfkill soc@3000000:rfkill@0: wakeup source is enabled
[    1.157122] sunxi-rfkill soc@3000000:rfkill@0: Missing bt_power.
[    1.163850] sunxi-rfkill soc@3000000:rfkill@0: bt clock[0] (32k-fanout1)
[    1.171476] sunxi-rfkill soc@3000000:rfkill@0: bt_rst gpio=210 assert=0
[    1.179918] [ADDR_MGT] addr_mgt_probe: module version: v1.0.9
[    1.187652] [ADDR_MGT] addr_mgt_probe: success.
[    1.194205] libphy: Fixed MDIO Bus: probed
[    1.198939] CAN device driver interface
[    1.204423] sun8iw20-pinctrl 2000000.pinctrl: 2000000.pinctrl supply vcc-pe not found, using dummy regulator

#70 Re: 全志 SOC » 全志主线Linux UART串口使用8250驱动程序,但是没有实现RS485控制,有没有哪位打上了patch? » 2020-11-12 16:29:08

X3
zwanh 说:

楼主,给你个自动切换的电路,不用什么切换脚。发送接收都不用加延时
https://whycan.com/files/members/3750/485%E8%87%AA%E5%8A%A8%E5%88%87%E6%8D%A2.png

感谢大佬分享,这是甲方的要求,而且他们已经贴了几千片板子了, 只能死马做活马医了。

#71 Re: 全志 SOC » 全志主线Linux UART串口使用8250驱动程序,但是没有实现RS485控制,有没有哪位打上了patch? » 2020-11-09 14:40:19

X3

http://lists.infradead.org/pipermail/linux-arm-kernel/2014-July/271071.html

https://bbs.21ic.com/blog-41444-683796.html
AM3352 串口升级为8250模式后,RS485模式失效及处理

AM3352原来使用为TI官方提供的OMAP  serial port 串口驱动,使用一段时间后发现,这个串口是么有启动用DMA 模式发送的, 尽管你在设备树种声明可DNA通道,
这有啥问题呢,就是发送串口数据时,例如发送100个字节,大部分的情况下,这100个字节是连续发送出去的,但是遇到系统繁忙时,数据就不是连续发送了,中间会插入5-10ms的延时,这个时间是不确定的(由内核处理的事务多少而定),看了下OMAP  serial port 串口驱动代码。串口发送机制大概就是把数据分成若干帧(帧长度为FIFO大小)写满串口的FIFO ,然后FIFO空闲时中断再填充下一帧数据,直到数据发送完成。 这个方案遇到系统繁忙时,FIFO中断被延后就会出现数据发送不连续的问题。

然后有大神告知8250串口默认都是开启DMA模式的,便试试;
其实升级8250串口很简单,都不用几分钟就升级完成了
把串口设备由OMAP serial 改为8250 串口即可,见上图;
编译内核,更新内核。需要说明的是之后/dev/下的串口驱动名字会变成ttyS0,ttyS1。。。等,不再是原来的ttyO1,ttyO2;
所以需要把/etc目录下的inittab文件的控制台初始化语句改动掉

# Put a getty on the serial port
ttyS0::respawn:/sbin/getty -L  ttyS0 115200 vt100 # GENERIC_SERIAL

之后我们测试AM3352的串口,果然串口发送数据不连续的问题解决了。。。。  开心中。。。。;
正准备划水时,测试发现RS485串口不工作了,RST引脚一直为高电平,正常你妹呀;
RS485功能原来用omap serial port 是好的呀,这下可好了,把锅补出个大洞了。
后来查代码得知,8250的串口驱动压根就没有RS485的相关部分代码,必须自己添加
按照外网的连接对8250_core.c 打RS485的
补丁

http://lkml.iu.edu/hypermail/linux/kernel/1407.1/01890.html

然后编译内核,下载运行。
然而你要的RS485通讯功能并没有出现

应用程序初始化RS485串口函数打印出异常:printf("ioctl TIOCSRS485 error.\r\n");

哎。。。。免费的确实是最贵的;又开始填坑之类旅。。。

先看应用程序的异常打印代码:


if (ioctl (fd, TIOCSRS485, &rs485conf) <
0)    //将填充的结构体写入到文件描述符中

       {

              /* Error handling.*/

              printf("ioctl TIOCSRS485
error.\r\n");

       }

是ioctl函数引起的,我们就去8250_core.c哪里看看

 static int serial8250_ioctl(struct
uart_port *port, unsigned int cmd,

                   unsigned
long arg)

{

         struct
serial_rs485 rs485conf;

         struct
uart_8250_port *up;

 up
= container_of(port, struct uart_8250_port, port);

 if
(!up->rs485_config)

     
        return -ENOIOCTLCMD; 

         switch
(cmd)

         {

         case
TIOCSRS485:

                   if
(!gpio_is_valid(up->rts_gpio))

                            return
-ENODEV;

                   if
(copy_from_user(&rs485conf, (void __user *) arg,

                                               sizeof(rs485conf)))

                            return
-EFAULT;

 

                   serial8250_config_rs485(port,
&rs485conf);

                   break;

 

         case
TIOCGRS485:

                   if
(!gpio_is_valid(up->rts_gpio))

                            return
-ENODEV;

                   if
(copy_to_user((void __user *) arg, &up->rs485,

                                               sizeof(rs485conf)))

                            return
-EFAULT;

                   break;

 

         default:

                   return
-ENOIOCTLCMD;

         }

         return
0;

}

通过prink函数打印,得出:ioctl 写入的cmd值并没有等于TIOCSRS485 ;
反复检测应用程序,没有错呀;(应用程序基于omap-serial.c模式时,RS-485可是工作得好好的呢)
真是百思不得骑姐;
后来在
drivers\tty\serial\ serial_core.c找到串口真正的ioctl入口函数

/*

 *
Called via sys_ioctl.  We can use
spin_lock_irq() here.

 */

static int

uart_ioctl(struct tty_struct *tty, unsigned
int cmd,

            unsigned long arg)

{

         struct
uart_state *state = tty->driver_data;

         struct
tty_port *port = &state->port;

         void
__user *uarg = (void __user *)arg;

         int
ret = -ENOIOCTLCMD;

 

 

         /*

          * These ioctls don't rely on the hardware to
be present.

          */

         switch
(cmd) {

         case
TIOCGSERIAL:

                   ret
= uart_get_info_user(port, uarg);

                   break;

 

         case
TIOCSSERIAL:

                   down_write(&tty->termios_rwsem);

                   ret
= uart_set_info_user(tty, state, uarg);

                   up_write(&tty->termios_rwsem);

                   break;

 

         case
TIOCSERCONFIG:

                   down_write(&tty->termios_rwsem);

                   ret
= uart_do_autoconfig(tty, state);

                   up_write(&tty->termios_rwsem);

                   break;

 

         case
TIOCSERGWILD: /* obsolete */

         case
TIOCSERSWILD: /* obsolete */

                   ret
= 0;

                   break;

         }

 

         if
(ret != -ENOIOCTLCMD)

                   goto
out;

 

         if
(tty->flags & (1 << TTY_IO_ERROR)) {

                   ret
= -EIO;

                   goto
out;

         }

 

         /*

          * The following should only be used when
hardware is present.

          */

         switch
(cmd) {

         case
TIOCMIWAIT:

                   ret
= uart_wait_modem_status(state, arg);

                   break;

         }

 

         if
(ret != -ENOIOCTLCMD)

                   goto
out;

 

         mutex_lock(&port->mutex);

 

         if
(tty->flags & (1 << TTY_IO_ERROR)) {

                   ret
= -EIO;

                   goto
out_up;

         }

 

         /*

          * All these rely on hardware being present and
need to be

          * protected against the tty being hung up.

          */

 

         switch
(cmd) {

         case
TIOCSERGETLSR: /* Get line status register */

                   ret
= uart_get_lsr_info(tty, state, uarg);

                   break;

 

         case
TIOCGRS485:

                   ret
= uart_get_rs485_config(state->uart_port, uarg);

                   break;

 

         case
TIOCSRS485:

                   ret
= uart_set_rs485_config(state->uart_port, uarg);

                   break;

         default:
{

                   struct
uart_port *uport = state->uart_port;

                   if
(uport->ops->ioctl)

                            ret
= uport->ops->ioctl(uport, cmd, arg);

                   break;

         }

         }

out_up:

         mutex_unlock(&port->mutex);

out:

         return
ret;

}

原来这个函数中的case已经定义了TIOCGRS485、TIOCSRS485 的常量了;

只有这个函数没有定义的常量,才会调用default中的ret = uport->ops->ioctl(uport, cmd, arg);自定义ioctl函数 ,也就8250_core.c的ioctl函数;

把上边2个case的内容一屏蔽;
重新编译内核。。。。。应以程序还是报告"ioctl TIOCSRS485 error.;

再回去8250_core.c中看serial8250_ioctl() 的代码,
通过打印报告得出

         if
(!gpio_is_valid(up->rts_gpio))

                            return
-ENODEV;

函数判断RS-485 rts引脚无效,然后就退出了,看来解决了rts引脚注册的问题,就能解决问题了;

RS-485补丁中8250_core.c中有个serial8250_probe_rs485()函数, 负责根据设备树的配置信息去申请对应的gpio,来控制rts引脚

int serial8250_probe_rs485(struct
uart_8250_port *up,

                   struct
device *dev)

{

         struct
serial_rs485 *rs485conf = &up->rs485;

         struct
device_node *np = dev->of_node;

         u32
rs485_delay[2];

         enum
of_gpio_flags flags;

         int
ret;

 

         rs485conf->flags
= 0;

         if
(!np)

                   return
0;

 

         /*
check for tx enable gpio */

         up->rts_gpio
= of_get_named_gpio_flags(np, "rts-gpio", 0, &flags);

         if
(up->rts_gpio == -EPROBE_DEFER)

                   return
-EPROBE_DEFER;

         if
(!gpio_is_valid(up->rts_gpio))

                   return
0;

 

         ret
= devm_gpio_request(dev, up->rts_gpio, "serial_rts");

         if
(ret < 0)

                   return
ret;

         ret
= gpio_direction_output(up->rts_gpio,

                            flags
& SER_RS485_RTS_AFTER_SEND);

         if
(ret < 0)

                   return
ret;

 

         up->rts_gpio_valid
= true;

 

         if
(of_property_read_bool(np, "rs485-rts-active-high"))

                   rs485conf->flags
|= SER_RS485_RTS_ON_SEND;

         else

                   rs485conf->flags
|= SER_RS485_RTS_AFTER_SEND;

 

         if
(of_property_read_u32_array(np, "rs485-rts-delay",

                                     rs485_delay,
2) == 0) {

                   rs485conf->delay_rts_before_send
= rs485_delay[0];

                   rs485conf->delay_rts_after_send
= rs485_delay[1];

         }

 

         if
(of_property_read_bool(np, "rs485-rx-during-tx"))

                   rs485conf->flags
|= SER_RS485_RX_DURING_TX;

 

         if
(of_property_read_bool(np, "linux,rs485-enabled-at-boot-time"))

                   rs485conf->flags
|= SER_RS485_ENABLED;

 

         return
0;

}

EXPORT_SYMBOL_GPL(serial8250_probe_rs485);

奇怪的是在内核的源码中,居然没有找到调用这个函数的地方,
而且这个函数还是被声明为:EXPORT_SYMBOL_GPL的呢

分析串口相关的代码,理清串口注册的流程如下:

Drivers\tty\serola\8250_omap.c  负责把AM335X 的串口注册为8250模式串口

8250_omap.c 函数中 static int omap8250_probe(struct platform_device *pdev)

有这一行函数:         ret = serial8250_register_8250_port(&up);

serial8250_register_8250_port()函数位于8250_core.c中,为核心函数

这个函数就把AM3352的串口注册为 8250模式,

后来想serial8250_probe_rs485()函数不是声明为:EXPORT_SYMBOL_GPL 外部调用的函数么?

那我们在serial8250_register_8250_port()函数前面调用下serial8250_probe_rs485()那么RS485的RTS引脚不就申请成功了么;

按照这样修改,重新编译内核,RS485串口RST引脚注册成功,ioctl TIOCSRS485 操作通过,RS485串口运行正常。

QQ交流群:761781147

#72 全志 SOC » 全志主线Linux UART串口使用8250驱动程序,但是没有实现RS485控制,有没有哪位打上了patch? » 2020-11-09 14:39:26

X3
回复: 9

这是RS485应用层编程:
https://www.kernel.org/doc/Documentation/serial/serial-rs485.txt


http://lkml.iu.edu/hypermail/linux/kernel/1407.1/01890.html

[PATCH 5/6] tty: serial: 8250-core: add rs485 support
From: Sebastian Andrzej Siewior
Date: Wed Jul 09 2014 - 13:51:23 EST
Next message: Sebastian Andrzej Siewior: "[PATCH 4/6] tty: serial: 8250-core: reorder serial8250_stop_rx() & serial8250_start_tx()"
Previous message: Sebastian Andrzej Siewior: "[PATCH 2/6] tty: serial: 8250 core: allow to overwrite & export serial8250_startup()"
In reply to: Sebastian Andrzej Siewior: "Re: [PATCH 2/6] tty: serial: 8250 core: allow to overwrite & export serial8250_startup()"
Next in thread: Lennart Sorensen: "Re: [PATCH 5/6] tty: serial: 8250-core: add rs485 support"
Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
So after I stuffed the rs485 support from the omap-serial into
8250-omap, I've been looking at it and the only omap specific part was
the OMAP_UART_SCR_TX_EMPTY part. The driver has always TX_EMPTY set
because the 8250 core expects an interrupt after the TX fifo + shift
register is empty. The rs485 parts seems to wait for half fifo and then
again for the empty fifo. With this change gone it fits fine as generic
code and here it is.

It is expected that the potential rs485 user invokes
serial_omap_probe_rs485() to configure atleast RTS gpio which is a must
have property. The code has been taken from omap-serial driver and
received limited tested due to -ENODEV (the compiler said it works).

Signed-off-by: Sebastian Andrzej Siewior <bigeasy@xxxxxxxxxxxxx>
---
drivers/tty/serial/8250/8250_core.c | 171 ++++++++++++++++++++++++++++++++++++
include/linux/serial_8250.h | 6 ++
2 files changed, 177 insertions(+)

diff --git a/drivers/tty/serial/8250/8250_core.c b/drivers/tty/serial/8250/8250_core.c
index c7c3bf7..bf06a4c 100644
--- a/drivers/tty/serial/8250/8250_core.c
+++ b/drivers/tty/serial/8250/8250_core.c
@@ -39,6 +39,8 @@
#include <linux/mutex.h>
#include <linux/slab.h>
#include <linux/pm_runtime.h>
+#include <linux/gpio.h>
+#include <linux/of_gpio.h>
#ifdef CONFIG_SPARC
#include <linux/sunserialcore.h>
#endif
@@ -1281,10 +1283,34 @@ static void autoconfig_irq(struct uart_8250_port *up)

static inline void __stop_tx(struct uart_8250_port *p)
{
+ if (p->rs485.flags & SER_RS485_ENABLED) {
+ int ret;
+
+ ret = (p->rs485.flags & SER_RS485_RTS_AFTER_SEND) ? 1 : 0;
+ if (gpio_get_value(p->rts_gpio) != ret) {
+ if (p->rs485.delay_rts_after_send > 0)
+ mdelay(p->rs485.delay_rts_after_send);
+ gpio_set_value(p->rts_gpio, ret);
+ }
+ }
+
if (p->ier & UART_IER_THRI) {
p->ier &= ~UART_IER_THRI;
serial_out(p, UART_IER, p->ier);
}
+
+ if ((p->rs485.flags & SER_RS485_ENABLED) &&
+ !(p->rs485.flags & SER_RS485_RX_DURING_TX)) {
+ /*
+ * Empty the RX FIFO, we are not interested in anything
+ * received during the half-duplex transmission.
+ */
+ serial_out(p, UART_FCR, p->fcr | UART_FCR_CLEAR_RCVR);
+ /* Re-enable RX interrupts */
+ p->ier |= UART_IER_RLSI | UART_IER_RDI;
+ p->port.read_status_mask |= UART_LSR_DR;
+ serial_out(p, UART_IER, p->ier);
+ }
}

static void serial8250_stop_tx(struct uart_port *port)
@@ -1330,6 +1356,20 @@ static void serial8250_start_tx(struct uart_port *port)
if (up->dma && !serial8250_tx_dma(up)) {
goto out;
} else if (!(up->ier & UART_IER_THRI)) {
+
+ if (up->rs485.flags & SER_RS485_ENABLED) {
+ int ret;
+
+ ret = (up->rs485.flags & SER_RS485_RTS_ON_SEND) ? 1 : 0;
+ if (gpio_get_value(up->rts_gpio) != ret) {
+ gpio_set_value(up->rts_gpio, ret);
+ if (up->rs485.delay_rts_before_send > 0)
+ mdelay(up->rs485.delay_rts_before_send);
+ }
+ if (!(up->rs485.flags & SER_RS485_RX_DURING_TX))
+ serial8250_stop_rx(port);
+ }
+
up->ier |= UART_IER_THRI;
serial_port_out(port, UART_IER, up->ier);

@@ -2556,6 +2596,7 @@ serial8250_do_set_termios(struct uart_port *port, struct ktermios *termios,
serial_port_out(port, UART_FCR, UART_FCR_ENABLE_FIFO);
serial_port_out(port, UART_FCR, fcr); /* set fcr */
}
+ up->fcr = fcr;
serial8250_set_mctrl(port, port->mctrl);
spin_unlock_irqrestore(&port->lock, flags);
pm_runtime_mark_last_busy(port->dev);
@@ -2811,6 +2852,124 @@ serial8250_verify_port(struct uart_port *port, struct serial_struct *ser)
return 0;
}

+int serial8250_probe_rs485(struct uart_8250_port *up,
+ struct device *dev)
+{
+ struct serial_rs485 *rs485conf = &up->rs485;
+ struct device_node *np = dev->of_node;
+ u32 rs485_delay[2];
+ enum of_gpio_flags flags;
+ int ret;
+
+ rs485conf->flags = 0;
+ if (!np)
+ return 0;
+
+ /* check for tx enable gpio */
+ up->rts_gpio = of_get_named_gpio_flags(np, "rts-gpio", 0, &flags);
+ if (up->rts_gpio == -EPROBE_DEFER)
+ return -EPROBE_DEFER;
+ if (!gpio_is_valid(up->rts_gpio))
+ return 0;
+
+ ret = devm_gpio_request(dev, up->rts_gpio, "serial_rts");
+ if (ret < 0)
+ return ret;
+ ret = gpio_direction_output(up->rts_gpio,
+ flags & SER_RS485_RTS_AFTER_SEND);
+ if (ret < 0)
+ return ret;
+
+ up->rts_gpio_valid = true;
+
+ if (of_property_read_bool(np, "rs485-rts-active-high"))
+ rs485conf->flags |= SER_RS485_RTS_ON_SEND;
+ else
+ rs485conf->flags |= SER_RS485_RTS_AFTER_SEND;
+
+ if (of_property_read_u32_array(np, "rs485-rts-delay",
+ rs485_delay, 2) == 0) {
+ rs485conf->delay_rts_before_send = rs485_delay[0];
+ rs485conf->delay_rts_after_send = rs485_delay[1];
+ }
+
+ if (of_property_read_bool(np, "rs485-rx-during-tx"))
+ rs485conf->flags |= SER_RS485_RX_DURING_TX;
+
+ if (of_property_read_bool(np, "linux,rs485-enabled-at-boot-time"))
+ rs485conf->flags |= SER_RS485_ENABLED;
+
+ return 0;
+}
+EXPORT_SYMBOL_GPL(serial8250_probe_rs485);
+
+static void serial8250_config_rs485(struct uart_port *port,
+ struct serial_rs485 *rs485conf)
+{
+ struct uart_8250_port *up =
+ container_of(port, struct uart_8250_port, port);
+ unsigned long flags;
+ unsigned int mode;
+ int val;
+
+ pm_runtime_get_sync(port->dev);
+ spin_lock_irqsave(&up->port.lock, flags);
+
+ /* Disable interrupts from this port */
+ mode = up->ier;
+ up->ier = 0;
+ serial_out(up, UART_IER, 0);
+
+ /* store new config */
+ up->rs485 = *rs485conf;
+
+ /* enable / disable rts */
+ val = (up->rs485.flags & SER_RS485_ENABLED) ?
+ SER_RS485_RTS_AFTER_SEND : SER_RS485_RTS_ON_SEND;
+ val = (up->rs485.flags & val) ? 1 : 0;
+ gpio_set_value(up->rts_gpio, val);
+
+ /* Enable interrupts */
+ up->ier = mode;
+ serial_out(up, UART_IER, up->ier);
+
+ spin_unlock_irqrestore(&up->port.lock, flags);
+ pm_runtime_mark_last_busy(port->dev);
+ pm_runtime_put_autosuspend(port->dev);
+}
+
+static int serial8250_ioctl(struct uart_port *port, unsigned int cmd,
+ unsigned long arg)
+{
+ struct serial_rs485 rs485conf;
+ struct uart_8250_port *up;
+
+ up = container_of(port, struct uart_8250_port, port);
+ switch (cmd) {
+ case TIOCSRS485:
+ if (!gpio_is_valid(up->rts_gpio))
+ return -ENODEV;
+ if (copy_from_user(&rs485conf, (void __user *) arg,
+ sizeof(rs485conf)))
+ return -EFAULT;
+
+ serial8250_config_rs485(port, &rs485conf);
+ break;
+
+ case TIOCGRS485:
+ if (!gpio_is_valid(up->rts_gpio))
+ return -ENODEV;
+ if (copy_to_user((void __user *) arg, &up->rs485,
+ sizeof(rs485conf)))
+ return -EFAULT;
+ break;
+
+ default:
+ return -ENOIOCTLCMD;
+ }
+ return 0;
+}
+
static const char *
serial8250_type(struct uart_port *port)
{
@@ -2840,6 +2999,7 @@ static struct uart_ops serial8250_pops = {
.request_port = serial8250_request_port,
.config_port = serial8250_config_port,
.verify_port = serial8250_verify_port,
+ .ioctl = serial8250_ioctl,
#ifdef CONFIG_CONSOLE_POLL
.poll_get_char = serial8250_get_poll_char,
.poll_put_char = serial8250_put_poll_char,
@@ -3375,6 +3535,17 @@ int serial8250_register_8250_port(struct uart_8250_port *up)
uart->tx_loadsz = up->tx_loadsz;
uart->capabilities = up->capabilities;

+ /*
+ * gpio_is_valid() is nice but if this struct wasn't initialized
+ * then it is 0 which is considered as valid. With the ioctl()
+ * which can enable the rs485 routine we could abuse a gpio.
+ */
+ if (up->rts_gpio_valid) {
+ uart->rs485 = up->rs485;
+ uart->rts_gpio = up->rts_gpio;
+ } else
+ uart->rts_gpio = -EINVAL;
+
/* Take tx_loadsz from fifosize if it wasn't set separately */
if (uart->port.fifosize && !uart->tx_loadsz)
uart->tx_loadsz = uart->port.fifosize;
diff --git a/include/linux/serial_8250.h b/include/linux/serial_8250.h
index 0ec21ec..056a73f 100644
--- a/include/linux/serial_8250.h
+++ b/include/linux/serial_8250.h
@@ -78,6 +78,7 @@ struct uart_8250_port {
unsigned char acr;
unsigned char ier;
unsigned char lcr;
+ unsigned char fcr;
unsigned char mcr;
unsigned char mcr_mask; /* mask of user bits */
unsigned char mcr_force; /* mask of forced bits */
@@ -94,6 +95,9 @@ struct uart_8250_port {
unsigned char msr_saved_flags;

struct uart_8250_dma *dma;
+ struct serial_rs485 rs485;
+ int rts_gpio;
+ bool rts_gpio_valid;

/* 8250 specific callbacks */
int (*dl_read)(struct uart_8250_port *);
@@ -107,6 +111,8 @@ void serial8250_resume_port(int line);

extern int early_serial_setup(struct uart_port *port);

+extern int serial8250_probe_rs485(struct uart_8250_port *up,
+ struct device *dev);
extern int serial8250_find_port(struct uart_port *p);
extern int serial8250_find_port_for_earlycon(void);
extern unsigned int serial8250_early_in(struct uart_port *port, int offset);
--
2.0.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/


https://patchwork.kernel.org/project/linux-arm-kernel/patch/1404928177-26554-6-git-send-email-bigeasy@linutronix.de/

http://lists.infradead.org/pipermail/linux-arm-kernel/2014-July/271071.html

#73 Re: 全志 SOC » 请教大家一个问题,全志linux主线uart驱动里面控制一个io脚实现rs485功能,应该如何修改? » 2020-11-09 14:34:26

X3
路人甲 说:

根据楼上这篇文章彻底解决了驱动中gpio控制RS485方向控制问题:

serial8250_tx_chars() 函数中执行 __stop_tx(up) 之后:

                //等待发送完成
                while (port->ops->tx_empty(port) != TIOCSER_TEMT)
                {
                    ;
                }

                gpio_set_value(133, 0);//拉低PE5, 进入接收状态

发现Linux5.4.70 执行 port->ops->tx_empty(port) 会死机。

#74 Re: 全志 SOC » f1c100s 要接以太网咋整? » 2020-08-18 08:10:24

X3

F1C100s要用以太网不如直接上V3s了。

#75 Re: 全志 SOC » 基于RTThread的F1C100s开发(带boot启动+硬件多图层+硬件游标+LVGL+SDIO) » 2020-04-17 23:54:10

X3

貌似你的 python 缺少 building 组件?
是不是要用 pip install building ???
或者 python -m pip install building ???

#76 Re: 站务公告/网站建设 » 自动定时备份 debugdump(whycan) 数据库并发送到邮箱 » 2020-04-17 23:52:02

X3

sudo apt-get install sendmail mailutils -y

echo “邮件正文” | mail -s 邮件主题 -r noreply@xxx.com yyyyyyy@qq.com

为何我的阿里云服务器安装 sendmail 之后, 使用mail命令死活发不出邮件?难道是被锁住了吗?如何解锁呢?

但是用搬瓦工可以哦。

#77 Re: 全志 SOC » A33/X3 Linux 5.0 控制 LCD 背光 » 2020-04-13 19:57:55

X3

用户层控制亮度:

echo 0 > /sys/class/backlight/backlight/brightness
echo 1 > /sys/class/backlight/backlight/brightness
....
echo 9 > /sys/class/backlight/backlight/brightness

#78 Re: 全志 SOC » A33/X3 Linux 5.0 控制 LCD 背光 » 2020-04-13 19:55:08

X3

dts 修改:

/ {



        backlight: backlight {
                compatible = "pwm-backlight";
                pwms = <&pwm 0 50000 PWM_POLARITY_INVERTED>;
                brightness-levels = <0 1 2 4 8 16 32 64 128 255>;
                default-brightness-level = <9>;
        };
&pwm {
        pinctrl-names = "default";
        pinctrl-0 = <&pwm0_pin>;
        status = "okay";
};

#79 Re: 全志 SOC » A33/X3 Linux 5.0 控制 LCD 背光 » 2020-04-13 19:48:38

X3

ARCH=arm make memuconfig 开启以下配置:

CONFIG_BACKLIGHT_LCD_SUPPORT=y
CONFIG_BACKLIGHT_PWM=y

#80 全志 SOC » A33/X3 Linux 5.0 控制 LCD 背光 » 2020-04-13 19:47:07

X3
回复: 5

QQ图片20200413194618.png

硬件上 PWM0 PH0 控制 LCD 背光

#82 Re: 全志 SOC » 新手求助Zero v3“增开USART1 和USART2” » 2020-04-13 10:34:51

X3

https://lists.denx.de/pipermail/u-boot/2018-June/330701.html

@@ -93,12 +116,39 @@ def Binman(options, args):
         try:
             tools.SetInputDirs(options.indir)
             tools.PrepareOutputDir(options.outdir, options.preserve)
-            dtb = fdt.FdtScan(dtb_fname)
+
+            # Get the device tree ready by compiling it and copying the compiled
+            # output into a file in our output directly. Then scan it for use
+            # in binman.
+            dtb_fname = fdt_util.EnsureCompiled(dtb_fname)
+            fname = tools.GetOutputFilename('u-boot-out.dtb')
+            with open(dtb_fname) as infd:
+                with open(fname, 'wb') as outfd:
+                    outfd.write(infd.read())
+            dtb = fdt.FdtScan(fname)
+
+            # Note the file so that GetFdt() can find it
+            fdt_files['u-boot.dtb'] = dtb
             node = _FindBinmanNode(dtb)
             if not node:
                 raise ValueError("Device tree '%s' does not have a 'binman' "
                                  "node" % dtb_fname)
+

错误在 python 脚本, 你可以跟踪一下。

#83 Re: 全志 SOC » 新手求助Zero v3“增开USART1 和USART2” » 2020-04-13 10:12:46

X3

sun8i-v3s-licheepi-zero.dts  47行附近有语法错误

#85 Re: 技术人生/软件使用技巧/破解经验/技术吐槽/灌水 » 请大家推荐一款资料备份硬盘 » 2020-04-08 10:32:03

X3
arychen 说:

SSD会不会更长久点   资料备份估计也不会经常开着吧,读写频度不高又没有机械故障的风险  还省电哈

不管是机械或者电子的存储器, 都有寿命的,估计标称10年左右(没查,凭感觉)。

据说地球上最可靠的记忆方式,石头.

因为现在还能挖出曾经地球的霸主 ---- 恐龙化石!

#86 Re: 全志 SOC » 试一试 Ubuntu 18.04 编译 X3 SDK » 2020-04-08 10:28:01

X3

2020-04-08_101324.png

烧录应该成功了,因为插卡之后就没有USB FEL设备了, 但是串口0没有反应, 芯片没有发热, 这TMD就怪了。

#87 Re: 全志 SOC » 试一试 Ubuntu 18.04 编译 X3 SDK » 2020-04-08 09:57:04

X3

这下麻烦,不知道烧哪里, 烧TF卡发现一闪而过.

参考这个帖子: https://whycan.cn/t_917.html#p30343

解包img文件, 发现boot0 只有 boot0_sdcard.fex / boot0_nand.fex

看来可能是 tf卡 或者 spi nand 固件:

$ ../imgRePacker.exe "tina_astar-parrot_uart0.img"

        imgRePacker (version 2.05 windows)
        LiveSuit's & PhoenixSuit's firmware image unpacker/packer

        (c) RedScorpio, Moscow, 2012-2014
            RedScorpio@land.ru

        ==========================[ START ]==========================

        --- Firmware unpacking ---

        PhoenixSuit image format detected

        - image.cfg creating -
        image.cfg created

        - Files extracting -
        "\sys_config.fex"               extracted (format: unknown)
        "\config.fex"           extracted (format: unknown)
        "\split_xxxx.fex"               extracted (format: unknown)
        "\sys_partition.fex"            extracted (format: unknown)
        "\boot0_nand.fex"               extracted (format: Allwinner BOOT0 file)
        "\boot0_sdcard.fex"             extracted (format: Allwinner BOOT0 file)
        "\u-boot.fex"           extracted (format: unknown)
        "\toc1.fex"             extracted (format: unknown/empty?)
        "\toc0.fex"             extracted (format: unknown/empty?)
        "\fes1.fex"             extracted (format: Allwinner BOOT0 file)
        "\full_img.fex"         extracted (format: unknown/empty?)
        "\usbtool.fex"          extracted (format: Windows PE file)
        "\aultools.fex"         extracted (format: Compiled lua file)
        "\aultls32.fex"         extracted (format: Compiled lua file)
        "\cardtool.fex"         extracted (format: Windows PE file)
        "\cardscript.fex"               extracted (format: unknown)
        "\sunxi_mbr.fex"                extracted (format: unknown)
        "\dlinfo.fex"           extracted (format: unknown)
        "\boot-resource.fex"            extracted (format: FAT16 image)
                "boot-resource.fex.iso" created
        "\Vboot-resource.fex"           extracted (format: unknown/empty?)
        "\env.fex"              extracted (format: unknown)
        "\Venv.fex"             extracted (format: unknown/empty?)
        "\boot.fex"             extracted (format: unknown)
        "\Vboot.fex"            extracted (format: unknown/empty?)
        "\rootfs.fex"           extracted (format: unknown)
        "\Vrootfs.fex"          extracted (format: unknown/empty?)
        "\recovery.fex"         extracted (format: unknown/empty?)
        "\Vrecovery.fex"                extracted (format: unknown/empty?)

        ==========================[ STOP  ]==========================

#88 Re: 全志 SOC » 试一试 Ubuntu 18.04 编译 X3 SDK » 2020-04-08 09:08:09

X3

打包成功:

toc0.fex Len: 0x8
fes1.fex Len: 0x31c0
full_img.fex Len: 0x16
usbtool.fex Len: 0x24200
aultools.fex Len: 0x27c29
aultls32.fex Len: 0x24d3f
cardtool.fex Len: 0x11e00
cardscript.fex Len: 0x6ea
sunxi_mbr.fex Len: 0x10000
dlinfo.fex Len: 0x4000
boot-resource.fex Len: 0x4c800
Vboot-resource.fex Len: 0x4
env.fex Len: 0x20000
Venv.fex Len: 0x4
boot.fex Len: 0x400000
Vboot.fex Len: 0x4
rootfs.fex Len: 0xc00000
Vrootfs.fex Len: 0x4
recovery.fex Len: 0x18
Vrecovery.fex Len: 0x4
BuildImg 0
Dragon execute image.cfg SUCCESS !
----------image is for nand/emmc----------
----------image is at----------

~/A33/x3sdk/x3_tina_send/out/astar-parrot/tina_astar-parrot_uart0.img

pack finish

#89 Re: 全志 SOC » 试一试 Ubuntu 18.04 编译 X3 SDK » 2020-04-08 08:32:35

X3
~/A33/x3sdk/x3_tina_send$ make
~/A33/x3sdk/x3_tina_send/build/board.mk:9: ~/A33/x3sdk/x3_tina_send/target/allwinner/-common/BoardConfigCommon.mk: No such file or directory
~/A33/x3sdk/x3_tina_send/build/board.mk:10: ~/A33/x3sdk/x3_tina_send/target/allwinner//BoardConfig.mk: No such file or directory
make[3]: *** No rule to make target '~/A33/x3sdk/x3_tina_send/target/allwinner//BoardConfig.mk'.  Stop.
~/A33/x3sdk/x3_tina_send/build/board.mk:9: ~/A33/x3sdk/x3_tina_send/target/allwinner/-common/BoardConfigCommon.mk: No such file or directory
~/A33/x3sdk/x3_tina_send/build/board.mk:10: ~/A33/x3sdk/x3_tina_send/target/allwinner//BoardConfig.mk: No such file or directory
make[3]: *** No rule to make target '~/A33/x3sdk/x3_tina_send/target/allwinner//BoardConfig.mk'.  Stop.
~/A33/x3sdk/x3_tina_send/build/board.mk:9: ~/A33/x3sdk/x3_tina_send/target/allwinner/-common/BoardConfigCommon.mk: No such file or directory
~/A33/x3sdk/x3_tina_send/build/board.mk:10: ~/A33/x3sdk/x3_tina_send/target/allwinner//BoardConfig.mk: No such file or directory
make[2]: *** No rule to make target '~/A33/x3sdk/x3_tina_send/target/allwinner//BoardConfig.mk'.  Stop.
~/A33/x3sdk/x3_tina_send/build/toplevel.mk:287: recipe for target 'prereq' failed
make[1]: *** [prereq] Error 2
~/A33/x3sdk/x3_tina_send/build/toplevel.mk:301: recipe for target 'world' failed
make: *** [world] Error 2

解决方案:

date +%s > version.date

原因:

原因是yaffs需要用这个日期信息来生成一个冗长的version信息,系统会从git信息中查找,但git没有安装,或者git环境变量错误。

参考: https://blog.csdn.net/yulijun2201/article/details/81667198

#91 全志 SOC » 试一试 Ubuntu 18.04 编译 X3 SDK » 2020-04-08 00:17:39

X3
回复: 8

哎呀, 搜了一圈居然发现已经全有了: https://whycan.cn/t_3270.html


source build/envsetup.sh

lunch

    选1  [astar_parrot-tina]

make

pack

页脚

工信部备案:粤ICP备20025096号 Powered by FluxBB

感谢为中文互联网持续输出优质内容的各位老铁们。 QQ: 516333132, 微信(wechat): whycan_cn (哇酷网/挖坑网/填坑网) service@whycan.cn