02--基于ARM9的Linux2.6内核移植
Linux内核移植+根文件系统制作+触摸屏

第一章移植内核1.1 Linux内核基础知识在动手进行Linux内核移植之前,非常有必要对Linux内核进行一定的了解,下面从Linux 内核的版本和分类说起。
1.1.1 Linux版本Linux内核的版本号可以从源代码的顶层目录下的Makefile中看到,比如2.6.29.1内核的Makefile中:VERSION = 2PATCHLEVEL = 6SUBLEVEL = 29EXTRAVERSION = .1其中的“VERSION”和“PATCHLEVEL”组成主版本号,比如2.4、2.5、2.6等,稳定版本的德主版本号用偶数表示(比如2.6的内核),开发中的版本号用奇数表示(比如2.5),它是下一个稳定版本内核的前身。
“SUBLEVEL”称为次版本号,它不分奇偶,顺序递增,每隔1~2个月发布一个稳定版本。
“EXTRAVERSION”称为扩展版本号,它不分奇偶,顺序递增,每周发布几次扩展本版号。
1.1.2 什么是标准内核按照资料上的习惯说法,标准内核(或称基础内核)就是指主要在/维护和获取的内核,实际上它也有平台属性的。
这些linux内核并不总是适用于所有linux支持的体系结构。
实际上,这些内核版本很多时候并不是为一些流行的嵌入式linux系统开发的,也很少运行于这些嵌入式linux系统上,这个站点上的内核首先确保的是在Intel X86体系结构上可以正常运行,它是基于X86处理器的内核,如对linux-2.4.18.tar.bz2的配置make menuconfig时就可以看到,Processor type and features--->中只有386、486、586/K5/5x86/6x86/6x86MX、Pentium-Classic、Pentium-MMX、Pentium-Pro/Celeron/Pentium-II、Pentium-III/Celeron(Coppermine)、Pentium-4、K6/K6-II/K6-III 、Athlon/Duron/K7 、Elan 、Crusoe、Winchip-C6 、Winchip-2 、Winchip-2A/Winchip-3 、CyrixIII/C3 选项,而没有类似Samsun 2410等其他芯片的选择。
Linux kernel内核升级全过程,教你一次成功

序言由于开发环境需要在linux-2.6内核上进行,于是准备对我的虚拟机上的Linux系统升级。
没想到这一弄就花了两天时间(反复装系统,辛苦啊~~),总算把Linux系统从2.4.20-8内核成功升级到了2.6.18内核。
网上虽然有很多介绍Linux内核升级的文章,不过要么过时,下载链接失效;要么表达不清,不知所云;更可气的是很多文章在转载过程中命令行都有错误。
刚开始我就是在这些“攻略”的指点下来升级的,以致于浪费了很多时间。
现在,费尽周折,升级成功,心情很爽,趁性也来写个“升级攻略”吧!于是特意又在虚拟机上重新安装一个Linux系统,再来一次完美的升级,边升级边记录这些步骤,写成一篇Linux内核升级记实录(可不是回忆录啊!),和大家一起分享~~!一、准备工作首先说明,下面带#号的行都是要输入的命令行,且本文提到的所有命令行都在终端里输入。
启动Linux系统,并用根用户登录,进入终端模式下。
1、查看Linux内核版本# uname -a如果屏幕显示的是2.6.x,说明你的已经是2.6的内核,也用不着看下文了,该干什么干什么去吧!~~~如果显示的是2.4.x,那恭喜你,闯关通过,赶快进行下一步。
2、下载2.6内核源码下载地址:/pub/linux/kernel/v2.6/linux-2.6.18.tar.bz23、下载内核升级工具(1)下载module-init-tools-3.2.tar.bz2/pub/linux/utils/kernel/module-init-tools/module-init-tools-3.2.tar.bz2(2)下载mkinitrd-4.1.18-2.i386.rpm/fedora/linux/3/i386/RPMS.core/mkinitrd-4.1.18-2.i386.rpm(3)下载lvm2-2.00.25-1.01.i386.rpm/fedora/linux/3/i386/RPMS.core/lvm2-2.00.25-1.01.i386.rpm(4)下载device-mapper-1.00.19-2.i386.rpm/fedora/linux/3/i386/RPMS.core/device-mapper-1.00.19-2.i386.rpm(2.6.18内核和这4个升级工具我都有备份,如果以上下载地址失效,请到/guestbook留下你的邮箱,我给你发过去)好啦,2.6内核和4个升级工具都下载完了(少一个也不行,如果没有下载齐全,请不要尝试下面的步骤,升级是不会成功的),下面回到Linux系统中开始配置工作吧。
基于arm9的图像采集系统的研究

