• linkedu视频
  • 平面设计
  • 电脑入门
  • 操作系统
  • 办公应用
  • 电脑硬件
  • 动画设计
  • 3D设计
  • 网页设计
  • CAD设计
  • 影音处理
  • 数据库
  • 程序设计
  • 认证考试
  • 信息管理
  • 信息安全
菜单
linkedu.com
  • 网页制作
  • 数据库
  • 程序设计
  • 操作系统
  • CMS教程
  • 游戏攻略
  • 脚本语言
  • 平面设计
  • 软件教程
  • 网络安全
  • 电脑知识
  • 服务器
  • 视频教程
  • JavaScript
  • ASP.NET
  • PHP
  • 正则表达式
  • AJAX
  • JSP
  • ASP
  • Flex
  • XML
  • 编程技巧
  • Android
  • swift
  • C#教程
  • vb
  • vb.net
  • C语言
  • Java
  • Delphi
  • 易语言
  • vc/mfc
  • 嵌入式开发
  • 游戏开发
  • ios
  • 编程问答
  • 汇编语言
  • 微信小程序
  • 数据结构
  • OpenGL
  • 架构设计
  • qt
  • 微信公众号
您的位置:首页 > 程序设计 >嵌入式开发 > Debian在工控中的使用1(移植debian到Atmelsam9g25低成本工控平台)

Debian在工控中的使用1(移植debian到Atmelsam9g25低成本工控平台)

作者:佚名 字体:[增加 减小] 来源:互联网 时间:2017-06-05

佚名通过本文主要向大家介绍了debian,debian linux下载,debian u盘安装,debian linux,debian ubuntu等相关知识,希望对您有所帮助,也希望大家支持linkedu.com www.linkedu.com
问题:Debian在工控中的使用1(移植debian到Atmel sam9g25低成本工控平台)
描述:

Debian系统支持很多应用软件的安装。使嵌入式用户告别不停的交叉编译操作,直接在板卡上可以通过指令安装应用,数据库,web服务器等,相当于一个PC电脑了。
目前我们放入debian的移植方法,后期我们会发布数据库及webserver安装方法。
1.板卡准备:
CORE9G25: 
Corewind提供的基于Atmel at91sam9g25的工业控制板卡,特性如下:
处理器: ARM9 @ 400Mhz Atmel AT91SAM9G25
内存: 128 or 256 MByte DDR2
存储: 256MB Nand Flash
以太网: 板载百兆PHY芯片
USB: 支持3路USB 接口
串口:支持扩展7路串口
I2C: 可扩展2路I2C总线
SPI: 可扩展2路SPI
GPIO:可扩展60路GPIO接口
A/D: 4通道10bit AD
Linux 3.6.9系统支持
Buildroot及Debian文件系统支持
-----------------------------------------------------------------------
一般来讲128MB内存跑debian足够了,不过如果跑大型数据库,还得上256MB 内存。
-------------------------------------------------------------------------
上个产品图片:
atmel,atmel公司,atmel公司中文网站,atmel中文官网,atmel studio,atmel 官网,atmel studio 7,atmel microchip,atmel studio 6.2下
========================================================================
2.debian移植方法
Required packages
Install the required packages on your Ubuntu Linux PC (Tested on Ubuntu 13.10):

~$ sudo apt-get install multistrap
~$ sudo apt-get install qemu
~$ sudo apt-get install qemu-user-static
~$ sudo apt-get install binfmt-support
~$ sudo apt-get install dpkg-cross
Use Multistrap to generate the rootfs contents
"Multistrap is a tool that automates the creation of complete, bootable, root filesystems. It can merge packages from different repositories to make the rootfs. Extra packages are added to the rootfs simply by listing them - all dependencies are taken care of. Current development in multistrap is to support user-specified scripts being added as hooks during the unpacking phase to add customised startup scripts and configure things like device nodes".
Create a working directory
~$ mkdir emdebian
~$ cd emdebian
~/emdebian$

Create or download a file called multistrap.conf with the following contents:
[General]
arch=armel
directory=target-rootfs
cleanup=true
noauth=true
unpack=true
debootstrap=Emdebian Net Utils Python
aptsources=Emdebian 
[Emdebian]
packages=apt
source=http://www.emdebian.org/grip
keyring=emdebian-archive-keyring
suite=wheezy-grip
[Net]
#Basic packages to enable the networking
packages=netbase net-tools ethtool udev iproute iputils-ping ifupdown isc-dhcp-client ssh 
source=http://www.emdebian.org/grip
[Utils]
#General purpose utilities
packages=locales adduser nano less wget vim rsyslog dialog
source=http://www.emdebian.org/grip
#Python language
[Python]
packages=python python-serial
source=http://www.emdebian.org/grip

