Qnx boot workflow

news2024/11/25 7:10:11

S820A QNX Hypervisor Software User Guide

80-CF838-1 Rev.

Img 生成脚本:

target/hypervisor/host/create_images.sh

tools/build/image-builder.sh

The QVM config file for the guest is instantiated within the host rootfs build file, located at root/target/hypervisor/qvm/$project/build_files/system.build.tmpl

startup.sh

Based on the requirements, services that are not critical to boot, can be launched programmatically using startup script.

Script location is under: /qnx_ap/target/hypervisor/host/startup.qvmhost.tmpl

target/hypervisor/host/create_images.sh +898

将startup.qvmhost.tmpl拷贝到out目录下更名为startup-qvmhost.sh

 target/hypervisor/host/out_8540/system.build_la +990

将startup-qvmhost.sh放到/sritpts/startup中

编译后生成的startup脚本

Qnx 的宏定义都在这个脚本中:

target/hypervisor/host/out_8540/platform_variables.sh

startupmgr

qnx_ap/target/hypervisor/host/startupmgr/src/script.c

build_files/makena_qdrive_mifs.build.tmpl

 

target/filesets/launcher_scripts/devb-host.c:257: .path = "/mnt/scripts/startup.sh",

target/hypervisor/host/startupmgr/makena_qdrive_poc/src/script.c:110:

target/hypervisor/host/startupmgr/src/script.c

create_variant_images.sh log输出 

bash create_variant_images.sh
8540
#######################
CFG File:./variant_config/8540.cfg
Variant File:./variant_config/8540_la.txt
mvariant:_la
ext_name:_la
SOC_NAME:8540

 create_images.sh

#!/bin/sh

# The .cfg files contain the SOC specific ifdefs which are used during compile time
# The .txt files contain the  flavor ( variant and subvariant) specific ifdefs
# target/
# |__hypervisor/
#    |__ host/
#       |__variant_config/
#          |__ <SOC>.cfg
#          |__ <SOC>_<variant>_<subvariant(optional)>.txt
#
# Each 'variant' corresponds to a unique device tree.
# The subvariant uses the same device tree / memory map / qcpe config as the
# main variant if a separate file for the subvariant is not specified .It allows additional ifdefs for some conditional compilation.
# Avoid use of subvariants as much as possible.
#
# target/
# |__filesets/
# |  |__ sdm_<SOC>.dtsi  ( SOC specific dtsi )
# |  |__ sdm-host_common.dtsi ( common dtsi )
# |__hypervisor/
#    |__ host/
#       |__fdt_config/
#          |_dtb/
#            |_sdm-host.dts ( main dts file )
#            |_sdm-host_<variant>.dts  ( variant specific dts file )

#Memory Map
#
#list of <SOC>.cfg files
LIST=`ls ./variant_config/*.cfg`

function get_soc_name()
{
    SOC_NAME=`basename $1 | sed "s/\..*//"`
    export SOC_CONFIG=$1
    export SOC_NAME
    if [ -d "${BSP_ROOT}/target/hypervisor/gvm/ivi/la" ]; then
        if [ -d "${BSP_ROOT}/target/hypervisor/gvm/ivi/lv" ]; then
            LIST1=`ls ./variant_config/${SOC_NAME}*.txt`
        else
            LIST1=`ls ./variant_config/${SOC_NAME}_la*.txt`
        fi
    else
        if [ -d "${BSP_ROOT}/target/hypervisor/gvm/ivi/lv" ]; then
            LIST1=`ls ./variant_config/${SOC_NAME}_lv*.txt`
        else
            LIST1=`ls ./variant_config/${SOC_NAME}*.txt`
        fi
    fi

    echo $SOC_NAME
    export OUT_DIR=out_${SOC_NAME}
}

function delete_out_dir()
{
    rm -rf ./${OUT_DIR}
}

function create_out_dir()
{
    if [ ! -d ./${OUT_DIR} ]
    then
        mkdir ./${OUT_DIR}
    fi
}

function create_image()
{
    rm -f ${SOC_NAME}${ext_name}.txt

    cat $1 >> ${SOC_NAME}${ext_name}.txt

    if [ -e $VENDOR_VARIANT ]; then
        cat $VENDOR_VARIANT >> ${SOC_NAME}${ext_name}.txt
        export SOC_VARIANT=$(readlink -f ${SOC_NAME}${ext_name}.txt)
    fi

    bash ${BSP_ROOT}/target/hypervisor/host/create_images.sh $2

    if [ $? -ne 0 ] ; then
        exit 1;
    fi
}