学校代号***** 学号********** 分类号TP18 密级公开硕士学位论文基于ARM9的图像采集系统的研究学位申请人姓名刘白皓培养单位长沙理工大学导师姓名及职称黄敏副教授学科专业通信与信息系统研究方向嵌入式系统论文提交日期2011年3月学校代号:10536学号:0810801515密级:公开长沙理工大学硕士学位论文基于ARM9的图像采集系统的研究学位申请人姓名刘白皓导师姓名及职称黄敏副教授培养单位长沙理工大学专业名称通信与信息系统论文提交日期2011年3月论文答辩日期2011年5月答辩委员会主席车生兵教授The Design of Image Acquisition System Based on ARM9ByLIU BaihaoB.E.( Anhui University of Architecture) 2008A thesis submitted in partial satisfaction of theRequirements for the degree ofMaster of EngineeringinCommunication and Information SysteminChangsha University of Science & TechnologySupervisorProfessor Huang MinMarch, 2011长沙理工大学学位论文原创性声明本人郑重声明:所呈交的论文是本人在导师的指导下独立进行研究所取得的研究成果。
除了文中特别加以标注引用的内容外,本论文不包含任何其他个人或集体已经发表或撰写的成果作品。
对本文的研究做出重要贡献的个人和集体,均已在文中以明确方式标明。
本人完全意识到本声明的法律后果由本人承担。
作者签名:日期:年月日学位论文版权使用授权书本学位论文作者完全了解学校有关保留、使用学位论文的规定,同意学校保留并向国家有关部门或机构送交论文的复印件和电子版,允许论文被查阅和借阅。
linux 2.6 kernel移植到QEMU Mips的源代码文档.

