资源简介
本资源包括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中文参考手册新版
相关资源
- IAR 7.80.4的安装包
- ccs官方软件及安装
- concept2.6无需安装1
- TI CCS V5.4 安装步骤及破解文件
- CCSv9链接及安装流程详解
- 微软masm汇编编译器
- JDK8 绿色版 免安装版 64位
- 编译原理实验工具及参考源码(lex&
- ManageEngine_OpManager_12.3安装手册+管理员
- 类pascal语言编译器(编译原理实验)
- 直流稳压电源的课程设计、安装及调
- VMware65_SLP_DeLLSLIC2.1
- 编译原理课程设计:词法语法编译器
- 中科院 编译原理 习题及解答
- 编译原理四元式和逆波兰式
-
安装 .net fr
amework 4.0失败原因是KB9 - arcgis 10.1 中文环境安装包
- windows下制作macOS安装U盘,绝对简单好
- unity3d反编译工具
- 汇编语言编译器masm5.0
- 《编译原理》清华大学版中的pl0扩充
- PL/0功能扩充break功能
- 编译词法分析器识别关键字常数和符
- windows cygwin ns2安装步骤
- 安装文件注册表提取工具-注册表监视
- uCOS编译环境建立 BC45 TASM
- 文本分割器(免费 无需安装)
- 如何安装驱动并进行打包
- zlib 最新 1.2.8 win32 win64 编译好的dll
- 编译原理LR(0)语法分析
评论
共有 条评论