Git Product home page Git Product logo

weimingtom / loongson1-pmon Goto Github PK

View Code? Open in Web Editor NEW

This project forked from lshw/loongson1-pmon

0.0 1.0 0.0 19.78 MB

loongson1b loongson1c-300a loongson1c-300b openloongson pmon 适用于智龙v2/智龙v3/龙芯1B开发板/龙芯1C-300B开发板1.0

License: Other

Shell 0.04% C++ 0.32% Perl 0.03% C 87.36% Smalltalk 0.01% Assembly 5.17% Awk 0.02% TeX 0.31% Makefile 6.45% Batchfile 0.01% DIGITAL Command Language 0.01% Module Management System 0.01% Yacc 0.03% Lex 0.02% Roff 0.23%

loongson1-pmon's Introduction

本项目,来自于龙芯广州分公司为龙芯俱乐部提供的龙芯1C智龙主板提供的pmon源码,适用于龙芯1B
build_ls1c_openloongson.sh 一键编译龙芯1C智龙v2/v3 pmon
build_ls1b_dev.sh 一键编译龙芯1B开发板的pmon
build_gcc.sh 一键编译龙芯的交叉开发环境gcc-4.9

编译:
git clone https://github.com/lshw/loongson1-pmon
cd loongson1-pmon
./build_ls1c_openloongson.sh
执行 build_ls1c_openloongson.sh 生成2个文件:gzram.* pmon_*.bin

配置文件
pmon-ls1x-openloongson/Targets/LS1X/conf/ls1c
该配置文件内容与ls1c_300a_openloongson相同,ls1c_300a_openloongson是该开发板的备份配置文件

nand flash分区: 若分区设为:
kernel 起始于2MByte,大小20M 用于内核
rootfs 起始于22MByte,大小106MByte 用于根文件系统
1.新的方式:
在pmon命令行下用set 命令设置,兼容 linux的mtdparts方式。 set mtdparts ls1x-nand:20M@2M(kernel),106M@22M(rootfs)
新的方式,分区表会传递给linux kernel ,需要linux kernel支持mtdparts
2.老的方式:
老的方式,注意分区大小需要与linux kernel中的一致
修改 Targets/LS1X/dev/ls1x_nand.c
#ifndef MTDPARTS add_mtd_device(ls1x_mtd, 210241024, 2010241024, "kernel"); add_mtd_device(ls1x_mtd, 2210241024, 10610241024, "rootfs");

刷写内核和文件系统命令如下:
devcp tftp://192.168.1.3/vmlinux /dev/mtd0
mtd_erase /dev/mtd1 devcp tftp://192.168.1.3/rootfs-yaffs2.img /dev/mtd1 yaf nw

如果用spiflash启动,不用nand启动的话可以根据自己使用的情况修改分区,注意linux内核中也要修改。

龙芯1C的u盘刷机文件名是autoexec.bat ,里面可以放置pmon命令,会在开机时自动执行, 第一行为版本号,用于防止重复刷机

另外, 此源码也可用于龙芯1B开发板,执行build_ls1b_dev.sh ,生成龙芯1B的pmon,
龙芯1B的u盘刷机文件名是autoexec.1b ,里面可以放置pmon命令,会在开机时自动执行, 第一行为版本号,用于防止重复刷机

为了防止误刷,并强制测试新版本的rom, 屏蔽了原来的刷机指令 load -rf bfc00000, 只在ram版本的install.1b,install.1c里可以使用pmon升级指令, 需要先boot /dev/fs/fat@usb0/install.1c 先运行ram版本的新版本,运行正常后, 在新版本的ram版pmon下,可以使用load -rf bfc00000 /dev/fs/fat@usb0/pmon_ls1c_openloongson.bin 进行升级。

有问题, 请到github给我留言 https://github.com/lshw ,或发邮件到[email protected]

loongson1-pmon's People

Contributors

lshw avatar sundm75 avatar red54 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.