Build an embedded Linux development environment

Source: Internet
Author: User

Build an embedded Linux development environment

Sort out the notes for building an embedded Linux development environment.

How to Use BusyBox's crond service in Embedded Linux

I. Make a u-boot.bin File:
Tar xjf u-boot-1.1.6.tar.bz2
Cd u-boot-1.1.6
Patch-p1 <../u-boot-1.1.6_jz2440.patch
Make 100ask24x0_config
 
Make
 

U-Boot source code

2. Create a uImage file for a 4.3-inch screen:
Tar xjf linux-2.6.22.6.tar.bz2
Cd linux-2.6.22.6
Patch-p1 <../linux-2.6.22.6_jz2440.patch
Mv ../4.2LCD _ mach-smdk2440.c arch/arm/mach-s3c2440/mach-smdk2440.c
Cp config_ OK. config
 
Make uImage
 


3. Build a root file system
1. Port Busybox
Tar xjf busybox-1.7.0.tar.bz2
Cd busybox-1.7.0
Make menuconfig (configuration)
Vi Makefiel (modify Makefile ARCH? = Arm CROSS_COMPILE? = Arm-linux -)
Make (Compilation)
Make CONFIG_PREFIX = dir_path install (installation)
2. Use the glibc Library
Mkdir-p/work/nfs_root/rootfs/lib
Cd/work/tools/gcc-3.4.5-glibc-2.3.6/arm-linux/lib
Cp *. so */work/nfs_root/rootfs/lib-d
3. Build the etc directory

A. etc/inittab file content is as follows:
#/Etc/inittab
Console: askfirst:-/bin/sh
: Sysinit:/etc/init. d/rcS
Tty1: askfirst:-/bin/sh
: Ctrlaltdel:/sbin/reboot
B. The content of the etc/init. d/rcS file is as follows:
#! /Bin/sh
Mount-
Mkdir/dev/pts
Mount-t devpts/dev/pts
Echo/sbin/mdev>/proc/sys/kernel/hotplug
Mdev-s
C. etc/fstab file content is as follows:
# Device mount-point type options dump fsck order
Proc/proc defaults 0 0
Tmpfs/tmp tmpfs defaults 0 0
Sysfs/sys sysfs defaults 0 0
Tmpfs/dev tmpfs defaults 0 0
 

4. Build the dev directory
Sudo mknod console c 5 1
Sudo mknod null c 1 3
Sudo mknod ttySAC0 c 204 64
Sudo mknod mtdblock0 B 31 0
Sudo mknod mtdblock1 B 31 1
Sudo mknod mtdblock2 B 31 2
 

5. create other directories
Mkdir proc mnt tmp sys root
 

4. Create a yaffs File System Image File
Cd/work/nfs_root
Mkyaffsimage rootfs. yaffs
5. Create a jffs2 file Image File
Cd/work/nfs_root
Mkfs. jffs2-n s 2048-e 128KiB-d rootfs-o rootfs. jffs2
 

6. Set the bootargs parameter of u-boot and select the root file system startup mode:
1. Enable nfs-based startup
Set bootargs noinitrd root =/dev/nfs nfsroot = kernel:/work/nfs_root/first_fs ip = kernel: 59.73.166.1: Kernel 255.255.0: eth0: off console = ttySAC0 init =/linuxrc
Stdin = serial
Saveenv
2. Start from a block Device
Set bootargs noinitrd root =/dev/mtdblock3 rootfstype = jffs2 init =/linuxrc console = ttySAC0
Saveenv

This article permanently updates the link address:

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.