function split_vars()
{
    IFS='_' # underscore is the delimiter
    read -a VARIANT_INFO <<< "$1" 
    # For internal variant testing
    if [ ! -z ${VARIANT_INFO[2]} ];then
        export ext_name=_${VARIANT_INFO[1]}_${VARIANT_INFO[2]}
    else
        export ext_name=_${VARIANT_INFO[1]}
    fi
    # strip the preceding underscore
    export variant_name="${ext_name:1}"

    export mvariant=_${VARIANT_INFO[1]} #_la

    cfg_file=./variant_config/${VARIANT_INFO[0]}.cfg #./variant_config/8540.cfg
    txt_file=./variant_config/${VARIANT_INFO[0]}$ext_name.txt #/variant_config/8540_la.txt
    # Restore IFS since its being this function is being
    # called from a FOR loop
    echo "#######################"
    echo "CFG File:$cfg_file"
    echo "Variant File:$txt_file"
    echo "mvariant:$mvariant"
    echo "ext_name:$ext_name"
    echo "SOC_NAME:$SOC_NAME"
    echo "#######################"

    unset IFS
}

#accepts the flavor as option , for e.g 8155_la, 8155_multi,etc
if [ $# -ne 0 ]
then
    if [ "help" = $1 ]; then
        echo "help"
        echo "./create_variant_images.sh  --> Build all images ( default )"
        echo "./create_variant_images.sh <flavor> <ifs> "
        echo "Check ./variant_config/<flavor>.txt for supported flavors"
        echo "flavor should be of format soc_<variant with no underscores>_<subvariant>"
        echo " The subvariant in this case will use the same dts/memory map/qcpe
             ",config , etc as the  main variant. But This allows you to have additional
        echo "  env variables for a slight update to the main variant"
        echo "e.g Creates all images for variants: ./create_variant_images.sh 8155_la"
        echo "e.g Creates only ifs image for variant: ./create_variant_images.sh 8155_la ifs"
        exit
    fi
    export flavor=$1
    split_vars $1
    get_soc_name $cfg_file
    create_out_dir
    echo $txt_file
    create_image $txt_file $2
    exit
fi

#Loop over each <SOC>.cfg file in variant_confg
for config_file in ${LIST}; do #./variant_config/8540.cfg
    # call to get the $SOC_NAME
    get_soc_name $config_file
    #delete_out_dir
    # Loop over the <flavors>.txt for each  SOC
    for os_file in ${LIST1}; do
        # Get the flavor_subvariant
        flavor=`basename $os_file`
        export flavor=${flavor%.txt} #flavor 8540_la
        # look for flavor subvariant
        split_vars $flavor
        create_out_dir
        # call to process the new vars
        if [[ "$qnx_toolchain" == QNX710 ]] || [[ "$qnx_toolchain" == QOS220 ]] || [[ "$qnx_toolchain" == QOS222 ]]; then
            if [[ "$txt_file" == *_qdrive* ]] || [[ "$txt_file" == *_srv1m* ]] || [[ "$txt_file" == *_slt* ]] ; then
                create_image $txt_file
            fi
        elif [[ "$qnx_toolchain" == HYP710 ]] || [[ "$qnx_toolchain" == QHS220 ]]; then
            if [[ "$txt_file" != *_qdrive* ]]; then
                create_image $txt_file
            fi
        else
            echo "Config $txt_file doesnt match the toolchain $qnx_toolchain"
            exit 1;
        fi

        if [ $? -ne 0 ]; then
            exit 1;
        fi
    done
done

rm -f ${SOC_NAME}${ext_name}.txt

 apps/qnx_ap/target/hypervisor/host/startupmgr/8540_la 目录不存在

 使用apps/qnx_ap/target/hypervisor/host/startupmgr/src/script.c

static const struct aaction* diskservices[] = {
    &reopen_serdev,
    &devb_ufs,
    &gpt_makelink_ufs,
    &fs_mount_firmware,
    &fs_mount_persist,
    &early_security_services,
    &fs_mount_svp_qtd,
    &fs_mount_svp,
    &fs_mount_system_qtd,
    &fs_mount_system,
    &next_startup,
    //Delimit with NULL
    NULL,
};

 

static const struct launcher_script scripts [] =  {

    /*host IFSs*/
    {
        .ifsname = "ifs_coreservices.img",
        .actions = coreservices,
        .sha256sum = __ifs_coreservices__hash__,
    },
    {
        .ifsname = "ifs_audio.img",
        .actions = audioservices,
        .sha256sum = __ifs_audio__hash__,
        .sleep_pre_dma = 0,
        .sleep_pre_sha = 0,
        .type = "IFS",
    },
    {
        .ifsname = "ifs_display.img",
        .actions = dispservices,
        .sha256sum = __ifs_display__hash__,
        .sleep_pre_dma = 0,
        .sleep_pre_sha = 0,
        .type = "IFS",
    },
    {
        .ifsname = "ifs_graphics.img",
        .actions = graphicsservices,
        .sha256sum = __ifs_graphics__hash__,
        .sleep_pre_dma = 80000,
        .sleep_pre_sha = 0,
        .type = "IFS",
    },
    {
        .ifsname = "ifs_camera.img",
        .actions = cameraservices,
        .sha256sum = __ifs_camera__hash__,
        .sleep_pre_dma = 0,
        .sleep_pre_sha = 0,
        .type = "IFS",
    },
    {
        .ifsname = "ifs_video.img",
        .actions = videoservices,
        .sha256sum = __ifs_video__hash__,
        .sleep_pre_dma = 0,
        .sleep_pre_sha = 0,
        .type = "IFS",
    },
    {
        .ifsname = "ifs_disk.img" ,
        .actions = diskservices   ,
        .sha256sum = __ifs_disk__hash__ ,
        .type = "IFS",
    },
    //Delimt with NULL,
    { NULL , NULL },
};
int main ( int argc,  char** argv ) {
    bmetrics_log_component_start();
    return init_loader_and_launcher ( argc, argv, scripts );
}

init_loader_and_launcher 解析launcher_script mount ifsname & load action server

apps/qnx_ap/AMSS/platform/services/applications/ifsloader/ifsloader.c

int init_loader_and_launcher ( int argc, char** argv, const struct launcher_script* scripts )
{
    int rc;
    struct arguments_info argu;
    pthread_t loader_thread;

    argu.argc = argc;
    argu.argv = a

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

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

相关文章

【QT】QComboBox和QPlainTextEdit基本介绍和应用示例

目录 1.QComboBox 1.1 QComboBox概述 1.2 QComboBox信号 1.3 QComboBox常用功能 1.4 QComboBox添加简单项 1.6 QComboBox列表项的访问 2.QPlainTextEdit 2.1 QPlainTextEdit概述 2.2 QPlainTextEdit的基本属性 2.3 QPlainTextEdit的公共函数 2.4 QPlainTextEdit的公…

设计模式篇之创建型模式

目录 前言一、简单工厂模式二、工厂方法模式总结 前言 最近开始整理Java设计模式&#xff0c;本篇主要分享设计模式中的创建型模式&#xff0c;并给出demo代码&#xff0c;适合初中级开发学习。分享书籍《大话设计模式》&#xff0c;分享GitHub学习设计模式仓库。 一、简单工厂…

集成开发环境PyCharm的使用【侯小啾python基础领航计划 系列(三)】

集成开发环境 PyCharm 的使用【侯小啾python基础领航计划 系列(三)】 大家好,我是博主侯小啾, 🌹꧔ꦿ🌹꧔ꦿ🌹꧔ꦿ🌹꧔ꦿ🌹꧔ꦿ🌹꧔ꦿ🌹꧔ꦿ🌹꧔ꦿ🌹꧔ꦿ🌹꧔ꦿ🌹꧔ꦿ🌹꧔ꦿ🌹꧔ꦿ🌹꧔ꦿ🌹꧔ꦿ🌹꧔ꦿ🌹꧔ꦿ🌹꧔ꦿ🌹꧔ꦿ🌹꧔ꦿ🌹…

2.环境变量及接口关联

一、环境变量以及全局变量 操作流程 1.点击environment 2.点击environment右侧号&#xff0c;新增环境变量 3.在变量中输入变量名以及变量值 4.回到collection页面&#xff0c;修改变量环境 5.在collection中通过{{变量名}}调用变量 变量定义 环境变量&#xff1a;环境变量…

Vue实现简单用户登录页面

&#x1f4d1;前言 本文主要是【Vue】——Vue实现简单用户登录页面的文章&#xff0c;如果有什么需要改进的地方还请大佬指出⛺️ &#x1f3ac;作者简介&#xff1a;大家好&#xff0c;我是听风与他&#x1f947; ☁️博客首页&#xff1a;CSDN主页听风与他 &#x1f304;每日…

内部文件上传以及渲染-接口API

文件上传 地址http://172.16.0.118:8090/api/pm/base/affix/upload请求类型POSTContent-Type:text/plain;charsetutf-8参数 prjData {"prjId":"", "jobId":"3031b2c8-c809-4110-8e88-22c80a9c1ec0721aca89-96a1-4346-9b6e-022331d221d1Nec…

现代物流系统的分析与设计

目 录 引言 3一、系统分析 4 &#xff08;一&#xff09;需求分析 4 &#xff08;二&#xff09;可行性分析 4 二、 总体设计 4 &#xff08;一&#xff09;项目规划 4 &#xff08;二&#xff09;系统功能结构图 5 三、详细设计 6 &#xff08;一&#xff09;系统登录设计 6 …

解决cad找不到msvcr100.dll的有效方法,完美修复dll问题

在计算机使用过程中&#xff0c;我们经常会遇到一些错误提示&#xff0c;其中之一就是由于找不到msvcr100.dll文件而导致CAD软件无法正常运行的情况&#xff0c;系统无法找到所需的动态链接库文件。但是通过一些简单的解决方法&#xff0c;我们可以快速解决这个问题并继续我们的…

机器翻译,文本生成评估指标BELU,BERTSCORE

一:BLEU 1.1 BLEU 的全称是 Bilingual evaluation understudy&#xff0c;BLEU 的分数取值范围是 0&#xff5e;1&#xff0c;分数越接近1&#xff0c;说明翻译的质量越高。BLEU 主要是基于精确率(Precision)的&#xff0c;下面是 BLEU 的整体公式。 BLEU 需要计算译文 1…

Http中post和get

get产生一个tcp数据包&#xff0c;服务器只响应一次&#xff0c;而post请求服务器会响应两次&#xff08;第一次发送请求头响应100&#xff0c;再次响应返回200&#xff0c;成功

react-router v6实现动态的title(react-router-dom v6)

前言 react-router-dom v6 默认不支持 title设置了&#xff0c;所以需要自己实现一下。 属性描述path指定路由的路径&#xff0c;可以是字符串或字符串数组。当应用的URL与指定的路径匹配时&#xff0c;该路由将会被渲染。element指定要渲染的React组件或元素。children代表…

gitLab创建新项目

1.进入git2.选择创建项目3.勾选生成readme.md文件4.邀请成员

unity学习笔记19

一、角色动画的使用练习 从资源商店导入的动画资源&#xff08;Character Pack: Free Sample&#xff09;中将资源中的角色创建在场景里&#xff0c;现在场景里存在的角色并没有任何动画。 在资源中找到Animations文件夹&#xff0c;在这个文件有很多模型文件&#xff08;.FBX…

【页面】表格展示

展示 Dom <template><div class"srch-result-container"><!--左侧--><div class"left"><div v-for"(item,index) in muneList" :key"index" :class"(muneIndexitem.mm)?active:"click"pa…

8_企业架构缓存中间件分布式memcached

企业架构缓存中间件分布式memcached 学习目标和内容 1、能够理解描述网站业务访问流程 2、能够理解网站业务的优化方向 3、能够描述内存缓存软件Memcached的作用 4、能够通过命令行操作Memcached 5、能够操作安装php的memcached扩展 extension 6、能够实现session存储到memcach…

算法通关村第十七关-青铜挑战贪心算法思想

大家好我是苏麟 , 今天说说贪心算法 . 贪心思想很难用理论解释&#xff0c;本文我们先通过案例来感受一下贪心是如何解决问题的 大纲 难以理解的贪心算法贪心问题举例分发饼干柠檬水找零分发糖果 难以理解的贪心算法 贪心的思想非常不好解释&#xff0c;而且越使用权威的语言解…

idea利用spring框架整合thymeleaf展现数据库数据

idea初步利用thymeleaf展现列表 上一篇文章简单展现自己写的列表&#xff1b; 这篇文章连接mysql数据库实现数据库数据展现 主要三个文件 controller指定html界面 package com.example.appledemo.controller;import com.example.appledemo.mapper.UserMapper; import com.exam…

编程模拟支付宝能量产生过程--数据控制流

#模拟支付宝蚂蚁森林的能量产生过程 behavior_points { # 定义行为对应的积分"步行": 2,"生活缴费": 10,"线下支付": 5,"网络购票": 5,"共享单车": 10 }total_points 0 # 初始化总积分while True: # 开…

Qlik 成为网络犯罪的焦点

研究人员警告说&#xff0c;Cactus 勒索软件组织正在利用 Qlik Sense 数据可视化、探索和监控解决方案中的关键漏洞来获得对企业网络的初始访问权限。 今年八月下旬&#xff0c;Qlik Sense 开发人员 针对影响 Windows 版本平台的两个关键漏洞发布了补丁 。 其中一个漏洞 CVE-…

嵌入式硬件和软件哪个好?

嵌入式硬件和软件哪个好? 嵌入式软硬件工程师哪个更有前途呢?一起来看看。 嵌入式是分为软硬件工程师的&#xff0c;首先我们先来看看嵌入式硬件工程师吧! 嵌入式硬件开发工程师主要编写嵌入式系统硬件总体方案和详细方案&#xff0c;要求理解嵌入式系统架构&#xff0c;有一…