当前位置: 首页 > news >正文

网站转跳怎么做百度指数搜索

网站转跳怎么做,百度指数搜索,企业网站的主要功能板块,做网站需要字体授权前言 此篇文章中使用 nvidia 相关aosp 库、510.155_Android_R_aarch64_release文件来于原厂提供基础资料,可供 aosp 移植库基本思路。 本文记录 redroid11(aosp11) 集成 nvidia gpu 驱动库、 nvidia_omx 驱动库实践记录,以作备忘。 1>. Apply the p…

前言

此篇文章中使用 nvidia 相关aosp 库、510.155_Android_R_aarch64_release文件来于原厂提供基础资料,可供 aosp 移植库基本思路。
本文记录 redroid11(aosp11) 集成 nvidia gpu 驱动库、 nvidia_omx 驱动库实践记录,以作备忘。

1>. Apply the patch to Android R code then trigger the build.

2>. Change ro.board.platform=nv-streaming for build.prop in build output, or rename the gralloc.nv-streaming.so in step #3,
corresponding to your platform name. eg: TARGET_BOARD_PLATFORM:=nv-streaming or rename gralloc.nv-streaming.so gralloc.redroid.so
在文件 @build/make/tools/buildinfo.sh 增加如下内容。

if [ -z "$TARGET_BOARD_PLATFORM" ];thenecho "##"echo "## Add ro.board.platform"echo "##"echo "ro.board.platform=nv-streaming"#echo "ro.board.platform=AMD"#echo "ro.hardware.gralloc=dri"#echo "ro.hardware.vulkan=amd"#echo "ro.hardware.egl=AMD"echo ""
fi

3>. Copy the graphics lib files in Android_aarch64_release.tar to the corresponding directory
under system/vendor/ . Remove other files under vendor/lib(64)/egl/ of your build output.

