资源简介
本资源包括jffs2文件系统源代码及相关依赖库源代码,具体编译、安装步骤的详细说明。
代码片段和文件信息
// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
// $Id: main.cv 1.1 1999/08/09 18:04:57 dwmw2 Exp $
/* ######################################################################
Linux Flash File System boot loader
This loader should be able to work with any sort of linearly paged flash
that is mapped into the bios extension region. To do so you have to
customize the first section to allow it to speak to your flash. The
loader reads a FFS2 filesystem directly to locate the image and read it
into ram. You‘ll need at least a 4K window size prefferably 8K to fit
the entire loader in. If you only have 4k then you have to use the
SMALLER loader that omits error messages and error checking code to
fit into 4k.
TODO:
- A Simple and worthwhile thing would be to read the kernel command
line from the file /commandline on the flash - this would remove the
need to hardcode one in here. Even better would be a config file but
I haven‘t the faintest idea what would be usefull to put in one!
##################################################################### */
/*}}} */
#include “local.h“
#include “io.h“
#include
#include
/* No more than 256 blocks must be used by the FFS2. If your flash window size
is over 4k then you must compile with -DSMALLER defined to strip out enough
code to fit the extension in the 4k window */
static unsigned long EraseSize = 0x20000;
static unsigned long FlashSize = 2*1024*1024;
static unsigned long WindowSize = 32*1024;
static unsigned char *FlashWindow = (void *)0xe8000;
#define PAGE_IO 0x208
#define CMDLINE “auto rw root=/dev/mtd1“
// PageTo - Window Swapping function /*{{{*/
// ---------------------------------------------------------------------
/* Handles the specific flash window implemenation. This one is for the
Octagon board */
void PageTo(unsigned long Window)
{
outb(Window | (2 << 6)PAGE_IO);
}
/*}}}*/
// Defines for the linux loader
#define SETUP_SIZE_OFF 497
#define SECTSIZE 512
#define SETUP_VERSION 0x0201
#define SETUP_HIGH 0x01
#define BIG_SYSSEG 0x10000
#define DEF_BOOTLSEG 0x9020
// From etherboot this is the header to the image startup code
struct setup_header
{
__u8 jump[2];
__u8 magic[4]; /* “HdrS“ */
__u16 version; /* >= 0x0201 for initrd */
__u8 realmode_swtch[4];
__u16 start_sys_seg;
__u16 kernel_version;
/* note: above part of header is compatible with loadlin-1.5 (header v1.5)*/
/* must not change it */
__u8 type_of_loader;
__u8 loadflags;
__u16 setup_move_size;
unsigned long code32_start;
unsigned long ramdisk_image;
unsigned long ramdisk_size;
unsigned long bootsect_kludge;
__u16 heap_end_ptr;
};
// ffs2_read - Read function from mapped flash /*{{{*/
// ---------------------------------------------------------------------
- 上一篇:经典和现代的信道编码
- 下一篇:STM32L0中文参考手册新版
相关资源
- vanFit绿色免安装版
- 编译完的QXlsx库
- BS_Contact破解安装.rar
- Cloudera Manager及CDH从5.4.8升级到5.12.1全
- vsftp安装包以及配置说明
- QuartusII12.0安装与使用指南
- doxygen源码Windows编译
- 中标麒麟5.0 下的软键盘 安装包
- MyBatis_Generator MyEclipse插件离线安装包
- eclipse安装extjs插件
- JCreator4.5(安装文件+注册机)(注册
- apk反编译包
- OpenGL库文件安装包
- elasticsearch-analysis-ik-6.2.4(编译版)
- xshell+xftp完美绿色免安装破解版
- W8W10安装PL2303问题终极解决方案 解决
- NSIS工具安装打包工具中文版
- CadenceIC617安装全过程.pdf
- RedHat 6.5离线安装openssl-devel顺序
- .NET 加密加壳工具,防止反编译被查看
- swf转pdf文件的转换利器——gfx2gfx原生
- 哈工大编译原理习题及答案
- LR0文法分析器32349
- C Minus 语法分析器及课程设计报告
- keepalived安装包,多版本
- TC与catia集成之客户端安装详细操作步
- 最新cadence16.6破解文件+安装步骤
- IBM V3500存储安装配置手册
-
syba
se15.7安装.doc - Saber_H-2012.12安装说明和破解.zip
评论
共有 条评论