<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Topics tagged with explore]]></title><description><![CDATA[A list of topics that have been tagged with explore]]></description><link>https://fishros.org.cn/forum/tags/explore</link><generator>RSS for Node</generator><lastBuildDate>Fri, 17 Jul 2026 01:36:31 GMT</lastBuildDate><atom:link href="https://fishros.org.cn/forum/tags/explore.rss" rel="self" type="application/rss+xml"/><pubDate>Invalid Date</pubDate><ttl>60</ttl><item><title><![CDATA[[开源硬件探索]LiCheePI NANO]]></title><description><![CDATA[<h2>核心镜像</h2>
<pre><code>docker run --rm -it -v /dev:/dev --privileged fishros2/licheepi /bin/bash
</code></pre>
<h2>基本流程</h2>
<p dir="auto">1.编译uboot</p>
<pre><code>cd u-boot/ 
git checkout nano-v2018.01
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- licheepi_nano_spiflash_defconfig

# ====配置====
 make ARCH=arm menuconfig
    取消勾选 [] Enable a default value for bootcmd
    勾选 [v] Enable boot arguments；
    在下方一项中填入 bootargs 参数:
        console=ttyS0,115200 panic=5 rootwait root=/dev/mtdblock3 rw rootfstype=jffs2

# =====配置/workspace/u-boot/include/configs/suniv.h======

/*
 * Configuration settings for new Allwinner F-series (suniv) CPU
 *
 * SPDX-License-Identifier:	GPL-2.0+
 */

#ifndef __CONFIG_H
#define __CONFIG_H

#define CONFIG_SUNXI_USB_PHYS 1

/*
 * Include common sunxi configuration where most the settings are
 */
#include &lt;configs/sunxi-common.h&gt;

#define CONFIG_BOOTCOMMAND   "sf probe 0 50000000; "                           \
                             "sf read 0x80C00000 0x100000 0x4000; "  \
                             "sf read 0x80008000 0x110000 0x400000; " \
                             "bootz 0x80008000 - 0x80C00000"

#endif /* __CONFIG_H */


# ----配置 /workspace/u-boot1/drivers/mtd/spi/spi_flash_ids.c
# LINE@175
 {"xt25f128b", INFO(0x0b4018, 0x0, 64 * 1024, 256, RD_FULL | WR_QPP | SECT_4K) },


make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- -j12
</code></pre>
<p dir="auto">结果如下</p>
<p dir="auto"><img src="/forum/assets/uploads/files/1673900861098-6548c06d-0ee3-4884-9216-849d943df814-image.png" alt="6548c06d-0ee3-4884-9216-849d943df814-image.png" class=" img-fluid img-markdown" /></p>
<p dir="auto">2.编译linux内核</p>
<pre><code>git clone --depth=1 -b master https://gitee.com/LicheePiNano/Linux.git
cd Linux
make ARCH=arm f1c100s_nano_linux_defconfig
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- -j12
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- -j12 INSTALL_MOD_PATH=out modules_install

</code></pre>
<p dir="auto">3.编译根文件系统</p>
<pre><code>wget https://buildroot.org/downloads/buildroot-2021.02.4.tar.gz
tar xvf buildroot-2021.02.4.tar.gz
cd buildroot-2021.02.4/
make menuconfig
配置：https://wiki.sipeed.com/soft/Lichee/zh/Nano-Doc-Backup/build_sys/rootfs.html

</code></pre>
<p dir="auto">4.合并</p>
<pre><code>#!/bin/sh
UBOOT_FILE=./u-boot/u-boot-sunxi-with-spl.bin
DTB_FILE=./Linux/arch/arm/boot/dts/suniv-f1c100s-licheepi-nano.dtb
KERNEL_FILE=./Linux/arch/arm/boot/zImage
ROOTFS_FILE=./buildroot-2021.02.4/output/images/rootfs.tar
MOD_FILE=./Linux/out/lib/modules/4.15.0-rc8-licheepi-nano+

dd if=/dev/zero of=flashimg.bin bs=1M count=16 &amp;&amp;\
dd if=$UBOOT_FILE of=flashimg.bin bs=1K conv=notrunc &amp;&amp;\
dd if=$DTB_FILE of=flashimg.bin bs=1K seek=1024 conv=notrunc &amp;&amp;\
dd if=$KERNEL_FILE of=flashimg.bin bs=1K seek=1088 conv=notrunc &amp;&amp;\
mkdir rootfs
tar -xvf $ROOTFS_FILE -C ./rootfs &amp;&amp;\
cp -r $MOD_FILE rootfs/lib/modules/ &amp;&amp;\

#为根文件系统制作jffs2镜像包
#--pad参数指定 jffs2大小
#由此计算得到 0x1000000(16M)-0x10000(64K)-0x100000(1M)-0x400000(4M)=0xAF0000
mkfs.jffs2 -s 0x100 -e 0x10000 --pad=0xAF0000 -d rootfs/ -o jffs2.img &amp;&amp;\
dd if=jffs2.img of=flashimg.bin bs=1K seek=5184 conv=notrunc &amp;&amp;\
rm -rf rootfs &amp;&amp;\
rm jffs2.img
</code></pre>
<p dir="auto">5.下载</p>
<pre><code>开机任意输入，进入uboot,清除原有uboot
sf probe 0
sf erase 0 0x100000
reset

