PDT.c: 探索OF PROM设备树支持代码

版权申诉
0 下载量 104 浏览量 更新于2024-10-20 收藏 2KB RAR 举报
资源摘要信息:"PDT(PROM Device Tree)是一种在开源操作系统中用来描述计算机硬件的数据结构。PDT在操作系统初始化阶段被用来识别和配置计算机系统中的硬件设备,以支持后续的启动过程。PROM(可编程只读存储器)是一种存储介质,通常用于存储设备的固件或引导程序。PDT与PROM结合使用,可以更高效地管理系统硬件资源。 在本资源中,文件pdt.c是实现PDT在PROM环境下的支持代码。该代码文件实现了PDT的基本操作,包括创建、更新和解析设备树等。通过阅读和理解pdt.c文件,开发者可以深入掌握PDT在PROM设备中如何被具体实现和应用。 pdt.c文件中可能包含如下核心知识点: 1. 设备树概念:设备树是一个用来描述硬件设备特性的数据结构,它以树状结构描述了系统的硬件布局。设备树在操作系统内核中扮演着硬件描述符的角色,使内核能够根据设备树的描述来加载相应的驱动程序和配置硬件设备。 2. PDT与PROM的关系:在系统启动阶段,PROM中的固件读取PDT来获取硬件信息,然后将这些信息传递给操作系统。操作系统使用这些信息来初始化硬件设备,并为设备加载相应的驱动程序。 3. PDT支持代码的作用:PDT支持代码负责实现与PDT相关的操作,如设备树的构建、维护以及在系统启动和运行期间的查询和更新。这些操作对于操作系统的硬件抽象层至关重要,影响到硬件资源的管理效率。 4. 核心功能实现:在pdt.c文件中,开发者可以看到如何定义和操作设备树节点、如何添加和删除节点以及如何搜索和遍历设备树。此外,还可能涉及到设备树数据的序列化和反序列化,以便于设备树信息能够被存储和传输。 5. 兼容性和可扩展性:PDT支持代码通常设计为兼容不同的硬件和平台,所以开发者需要理解如何通过设备树来支持不同的硬件配置,并实现代码的可扩展性,以适应未来硬件的发展。 6. 错误处理和调试:在设备树代码的开发过程中,错误处理和调试是不可或缺的部分。pdt.c文件中会包含相应机制来处理设备树操作过程中可能出现的错误,并提供了调试接口以帮助开发者更好地理解和分析问题。 7. 硬件初始化流程:阅读pdt.c文件有助于了解在PROM环境下,如何通过设备树来初始化硬件设备。这包括加载固件、配置处理器、设置内存映射以及初始化各种I/O接口等。 了解上述知识点后,开发者可以对PDT在PROM环境中的实现有一个全面的认识。这对于从事嵌入式系统开发或者需要与硬件紧密交互的软件开发人员来说尤其重要。掌握PDT的原理和代码实现,有助于提高系统的稳定性和性能,同时也能更好地支持未来硬件的兼容性和扩展性。"