Port Linux 2.6 Kernel to Qemu MipsAuthor: Joy Tang2009.1Version 1.02Overview•Use open source to study, no confidential information inside.•If we need deep view inside linux, we must understand what kernel do.•This doc is for build up mips for linux environment run on X86 emulator machine.I, Build Kernel•Target•Main CPU: QEMU emulate Mips•Cross Compile:mips-linux•Develop Environment: Red Hat•Notes, QEMU also support melta board, and MIPSsim. Reference web page: https:///mailarchive/git-commits-head/2008/1/29/636729/thread, from version linux 2.6.25, it remove qemu mips inside.Prepare Working•Prepare Working:•Download source code of Linux:•Annymos login •Go to the folder "/pub/linux/kernel/v2.6" inside FTP.•Get the source code:tar -jxvf linux-2.6.22.19.tar.bz2•2.6.21 will be another choice.Add Toolchain to Search Path•vi /etc/profile, add following lines•PATH="$PATH:/opt/hardhat/devkit/mips/lexra_fp_b e/bin"•PATH="$PATH:/opt/hardhat/devkit/mips/lexra_fp_b e/target/bin"•PATH="$PATH:/opt/build_mips_nofpu/mips-uClibc-linux/usr/bin“•…Change Makefile•vi Makefile, search SUBARCH•Change toSUBARCH := mips•Find CROSS_COMPILE, change toCROSS_COMPILE ?= mips-linux-•vi arch/mips/Makefile, search cflags-y:=, if it is cflags-y:= mips1, change it to cflags-y:=•The change base on user itself environment.Start to Build, Step1•Make config or make menuconfig or make xconfig •Change CPU to QEMU•Add support for “Initial RAM filesystem and RAM disk”. (Initial RAM filesystem and RAM disk (initramfs/initrd) support (BLK_DEV_INITRD) [N/y/?] n change to Y)•Change many other settings, such as MAP_RAM, MTD support, MTD_PLATRAM•Attach .config file for reference. (end of this doc)•File system analyses•In company file system, there are 4 mtds, •1, busybox=> mtd1•2, kernel=>mtd2•3, workdir=>mtd3•4, jffs etc folder=> mtd4•This step will mount all this 4 files.•Change source:go to drivers/mtd/maps.•Run cp cfi_flagadm.c qemuflash.c•Change linux/drivers/mtd/maps/Kconfig, find config MTD_CDB89712, after it, addconfig MTD_QEMU_EMUFLASHtristate"gggggg qemu emu flash”•Also change Makefile under linux/drivers/mtd/maps/ Find obj-$(CONFIG_MTD_CDB89712)+= cdb89712.o, after it, addobj-$(CONFIG_MTD_QEMU_EMUFLASH)+= qemuflash.o•See attach (makefile& kconfig, end of this doc)•For the file, qemuflash.c, there is some comments:•mtd0,mtd1, mtd2 is not used. Mtd3 is for workdir, mtd4 is for jffs etc folder.•Here is attach. (end of this doc)•Go to folder \fs\jffs2, open earse.c, line 350, function jffs2_block_check_erase, add a qemu patch#ifdef CONFIG_QEMU#elseprintk(KERN_WARNING"Newly-erased block ……#endif•Goto root folder, run make config, press enter until it quit. This is for correct errors in the file “.config”•Run build commandmake all•Run commandcp -f ./vmlinux/opt/emularor/qemu/mips/myimages2…After that, kernel elf file will be send to qemu folderII, Build Qemu•Download qemu packet on web/qemu/download.html•Get the file /qemu/qemu-0.9.1.tar.gz •Uncompress it. In order to save time, inside file config-host.mak: change TARGET_DIRS to mips-softmmu.•Open root folder\vl.c•Add following lineschar g_mtdFileName_etcSave[1024];char g_mtdFileName_workdir[1024];•At beginning of main function, addmemset(g_mtdFileName_etcSave, 0, 1024);memset(g_mtdFileName_workdir, 0, 1024);At the end of function drive_init, add following lines if (type == IF_PFLASH && g_mtdFileName_etcSave[0] == 0){//mtd will load to bios mem, save file name firstsprintf(g_mtdFileName_etcSave, "%s", file);}if (type == IF_MTD && g_mtdFileName_workdir[0] == 0){//mtd will load to bios mem, save file name firstsprintf(g_mtdFileName_workdir, "%s", file);}•Go to “hw”folder, open mips_r4k.c, add following lines •extern char g_mtdFileName_etcSave[1024]; //2M •extern char g_mtdFileName_workdir[1024]; //30M•#define START_ADDR_ETC_SAVE 0x1fc00000•#define SIZE_ETCSAVE 0x00200000•#define START_ADDR_WORKDIR 0x1fe00000•At the end of function, mips_r4k_init, add following lines, add processing of g_mtdFileName_etcSave andg_mtdFileName_workdir.Build QEMU Step 3(continue) if (g_mtdFileName_etcSave[0]){bios_offset= ram_size+ vga_ram_size;bios_size= load_image(g_mtdFileName_etcSave, phys_ram_base+ bios_offset);if ((bios_size> 0) && (bios_size<= BIOS_SIZE))cpu_register_physical_memory(START_ADDR_ETC_SAVE,BIOS_SIZE, bios_offset| IO_MEM_ROM);else/* not fatal */ fprintf(stderr, "qemu: Warning, could not load MIPS bios '%s'\n",buf);}if (g_mtdFileName_workdir[0]){bios_offset= ram_size+ vga_ram_size+ SIZE_ETCSAVE;bios_size= load_image(g_mtdFileName_workdir, phys_ram_base+ bios_offset);if ((bios_size> 0) && (bios_size<= BIOS_SIZE))cpu_register_physical_memory(START_ADDR_WORKDIR,BIOS_SIZE, bios_offset| IO_MEM_ROM);else/* not fatal */fprintf(stderr, "qemu: Warning, could not load MIPS bios '%s'\n",buf);}Attach mips_r4k.c, end of this doc•Open root folder sysemu.h, change 4m to 32m#define MAX_BIOS_SIZE (32 * 1024 * 1024)…#elif defined(TARGET_MIPS)#define BIOS_SIZE (32 * 1024 * 1024) //we want use bios ram to be mtd area #endif•Here is attach file for it. (end of this doc)•Run following command: ./configuremakemake installIII, Build busybox •Find web /downloads/, choose/downloads/busybox-1.6.1.tar.bz2•Uncompress it.•Change make file, like the build kernel,•vi Makefile, search SUBARCH•Change toSUBARCH := mips•Find CROSS_COMPILE, change toCROSS_COMPILE ?= mips-linux-Build busybox Step2•make xconfig•Change settings for it, make sure the mount & fdisk is inside.•make\n•make install\n•cd./_install\n•rm dev -rf\n•cp /opt/source/flashmaster_prxxx_fe-1.0.linux-2.6-2/res/1.0/rootfs.mips_nofpu/dev/ ./dev -rf\n•cd-\n•cp -f --reply=yes /opt/source/flashmaster_prxxx_fe-1.0.linux-2.6-2/res/1.0/rootfs.mips_nofpu/sbin/portmap ./_install/sbin\n•../flashmaster_prxxx_fe-1.0.linux-2.6-2/bin/mkcramfs -Nb_install/ a.mtd\n •cp -f --reply=yes a.mtd../emulator/qemu/mips/\nIV,MTD files, step 1•There are 4 MTD files in real system, now we design each to a file,•A, MTD1, it will be busy-box => -initrd“filename”•B, MTD2, it will be kernel=>-kernel “filename”•C, MTD3, it will be workdir=>-mtdblock“filename”•D, MTD4, it will jffs2 format etc/save=>-pflash“filename”•MTD files Step 2•For 1st, busybox, run following command to create it cd/opt/…/flashmaster_prxxx_fe-1.0.linux-2.6-2/res/1.0 mkdir rootfs.mips_nofpu/dev/netmknod rootfs.mips_nofpu/dev/net /tun c 10 200chmod0666 rootfs.mips_nofpu/dev/net /tun../../bin/mkcramfs -Nb rootfs.mips_nofpu a.mtd•or directly use exist one “mtd1.img”.•For 2nd, use build kernel file “vmlinux”•For 3rd, use workdir•For 4th, run following command../../bin/mkfs.jffs2 -o etcsave.mtd-d ./etc -e 65535 -p ff -bComments of MTD•For 1st, parameter –initrd use it as ram-disk. It will loaded to ram of qemu memory space.•For 2nd, parameter –kernel use same concept of 1st.•For 3rd, it emulate a flash, it start address will be 2M, 0x1fc00000 + 0x00200000, size 30M, 0x01E00000•For 4th, its start address will be 0M0x1fc00000 + 0x0000000, size 2MV, Create script fileto run kernel •Its contentsinitarg="init=/linuxrc root=/dev/hda root2=/dev/hd18" mtdparameter="-mtdblock./boot/workdir.mtd“pflashparameter="-pflash./boot/etcsave.mtd“time \${qemupath}qemu-system-mips\-kernel ./myimages2/vmlinux \-initrd a.mtd\-append "console=ttyS0 $initarg" \-nographic\-m 128 \$pflashparameter\$mtdparameter\-net nic,vlan=1 -net user,vlan=1Comments for the script file•-nographic can be removed. If it is exist, qemu emulator will not show command console, we can use secure-crt’s SSH2 account to do this.•If it is not exist, we must run under x window in linuxAdd function for readphysical memory in QEMU •Add a function in monitor.c, do_phymemory_save •Detail is in attachment monitor.cFor run qemu command•Use graphic, ctrl+alt+2•Run command•Here is help:•help|? [cmd] --show the help•commit device|all--commit changes to the disk images (if -snapshot is used) or backing files •info subcommand --show various information about the system state•q|quit--quit the emulator•eject [-f] device --eject a removable medium (use -f to force it)•change device filename --change a removable medium•screendump filename --save screen into PPM image 'filename'•logfile filename --output logs to 'filename'•log item1[,...] --activate logging of the specified items to '/tmp/qemu.log'•savevm tag|id--save a VM snapshot. If no tag or id are provided, a new snapshot is created •loadvm tag|id--restore a VM snapshot from its tag or id•delvm tag|id--delete a VM snapshot from its tag or id•stop --stop emulation•c|cont--resume emulation•gdbserver[port] --start gdbserver session (default port=1234)•x /fmt addr--virtual memory dump starting at 'addr'•xp/fmt addr--physical memory dump starting at 'addr'•p|print/fmt expr--print expression value (use $reg for CPU register access)•i /fmt addr--I/O port read•sendkey keys --send keys to the VM (e.g. 'sendkey ctrl-alt-f1')•system_reset--reset the system•system_powerdown--send system power down event•sum addr size --compute the checksum of a memory region•usb_add device --add USB device (e.g. 'host:bus.addr' or 'host:vendor_id:product_id')•usb_del device --remove USB device 'bus.addr'•cpu index --set the default CPU•mouse_move dx dy[dz] --send mouse move events•mouse_button state --change mouse button state (1=L, 2=M, 4=R)•mouse_set index --set which mouse device receives events •wavcapture path [frequency bits channels] --capture audio to a wave file (default frequency=44100 bits=16 channels=2)•stopcapture capture index --stop capture•memsave addr size file --save to disk virtual memory dump starting at 'addr' of size 'size'•pmemsave addr size file --save to physical memory memory dump starting at 'addr' of size 'size'VI,Study on mount cd iso,harddiskand share files•1)For mount hda and cdrom correctly, we need open following kernel options:•A, ATA IDE support option.•B, VFS support•C, CDROM ISO9660 file system support•(“make xconfig”to find&open it. Recompile and build kernel again)•2)Go to /dev folder inside root file system prepare folder, run following command:•mknod hdc b 22 0•3)inside run-qemu script file, add•-cdrom./cd.ISO-hda linux.img.•(cd.ISO can be any cdrom iso file, linux.img copy fromhttp://lassauge.free.fr/qemu/release/Qemu-0.9.1-windows.zip. ./share is a folder for share between qemu and host x86 linux system)•4)After all file prepared, in qemu kernel, test this:•mount /dev/hda/tmp3 => hda will be linux.img’s data•mount /dev/hdc/tmp4 => hdc will be cdrom’s dataMount(continued)Now I want to share data with vmware. Here is steps to share data with vmware:1, inside vmware, create a IDE harddisk disk, select persistent and independent. Minimum size is 0.1GB, (100MB). Suppose it use hdd inside vmware, its file name is “vmware-qemu-flat.vmdk”. When generate it, choose a special folder for it. It is for share purpose.2, let the share folder inside a folder /mnt/hgfs. (The other topic, vmware tools.)3, inside vmware, run command: fdisk/dev/hdd. Use “n”command to create a new partition.4, inside vmware, run mkfs/dev/hdd. Then vmdk file is formatted. Copy new vmdk file to qemu’s folder, suppose it is “./share”. Make sure don’t format other partition inside vmware. ☺5, add parameter in run qemu-mips-system script: -hda/mnt/hgfs/share-qemu/vmware-qemu-flat.vmdk. Start the qemu-mips-system. Use this command in vm: mount /dev/hda/tmp3.6, With upper steps, the vmdk file can be share between qemu and vmware. It will be useful to share files.7, Before transfer the vmdk files between vmware and qemu, pls run “sync”. It is for write buffer’s data. “sync”may not enough. Maybe need “poweroff”VII. GDB for debug kernel•Step1, need re-build kernel. Run “make xconfig”, open many options in “kernel hacking”, such as “compile kernel with debug info”etc.After compile, we can find kernel image size change from about 4m to about 20m. This is normal.•Step2,use X window linux, in command script, remove –nographic, add a paramter–S, it is for stop kernel and wait for gdb command.•Step3, after qemu window start, you will see black screen but press Ctrl-Alt-3 to see bash prompt. Press Ctrl-Alt-2, go to qemu command window, press “gdbserver”, at this time, qemu will start to listen port 1234.•Step4, start another linux terminal, run “mips-linux-gdb vmlinux”, in gdb, run command “(gdb)target remote localhost:1234”, you will find gdb can trace kernel now.VIII network1, host preparation in linux •From /progDownload/tunctl-Download-41592.html download tunctl-1.5.tar.gz•Comment 2 lines,•#docbook2man $(PACKAGE).sgml•#install $(MAN) $(DESTDIR)$(MAN_DIR)•make•make install•Find if host linux kernel have “tun.ko”•[root@...~]# find /lib -name "tun.ko"•/lib/modules/2.6.9-22.EL/kernel/drivers/net/tun.konetwork•Goto guest kernel folder, run “make xconfig”•Find “network device support”=> “other ISA cards”=>”ne2000/ne1000 support”, open it.•Re-compile your guest kernel after the change.network•-----------------------------------------"create /usr/local/sbin/tap.sh file (e1000g0 is network card label, this file is at host) -----------------------------------------#!/bin/sh•IF=e1000g0•TAP=tap0•case "$1" in•"start")•sudo tunctl-t $TAP•ifconfig$TAP plumb•brdgadm-a $IF•brdgadm-a $TAP•;;•"stop")•#brdgadm-d $IF•#brdgadm-d $TAP•ifconfig$TAP unplumb•sudo tunctl-d $TAP•;;•esac•exit 0•------------------------------------# /usr/local/sbin/tap.sh start## /usr/local/sbin/tap.sh stop------------------------------------network•After run “tap.sh start”on host of linux, we check if tun.ko is probed: “lsmod | grep tun“,•tun 9153 0•And also we check if tap0 device is power up,•ifconfig –a, we can find a new device tap0 is power on.•We can run following command in host linux:“ifconfig tap0 192.168.200.1“.•Create a file, vi /etc/qemu-ifup#!/bin/shifconfig$1 192.168.200.10Network2, guest•Add following string to qemu-run script:•-net nic,vlan=1,macaddr=00:aa:00:00:01:01 -net tap,vlan=1,ifname=tap0•Startup qemu-system-mips by the added script file.•In guest linux shell, run:•ifconfig eth0 192.168.200.11•ping -c 4 192.168.200.1 to check if network is ok.Network error•I meet this error:•# ping -c 3 192.168.200.10•PING 192.168.200.10 (192.168.200.10): 56 data bytes•NETDEV WATCHDOG: eth0: transmit timed out•NETDEV WATCHDOG: eth0: transmit timed out•---192.168.200.10 ping statistics ---• 4 packets transmitted, 0 packets received, 100% packet loss•After I change this file, arch/mips/kernel/i8259.c , I solve the issue on guest linux2.6.21.•add .disable = disable_8259A_irq,on line 39•[root@localhost linux-2.6.21.7]#diff ./arch/mips/kernel/i8259.c ./arch/mips/kernel/i8259_test.c•39d38•< .disable = disable_8259A_irq•Reference web for the patch:•/mm-commits@/msg24505.html or •/Mailing-Lists/Kernel/2007-07/msg12733.html3, Network prepare inhost Windows XP host system•1, go to /BBS/thread-3209-1-1.html, download tapnic.rar.•After click “addtap.bat”, a new driver for virtual XP network is generated. Please rename it to tap0.•Reference web http://www.h7.dion.ne.jp/~qemu-win/TapWin32-en.html.XP windows hostprepare for network •Force IP address of tap0:Windows XPprepare•Run this command for windows XP:•qemu-system-mips.exe-L . -m 192 -kernel .\myimages2\vmlinux -initrd a.mtd-append "console=ttyS0 init=/linuxrc root=/dev/hda pci=noapicisa=noapic" -M mips-cdrom./cd.ISO-hda./share/vmware-qemu-flat.vmdk-net nic,vlan=1,macaddr=00:aa:00:00:01:01 -net tap,vlan=1,ifname=tap0,vlan=1,ifname=tap0•Guest OS preparation same as upper mentioned hostlinux+guest linux.Rootfs changefor the network•In order to mount nfs server on host linux or windows host, I add nfs support in guest kernel option, but still cannot mount nfs folder.•Later I add follow lines in rc.sysinit and solve the unable mount issue.ifconfig lo 127.0.0.1netmask255.0.0.0 broadcast 127.255.255.255 portmapmount -t ramfs ramfs/tmp-o maxsize=4000More Host Preparationfor Network•1, windows, for NFS work, need install cygwin, make sure NFS module is installed. We need edit “C:\cygwin\etc\hosts”and “C:\cygwin\etc\exports”for NFS setting•2, Linux, make sure NFS work. It is at “start menu”=>”system setting”=> “server setting”=> “nfs setting”Malta board(Mips24k)& Graphics study•MTD_PHYSMAP need to be closed.•Because Malta board has graphics card support, now I start to study malta board.•1) get svn code from internet:•svn co svn:///qemu/trunk•2)don’t change anything on qemu code like before because there is a crash on change code and I find workdir also can be mounted on /dev/hdc. Also don’t need to change guest kernel code, it can be optional.•3)copy malta/.config to guest kernel folder. Build guest kernel with 2 commands: make config, make allMalta (continue)•4, create a script file, my-run-qemu without graphic support(in attachment, /malta/script) and another script file, graphics-qemu with graphic support. •run the graphic script file. For malta board, we don’t need change arch/mips/kernel/i8259.c like the fake qemu board.•Under guest linux, run “mount /dev/hdc/tmp3”to check if workdir is mounted on /tmp3.Some capture imageon malta platform•Graphic display after press “ctrl+alt+1”•After run some command, network mount is working.Futher topic & summerize•There are still 1 important topics Emulate every device inside Mips chip.•That’s all•Because pdf file don’t support *.rar file asas attachment, pls rename the txt to rar.。
计算机三级嵌入式综合题10-14套答案

