![](https://img-blog.csdnimg.cn/20201014180756780.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
嵌入式
杨幂的咪
读书使我快乐
展开
-
linuxrw
#include <stdio.h>#include <stdlib.h>#include <unistd.h>#include <string.h>#include <errno.h>#include <signal.h>#include <fcntl.h>#include <ctype.h>#include <termios.h>#include <sys原创 2020-02-09 15:28:28 · 736 阅读 · 0 评论 -
回声消除数据对齐软件方法
待写-----------------------------------------------------------------...原创 2018-07-05 13:31:18 · 989 阅读 · 0 评论 -
ppc qemu
qemu-img create -f raw disk-img.raw 2.5Gsudo losetup /dev/loop7 disk-img.rawsudo losetup -o $((2048*512)) /dev/loop6 /dev/loop7sudo mkfs.ext3 /dev/loop6sudo qemu-system-ppc -cpu G4 -nographic -k...原创 2020-02-02 09:52:16 · 610 阅读 · 1 评论 -
spin_lock为什么要关闭抢占?
The reason that preemption is disabled on a uniprocessor system is:If not:P1 holds the lock and after a time is scheduled out.Now P2 starts executing and let’s say requests the same spinlock. Since...原创 2020-02-02 09:39:46 · 827 阅读 · 0 评论 -
C函数与栈的理解
栈是内存中的空间,用来存储函数内部的变量,sp寄存器值是这片空间的基址下面的例子直观的说明了这一点:test.c:#include <stdio.h>#include <stdlib.h>int sum2(int a, int b){ return a + b;}int sum1(int a, int b){ return (sum2(...原创 2020-02-01 20:42:41 · 301 阅读 · 0 评论 -
C指针的理解
test.c:#include <stdio.h>#include <stdlib.h>int main(int argc, char **argv){ int a = 5; int *p1 = &a; int **p2 = &p1; return 0;}arm-cortexa9-linux-gnueabih...原创 2020-02-01 20:37:58 · 247 阅读 · 0 评论 -
linux内核宏的阅读方法
通过预编译的方法将内核代码中的宏替换掉,再把得到的c代码格式化下面是预编译后的一个例子:extern void task_cputime_adjusted(struct task_struct *p, cputime_t *ut, cputime_t *st);extern void thread_group_cputime_adjusted(struct task_struct *p, ...原创 2020-02-01 20:33:45 · 487 阅读 · 0 评论 -
重采样库示例
功能:使用重采样库对音频数据重采样,适用于单声道16位音频数据。#include <fcntl.h>#define BUFFER_LEN30*48000*2static void simple_test (int converter, double ratio) ;int main(int argc ,char ** argv ){ printf("us...原创 2020-02-01 20:25:21 · 442 阅读 · 0 评论 -
qemu添加网卡
ip link add brtest0 type bridgeip tuntap add tap0 mode tap user woodip link set tap0 upip link set tap0 master brtest0ip tuntap add tap1 mode tap user woodip link set tap1 upip link set tap1 mas...原创 2020-02-01 20:27:38 · 1913 阅读 · 0 评论 -
一种调试方法
在芯片验证期间,会在palladium上调试driver,早期只起了个ramdisk文件系统,网络,sd卡,u盘可能都不能使用,如何将ko传到文件系统里?如果把ko直接编译进内核,再用jtag烧录,这也是一种办法,但是由于palladium这个平台非常的慢,这样做每debug一次都会耗费1个多小时。这里介绍另外一种方法,先将driver编译成ko,然后通过jtag讲ko下载到一段内核不用的内存空...原创 2020-02-01 20:29:22 · 321 阅读 · 0 评论 -
make grub udisk manually
Below is the steps how to make grub udisk manuallymy udisk is /dev/sdcclean udisk information(mbr and partition information)sudo dd if=/dev/zero of=/dev/sdc bs=1M count=1024 oflag=directcr...原创 2020-02-02 09:49:42 · 279 阅读 · 0 评论 -
Initramfs制作
1 uboot的修改: vi commo/cmd_bootm.c’;将CFG_BOOTM_LEN 改为0x5000000 vi include/configs/grus. h 修改bootargs 为: “mem=256M console=ttyS3 57600n8 ip=off root=/dev/ram0 rdinit=/linuxrc” 修改bootcmd为: “nand原创 2020-02-02 09:57:51 · 832 阅读 · 0 评论 -
Linux平台RTL8188CUS驱动移植及测试
Linux平台RTL8188CUS驱动移植及测试 一 内核配置以及驱动编译: 1.配置内核wireless选项 进入内核目录,make menuconfig , [*] Networking support —> [*] Wireless —> — Wireless -*- Wireless extensi原创 2020-02-02 10:06:55 · 4465 阅读 · 0 评论 -
RT3070驱动移植及测试
一 驱动移植: 1 配置内核wireless选项 进入内核目录,make menuconfig , [*] Networking support —> [*] Wireless —> — Wireless -*- Wireless extensions [*] Wireles原创 2020-02-02 09:54:58 · 1152 阅读 · 0 评论 -
SD卡测试脚本
!/bin/bashcp /mnt/sdcard/appfs.cramfs /tmp/a.bin umount /usr/fs md5a=md5sum /tmp/a.bin | awk '{print $1 }' asize=ls -l /tmp/a.bin | awk '{print $5 }' cnt=1 echo “asize asize”while:doecho“————————”原创 2020-02-02 09:53:25 · 1105 阅读 · 0 评论 -
sin函数生成PCM文件
利用正弦函数采样生成音频RAW数据存入PCM文件.用Audacity打开可以看到波形:原创 2020-02-02 09:50:28 · 1237 阅读 · 0 评论 -
linpack-linux
/* * Linpack 100x100 Benchmark In C/C++ For PCs * ******************************************************************** * * Original Source from NETLIB * * Translated ...原创 2020-02-02 09:52:56 · 1993 阅读 · 1 评论 -
Image拼接脚本
#!/bin/bashOFFSET_UBOOT=0OFFSET_NV=262144OFFSET_USER=393216OFFSET_ZIMAGE=1048576OFFSET_UPDATER=4194394OFFSET_APPFS=8912896TARGET=img.bindd if=/dev/zero of=$TARGET bs=1M count=16dd if原创 2016-11-02 09:29:37 · 557 阅读 · 0 评论 -
重采样库示例
#include <fcntl.h>#define BUFFER_LEN30*48000*2static void simple_test (int converter, double ratio) ;int main(int argc ,char ** argv ){ printf("usage : ./a.out type file\n");...原创 2020-02-02 09:57:21 · 953 阅读 · 0 评论 -
Linux ram挂载jffs2文件系统
参考链接:http://www.linuxdiyf.com/viewarticle.php?id=58126 http://blog.chinaunix.net/uid-26683644-id-3394110.html如何将一个mtd ram 设备格式化为jffs2文件系统并且正常使用?1kernel 配置: (1)jffs2文件系统支持: File systems —&gt;...原创 2018-07-13 14:55:23 · 1301 阅读 · 0 评论 -
arm linux无线路由
一块arm开发板,带有以太网口,还有一个在京东上买的usbwifi模块,wifi模块在ubuntu上直接可以用,输入lsusb,发现其使用的wifi模块竟然是realtek的8192,于是想用这两个网口实现无线路由的转发功能,即板子的以太网接到局域网,以太网与wifi的wlan0直接存在一定转发规则,然后手机或者笔记本连上8192的AP即可上网。 实现这一功能稍微有...原创 2020-02-02 09:54:03 · 1924 阅读 · 0 评论