热烈庆祝,需要掌握该技术的人来这里学习。
共3条
1/1 1 跳转至页
今天工程师在AT91RM9200上跑通了GPRS模块驱动。

我在2410上移植ppp
运行出现如下错误:
[root@S3C2410SMDK /]$pppd
/usr/sbin/pppd: 1: Syntax error: "(" unexpected
而我移植的另外一个h 能正常运行
[root@S3C2410SMDK /]$pppd
/usr/sbin/pppd: 1: Syntax error: "(" unexpected
[root@S3C2410SMDK /]$h
Hello World!
Hello World!
Hello World!
Hello World!
Hello World!
两个程序都是用gcc-3.3交叉编译的.
我的ppp用的是2.4.3
以前我也用过2.4.1在2.95.3下编译也不能执行
错误的提示是说语法错误,"("是多余的.但是我不知道为什么会产生这样的错误.应该不是ppp程序本身的问题的吧.
不知道各位能不能给我点提示,问题到底是出在哪里.
谢谢!
-----------------------------------------------------------
找了好久才找到原因
ppp交叉编译的参数好像是不能这样传的;
$make ARCH=arm CROSS_COMPILE=/../arm-linux-
我用如下方法编译成功之后就能在板子上跑了;
$export CROSS_COMPILE=/../arm-linux-
$export CC=/../arm-linux-gcc
$make
请问有人知道这是为什么不?
好像很多的交叉编译都是用的上面那种方法.
我是新手,说的做的不对的地方还请各位指正!
运行出现如下错误:
[root@S3C2410SMDK /]$pppd
/usr/sbin/pppd: 1: Syntax error: "(" unexpected
而我移植的另外一个h 能正常运行
[root@S3C2410SMDK /]$pppd
/usr/sbin/pppd: 1: Syntax error: "(" unexpected
[root@S3C2410SMDK /]$h
Hello World!
Hello World!
Hello World!
Hello World!
Hello World!
两个程序都是用gcc-3.3交叉编译的.
我的ppp用的是2.4.3
以前我也用过2.4.1在2.95.3下编译也不能执行
错误的提示是说语法错误,"("是多余的.但是我不知道为什么会产生这样的错误.应该不是ppp程序本身的问题的吧.
不知道各位能不能给我点提示,问题到底是出在哪里.
谢谢!
-----------------------------------------------------------
找了好久才找到原因
ppp交叉编译的参数好像是不能这样传的;
$make ARCH=arm CROSS_COMPILE=/../arm-linux-
我用如下方法编译成功之后就能在板子上跑了;
$export CROSS_COMPILE=/../arm-linux-
$export CC=/../arm-linux-gcc
$make
请问有人知道这是为什么不?
好像很多的交叉编译都是用的上面那种方法.
我是新手,说的做的不对的地方还请各位指正!