十【解题思路】车载GPS导航仪是在当前城市生活中已经非常普及,是嵌入式系统的典型应用。
可以通过S3C2410外加功能电路来实现在汽车行驶过程中定位导航、防盗防劫等实用功能。
S3C2410是基于ARM9内核的典型ARM芯片,采用ARM920T核,属于中高档32位嵌入式微处理器。
本题主要考查基于S3C2410的嵌入式系统开发。
涉及到无线通信与数据传输,数字信号处理,通用I/O接口GPIO、串行外设接口SPI、集成电路互连总线接口I2C的典型应用及相关应用的驱动程序设计以及系统集成等。
【参考答案及解析】(1)【81】GPE11、GPE12、GPE13【82】0xFABFFFFF【解析】GPS是嵌入式系统中常用的无线通信接口,本题使用基于SPI接口的GPS 模块,采用S3C2410芯片GPE端口的GPE11~GPE13引脚。
初始化为GPE11~GPE13共6位进行赋值,按照寄存器格式为10,则端口值为0xFABFFFFF。
(2)【83】GPD【84】0xAAAAAAAA【85】8【86】2.25【解析】LCD显示屏自身不带控制器,没有驱动电路;本系统中主要利用GPIO 口设计驱动电路来进行控制,主要利用GPC和GPD端口。
真彩色图像由R、G、B三基色组成,且3个分量中的像素位数都是8位。
图像数据量=图像水平分辨率×图像垂直分辨率×像素深度/8。
(3)【87】8【88】125【89】0x00000100【90】0x00000100【91】0x249F【92】0x002000【93】0x001000【解析】按照采样定理,取样频率不应低于声音信号最高频率的两倍才不产生失真;所以此处频率可以取8KHz;波形声音的码率=取样频率×量化位数×声道数(单位:b/s);定时器计数脉冲周期=1/(PCLK/(预分频值+1)/分频系数)。
对配置寄存器以及控制寄存器的设置即按照寄存器格式对相应位进行赋值。
ARM开发教程之ARM Linux系统移植步骤

