Giter Club home page Giter Club logo

loongson1-pmon's Introduction

本项目,来自于龙芯广州分公司为龙芯俱乐部提供的龙芯1C开龙主板提供的pmon源码

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

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

nand flash分区:
在pmon-ls1x-openloongson/Targets/LS1X/dev/ls1x_nand.c文件中设置分区

#if defined(LS1CSOC)
add_mtd_device(ls1x_mtd, 0, 10241024, "bootloader");
add_mtd_device(ls1x_mtd, 1024
1024, 1310241024, "kernel");
add_mtd_device(ls1x_mtd, 1410241024, 5010241024, "rootfs");
add_mtd_device(ls1x_mtd, (50+14)10241024, 6410241024, "data");
分区为:
bootloader 1MByte 保留给nand启动用
kernel 13MByte 用于烧录内核
rootfs 50MByte 用于烧录根文件系统
data 64MByte 可以用作其他

注意分区大小要与linux kernel中的一致
bootloader分区保留给nand启动用,所以pmon烧录内核和根文件系统的命令变为:
devcp tftp://192.168.1.3/vmlinux /dev/mtd1
mtd_erase /dev/mtd2
devcp tftp://192.168.1.3/rootfs-yaffs2.img /dev/mtd2 yaf nw
就是/dev/mtd0不用,注意不要烧录错

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

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

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

loongson1-pmon's People

Contributors

lshw 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.