全志A40i android7.1 调试信息打印串口由uart0改为uart3

news2025/6/12 8:46:00

一,概述

1. 目的

将调试信息打印串口由uart0改为uart3。

2. 版本信息

Uboot版本:2014.07;
Kernel版本:Linux-3.10;

二,Uboot

1. sys_config.fex改动

使能uart3(TX:PH00 RX:PH01),并让boot0,uboot的debug串口由uart0改为uart3(TX:PH00 RX:PH01)

diff --git a/pack/chips/sun8iw11p1/configs/a40i-p3/sys_config.fex b/pack/chips/sun8iw11p1/configs/a40i-p3/sys_config.fex index 159d3fa..afe98fe 100755
--- a/pack/chips/sun8iw11p1/configs/a40i-p3/sys_config.fex
+++ b/pack/chips/sun8iw11p1/configs/a40i-p3/sys_config.fex
 @@ -111,9 +111,9 @@ twi_scl         = port:PB0<2><default><default><default>
 twi_sda         = port:PB1<2><default><default><default>
 
 [uart_para]
 -uart_debug_port = 0
 -uart_debug_tx         = port:PB22<2><1><default><default>
 -uart_debug_rx         = port:PB23<2><1><default><default>
 +uart_debug_port = 3
 +uart_debug_tx         = port:PH00<4><1><default><default>
 +uart_debug_rx         = port:PH01<4><1><default><default>
 
 [jtag_para]
 jtag_enable     = 1
 @@ -387,7 +387,7 @@ uart2_rx         = port:PI19<7><1><default><default>
 
 
 [uart3]
 -uart3_used       = 0
 +uart3_used       = 1
 uart3_port       = 3
 uart3_type       = 2
 uart3_tx         = port:PH00<4><1><default><default>

2. 宏定义改动

brandy/u-boot-2014.07/include/configs/sunXXX.h路径中,修改如下:

diff --git a/u-boot-2014.07/include/configs/sun8iw11p1.h b/u-boot
2014.07/include/configs/sun8iw11p1.h
index b733162..22390a9 100755
--- a/u-boot-2014.07/include/configs/sun8iw11p1.h
+++ b/u-boot-2014.07/include/configs/sun8iw11p1.h
@@ -282,7 +282,7 @@
#define CONFIG_SYS_NS16550_COM4                SUNXI_UART3_BASE
#define CONFIG_NS16550_FIFO_ENABLE     (1)
-#define CONFIG_CONS_INDEX                      1                       /* 
which serial channel for console */
+#define CONFIG_CONS_INDEX                      4                       /* 
which serial channel for console */
#define CONFIG_SETUP_MEMORY_TAGS

CONFIG_CONS_INDEX=4,对应serial3 ;如下表:

串口通道CONFIG_CONS_INDEX
serial01
serial12
serial23
serial34
serial45
serial56

指定波特率:

 #define CONFIG_BAUDRATE             115200

3. 初始化改动

boot0已经限制了仅使用uart0,将这一修改去掉,将会按照sys_config.fex中的uart_debug_port配置的uart端口输出信息。

 diff --git a/u-boot-2014.07/arch/arm/cpu/armv7/sun8iw11p1/spl/serial_spl.c 
b/u-boot-2014.07/arch/arm/cpu/armv7/sun8iw11p1/spl/serial_spl.c
 index 3f6c141..70955df 100644--- a/u-boot-2014.07/arch/arm/cpu/armv7/sun8iw11p1/spl/serial_spl.c
 +++ b/u-boot-2014.07/arch/arm/cpu/armv7/sun8iw11p1/spl/serial_spl.c
 @@ -44,10 +44,10 @@ void sunxi_serial_init(int uart_port, void *gpio_cfg, 
int gpio_max)
        u32 reg, i;
        u32 uart_clk;
-       if( (uart_port < 0) ||(uart_port > 0) )
-       {
-               return;-       }
 +       // if( (uart_port < 0) ||(uart_port > 0) )
 +       // {
 +       //      return;
 +       // }
        //reset
        reg = readl(CCMU_BUS_SOFT_RST_REG4);
        reg &= ~(1<<(CCM_UART_PORT_OFFSET + uart_port));

4. 打包改动