Read Multistrap man page to understand each directive meanings.
Adding packages
You can add or remove packages changing the "packages=" or adding new sections on "debootstrap=" line.
For example if you need to install the Apache http server and the PHP language add this section in multistrap.conf:
[Php]
packages=php5 apache2
source=http://www.emdebian.org/grip

and add the new section on this line:
debootstrap=Emdebian Net Utils Python Php

In this example we are using the Italian Debian repository http://ftp.it.debian.org/debian so to use your local Debian repository change .it. with your country ISO code (for example .uk., etc).
Note that not all the packages are available in the Emdebian-Grip repository so you need to download them from the standard Wheezy Debian repository in this case the section will become something like this:
[Php]
packages=php5 apache2
source=http://ftp.it.debian.org/debian
suite=wheezy
Note that you can install more packages directly on the target using apt-get command.
Create the root filesystem
When your multistrap.conf file is ready launch Multistrap:
~/emdebian$ sudo multistrap -f multistrap.conf
...
Multistrap system installed successfully in /home/.../emdebian/target_rootfs/.
At the end of this procedure the directory target-rootfs directory will contents the whole rootfs tree to be moved into the second partition of an CORE9G25 board bootable microSD.
Configure now the EmDebian packages using the armel CPU emulator QEMU and chroot to create a jail where dpkg will see the target-rootfs as its root (/) directory.
~/emdebian$ sudo cp /usr/bin/qemu-arm-static target-rootfs/usr/bin
~/emdebian$ sudo LC_ALL=C LANGUAGE=C LANG=C chroot target-rootfs dpkg --configure -a
At this prompt:
Reply with < No >.
Some other prompt will appear during the configuration. Reply to them as you like.
When finished the target rootfs will be almost ready to be moved on the target microSD but it still needs some last extra configuration before using it.
Create a command file like this:
#!/bin/sh
#Target directory where will be createt the next target
#rootfs
TARGET_ROOTFS_DIR="target-rootfs"
#Directories used to mount some microSD partitions 
分享到:QQ空间新浪微博腾讯微博微信百度贴吧QQ好友复制网址打印

您可能想查找下面的文章:

  • Debian在工控中的使用1(移植debian到Atmelsam9g25低成本工控平台)

相关文章

  • 2017-06-05 请问Ardunio控制步进电机的代码里四个输出脚的功能定义是什么?
  • 2017-06-05 verilog如何用一个时钟的上升沿去启动一个计时器
  • 2017-06-05 mxArray[]数据类型在LabVIEW里怎么适配啊?
  • 2017-06-05 每次关机都会弹出这个界面,怎么办
  • 2017-06-05 hlp文件怎么打开
  • 2017-06-05 vxsim模拟器和主机ftp通信问题
  • 2017-06-05 如何用公网通过wifi实现对硬件的数据传输?
  • 2017-06-05 请教有关USB虚拟RS232的问题!望赐教
  • 2017-06-17CF卡及IDE硬盘接口
  • 2017-06-05 关于SMBus协议议的数据结构的实现

文章分类

  • JavaScript
  • ASP.NET
  • PHP
  • 正则表达式
  • AJAX
  • JSP
  • ASP
  • Flex
  • XML
  • 编程技巧
  • Android
  • swift
  • C#教程
  • vb
  • vb.net
  • C语言
  • Java
  • Delphi
  • 易语言
  • vc/mfc
  • 嵌入式开发
  • 游戏开发
  • ios
  • 编程问答
  • 汇编语言
  • 微信小程序
  • 数据结构
  • OpenGL
  • 架构设计
  • qt
  • 微信公众号

最近更新的内容

    • 关于移植数学函数的问题!
    • 使用USB发送数据包,速率问题
    • windowsddkUSB复合设备驱动,如何同时读两个pipe?
    • 新手500分求教驱动基础问题
    • 关于三菱PLCPLSR指令底层代码是如何做的,请教大神
    • 与注册表有关的问题
    • STM32串口通信导致hardfault产生
    • 嵌入式操作系统的特点
    • Wince通过Activesync用USB与PC连接时数据的通信格式
    • 原创fpga的经典视频教程,非常给力!

关于我们 - 联系我们 - 免责声明 - 网站地图

©2020-2025 All Rights Reserved. linkedu.com 版权所有