搜索
bottom↓
回复: 4

请问有谁了解或者编译过NI-Linux RT系统的移植工作?

[复制链接]

出0入0汤圆

发表于 2020-6-22 15:31:56 | 显示全部楼层 |阅读模式
请问有谁了解或者编译过NI-Linux RT系统的移植工作?

这个链接如下:
https://github.com/ni/nilrt

一些简单的编译过程介绍:
NI Linux Real-Time Distribution
Introduction
Downloads the NI Linux Real-Time (NILRT) source code and provides scripts to aid in building images and packages.

Build Steps
Get the source by running the following commands:

git clone https://github.com/ni/nilrt.git
cd nilrt
git checkout nilrt/<release>
git submodule init
git submodule update --remote --checkout
Set up your shell environment to run bitbake:

Source NILRT's environment script by running the following command:

. ni-oe-init-build-env
This will setup the needed environment variables and build configuration files for building through OpenEmbedded build system. Note that the configuration files (that exist in the build/conf directory) include some basic default configurations, allowing modification or overriding of these default configurations.

Set an appropriate MACHINE variable so that bitbake can tune builds of NILRT for your hardware.

Run the following command to configure for ARM targets:

export MACHINE=xilinx-zynqhf
or the following command to configure for x64 targets:

export MACHINE=x64
NOTE It's not recommended to run bitbake for different MACHINE's in the same workspace (build directory).

Build the package or packages that you want for your target. For example, to build Python, Ruby, and Apache for Zynq targets, run the following commands:

bitbake python ruby apache2
To build every package in National Instruments' feed, run the following commands:

bitbake packagegroup-ni-coreimagerepo
bitbake --continue packagegroup-ni-extra
NOTE The configuration files (build/conf/*.conf) can optionally be changed to reflect the desired build settings instead of setting environment variables.

NOTE Building packages through OpenEmbedded can use significant disk space, on the order of tens of gigabytes. If you are preparing a virtual machine to build images, make sure to allocate sufficient disk space.

The resulting ipk files that can be installed through opkg exist at the following directory:

tmp-glibc/deploy/ipk/...
(Optional/Advanced) Bitbake can transform tmp-glibc/deploy/ipk/ into a package feed when you run the following command:

bitbake package-index
Your build machine can then host the feed by running the following command:

(cd tmp-glibc/deploy/ipk/ && python -m SimpleHTTPServer 8080)
# press ctrl+c to stop hosting
This creates a temporary HTTP server on port 8080 that is accessible to other hosts on your local network. You may need to configure your firewall to permit Python to access port 8080. Otherwise, the server will only be accessible locally on address localhost:8080.

(Optional/Advanced) Build a bootable recovery disk by running the following commands:

bitbake restore-mode-image
NOTE You must build everything in packagegroup-ni-coreimagerepo (step 3) and build a feed (optional step 4) to build images.

NOTE By default, National Instruments software is pulled from a feed hosted on ni.com. You can redirect to a mirror by setting IPK_NI_SUBFEED_URI to any URI supported by opkg in your org.conf, site.conf, or auto.conf.

The resulting root file system images for the minimal NILRT run-mode and recovery disk are located at the following paths:

tmp-glibc/deploy/images/$MACHINE/minimal-nilrt-image-$MACHINE.tar.bz2
tmp-glibc/deploy/images/$MACHINE/restore-mode-image-$MACHINE.cpio.gz
The bootable ISO recovery disk, which you can install onto a USB memory stick or burn to a CD, is located at the following path:

tmp-glibc/deploy/images/$MACHINE/restore-mode-image-$MACHINE.wic
(You can rename it to ".iso" if desired)
Run the following command to install the bootable ISO recovery image onto a USB memory stick at /dev/disk/by-id/XXX, where XXX is the appropriate device node for your hardware:

sudo dd if=tmp-glibc/deploy/images/$MACHINE/restore-mode-image-$MACHINE.wic of=/dev/disk/by-id/XXX bs=1M
WARNING Setting 'of' to the wrong device will permanently destroy data and potentially leave your system unbootable. Use at your own risk!!!

Boot your NI Linux Real-Time compatible hardware from the recovery disk and follow on-screen instructions to perform a factory reset.

(Optional/Advanced) Build a NILRT Software Development Kit (SDK) with GCC compiler toolchain.

Run the following to build an SDK for x64 Linux machines:

SDKMACHINE=x86_64 bitbake -c populate_sdk host-toolchain-sysroot
Run the following to build an SDK for x86 Windows machines:

SDKMACHINE=i686-mingw32 bitbake -c populate_sdk host-toolchain-sysroot
The resulting archives are located at the following paths for Linux and Windows, respectively:

tmp-glibc/deploy/sdk/oecore-x86_64-*.sh
tmp-glibc/deploy/sdk/oecore-i686-*.tar.bz2
The Linux archive is a self-extracting shell script (a.k.a. shar). To install the SDK, copy archive to your build machine and run it with the following arguments to extract into your $HOME directory:

/path/to/oecore-x86_64-*.sh -y -d "$HOME/NILRTSDK"
$HOME/NILRTSDK/sysroots/x86_64-nilrtsdk-linux/ is a *NIX style system root (sysroot) for your build machine. It contains a GCC cross-compiler which may run on your build machine to produce NILRT binaries.

The other directory under $HOME/NILRTSDK/sysroots/ is an NILRT system root containing headers and shared libraries that GCC may link during it's build process. These are the same files you might find on an NILRT system. The name of this sysroot directory depends on the configured $MACHINE and tuning options in NILRT config files.

The Windows archive is a bzipped tarball, which may be extracted by any compatible archiver utility. It has a similar directory structure as the Linux shar, but the build system's sysroot is named i686-nilrtsdk-mingw32 instead of x86_64-nilrtsdk-linux. It will have the same NILRT sysroot.

Creating a Docker Build Container
This repository includes a Dockerfile which may be used to construct an ephemeral build container. The container is a debian base, plus the toolchain and environment necessary to run bitbake.

Example docker build command:

docker build --no-cache=yes \
        --file=./scripts/docker/Dockerfile  \
        --tag=<docker image tag> \
        ./scripts/docker
Enjoy, and happy hacking!
ni.com/community/

不知道这个可行性有多大?
最后 NI 还很有挑战的给出了一个 欢迎破解的挑衅的语气……

阿莫论坛20周年了!感谢大家的支持与爱护!!

月入3000的是反美的。收入3万是亲美的。收入30万是移民美国的。收入300万是取得绿卡后回国,教唆那些3000来反美的!

出0入20汤圆

发表于 2020-6-22 15:58:07 | 显示全部楼层
这里的hacking不是破解的意思吧,本身黑客这个词在互联网早期就是中性的。真正的破解应该用crack吧。。。
这里应该欢迎各位系统黑客探索这个系统~

出0入0汤圆

 楼主| 发表于 2020-6-22 16:12:45 | 显示全部楼层
Error.Dan 发表于 2020-6-22 15:58
这里的hacking不是破解的意思吧,本身黑客这个词在互联网早期就是中性的。真正的破解应该用crack ...

奥……
原来如此!

出235入235汤圆

发表于 2020-6-22 16:22:46 | 显示全部楼层
源代码目录都是空的啊

出0入0汤圆

 楼主| 发表于 2020-6-22 16:49:18 | 显示全部楼层
lyping1987 发表于 2020-6-22 16:22
源代码目录都是空的啊

您好!

源码目录在另外的一个连接里面!

https://github.com/ni/linux

回帖提示: 反政府言论将被立即封锁ID 在按“提交”前,请自问一下:我这样表达会给举报吗,会给自己惹麻烦吗? 另外:尽量不要使用Mark、顶等没有意义的回复。不得大量使用大字体和彩色字。【本论坛不允许直接上传手机拍摄图片,浪费大家下载带宽和论坛服务器空间,请压缩后(图片小于1兆)才上传。压缩方法可以在微信里面发给自己(不要勾选“原图),然后下载,就能得到压缩后的图片】。另外,手机版只能上传图片,要上传附件需要切换到电脑版(不需要使用电脑,手机上切换到电脑版就行,页面底部)。
您需要登录后才可以回帖 登录 | 注册

本版积分规则

手机版|Archiver|amobbs.com 阿莫电子技术论坛 ( 粤ICP备2022115958号, 版权所有:东莞阿莫电子贸易商行 创办于2004年 (公安交互式论坛备案:44190002001997 ) )

GMT+8, 2024-4-25 03:17

© Since 2004 www.amobbs.com, 原www.ourdev.cn, 原www.ouravr.com

快速回复 返回顶部 返回列表