---
 wget https://ghproxy.com/https://github.com/linux-sunxi/sunxi-tools/raw/master/bin/fel-sdboot.sunxi
dd if=fel-sdboot.sunxi of=/dev/sda bs=1024 seek=8
</code></pre>
<pre><code>sudo sunxi-fel -p spiflash-write 0 flashimg.bin
</code></pre>
<h2>Docker构建</h2>
<p dir="auto">使用docker创建uboot、xboot、sunxi-tools环境.</p>
<pre><code>docker run -it  --privileged -v /dev:/dev fishros2/licheepi /bin/bash
</code></pre>
<p dir="auto">Dockerfile</p>
<pre><code>FROM ubuntu:16.04

# ENV https_proxy=http://192.168.1.107:7890
# ENV http_proxy=http://192.168.1.107:7890
# ENV all_proxy=socks5://192.168.1.107:7890

RUN apt update \ 
    &amp;&amp; apt install wget python3-yaml -y  \
    # 安装melodic
    &amp;&amp; echo "chooses:\n" &gt; fish_install.yaml \
    &amp;&amp; echo "- {choose: 5, desc: '一键安装:ROS(支持ROS和ROS2,树莓派Jetson)'}\n" &gt;&gt; fish_install.yaml \
    &amp;&amp; echo "- {choose: 2, desc: 更换源继续安装}\n" &gt;&gt; fish_install.yaml \
    &amp;&amp; echo "- {choose: 2, desc: 清理三方源}\n" &gt;&gt; fish_install.yaml \
    &amp;&amp; wget http://fishros.com/install  -O fishros &amp;&amp; /bin/bash fishros \
    &amp;&amp; wget http://fishros.com/install  -O fishros &amp;&amp; /bin/bash fishros \
    # 进行最后的清理
    &amp;&amp; rm -rf /var/lib/apt/lists/*  /tmp/* /var/tmp/* \
    &amp;&amp; apt-get clean &amp;&amp; apt autoclean 

RUN apt update &amp;&amp; \
    apt install gcc make cmake rsync wget unzip build-essential git bc swig libncurses-dev libpython3-dev libssl-dev -y
    #  python3-distutils android-tools-mkbootimg 

RUN wget http://releases.linaro.org/components/toolchain/binaries/7.2-2017.11/arm-linux-gnueabi/gcc-linaro-7.2.1-2017.11-x86_64_arm-linux-gnueabi.tar.xz &amp;&amp; \
    tar -vxJf gcc-linaro-7.2.1-2017.11-x86_64_arm-linux-gnueabi.tar.xz 

RUN sudo cp -r ./gcc-linaro-7.2.1-2017.11-x86_64_arm-linux-gnueabi /opt/ &amp;&amp; \
    echo 'PATH="$PATH:/opt/gcc-linaro-7.2.1-2017.11-x86_64_arm-linux-gnueabi/bin"' &gt;&gt; /etc/bash.bashrc

RUN apt install git -y &amp;&amp; \
    git clone https://gitee.com/LicheePiNano/u-boot.git /workspace/u-boot &amp;&amp; \
    cd /workspace/u-boot &amp;&amp; \
    git checkout nano-lcd800480

RUN apt install python2.7 python-dev -y 

WORKDIR /workspace


#========================================uboot========================================================
# 此处告知make采用arm-linux-gnueabi下的所有交叉编译工具，目标架构为Arm，设定各项默认配置为 nano 的spiflash支持版
# make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- f1c100s_nano_uboot_defconfig
# 若不带spi-flash的板子，请换成 licheepi_nano_defconfig
# make ARCH=arm menuconfig
# make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- -j8


#========================================sunxi-tools====================================================
RUN sudo apt-get install pkg-config libusb-1.0-0-dev -y &amp;&amp; \
    git clone -b f1c100s-spiflash https://github.com/Icenowy/sunxi-tools.git &amp;&amp; \
    cd sunxi-tools &amp;&amp; \
    make &amp;&amp; sudo make install

#========================================xboot========================================================
RUN git clone https://github.91chi.fun/https://github.com/xboot/xboot.git 
RUN apt install cpio -y &amp;&amp; \
    cd xboot &amp;&amp; \
    make CROSS_COMPILE=/opt/gcc-linaro-7.2.1-2017.11-x86_64_arm-linux-gnueabi/bin/arm-linux-gnueabi- PLATFORM=arm32-f1c100s 

# docker run -it fishros2/licheepi /bin/bash

#https://wiki.sipeed.com/soft/Lichee/zh/Nano-Doc-Backup/get_started/first_eat.html#%E4%B8%8B%E8%BD%BD%E5%B7%A5%E5%85%B7-sunxi-tools-%E5%AE%89%E8%A3%85
</code></pre>
]]></description><link>https://fishros.org.cn/forum/topic/650/开源硬件探索-licheepi-nano</link><guid isPermaLink="true">https://fishros.org.cn/forum/topic/650/开源硬件探索-licheepi-nano</guid><dc:creator><![CDATA[小鱼]]></dc:creator><pubDate>Invalid Date</pubDate></item></channel></rss>