ARM开发教程之ARM LINUX系统移植步骤 ARM开发教程之ARM LINUX系统移植步骤 开发教程之
ARM简介 Linux简介 系统的制作移植建立交叉编译环境 引导程序 内核 修改内核 内核的配置编译 根文件系统 结束语
千锋3G嵌入式移动互联网技术研发中心 千锋3G嵌入式移动互联网技术研发中心 3G
ARM开发教程之引导程序 引导程序
对于计算机系统来说,从开机上电到操作系统启动需要一个引导程 序。嵌入式linux系统同样离不开引导程序,这个引导程序叫做 Bootloader[1]。通过这段小程序,可以初始化硬件设备、建立内存 空间的映射表,从而建立适当的系统硬件环境,为最终调用操作系 统内核做好准 备。 vivi[4]是韩国MIZI公司为其arm9系列产品而研发的Bootloader, 小而灵巧,这里选用它作为小型Linux系统的Bootloader。 首先要修改vivi源代码中的Flash分区信息,新的分区信息如表1 所示。 根据表1,在vivi源码arch/s3c2410/smdk.c文件中作出相应的 修改。 然后在配置菜单中导入smdk2410的默认配置,编译成功将在 vivi源代码目录下生成所需的Bootloader文件,文件名为vivi。 接着,便可把vivi下载到目标板Flash的相应位置。
千锋3G嵌入式移动互联网技术研发中心 千锋3G嵌入式移动互联网技术研发中心 3G
ARM开发教程之ARM简介
Arm9S3C2410微处理器与Linux的结合越来越紧密,逐 渐在嵌入式领域得到广范的应用。目前,在便携式消 费类电子产品、无线设备、汽车、网络、存储产品等 都可以看到S3C2410与Linux相结合的身影。 S3C2410微处理器是一款由Samsung公司为手持 终端设计的低价格、低功耗、高性能,基于arm920T 核的微处理器。它带有内存管理单元 (MMU),采用 0.18mm工艺和AMBA新型总线结构,主频可达203MHz。 同时,它支持Thumb 16位压缩指令集,从而能以较小 的存储空间获得32位的系统性能。
基于ARM9的嵌入式Linux应用开发平台的分析与实现

