我正在运行Ubuntu 12:04LTS并安装了arm-linux-gnueabi C和C++编译器.编译的二进制文件不会在我的目标板上运行.看起来即使我指定了cpu和arch,编译器仍会为错误的CPU构建二进制文件.而不是atm9tdmi它构建和7-A.
我做错了什么或者我应该配置什么?谢谢.
~/ArmTest$ arm-linux-gnueabi-g++-4.4 -mcpu=arm9tdmi -march=armv4t -O main.cpp -o CPPTest
~/ArmTest$ readelf -A CPPTest
Attribute Section: aeabi
File Attributes
Tag_CPU_name: "7-A"
Tag_CPU_arch: v7
Tag_CPU_arch_profile: Application
Tag_ARM_ISA_use: Yes
Tag_THUMB_ISA_use: Thumb-2
Tag_FP_arch: VFPv3-D16
Tag_ABI_PCS_wchar_t: 4
Tag_ABI_FP_denormal: Needed
Tag_ABI_FP_exceptions: Needed
Tag_ABI_FP_number_model: IEEE 754
Tag_ABI_align_needed: 8-byte
Tag_ABI_align_preserved: 8-byte, except leaf SP
Tag_ABI_enum_size: int
Tag_ABI_HardFP_use: SP and DP
Tag_CPU_unaligned_access: v6
Tag_DIV_use: Not allowed
~/ArmTest$ file CPPTest
CPPTest: ELF 32-bit LSB executable, ARM, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.31, …Run Code Online (Sandbox Code Playgroud) 我在linux嵌入式系统上构建并安装了iptables.如果我列出所有规则,一切正常:
#iptables --list
Chain INPUT (policy ACCEPT)
target prot opt source destination
Chain FORWARD (policy ACCEPT)
target prot opt source destination
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
Run Code Online (Sandbox Code Playgroud)
但是,如果我添加一个新规则来阻止icmp ping,我将得到以下错误:
iptables -A INPUT -i eth0 -p icmp --icmp-type any -s 0/0 -d 10.20.3.179 -m state --state NEW,ESTABLISHED,RELATED -j DROP
iptables: No chain/target/match by that name.
Run Code Online (Sandbox Code Playgroud)
怎么解决?
我需要通过 SSH 连接到嵌入式设备,启动后台程序,然后断开连接并保持后台进程运行。问题是嵌入式设备正在使用 ash shell(不是 bash 或其他任何东西),所以 nohup 和 screen 不可用。我还没有找到任何方法来断开 ash 中的进程。有没有办法在灰烬中做到这一点?
的操作shm_unlink对我来说不清楚。我创建了一个共享内存对象并映射到一个进程。后来,我做shm_unlink了内存对象。接下来shm_unlink,我能够访问相同的内存进行读写。这怎么可能?由于内存对象被 破坏shm_unlink,我预计在这种情况下会出现分段错误。但是,并没有发生?是什么原因?是什么shm_unlink究竟在这里干什么?
下面是代码片段。
main(int argc, char * argv[])
{
int fd;
char *addr;
int i = 0;
/*
* In case the unlink code isn't executed at the end
*/
if (argc != 1) {
shm_unlink("/bolts");
return EXIT_SUCCESS;
}
/* Create a new memory object */
fd = shm_open("/bolts", O_RDWR | O_CREAT, 0666);
if (fd == -1) {
fprintf(stderr, "Open failed : %s\n",
strerror(errno));
return EXIT_FAILURE;
}
/* Set the …Run Code Online (Sandbox Code Playgroud) 我试图/var/log坚持我的fido构建.poky的默认设置是,有一个符号链接,/var其中包含点log -> volatile/log.volatile是一个安装在tmpfs上.
到目前为止,我发现符号链接应该由base-files配方创建:
volatiles = "log tmp"
do_install () {
...
for d in ${volatiles}; do
ln -sf volatile/$d ${D}${localstatedir}/$d
done
...
Run Code Online (Sandbox Code Playgroud)
我附加了基本文件配方,因此没有创建链接,但它仍然在我的rootfs中出现.那么它来自哪里?我怀疑它可能fs-perms.txt与它有关.但我试图创造一个没有
${localstatedir}/log link volatile/log
Run Code Online (Sandbox Code Playgroud)
线,它仍然创建了该链接.有线索吗?
我正在使用通过 LVDS 连接到 i.MX6 Quad 的 CSI 接口的 Aptina MT9V024 传感器。我在快照模式下运行传感器,即使用外部信号触发/开始图像捕获。
在软件方面,我正在运行 Yocto Linux 和一个用 C 编写的应用程序,它应该检索捕获的图像数据。
它是这样工作的(部分代码,循环运行):
// wait until camers is triggered
ret = select(video_fd + 1, &fds, NULL, NULL, &tv);
// dq buffer / read image data and save to disk
ret = xioctl(video_fd, VIDIOC_DQBUF, &v4l2buf);
img->imageData = buffers[v4l2buf.index].start;
cvSaveImage(filename, img, 0);
// enqueue another buffer to capture next frame
ret = xioctl(video_fd, VIDIOC_QBUF, &v4l2buf);
Run Code Online (Sandbox Code Playgroud)
调用select(...)阻塞直到新帧可用,即相机被触发。
我的问题:检索到的图像是上一次捕获的图像。在 init 期间,我请求两个缓冲区,因为传感器不会从更少开始。但是在 select(...) 返回后,我不能 DQBUF …
目标:模仿Qemu特别支持的"sabrelite:飞思卡尔i.MX6 Quad SABRE Lite Board(Cortex A9)"(做'qemu-system-arm -M?'它出现).
Qemu ver:2.10.1(主持人:fedora-27).
我已成功交叉编译并构建了一个4.1.46 Linux内核(使用了imx_v6_v7_defconfig配置文件)以及一个简单的"骨架"根文件系统(基于busybox).(仅供参考,我对ARM Cortex-A9 Versatile Express平台有类似的工作设置 - 我使用自己的家用旋转嵌入式Linux系统SEALS进行此操作.
看看类似主板使用的U-Boot配置文件,我想用'root =/dev/mmcblk0p0'作为内核的root = param.所以,为了尝试一下,我按如下方式运行qemu(pl水平滚动以查看):
qemu-system-arm -m 512 -M sabrelite -kernel zImage -drive file=rfs.img,format=raw -append "console=ttymxc0 rootfstype=ext4 root=/dev/mmcblk0p0 rw rootwait init=/sbin/init " -nographic -dtb imx6dl-sabresd.dtb
[ 0.000000] Booting Linux on physical CPU 0x0
[ 0.000000] Linux version 4.1.46 (kai@klaptop) (gcc version 4.8.3 20140320 (prerelease) (Sourcery CodeBench Lite 2014.05-29) ) #2 SMP Mon Nov 27 17:16:22 IST 2017
[ 0.000000] …Run Code Online (Sandbox Code Playgroud) 我有一个简单的python应用程序,它可以:
包装要求:
certifi==2018.4.16
chardet==3.0.4
idna==2.6
influxdb==5.0.0
pynmea2==1.12.0
pyserial==3.4
python-dateutil==2.7.3
pytz==2018.4
requests==2.18.4
six==1.11.0
urllib3==1.22
Run Code Online (Sandbox Code Playgroud)
上面是通过使用以下命令生成的:
pip3 install pynmea2 pyserial influxdb
在OpenEmbedded Layers Index我已经找到pyserial的Python3包中。这暗示着我可能需要做的事情pip3 install pynmea2 influxdb。
在考虑所有上述pip依赖关系的情况下,如何继续编写应用程序的配方?
我没有找到有关编写python应用程序食谱的任何教程。(相反,Node应用程序确实在yocto的Wiki页面上有一些指导。
在检查meta-python层中的一些配方后,我发现了一些.inc文件,但不确定如何处理
我需要找出符合 HID 标准的触摸屏(单点触摸)输入数据结构(例如字节顺序以及每个字节中应写入的内容)。
我使用了 Microsoft 官方文档中的符合 HID 的触摸屏描述符
在使用设备管理器的主机 PC 中,我可以看到它成功枚举了 HID 兼容设备。现在我想将 HID 报告发送到主机,但问题是我还没有找到类似触摸屏的 HID 启动协议之类的东西(对于鼠标和键盘,它在 USB 组织规范中明确定义)。这是我用来创建触摸屏 HID 报告的代码示例,它可以工作,但不符合预期。我通过研究大量 github 代码和阅读文章找到了这种字节组合,但我想找到一些文档来证明顺序是正确的。
char report[8] = {0};
uint16_t x_access = 10000;
uint16_t y_access = 10000;
report[0] = 0x01; //reportid
report[1] = 0x3; //statuss
report[2] = LOWBYTE(x_access); //x low byte
report[3] = HIGHBYTE(x_access); //x high byte
report[4] = LOWBYTE(y_access); //y low byte
report[5] = HIGHBYTE(y_access); //y high byte
report[6] = 0x65; //touch parsing time low byte
report[7] = 0x00; //touch …Run Code Online (Sandbox Code Playgroud) 我正在使用Yocto (Hardknott)构建映像并创建包源(rpm 包)。图像依赖项之一是u-boot-karo(它是 karo 模块的自定义 u-boot),并且此配方似乎与libdnf. 谁能帮我解决这个问题,下面您将在 do_rootfs.log 中找到有关该错误的更多详细信息
NOTE: ###### Generate rootfs #######
NOTE: Executing '/amr-bsp/build/tmp/work/amr1-poky-linux-gnueabi/amr-image-dev/1.0-r0/recipe-sysroot-native/usr/bin/createrepo_c --update -q /amr-bsp/build/tmp/work/amr1-poky-linux-gnueabi/amr-image-dev/1.0-r0/oe-rootfs-repo' ...
NOTE: Running /amr-bsp/build/tmp/work/amr1-poky-linux-gnueabi/amr-image-dev/1.0-r0/recipe-sysroot-native/usr/bin/dnf -v --rpmverbosity=info -y -c /amr-bsp/build/tmp/work/amr1-poky-linux-gnueabi/amr-image-dev/1.0-r0/rootfs/etc/dnf/dnf.conf --setopt=reposdir=/amr-bsp/build/tmp/work/amr1-poky-linux-gnueabi/amr-image-dev/1.0-r0/rootfs/etc/yum.repos.d --installroot=/amr-bsp/build/tmp/work/amr1-poky-linux-gnueabi/amr-image-dev/1.0-r0/rootfs --setopt=logdir=/amr-bsp/build/tmp/work/amr1-poky-linux-gnueabi/amr-image-dev/1.0-r0/temp --repofrompath=oe-repo,/amr-bsp/build/tmp/work/amr1-poky-linux-gnueabi/amr-image-dev/1.0-r0/oe-rootfs-repo makecache --refresh
DEBUG: DNF version: 4.6.0
cachedir: /amr-bsp/build/tmp/work/amr1-poky-linux-gnueabi/amr-image-dev/1.0-r0/rootfs/var/cache/dnf
Added oe-repo repo from /amr-bsp/build/tmp/work/amr1-poky-linux-gnueabi/amr-image-dev/1.0-r0/oe-rootfs-repo
Making cache files for all metadata files.
oe-repo: has expired and will be refreshed.
repo: downloading from remote: oe-repo
oe-repo 343 MB/s | 1.2 MB …Run Code Online (Sandbox Code Playgroud) embedded-linux ×10
linux ×4
c ×3
yocto ×3
arm ×2
imx6 ×2
openembedded ×2
ash ×1
bitbake ×1
embedded ×1
gcc ×1
hid ×1
iptables ×1
linux-kernel ×1
python-3.x ×1
qemu ×1
shell ×1
ssh ×1
usb ×1
v4l2 ×1