JDBC Connection [org.postgresql.jdbc.PgConnection@49f1bf43] will not be managed by Spring ==> Preparing: select z.*,y.PDTCLASS_CLASS FROM ( SELECT * FROM (SELECT r.PDT_PLANEX_PDTID,r.PDT_PLANEX_TYPE ,r.SUM_NUM,e.SUM_NUM2,e.COUNT_NUM FROM (SELECT SUM(t.PDT_PLANEX_NUM) as SUM_NUM,t.PDT_PLANEX_PDTID,t.PDT_PLANEX_TYPE FROM c_pdt_plan_ex t WHERE t.PDT_PLANEX_DELETED = 0 and t.DATA_FROM = ? and to_timestamp(?, 'yyyy-MM-dd HH:mm:ss.SSS') >= t.PDT_PLANEX_BEGIN and t.PDT_PLANEX_END >= to_timestamp(?, 'yyyy-MM-dd HH:mm:ss.SSS') GROUP BY t.PDT_PLANEX_PDTID,t.PDT_PLANEX_TYPE )r LEFT JOIN (SELECT SUM(o.WEISHT_NET_WGHT) SUM_NUM2,COUNT(1) COUNT_NUM,o.PDTINF_PDT,o.PDTINF_CLASS,o.PDT_PLANEX_PDTID,o.PDT_PLANEX_TYPE FROM(SELECT * FROM(SELECT * FROM (SELECT q.*, p.* FROM ( SELECT t.PDT_PLANEX_ID, t.PDT_PLANEX_NUM, t.PDT_PLANEX_PDTID, t.PDT_PLANEX_TYPE, t.PDT_PLANEX_BEGIN, t.PDT_PLANEX_END, t.PDT_PLANEX_COID FROM c_pdt_plan_ex t WHERE t.PDT_PLANEX_DELETED = 0 and t.DATA_FROM = ? and to_timestamp(?, 'yyyy-MM-dd HH:mm:ss.SSS') >= t.PDT_PLANEX_BEGIN and t.PDT_PLANEX_END >= to_timestamp(?, 'yyyy-MM-dd HH:mm:ss.SSS') GROUP BY t.PDT_PLANEX_PDTID, t.PDT_PLANEX_COID, t.PDT_PLANEX_TYPE, t.PDT_PLANEX_BEGIN, t.PDT_PLANEX_END, t.PDT_PLANEX_COID ) q LEFT JOIN (SELECT PDTINF_PDT, PDTINF_ID , PDTINF_CLASS FROM c_products_info WHERE PDTINF_DELETED=0 and DATA_FROM = ? )p on q.PDT_PLANEX_PDTID=p.PDTINF_ID)k LEFT JOIN (select g.CPY_CO,g.CPY_ID from c_companys g where CPY_DELETED=0 and DATA_FROM = ? ) c ON k.PDT_PLANEX_COID=c.CPY_ID)k inner JOIN (select j.WEISHT_NET_WGHT,j.WEISHT_PRODUCT,j.WEISHT_CO,j.WEISHT_EMPTY_TM,j.WEISHT_FULL_TM from c_weight_sheets j where WEISHT_DELETED = 0 and DATA_FROM = ? )r ON k.PDTINF_PDT=r.WEISHT_PRODUCT and k.CPY_CO=r.WEISHT_CO AND k.PDT_PLANEX_BEGIN <= r.WEISHT_FULL_TM AND k.PDT_PLANEX_END >= r.WEISHT_FULL_TM ORDER BY k.PDTINF_PDT )o GROUP BY o.PDT_PLANEX_PDTID)e ON e.PDT_PLANEX_PDTID=r.PDT_PLANEX_PDTID AND e.PDT_PLANEX_TYPE=r.PDT_PLANEX_TYPE)w left join (SELECT PDTINF_PDT, PDTINF_ID , PDTINF_CLASS FROM c_products_info WHERE PDTINF_DELETED=0 and DATA_FROM = ? )p on w.PDT_PLANEX_PDTID=p.PDTINF_ID) z left join (select PDTCLASS_CLASS,PDTCLASS_ID from c_pdt_class where PDTCLASS_DELETED=0) y on z.PDTINF_CLASS=y.PDTCLASS_ID ==> Parameters: e9f6ed8e091611ec842700163e092c06(String), 2023-10-08 23:59:59(String), 2020-10-08 23:59:59(String), e9f6ed8e091611ec842700163e092c06(String), 2023-10-08 23:59:59(String), 2020-10-08 23:59:59(String), e9f6ed8e091611ec842700163e092c06(String), e9f6ed8e091611ec842700163e092c06(String), e9f6ed8e091611ec842700163e092c06(String), e9f6ed8e091611ec842700163e092c06(String) Closing non transactional SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@57f98196] [2023-06-01 21:16:02] [ERROR] -- Servlet.service() for servlet [dispatcherServlet] in context with path [/szIntranetweb] threw exception [Request processing failed; nested exception is org.springframework.jdbc.BadSqlGrammarException: ### Error querying database. Cause: org.postgresql.util.PSQLException: 错误: 字段 "t.pdt_planex_id" 必须出现在 GROUP BY 子句中或者在聚合函数中使用

2023-06-02 上传

帮我修复一下这个bugJDBC Connection [org.postgresql.jdbc.PgConnection@49f1bf43] will not be managed by Spring ==> Preparing: select z.,y.PDTCLASS_CLASS FROM ( SELECT * FROM (SELECT r.PDT_PLANEX_PDTID,r.PDT_PLANEX_TYPE ,r.SUM_NUM,e.SUM_NUM2,e.COUNT_NUM FROM (SELECT SUM(t.PDT_PLANEX_NUM) as SUM_NUM,t.PDT_PLANEX_PDTID,t.PDT_PLANEX_TYPE FROM c_pdt_plan_ex t WHERE t.PDT_PLANEX_DELETED = 0 and t.DATA_FROM = ? and to_timestamp(?, 'yyyy-MM-dd HH:mm:ss.SSS') >= t.PDT_PLANEX_BEGIN and t.PDT_PLANEX_END >= to_timestamp(?, 'yyyy-MM-dd HH:mm:ss.SSS') GROUP BY t.PDT_PLANEX_PDTID,t.PDT_PLANEX_TYPE )r LEFT JOIN (SELECT SUM(o.WEISHT_NET_WGHT) SUM_NUM2,COUNT(1) COUNT_NUM,o.PDTINF_PDT,o.PDTINF_CLASS,o.PDT_PLANEX_PDTID,o.PDT_PLANEX_TYPE FROM(SELECT * FROM(SELECT * FROM (SELECT q., p.* FROM ( SELECT t.PDT_PLANEX_ID, t.PDT_PLANEX_NUM, t.PDT_PLANEX_PDTID, t.PDT_PLANEX_TYPE, t.PDT_PLANEX_BEGIN, t.PDT_PLANEX_END, t.PDT_PLANEX_COID FROM c_pdt_plan_ex t WHERE t.PDT_PLANEX_DELETED = 0 and t.DATA_FROM = ? and to_timestamp(?, 'yyyy-MM-dd HH:mm:ss.SSS') >= t.PDT_PLANEX_BEGIN and t.PDT_PLANEX_END >= to_timestamp(?, 'yyyy-MM-dd HH:mm:ss.SSS') GROUP BY t.PDT_PLANEX_PDTID, t.PDT_PLANEX_COID, t.PDT_PLANEX_TYPE, t.PDT_PLANEX_BEGIN, t.PDT_PLANEX_END, t.PDT_PLANEX_COID ) q LEFT JOIN (SELECT PDTINF_PDT, PDTINF_ID , PDTINF_CLASS FROM c_products_info WHERE PDTINF_DELETED=0 and DATA_FROM = ? )p on q.PDT_PLANEX_PDTID=p.PDTINF_ID)k LEFT JOIN (select g.CPY_CO,g.CPY_ID from c_companys g where CPY_DELETED=0 and DATA_FROM = ? ) c ON k.PDT_PLANEX_COID=c.CPY_ID)k inner JOIN (select j.WEISHT_NET_WGHT,j.WEISHT_PRODUCT,j.WEISHT_CO,j.WEISHT_EMPTY_TM,j.WEISHT_FULL_TM from c_weight_sheets j where WEISHT_DELETED = 0 and DATA_FROM = ? )r ON k.PDTINF_PDT=r.WEISHT_PRODUCT and k.CPY_CO=r.WEISHT_CO AND k.PDT_PLANEX_BEGIN <= r.WEISHT_FULL_TM AND k.PDT_PLANEX_END >= r.WEISHT_FULL_TM ORDER BY k.PDTINF_PDT )o GROUP BY o.PDT_PLANEX_PDTID)e ON e.PDT_PLANEX_PDTID=r.PDT_PLANEX_PDTID AND e.PDT_PLANEX_TYPE=r.PDT_PLANEX_TYPE)w left join (SELECT PDTINF_PDT, PDTINF_ID , PDTINF_CLASS FROM c_products_info WHERE PDTINF_DELETED=0 and DATA_FROM = ? )p on w.PDT_PLANEX_PDTID=p.PDTINF_ID) z left join (select PDTCLASS_CLASS,PDTCLASS_ID from c_pdt_class where PDTCLASS_DELETED=0) y on z.PDTINF_CLASS=y.PDTCLASS_ID ==> Parameters: e9f6ed8e091611ec842700163e092c06(String), 2023-10-08 23:59:59(String), 2020-10-08 23:59:59(String), e9f6ed8e091611ec842700163e092c06(String), 2023-10-08 23:59:59(String), 2020-10-08 23:59:59(String), e9f6ed8e091611ec842700163e092c06(String), e9f6ed8e091611ec842700163e092c06(String), e9f6ed8e091611ec842700163e092c06(String), e9f6ed8e091611ec842700163e092c06(String) Closing non transactional SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@57f98196] [2023-06-01 21:16:02] [ERROR] -- Servlet.service() for servlet [dispatcherServlet] in context with path [/szIntranetweb] threw exception [Request processing failed; nested exception is org.springframework.jdbc.BadSqlGrammarException: ### Error querying database. Cause: org.postgresql.util.PSQLException: 错误: 字段 "t.pdt_planex_id" 必须出现在 GROUP BY 子句中或者在聚合函数中使用

2023-06-02 上传