基于ARM9的嵌入式Linux应用开发平台的分析与实现陈斌【摘要】随着经济的迅速发展以及科学技术水平的不断提高,IT行业取得了较大程度上的进步,为我国国民经济的发展以及人民生活水平的提高做出重要贡献。
尤其是近几年来,信息技术、网络技术飞速发展,IT领域不断发展与升级,在这种环境之下,嵌入式系统成为IT领域的重要焦点之一。
目前状况下,行业内存在着诸多的嵌入式系统,而在这些嵌入式系统当中,Linux最为受到青睐,这主要是因为Linux具有自身的强大优势,主要表现在三个方面,分别是元代码开放、功能强大一级级易于移植等。
就目前市场状况而言,ARM9系列的嵌入式微处理器已经成为嵌入式系统首选的处理器产品,本文就在此基础之上针对基于ARM9的嵌入式Linux应用开发平台的分析与实现进行有益探讨。
【期刊名称】《佳木斯职业学院学报》【年(卷),期】2014(000)005【总页数】2页(P1-2)【关键词】嵌入式系统 ARM9 Linux应用开发平台文件系统【作者】陈斌【作者单位】铁岭师范高等专科学校【正文语种】中文【中图分类】TP316.811.嵌入式系统模型图1显示的主要是嵌入式系统的模型结构:如果从物理层面的角度对其进行一定程度上的分析,可以将嵌入式计算系统理解成一个专用的电子系统,一般情况下,这一专用的电子系统都处于一个非电子系统环境之下,且这一系统环境具有一定的复杂性。
至于这两种系统的关系,可以对其进行一定程度的抽象化处理,即具有复杂性的非电子系统是嵌入式系统的外部环境,我们将其称为被嵌入的系统。
就一般状况而言,整个系统之中所包含的嵌入式系统为多个,同时,嵌入式系统能够与外界进行直接的通信。
对于嵌入式系统而言,它能够提供一个专门的服务给被嵌入系统,这一服务主要表现为两个方面:一方面,这一服务可以表现为对外界输入的响应;另一方面,这一服务也可以是对被嵌入系统或者与之相邻的嵌入式系统数据的响应。
就如现代机电控制系统,对于这一系统而言,它是一种分布式的系统,在这种系统环境之下,各个处理单元都是通过网络进行一定程度上的连接的。
基于ARM9嵌入式Linux内核的移植