这是我在LINUX下写的文档
没有装中文输入法,英文又很烂,大家将就看下吧
有什么不对的地方欢迎指教!
Tools list:
Kernel: 2.4.18
Sysvinit:2.86
Tinylogin:1.4
CC:3.3
Glibc: 2.2.5
PPP: 2.4.1
U-boot:1.1.1
Do it like this:
At first, recompile your kernel to support PPP:
$make menuconfig //to compile ppp in your kernel
$make ARCH=arm CROSS_COMPILE=/../arm-linux- zImage
$./mkimage2410 uImage //then you get kernel uImage
The second step, make a ramdisk filesystem:
1. Compile Busybox
$make menuconfig //choose the commands you need
Build options ---->
[*] Build BusyBox as a static binary (no shared libs)
[*] Do you want to build BusyBox with a Cross Compiler?
(/usr/local/arm/3.3/bin/arm-linux-) Cross Compiler prefix
$make
$make PREFIX=/../rootfs/ install
2. Compile System V init
$cd src
$make CROSS=/../arm-linux- PREFIX=/../rootfs/ all
$make PREFIX=/../rootfs install
3. Compile Tinylogin
$make CROSS=/../arm-linux- PREFIX=/../rootfs/ all
$make PREFIX=/../rootfs/ install
The third step, cross compile your PPP:
$export CROSS_COMPILE=/../arm-linux-
$export CC=/../arm-linux-gcc
$make
then, you'll get executable programs pppd,pppdump,pppstats and chat in directory: /../ppp-2.4.1/pppd,/../ppp-2.4.1/pppdump,/../ppp-2.4.1/pppstats and /../ppp-2.4.1/chat.
Copy these files to /../rootfs/usr/sbin
cd to the rootfs/
$mkdir etc dev
$cd dev
$mknod 600 console 5 1
$cd ..
then configures the files and directories such as 'inittab' 'fstab' 'host.conf' 'rc.d/' and 'ppp/' in /etc
Finally, get the glibc files which you need to rootfs/lib from /../3.3/lib.
没有装中文输入法,英文又很烂,大家将就看下吧
有什么不对的地方欢迎指教!
Tools list:
Kernel: 2.4.18
Sysvinit:2.86
Tinylogin:1.4
CC:3.3
Glibc: 2.2.5
PPP: 2.4.1
U-boot:1.1.1
Do it like this:
At first, recompile your kernel to support PPP:
$make menuconfig //to compile ppp in your kernel
$make ARCH=arm CROSS_COMPILE=/../arm-linux- zImage
$./mkimage2410 uImage //then you get kernel uImage
The second step, make a ramdisk filesystem:
1. Compile Busybox
$make menuconfig //choose the commands you need
Build options ---->
[*] Build BusyBox as a static binary (no shared libs)
[*] Do you want to build BusyBox with a Cross Compiler?
(/usr/local/arm/3.3/bin/arm-linux-) Cross Compiler prefix
$make
$make PREFIX=/../rootfs/ install
2. Compile System V init
$cd src
$make CROSS=/../arm-linux- PREFIX=/../rootfs/ all
$make PREFIX=/../rootfs install
3. Compile Tinylogin
$make CROSS=/../arm-linux- PREFIX=/../rootfs/ all
$make PREFIX=/../rootfs/ install
The third step, cross compile your PPP:
$export CROSS_COMPILE=/../arm-linux-
$export CC=/../arm-linux-gcc
$make
then, you'll get executable programs pppd,pppdump,pppstats and chat in directory: /../ppp-2.4.1/pppd,/../ppp-2.4.1/pppdump,/../ppp-2.4.1/pppstats and /../ppp-2.4.1/chat.
Copy these files to /../rootfs/usr/sbin
cd to the rootfs/
$mkdir etc dev
$cd dev
$mknod 600 console 5 1
$cd ..
then configures the files and directories such as 'inittab' 'fstab' 'host.conf' 'rc.d/' and 'ppp/' in /etc
Finally, get the glibc files which you need to rootfs/lib from /../3.3/lib.
共3条
1/1 1 跳转至页
回复
打赏帖 | |
---|---|
汽车电子中巡航控制系统的使用被打赏10分 | |
分享汽车电子中巡航控制系统知识被打赏10分 | |
分享安全气囊系统的检修注意事项被打赏10分 | |
分享电子控制安全气囊计算机知识点被打赏10分 | |
【分享开发笔记,赚取电动螺丝刀】【OZONE】使用方法总结被打赏20分 | |
【分享开发笔记,赚取电动螺丝刀】【S32K314】芯片启动流程分析被打赏40分 | |
【分享开发笔记,赚取电动螺丝刀】【S32K146】S32DS RTD 驱动环境搭建被打赏12分 | |
【分享开发笔记,赚取电动螺丝刀】【IAR】libc标注库time相关库函数使用被打赏23分 | |
LP‑MSPM0L1306开发版试用结果被打赏10分 | |
【分享开发笔记,赚取电动螺丝刀】【LP-MSPM0L1306】适配 RT-Thread Nano被打赏23分 |