4>. Ensure hwcomposer process in the container has permission for /tmp/display_pipe.
For example, change the binderinit.sh file:
cpp chown system system /tmp chmod 777 /tmp
4.1> del umount /etc/* in binderinit.sh
cpp # umount /etc/* # rm -rf /etc # ln -s /system/etc /etc

5>. Add related property in redroid.common.rc By default the graphics will use 720p 30fps,

	setprop persist.sys.display.resolution 720x1080setprop persist.sys.display.refresh 30

6>. If you want to run container in different GPU,set below property

setprop persist.vendor.nvidia.gpu.index $index

docker run input parament: ‘persist.vendor.nvidia.gpu.index=0/1/2…’

7>.hwcomposer2.1 which use HIDL interface
7.1> Add below part in your product manifest.xml which define hidl interface:

	<hal format="hidl"><name>android.hardware.graphics.composer</name><transport>hwbinder</transport><version>2.1</version><interface><name>IComposer</name><instance>default</instance></interface></hal>
<!--nvidia begin--><hal format="hidl"><name>vendor.nvidia.hardware.graphics.composer</name><transport>hwbinder</transport><version>1.0</version><interface><name>INvComposer</name><instance>default</instance></interface></hal><hal format="hidl"><name>vendor.nvidia.hardware.graphics.display</name><transport>hwbinder</transport><version>1.0</version><interface><name>INvDisplay</name><instance>default</instance></interface></hal>
<!--nvidia end-->

7.2> rewrite compatibility_matrices
${TOP}/hardware/interfaces/compatibility_matrices/compatibility_matrix.5.xml

<!--nvidia begin--><hal format="hidl" optional="false"><name>vendor.nvidia.hardware.graphics.composer</name><version>1.0</version><interface><name>INvComposer</name><instance>default</instance></interface></hal><hal format="hidl" optional="false"><name>vendor.nvidia.hardware.graphics.display</name><version>1.0</version><interface><name>INvDisplay</name><instance>default</instance></interface></hal>
<!--nvidia end-->

7.3> 移除 android.hardware.graphics.composer@2.1-service 服务

## gpu render    
PRODUCT_PACKAGES += \android.hardware.drm@1.3-service-lazy.clearkey \android.hardware.graphics.allocator@2.0-service \android.hardware.graphics.allocator@2.0-impl \android.hardware.graphics.mapper@2.0-impl-2.1 \#android.hardware.graphics.composer@2.1-service \#android.hardware.graphics.composer@2.1-impl \

8> graphics composer

8.1> Add vendor.nvidia.hardware.graphics.composer@1.0-service which under system\vendor\bin\hw to your image.

8.2> ensure it’s init rc vendor.nvidia.hardware.graphics.composer@1.0-service.rc and lib dependency
are included.

8.3> For internal build related reason, NVIDIA graphics lib will depend on libc++_nv_build.so
instead of libc++.so, so need copy /system/lib(64)/libc++.so to /system/lib(64)/libc++_nv_build.so for graphics lib to use.

510.155_Android_R_aarch64_release.tar 文件中没有 libc++_nv_build.so 库文件,从  android-arm-r.tar.gz 文件提取出 libc++_nv_build.so 并
拷贝至 redroid11 编译镜像中。

8.4> Need ensure libhidltransport/libhwbinder are included in container build
redroid11 手工编译 libhidl

mmm system/libhidl/
##mmm external/selinux
mmm external/libdrm
mmm system/libhwbinder

8.5>. Diff in system/linkerconfig to allow hwcomposer service load required library:

diff --git a/contents/namespace/systemdefault.cc b/contents/namespace/systemdefault.cc
index a9bfdb1..7b7c647 100644
--- a/contents/namespace/systemdefault.cc
+++ b/contents/namespace/systemdefault.cc
@@ -14,6 +14,19 @@
* limitations under the License.
*/
+// Not a contribution
+// Changes made by NVIDIA CORPORATION
+// NVIDIA-proprietary are not a contribution and subject to the following terms and conditions:
+//
+// Copyright (C) 2022 NVIDIA CORPORATION. All Rights Reserved.
+//
+// NVIDIA CORPORATION and its licensors retain all intellectual property
+// and proprietary rights in and to this software, related documentation
+// and any modifications thereto. Any use, reproduction, disclosure or
+// distribution of this software and related documentation is governed by
+// the NVIDIA Pre-Release License Agreement between NVIDIA CORPORATION and
+// the licensee. All other uses are strictly forbidden.
+
// Framework-side code runs in this namespace. Libs from /vendor partition can't
// be loaded in this namespace.
@@ -81,6 +94,8 @@ Namespace BuildSystemDefaultNamespace([[maybe_unused]] const
Context& ctx) {
"/system/vendor/framework",
"/system/vendor/app",
"/system/vendor/priv-app",
+ "/system/vendor/${LIB}/egl",
+ "/system/vendor/${LIB}/hw",
"/odm/framework",
"/odm/app",
"/odm/priv-app",
@@ -101,6 +116,10 @@ Namespace BuildSystemDefaultNamespace([[maybe_unused]] const
Context& ctx) {
ns.AddPermittedPath(product + "/${LIB}", AsanPath::SAME_PATH);
}
}
+ ns.AddPermittedPath("/system/vendor/${LIB}/egl", AsanPath::NONE);
+ ns.AddPermittedPath("/system/vendor/${LIB}/hw", AsanPath::NONE);
+ ns.AddSearchPath("/system/vendor/${LIB}/egl", AsanPath::NONE);
+ ns.AddSearchPath("/system/vendor/${LIB}/hw", AsanPath::NONE);
ns.AddRequires(std::vector{
// Keep in sync with the "platform" namespace in art/build/apex/ld.config.txt.

8.6> linkerconfig 增加 libc++_nv_build.so 和 libui.so
文件中 @system/linkerconfig/contents/common/system_links.cc 增加

void AddStandardSystemLinks(const Context& ctx, Section* section) {const bool debuggable = android::base::GetBoolProperty("ro.debuggable", false);const std::string system_ns_name = ctx.GetSystemNamespaceName();const bool is_section_vndk_enabled = ctx.IsSectionVndkEnabled();section->ForEachNamespaces([&](Namespace& ns) {if (ns.GetName() != system_ns_name) {ns.GetLink(system_ns_name).AddSharedLib(kBionicLibs);if (!is_section_vndk_enabled || ns.GetName() != "default") {ns.GetLink(system_ns_name).AddSharedLib(Var("SANITIZER_RUNTIME_LIBRARIES"));}if (debuggable) {// Library on the system image that can be dlopened for debugging purposes.ns.GetLink(system_ns_name).AddSharedLib("libfdtrack.so");}//>for nvidia ns.GetLink(system_ns_name).AddSharedLib("libc++_nv_build.so");ns.GetLink(system_ns_name).AddSharedLib("libui.so");ns.GetLink(system_ns_name).AddSharedLib("libstagefright.so");//>nvidia end}});
}

8.7> 修改 vendor.nvidia.hardware.graphics.composer@1.0-service.rc
封闭 composer@2.1::IComposer default 内容,解决 reference 错误。

service hwcomposer-1-0 /vendor/bin/hw/vendor.nvidia.hardware.graphics.composer@1.0-serviceclass hal animationuser systemgroup graphics drmrpccapabilities SYS_NICEonrestart restart surfaceflinger#interface android.hardware.graphics.composer@2.1::IComposer defaultinterface android.hardware.graphics.composer@2.2::IComposer defaultinterface vendor.nvidia.hardware.graphics.composer@1.0::INvComposer defaultinterface vendor.nvidia.hardware.graphics.display@1.0::INvDisplay default

8.8> Add media_codecs_nvidia
nvidia_omx的移植基础打打补丁文件:omx.patch.

@hardware/redroid/omx/media_codecs.xml 增加 nvidia 配置内容.

<MediaCodecs><Encoders><MediaCodec name="OMX.redroid.h264.encoder" type="video/avc" /></Encoders><Include href="media_codecs_nvidia.xml" /><Include href="media_codecs_google_audio.xml" /><Include href="media_codecs_google_telephony.xml" /><Include href="media_codecs_google_video.xml" />
</MediaCodecs>

把文件拷贝至 vendor 路径下
PRODUCT_COPY_FILES +=
vendor/nvidia/Android_R/nvidia_omx/media_codecs_nvidia.xml: ( T A R G E T C O P Y O U T V E N D O R ) / e t c / m e d i a c o d e c s n v i d i a . x m l v e n d o r / n v i d i a / A n d r o i d R / n v i d i a o m x / l i b / l i b n v i d i a o m x . s o : (TARGET_COPY_OUT_VENDOR)/etc/media_codecs_nvidia.xml \ vendor/nvidia/Android_R/nvidia_omx/lib/libnvidia_omx.so: (TARGETCOPYOUTVENDOR)/etc/mediacodecsnvidia.xml vendor/nvidia/AndroidR/nvidiaomx/lib/libnvidiaomx.so:(TARGET_COPY_OUT_VENDOR)/lib/libnvidia_omx.so
vendor/nvidia/Android_R/nvidia_omx/lib64/libnvidia_omx.so:$(TARGET_COPY_OUT_VENDOR)/lib64/libnvidia_omx.so \

8.9> Add libnvidia_omx.so
@framework/av/media/libstragefright/omx/OMXMaster.cpp 增加库

void OMXMaster::addVendorPlugin() {addPlugin("libstagefrighthw.so");addPlugin("libstagefrighthw_inno.so");addPlugin("libnvidia_omx.so");
}

8.10> 解决 cpuset cgroup controller is not mounted! 错误

10-20 05:24:35.935     0     0 E init    : cpuset cgroup controller is not mounted!
10-20 05:24:35.936     0     0 I init    : processing action (init.svc.audioserver=running) from (/system/etc/init/audioserver.rc:35)
10-20 05:24:35.941     0     0 I init    : starting service 'vendor.audio-hal'...
10-20 05:24:35.944     0     0 E init    : cpuset cgroup controller is not mounted!

修改源码:@system/core/libprocessgroup/setup/cgroup_map_write.cpp文件内容如下:

bool CgroupSetup() {using namespace android::cgrouprc;std::map<std::string, CgroupDescriptor> descriptors;if (getpid() != 1) {LOG(ERROR) << "Cgroup setup can be done only by init process";//return false; 关闭 pid != 1 错误退出}// Make sure we do this only one time. No need for std::call_once because// init is a single-threaded processif (access(CGROUPS_RC_PATH, F_OK) == 0) {LOG(WARNING) << "Attempt to call SetupCgroups more than once";return true;}......
}

9>. Package your container image from the modified output.

测试系统集成结果

scrcpy客户端启动参数配置:
C:\NV-GPU\istream-v1.24>
start “R3” /b scrcpy.exe --tcpip=192.168.31.25:21002
–window-title=3 --window-x=640 --window-y=30 --window-width=320 --window-height=180 --always-on-top
–encoder=OMX.nvidia.h264.encoder --stay-awake -V debug
–rotation=1 --lock-video-orientation=0
–max-fps=30 --bit-rate=3000000
–codec-options=minQP:int=8,maxQP:int=35,frameCount:int=-1,isUseVBR:int=1,isSaveFile:int=0,
verbose:int=0,isSaveYuv:int=0,qp:int=25,gopSize=600,gopPreset=0,
keyPeriod=600,keyRefreshMode:int=0,keyRefreshArg:int=10,keyFrameIndex:int=-1,
isScale:int=0,scaleWith:int=1280,scaleHeight:int=720,isUseCrop:int=0,cropTopOffset:int=0,cropBottomOffset:int=0,cropLeftOffset:int=0,cropRightOffset:int=0,isUseROI=0,
roiFrameIndex=0,isUseSEI=0,seiFrameIndex=0,byPassFlages:int=255,
interval:int=60,pushStreamTimeout:int=10,bufferType:int=0,captureMode:int=5,
encoderName:string=OMX.nvidia.h264.encoder --stay-awake -V debug

http://www.hrbkazy.com/news/41078.html

相关文章:

  • 找人做时时彩网站网站首页推广
  • 南通哪些公司做网站百度关键词推广费用
  • 龙岗南联网站建设公司查网站域名
  • 5成都网站建设网络营销的推广
  • 网站开发行情手机系统优化软件
  • java做的网站有哪些河南搜索引擎优化
  • 陶瓷网站模板白酒营销策划方案
  • 企业网站制作模板2021网络营销成功案例
  • 镇江公司做网站app开发公司排名
  • 杭州网站制作推荐google play服务
  • 使用cnnic证书的网站短链接在线生成器
  • dw网站图片滚动怎么做网络推广应该怎么做啊
  • 大英县住房和城乡建设局网站搜索引擎优化哪些方面
  • 北京有做网站的吗济宁网站建设
  • 单页企业网站模板网站快速排名推荐
  • 一个小胖子从网站做任务的色情故事软文营销代理
  • 公厂做网站需要开诚信通吗百度推广公司
  • 网站城市分站织梦系统苏州seo按天扣费
  • 个人网站可以做评论功能吗搜索指数查询
  • 做书app下载网站有哪些内容云南网络推广公司排名
  • 爱客源合肥网站优化推广方案
  • 安徽新站优化搜索广告排名
  • 网站开发ide php郑州seo优化顾问
  • 网站和二级目录权重移动建站优化
  • 网站建设实训总结seo优化排名百度教程
  • 淘宝客返利网站建设国外免费网站建设
  • 个人如何做问答类网站最近的国际新闻大事
  • 自己想做网站怎么在百度上发表文章
  • 微信团购网站怎么做百度百科官网登录
  • 太原网站推广怎么做杭州制作公司网站