一
ห้องสมุดไป่ตู้
I 在 相 关 地 方 增 加 修改根 目录中的 Ma ef 文件。这个 j“ CONFI ARCH— 3 4 0 = kfe l ¥ G— S C2 1 ”
Ma e l  ̄ kfe 件的任务有两个 : i3 产生v iu  ̄ i“ ml x n y”一 这个语句。 。 件 和 产 生 内 核模 块 。为 了达 到 此 目的 , 1 关键点: of 文件决定了m ncni cn g i euof g Ma ei 将递 归进入内核的各个子 目录中, 菜单的 内容 。把使 用的平 台加在需要的地 kf e l 分别调用位于这些子 目录中的 Ma ef 。 k f e j l 方,这样在配置Ln x时就能够选择是否 iu 打开最上 层目录下的 Ma ei 文 件, 1 k fl e 支持 你的 平台 了。 这个文件 中修改后 的内容如 下所示 : 1 4 . 改ac / r b o )修 r h a m/ o t目录下的 ( )指定 目标平台 :ARCH:= a m Ma ei 文件 1 r kfe l (2 ) 指 定 交 叉 编 译 器 : { 编译出来的内核是存放在 ac / r r am/ h
解压到 目标板的地址 :修改 b o 目录下的 ot 2. )根据电路设置T XT DD E A R { kfe Mael文件 ; i 修改 cm r s / kfe o pe e Mael sd i 因为 2. 1 4. 8版本 的内核还没有包含 1文 件 。
¥C 40 3 2 1X处理器 ,所以要手动增加下面内 } 5. ac /r / e e 目 ) 修改 r am kr l 录下的文 h n 容 『 件 i q¥C FG AR H_ 3 2 1)y f ((ON I_ C S C 40,) e
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
基于ARM9的Linux2.6内核移植
姓名
系别、专业
导师姓名、职称
完成时间
目录
摘要 (I)
ABSTARCT (II)
1 绪论 (1)
1.1课题研究的背景、目的和意义 (1)
1.2嵌入式系统现状及发展趋势 (1)
1.3论文的主要工作 (4)
2 嵌入式 Linux系统构成和软件开发环境 (5)
2.1嵌入式Linux系统的体系结构 (5)
2.2嵌入式Linux系统硬件平台 (5)
2.3嵌入式Linux开发软件平台建立 (7)
2.4本章小结 (11)
3 嵌入式Linux的引导BootLoader程序 (12)
3.1 BootLoader概述 (12)
3.2 NAND Flash和NOR Flash的区别 (13)
3.3本章小结 (19)
4 Linux内核的编译、移植 (20)
4.1 Linux2.6内核的新特性简介 (20)
4.2 Linux内核启动流程 (20)
4.3内核移植的实现 (21)
4.4 MTD内核分区 (23)
4.5配置、编译内核 (24)
4.6本章小结 (26)
5 文件系统制作 (27)
5.1 yaffs文件系统简介 (27)
5.2 内核支持YAFFS文件系统 (27)
5.3本章小结 (30)
6测试 (31)
6.1简单测试方法的介绍 (31)
6.2编写简单C程序测试移植的系统 (31)
6.3在开发板执行测试程序 (32)
7结论 (33)
参考文献 (34)
致谢................................... 错误!未定义书签。
摘要
研究目的是在以S3C2410A(ARM920T核)微处理器为核心的硬件平台上,构建嵌入式Linux软件开发平台,以便在此基础上进行二次开发。
该移植研究并没有使用开发板附带的软件包,其所有源码都来自Internet,并且采用了较新的版本。
主要做了以下工作:下载、配置、编译了交叉编译工具链,建立了嵌入式Linux 交叉开发环境;详细分析了BootLoader的启动过程,深入地研究了BootLoader 从 NOR Flash启动的原理,在此基础上,对BootLoader进行了移植研究并实现了从 NOR Flash启动;综述了Linux2.6的新特性,详细分析了Linux内核移植要点,并移植、配置、编译了2.6版Linux内核。
关键词:系统移植;BootLoader;S3C2410;Linux2.6。