由于平台适配性问题,在更改了uart_para参数后,会出现采用PhoenixSuit无法烧录固件的情况。由于在pack阶段,会解析sys_confg.fex的uart_para配置项,然后更新boot0,fes1,uboot的头部信息,路径(tools/pack/pack

 update_fes1  fes1.fex           sys_config.bin > /dev/null

出现无法烧录的原因是pack更新了fes1的头部信息,导致校验不通过,所以需要屏蔽fes1的更新,修改如下:

diff --git a/pack_tools/update_fes1/update_fes1.c 
b/pack_tools/update_fes1/update_fes1.c
index 6134c96..536dfb1 100755
 --- a/pack_tools/update_fes1/update_fes1.c
 +++ b/pack_tools/update_fes1/update_fes1.c
 @@ -230,6 +230,21 @@ int update_for_fes1(char *fes1_name, int storage_type)
                }
        }
 +       fes1_head->prvt_head.uart_port = 0;
 +       fes1_head->prvt_head.uart_ctrl[0].port      = 2;
 +       fes1_head->prvt_head.uart_ctrl[0].port_num  = 22;
 +       fes1_head->prvt_head.uart_ctrl[0].mul_sel   = 2;
 +       fes1_head->prvt_head.uart_ctrl[0].pull      = 1;
 +       fes1_head->prvt_head.uart_ctrl[0].drv_level = -1;
 +       fes1_head->prvt_head.uart_ctrl[0].data      = -1;
 +
 +       fes1_head->prvt_head.uart_ctrl[1].port      = 2;
 +       fes1_head->prvt_head.uart_ctrl[1].port_num  = 23;
 +       fes1_head->prvt_head.uart_ctrl[1].mul_sel   = 2;
 +       fes1_head->prvt_head.uart_ctrl[1].pull      = 1;
 +       fes1_head->prvt_head.uart_ctrl[1].drv_level = -1;
 +       fes1_head->prvt_head.uart_ctrl[1].data      = -1;
 +
        //取出数据进行修正,debugenable参数
        if(!script_parser_fetch("jtag_para", "jtag_enable", value))
        {

更新update_fes1工具:进入brandy/pack_tools/update_fes1/ 目录,执行make命令,用生成的 update_fes1覆盖tools/pack/pctools/linux/mod_update/update_fes1 ,再进行 pack 操作即可。
但这样会造成fes1的输出依然还是uart0,所以我们需要更改fes1的代码,如下:

diff --git a/lichee/brandy/u-boot-2014.07/sunxi_spl/fes_init/main/fes1_main.c b/lichee/brandy/u-boot-2014.07/sunxi_spl/fes_init/main/fes1_main.c
index 31a01017c5..1b794e2010 100755
--- a/lichee/brandy/u-boot-2014.07/sunxi_spl/fes_init/main/fes1_main.c
+++ b/lichee/brandy/u-boot-2014.07/sunxi_spl/fes_init/main/fes1_main.c
@@ -101,9 +101,35 @@ int main(void)
 {
        __s32 dram_size=0;
 
-       timer_init();
+       timer_init();       
+if(CONFIG_CONS_INDEX == 4)
+{
+               boot0_file_head_t fes1_head_fix;
+               fes1_head_fix.prvt_head.uart_port = 3;
+               fes1_head_fix.prvt_head.uart_ctrl[0].port = 8;      
+               fes1_head_fix.prvt_head.uart_ctrl[0].port_num  = 0;
+               fes1_head_fix.prvt_head.uart_ctrl[0].mul_sel  = 4;
+               fes1_head_fix.prvt_head.uart_ctrl[0].pull   = 1;   
+               fes1_head_fix.prvt_head.uart_ctrl[0].drv_level = -1;
+               fes1_head_fix.prvt_head.uart_ctrl[0].data = -1;      
+               
+
+               fes1_head_fix.prvt_head.uart_ctrl[1].port  = 8;
+               fes1_head_fix.prvt_head.uart_ctrl[1].port_num  = 0;
+               fes1_head_fix.prvt_head.uart_ctrl[1].mul_sel  = 4;
+               fes1_head_fix.prvt_head.uart_ctrl[1].pull   = 1;
+               fes1_head_fix.prvt_head.uart_ctrl[1].drv_level = -1;
+               fes1_head_fix.prvt_head.uart_ctrl[1].data = -1;
+               
+               //serial init
+               sunxi_serial_init(fes1_head_fix.prvt_head.uart_port, (void *)fes1_head_fix.prvt_head.uart_ctrl, 2);
+ }
+ else
+ {
        //serial init
-       sunxi_serial_init(fes1_head.prvt_head.uart_port, (void *)fes1_head.prvt_head.uart_ctrl, 2);
+       sunxi_serial_init(fes1_head_fix.prvt_head.uart_port, (void *)fes1_head_fix.prvt_head.uart_ctrl, 2);
+ }
+
 #ifdef CONFIG_SUNXI_MULITCORE_BOOT
        pmu_init();
        set_pll_voltage(1260);

其中,CONFIG_CONS_INDEX即为brandy/u-boot-2014.07/include/configs/sunXXX.h路径中的宏。

5. 启动参数改动

更改uboot传递给kernel的启动参数,路径pack/chips/sun8iw11p1/configs/default/env.cfg可能
因为配置有所不同

diff --git a/pack/chips/sun8iw11p1/configs/default/env.cfg 
b/pack/chips/sun8iw11p1/configs/default/env.cfgindex eb60f41..922057e 100755
--- a/pack/chips/sun8iw11p1/configs/default/env.cfg
+++ b/pack/chips/sun8iw11p1/configs/default/env.cfg
 @@ -1,9 +1,9 @@
 
 #kernel command arguments
 enforcing=1
 -earlyprintk=sunxi-uart,0x01c28000
 +earlyprintk=sunxi-uart,0x01c28c00
 initcall_debug=0
 -console=ttyS0,115200
 +console=ttyS3,115200
 nand_root=/dev/system
 mmc_root=/dev/mmcblk0p7
 nor_root=/dev/mtdblock2

重新编译boot0,uboot。


三. Kernel

1. config改动

修改 kernel 的 menuconfig 中 uart 的打印端口和基地址:

diff --git a/arch/arm/Kconfig.debug b/arch/arm/Kconfig.debug
 index 4d17934..3aea83e 100644
--- a/arch/arm/Kconfig.debug
+++ b/arch/arm/Kconfig.debug
@@ -443,6 +443,13 @@ choice
                  Say Y here if you want kernel low-level debugging support
                  on Allwinner A1X based platforms on the UART1.

 +       config DEBUG_SUNXI_UART3
 +               bool "Kernel low-level debugging messages via sunXi UART3"
 +               depends on ARCH_SUNXI
 +               help
 +                 Say Y here if you want kernel low-level debugging support
 +                 on Allwinner A1X based platforms on the UART3.
 +
        config DEBUG_TEGRA_UART
                depends on ARCH_TEGRA
                bool "Use Tegra UART for low-level debug"
 @@ -662,7 +669,7 @@ config DEBUG_LL_INCLUDE
                                 DEBUG_MMP_UART3
        default "debug/sirf.S" if DEBUG_SIRFPRIMA2_UART1 || 
DEBUG_SIRFMARCO_UART1
        default "debug/socfpga.S" if DEBUG_SOCFPGA_UART
 -       default "debug/sunxi.S" if DEBUG_SUNXI_UART0 || DEBUG_SUNXI_UART1
 +       default "debug/sunxi.S" if DEBUG_SUNXI_UART0 || DEBUG_SUNXI_UART1 || DEBUG_SUNXI_UART3
        default "debug/tegra.S" if DEBUG_TEGRA_UART
        default "debug/ux500.S" if DEBUG_UX500_UART
        default "debug/vexpress.S" if DEBUG_VEXPRESS_UART0_DETECT || \
diff --git a/arch/arm/include/debug/sunxi.S b/arch/arm/include/debug/sunxi.S
 index 04eb56d..5f66699 100644
 --- a/arch/arm/include/debug/sunxi.S
 +++ b/arch/arm/include/debug/sunxi.S
 @@ -16,6 +16,9 @@
 #elif defined(CONFIG_DEBUG_SUNXI_UART1)
 #define SUNXI_UART_DEBUG_PHYS_BASE 0x01c28400
 #define SUNXI_UART_DEBUG_VIRT_BASE 0xf1c28400
 +#elif defined(CONFIG_DEBUG_SUNXI_UART3)
 +#define SUNXI_UART_DEBUG_PHYS_BASE 0x01c28c00
 +#define SUNXI_UART_DEBUG_VIRT_BASE 0xf1c28c00
 #endif
 
 .macro  addruart, rp, rv, tmp

增加DEBUG_SUNXI_UART3后,在menuconfig中选择:

make ARCH=arm menuconfig

在这里插入图片描述

2. 设备树改动

dts可改可不改,为了统一,这里的设备树也一起更改,实际上这里的配置会被uboot传递的启动参数覆盖

 diff --git a/arch/arm/boot/dts/sun8iw11p1.dtsi 
b/arch/arm/boot/dts/sun8iw11p1.dtsi
 index 526fe29..4e00a86 100755
 --- a/arch/arm/boot/dts/sun8iw11p1.dtsi
 +++ b/arch/arm/boot/dts/sun8iw11p1.dtsi
 @@ -61,7 +61,7 @@
 };
 chosen {
 -               bootargs = "earlyprintk=sunxi-uart,0x01c28000 loglevel=8 
initcall_debug=1 console=ttyS0 init=/init";
 +               bootargs = "earlyprintk=sunxi-uart,0x01c28c00 loglevel=8 
initcall_debug=1 console=ttyS3 init=/init";
 linux,initrd-start = <0x0 0x0>;
 linux,initrd-end = <0x0 0x0>;
 };

四,文件系统

1. defconfig改动

修改buildroot-201611/configs/sun8iw11p1_defconfig 下的配置:

 diff --git a/configs/sun8iw11p1_defconfig b/configs/sun8iw11p1_defconfig
 index e4b6313..89c9e01 100755
 --- a/configs/sun8iw11p1_defconfig
 +++ b/configs/sun8iw11p1_defconfig
 @@ -273,7 +273,7 @@ BR2_SYSTEM_BIN_SH_BASH=y
 # BR2_SYSTEM_BIN_SH_NONE is not set
 BR2_SYSTEM_BIN_SH="bash"
 BR2_TARGET_GENERIC_GETTY=y-BR2_TARGET_GENERIC_GETTY_PORT="ttyS0"
 +BR2_TARGET_GENERIC_GETTY_PORT="ttyS3"
 # BR2_TARGET_GENERIC_GETTY_BAUDRATE_KEEP is not set
 # BR2_TARGET_GENERIC_GETTY_BAUDRATE_9600 is not set
 # BR2_TARGET_GENERIC_GETTY_BAUDRATE_19200 is not set

注:
执行build.sh编译builroot的过程:
tools/build/mkcommon.sh 会执行buildroot-201611/scripts/mkcommon.sh ,然后在buildroot-201611/scripts/build.sh 的build_buildroot函数中,
会判断是否存在out/sun8iw11p1/linux/common/buildroot/.config
如果存在,则使用该配置,否则使用buildroot-201611/configs/sun8iw11p1_defconfig ,所以需要
清空out目录,或者直接删除out/sun8iw11p1/linux/common/buildroot/.config

如果不确定是否配置成功,可以在buildroot-201611/package/skeleton/skeleton.mk 增加打印:

diff --git a/package/skeleton/skeleton.mk b/package/skeleton/skeleton.mk
 index a4788e1..702596b 100644
 --- a/package/skeleton/skeleton.mk
 +++ b/package/skeleton/skeleton.mk
 @@ -223,6 +223,7 @@ endef
 else ifeq ($(BR2_INIT_BUSYBOX),y)
 # Add getty to busybox inittab
 define SKELETON_SET_GETTY
 +       echo "SKELETON_TARGET_GENERIC_GETTY_PORT$(SKELETON_TARGET_GENERIC_GETTY_PORT)"
 $(SED) '/# 
GENERIC_SERIAL$$/s~^.*#~$(SKELETON_TARGET_GENERIC_GETTY_PORT)::respawn:/sbin
 /getty -L $(SKELETON_TARGET_GENERIC_GETTY_OPTIONS) 
$(SKELETON_TARGET_GENERIC_GETTY_PORT) $(SKELETON_TARGET_GENE
 $(TARGET_DIR)/etc/inittab
 endef

五,整体重新编译打包

 ./build.sh && ./build.sh pack

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/2407479.html

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

pikachu靶场通关笔记22-1 SQL注入05-1-insert注入(报错法)

目录 一、SQL注入 二、insert注入 三、报错型注入 四、updatexml函数 五、源码审计 六、insert渗透实战 1、渗透准备 2、获取数据库名database 3、获取表名table 4、获取列名column 5、获取字段 本系列为通过《pikachu靶场通关笔记》的SQL注入关卡(共10关&#xff0…

Redis数据倾斜问题解决

Redis 数据倾斜问题解析与解决方案 什么是 Redis 数据倾斜 Redis 数据倾斜指的是在 Redis 集群中&#xff0c;部分节点存储的数据量或访问量远高于其他节点&#xff0c;导致这些节点负载过高&#xff0c;影响整体性能。 数据倾斜的主要表现 部分节点内存使用率远高于其他节…

mysql已经安装,但是通过rpm -q 没有找mysql相关的已安装包

文章目录 现象&#xff1a;mysql已经安装&#xff0c;但是通过rpm -q 没有找mysql相关的已安装包遇到 rpm 命令找不到已经安装的 MySQL 包时&#xff0c;可能是因为以下几个原因&#xff1a;1.MySQL 不是通过 RPM 包安装的2.RPM 数据库损坏3.使用了不同的包名或路径4.使用其他包…

Map相关知识

数据结构 二叉树 二叉树&#xff0c;顾名思义&#xff0c;每个节点最多有两个“叉”&#xff0c;也就是两个子节点&#xff0c;分别是左子 节点和右子节点。不过&#xff0c;二叉树并不要求每个节点都有两个子节点&#xff0c;有的节点只 有左子节点&#xff0c;有的节点只有…

selenium学习实战【Python爬虫】

selenium学习实战【Python爬虫】 文章目录 selenium学习实战【Python爬虫】一、声明二、学习目标三、安装依赖3.1 安装selenium库3.2 安装浏览器驱动3.2.1 查看Edge版本3.2.2 驱动安装 四、代码讲解4.1 配置浏览器4.2 加载更多4.3 寻找内容4.4 完整代码 五、报告文件爬取5.1 提…

图表类系列各种样式PPT模版分享

图标图表系列PPT模版&#xff0c;柱状图PPT模版&#xff0c;线状图PPT模版&#xff0c;折线图PPT模版&#xff0c;饼状图PPT模版&#xff0c;雷达图PPT模版&#xff0c;树状图PPT模版 图表类系列各种样式PPT模版分享&#xff1a;图表系列PPT模板https://pan.quark.cn/s/20d40aa…

tree 树组件大数据卡顿问题优化

问题背景 项目中有用到树组件用来做文件目录&#xff0c;但是由于这个树组件的节点越来越多&#xff0c;导致页面在滚动这个树组件的时候浏览器就很容易卡死。这种问题基本上都是因为dom节点太多&#xff0c;导致的浏览器卡顿&#xff0c;这里很明显就需要用到虚拟列表的技术&…

Spring数据访问模块设计

前面我们已经完成了IoC和web模块的设计&#xff0c;聪明的码友立马就知道了&#xff0c;该到数据访问模块了&#xff0c;要不就这俩玩个6啊&#xff0c;查库势在必行&#xff0c;至此&#xff0c;它来了。 一、核心设计理念 1、痛点在哪 应用离不开数据&#xff08;数据库、No…

如何在最短时间内提升打ctf(web)的水平?

刚刚刷完2遍 bugku 的 web 题&#xff0c;前来答题。 每个人对刷题理解是不同&#xff0c;有的人是看了writeup就等于刷了&#xff0c;有的人是收藏了writeup就等于刷了&#xff0c;有的人是跟着writeup做了一遍就等于刷了&#xff0c;还有的人是独立思考做了一遍就等于刷了。…

如何理解 IP 数据报中的 TTL?

目录 前言理解 前言 面试灵魂一问&#xff1a;说说对 IP 数据报中 TTL 的理解&#xff1f;我们都知道&#xff0c;IP 数据报由首部和数据两部分组成&#xff0c;首部又分为两部分&#xff1a;固定部分和可变部分&#xff0c;共占 20 字节&#xff0c;而即将讨论的 TTL 就位于首…

Android 之 kotlin 语言学习笔记三(Kotlin-Java 互操作)

参考官方文档&#xff1a;https://developer.android.google.cn/kotlin/interop?hlzh-cn 一、Java&#xff08;供 Kotlin 使用&#xff09; 1、不得使用硬关键字 不要使用 Kotlin 的任何硬关键字作为方法的名称 或字段。允许使用 Kotlin 的软关键字、修饰符关键字和特殊标识…

C++ Visual Studio 2017厂商给的源码没有.sln文件 易兆微芯片下载工具加开机动画下载。

1.先用Visual Studio 2017打开Yichip YC31xx loader.vcxproj&#xff0c;再用Visual Studio 2022打开。再保侟就有.sln文件了。 易兆微芯片下载工具加开机动画下载 ExtraDownloadFile1Info.\logo.bin|0|0|10D2000|0 MFC应用兼容CMD 在BOOL CYichipYC31xxloaderDlg::OnIni…

【Oracle】分区表

个人主页&#xff1a;Guiat 归属专栏&#xff1a;Oracle 文章目录 1. 分区表基础概述1.1 分区表的概念与优势1.2 分区类型概览1.3 分区表的工作原理 2. 范围分区 (RANGE Partitioning)2.1 基础范围分区2.1.1 按日期范围分区2.1.2 按数值范围分区 2.2 间隔分区 (INTERVAL Partit…

【开发技术】.Net使用FFmpeg视频特定帧上绘制内容

目录 一、目的 二、解决方案 2.1 什么是FFmpeg 2.2 FFmpeg主要功能 2.3 使用Xabe.FFmpeg调用FFmpeg功能 2.4 使用 FFmpeg 的 drawbox 滤镜来绘制 ROI 三、总结 一、目的 当前市场上有很多目标检测智能识别的相关算法&#xff0c;当前调用一个医疗行业的AI识别算法后返回…

RNN避坑指南:从数学推导到LSTM/GRU工业级部署实战流程

本文较长&#xff0c;建议点赞收藏&#xff0c;以免遗失。更多AI大模型应用开发学习视频及资料&#xff0c;尽在聚客AI学院。 本文全面剖析RNN核心原理&#xff0c;深入讲解梯度消失/爆炸问题&#xff0c;并通过LSTM/GRU结构实现解决方案&#xff0c;提供时间序列预测和文本生成…

学习STC51单片机32(芯片为STC89C52RCRC)OLED显示屏2

每日一言 今天的每一份坚持&#xff0c;都是在为未来积攒底气。 案例&#xff1a;OLED显示一个A 这边观察到一个点&#xff0c;怎么雪花了就是都是乱七八糟的占满了屏幕。。 解释 &#xff1a; 如果代码里信号切换太快&#xff08;比如 SDA 刚变&#xff0c;SCL 立刻变&#…

3-11单元格区域边界定位(End属性)学习笔记

返回一个Range 对象&#xff0c;只读。该对象代表包含源区域的区域上端下端左端右端的最后一个单元格。等同于按键 End 向上键(End(xlUp))、End向下键(End(xlDown))、End向左键(End(xlToLeft)End向右键(End(xlToRight)) 注意&#xff1a;它移动的位置必须是相连的有内容的单元格…

蓝桥杯3498 01串的熵

问题描述 对于一个长度为 23333333的 01 串, 如果其信息熵为 11625907.5798&#xff0c; 且 0 出现次数比 1 少, 那么这个 01 串中 0 出现了多少次? #include<iostream> #include<cmath> using namespace std;int n 23333333;int main() {//枚举 0 出现的次数//因…

什么是Ansible Jinja2

理解 Ansible Jinja2 模板 Ansible 是一款功能强大的开源自动化工具&#xff0c;可让您无缝地管理和配置系统。Ansible 的一大亮点是它使用 Jinja2 模板&#xff0c;允许您根据变量数据动态生成文件、配置设置和脚本。本文将向您介绍 Ansible 中的 Jinja2 模板&#xff0c;并通…

优选算法第十二讲:队列 + 宽搜 优先级队列

优选算法第十二讲&#xff1a;队列 宽搜 && 优先级队列 1.N叉树的层序遍历2.二叉树的锯齿型层序遍历3.二叉树最大宽度4.在每个树行中找最大值5.优先级队列 -- 最后一块石头的重量6.数据流中的第K大元素7.前K个高频单词8.数据流的中位数 1.N叉树的层序遍历 2.二叉树的锯…