Create a sona-Tina installation disk

Source: Internet
Author: User
The installation disk consists of the following files:
Vmlinux. Bin Operating System Image
Ramdisk. BIN file system image, including applications
Home. jffs2.img configuration file Image
Bootloader image of loader. Bin arm3902 Motherboard
Redboot. Bin

====================================
Vmlinux. Bin
Is a Linux operating system image after the Linux kernel is reduced. Make can generate this file in the root directory of the Linux kernel folder,
The generated location is in the current directory.
Re-compile the kernel to generate a new image file.
There is a hidden configuration file. config in the root directory, which has been lost when copying or tar packages (not compressed,
It is best to compress tar -cxvfinto A tar.gz package

When you change the startup logo, use fblogo to make the image linux_logo.h and put it in the Linux/include/Linux/folder,
Overwrite the original file and change the width, height, and position of the image in the Linux/Drivers/Video/fbcom. c file,
Then re-compile the kernel

Change the screen driver after changing the screen. replace a file in the kernel: Linux/Drivers/Video/ep93xxfb. C,
Then re-compile the kernel

====================================
Ramdisk. Bin
The file system image of the application, including the application. The main file structure is as follows:
/Bin/
/Dev/
/Etc/
/Home/
+ -- Common/
+ -- Nfs/
+ -- Put the bin/sonatina program file in this directory
+ -- RW/put the program configuration file in this directory
+ -- Userfiles/Save the curve file in this directory
/Lib/
/Lost + found/
/Mnt/
/Proc/
/Root/
/Tmp
/Usr
/Var

File generation method:
1. Create a blank file system named Device
Dd If =/dev/Zero of = device BS = 1 k count = 7000
2. format the File System
Mke2fs-m-0-I 2000 Device
3. Mount the file system and create a directory/mnt/target first.
Mount-o loop device/mnt/Target
4. Copy the preceding directories and files to the file system, including the sonatina executable files compiled in the arm environment.
5. unmount
Umount/mnt/Target
6. compress the device into ramdisk. Bin.
Dd If = device BS = 1k | gzip-V9> ramdisk. Bin
Most of the operation steps have been written in the make pub Statement of makefile. You only need to put the device file under the source code directory.
7. Run the following command to decompress the file:
MV ramdisk. Bin ramdisk.gz
Gunzip ramdisk.gz

====================================
Home. jffs2.img
For Free Space image files on flash, only the partition is read and written when the program is running, including reading and writing configuration files and saving loading curve files.
The directory corresponding to this file on the sonatina machine is/home/RW/, which is defined in the ramdisk. BIN file system.
In the/etc/rc. d/rc. sysinit file, if you want to change this directory,
You need to change the source code of the program in this file.
In programming, the corresponding path is/home/RW/, which is determined by the program code.
The path for compiling in arm is/usr/local/ARM/2.95.3/src/microwindows-0.90/src/projects/RW /,
Determined in makefile.

Note:
Jffs is called: The Journalling flash File System (log FLASH file system) was initially developed by Axis
Communications Development, David Woodhouse of Red Hat
It has been improved. It appears as an actual File System of the original flash chip used for micro-embedded devices. The jffs file system is log structured, which means that it is basically a long column node. Each node
Contains part of the information about the file, which may be the file name or data. Compared with ext2 FS, jffs
These advantages are increasingly popular in diskless embedded devices:
1 jffs performs flash erasure/Write/read operations on the sector level, which is better than ext2 file system.
2 jffs provides better crash/power loss security protection than ext2. Ext2
The file system copies the entire sector to the memory (Dram), merges new data in the memory, and writes the data back to the entire sector. This means that to change a single word, you must
KB) Execution of Read/Erase/write routines-this is very inefficient. If luck is poor, when dram
If a power failure or other accident occurs during data merging, the entire data set is lost because the flash sector is erased after the data is read into dram. Jffs
Attaches a file instead of overwriting the entire sector, and provides crash/power-down security protection.
3. This may be the most important thing: jffs is specially created for embedded devices like flash memory chips, so its entire design provides better flash memory management.
To build a jffs file system, you must first have a hardware device flash and an operating system that supports the jffs file system.

====================================
Loader. Bin

//////////////////////////////////////// /////////
///// Set up the microwindow and arm environment on Linux ///////
//////////////////////////////////////// /////////
1. Copy/home/nfs/to the same directory and create the directory/home/RW /,
Copy/usr/include/freetype1/FreeType/
/Usr/include/directory
Make again in the/home/nfs/microwindow/src/directory
2. Copy/usr/local/ARM/folder to the same directory of the target machine and re-make microwindow
3. The mkfs. jffs2 executable file must be copied to the/sbin folder separately to use this command in shell.
[Note]
1. Copy the tar.gz package before copying between Windows and Linux. Otherwise, the symbolic link file will be lost!
2. makefile files under arm and PC are different and cannot be used in general!

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.