Navigation

    全志在线开发者论坛

    • Register
    • Login
    • Search
    • Categories
    • Tags
    • 在线文档
    • 社区主页

    请问:F133-B的V1.0 版本的norflash uboot有什么修改,如何适配?

    MR Series
    4
    4
    1923
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • H
      huangjun.zopudt LV 4 last edited by

      我自行编译了f133-b的Uboot,如下图中的u-boot-spinor-sun20iw1p1.bin

      60f430ef-e129-4a84-b576-4d4e5b5c8d12-image.png
      执行报错如下:
      56fc230e-907b-4ff3-b59e-36cfbb3c9496-image.png
      请问,这个版本的uboot需要做哪些调整?

      1 Reply Last reply Reply Quote Share 0
      • YuzukiTsuru
        柚木 鉉 LV 9 last edited by

        boot0和boot1都需要重新编译

        1 Reply Last reply Reply Quote Share 0
        • aozima
          aozima LV 7 last edited by

          128M的DDR是在哪块代码支持的?

          1 Reply Last reply Reply Quote Share 0
          • Y
            YiXinTai LV 5 last edited by

            1. SPINOR启动
              3.1. setup.h
              路径:lichee/linux-5.4/include/uapi/asm-generic/setup.h
              1、修改COMMAND_LINE_SIZE宏大小至1024,

            3.2. boot_package_nor.cfg
            路径:lichee/device/config/f133/configs/default/boot_package_nor.cfg
            1、修改item=u-boot, u-boot-spinor.fex为u-boot.fex,

            3.3. env.cfg
            路径:lichee/device/config/f133/configs/default/env.cfg
            1、增加nor_root=/dev/mtdblock5
            2、增加
            setargs_nor=setenv bootargs ubi.mtd=${mtd_name} ubi.block=0,${root_partition} earlyprintk=${earlyprintk} clk_ignore_unused initcall_debug=${initcall_debug} console=${console} loglevel=${loglevel} root=${nor_root} rootfstype=${rootfstype} init=${init} partitions=${partitions} cma=${cma} snum=${snum} mac_addr=${mac} wifi_mac=${wifi_mac} bt_mac=${bt_mac} specialstr=${specialstr} gpt=1

            3、修改bootcmd=run setargs_nor boot_normal
            参考图如下:

            3.4. board.dts
            路径:lichee/device/config/f133/configs/evb1/linux-5.4/board.dts
            1、增加spi-nor@0结点的配置,并确保节点spi0和子节点spi-nor@0的status="okay",如下:
            spi-nor@0 {
            compatible = "jedec,spi-nor";
            spi-max-frequency=<30000000>;
            reg = <0x0>;
            spi-rx-bus-width=<0x01>;
            spi-tx-bus-width=<0x01>;
            status="okay";
            };
            参考图如下:

            3.5. sys_config.fex配置文件
            路径:device\config\chips\f133\configs\evb1
            1、修改storage_type = 3

            3.6. kernel_menuconfig配置
            1、进入make kernel_menuconfig -> Device Drivers -> Memory Technology Device (MTD) Support,选择SUNXI partitioning support和SPI-NOR device support配置;
            2、进入make kernel_menuconfig -> Device Drivers -> SPI support,选择SPI memory externsion;

            选择SPI memory externsion

            3.7. 裁剪固件小于10MBytes

            3.7.1. 内核裁剪
            编译窗口输入make kernel_menuconfig

            3.7.1.1. 关闭网络支持

            Networking support --->

            3.7.1.2. 开启MTD/spinor支持
            ---> Device Drivers
            ---> <> Memory Technology Device (MTD) support --->
            ---> <
            > SUNXI partitioning support
            ---> <*> SPI-NOR device support --->

            3.7.1.3. 关闭dump reg支持
            ---> Device Drivers
            ---> < > dump reg driver for sunxi platform

            3.7.1.4. 关闭Remote Controller支持
            ---> Device Drivers

            Remote Controller support ----

            3.7.1.5. 关闭Multimedia支持
            ---> Device Drivers
            ---> < > Multimedia support ----

            3.7.1.6. 关闭Sound card支持
            ---> Device Drivers
            --- > <*> Sound card support --->
            --- > < > Advanced Linux Sound Architecture ----

            3.7.1.7. 关闭部分Cryptographic API支持
            ---> -*- Cryptographic API --->

            Disable run-time self tests

            --- > < > RSA algorithm
            --- > < > ECDH algorithm
            --- > < > CCM support
            --- > < > GCM/GMAC support
            --- > < > CTR support
            --- > < > Sequence Number IV Generator
            --- > < > Null algorithms
            --- > < > ECB support
            --- > < > CMAC support
            --- > < > GHASH hash function
            --- > < > AES cipher algorithms
            --- > < > ARC4 cipher algorithm
            --- > < > Deflate compression algorithm --- > < > LZO compression algorithm
            --- > < > Zstd compression algorithm
            ---> < > NIST SP800-90A DRBG ----
            ---> < > Jitterentropy Non-Deterministic Random Number Generator
            Hardware crypto devices ----

            ---> < > SHA224 and SHA256 digest algorithm
            ---> < > HMAC support
            ---> < > Cryptographic algorithm manager

            3.7.1.8. 关闭XZ decompression支持
            ---> Library routines --->
            --- > < > XZ decompression support

            DMA Contiguous Memory Allocator

            3.7.2. 应用裁剪
            编译窗口输入make menuconfig

            3.7.2.1. 关闭smartva
            ---> Gui --->
            ---> Littlevgl --->
            ---> < > smartva

            lvgl-8.0.1 use sunxifb cache

            lvgl-8.0.1 use sunxifb double buffer

            3.7.2.2. 关闭cedarx
            ---> Allwinner --->
            ---> < > libcedarx

            3.7.2.3. 关闭alsa
            ---> Allwinner --->
            ---> < > alsa-conf-aw

            ---> Utilities --->
            < > alsa-utils

            3.7.2.4. 关闭网络
            ---> Kernel modules --->
            ---> Wireless Drivers --->
            ---> < > kmod-net-xr819s

            ---> Firmware --->
            ---> < > xr819s-firmware

            		--->	Base system  --->
            

            ---> <*> busybox
            ---> Networking Utilities --->

            Enable IPv6 support

            hostname

            ifconfig

            ip

            ntpd

            ping

            route

            wget

            udhcpc (DHCP client)

            ---> Allwinner --->
            ---> < > swupdate
            ---> < > ota-burnboot
            ---> < > wifimanager

            ---> Network --->
            ---> < > iw
            ---> WirelessAPD --->
            ---> < > wpa-cli
            ---> < > wpad-basic
            ---> < > hostapd-common

            		--->	Libraries  --->
            

            ---> Firewall --->
            ---> < > libip4tc
            ---> < > libip6tc
            ---> < > libxtables

            ---> Base system --->
            ---> < > dnsmasq
            ---> < > netifd

            3.7.2.5. 关闭input模块
            ---> Kernel modules --->
            ---> Input modules --->
            ---> < > kmod-net-xr819s
            ---> < > kmod-touchscreen-gt9xxnew
            ---> < > kmod-input-evdev
            ---> < > kmod-input-core

            3.7.2.6. 关闭其他库
            ---> Base system --->
            ---> < > jsonfilter
            ---> < > ubus
            ---> < > ubusd

            ---> Allwinner --->
            ---> < > liballwinner-base
            ---> < > libuapi

            ---> Libraries --->
            ---> < > alsa-lib
            ---> < > libconfig
            ---> < > libfreetype
            ---> < > libncurses
            ---> < > libncursesw
            ---> < > terminfo
            ---> < > libuci
            ---> < > libubus
            ---> < > libspeexdsp
            ---> Compression --->
            ---> < > libbz2
            ---> SSL --->
            ---> < > libopenssl
            ---> < > libnl-tiny

            ---> Multimedia --->
            ---> < > fdk-aac

            ---> Utilities --->
            ---> < > jshn
            ---> < > strace

            ---> Libraries --->
            ---> < > libblobmsg-json
            ---> < > libjson-c
            ---> < > libubox

            3.8. sys_partition_nor.fex
            路径:device/config/chips/f133/configs/evb1/sys_partition_nor.fex
            此文件为spinor的分区配置文件,打包过程中可能出现分区太小导致镜像装载失败的情况

            此时需要修改对应分区大小,或对内核或者文件系统进行裁剪。
            各分区大小配置参考样本如下:

            3.9. 问题归纳
            1)启动过程中,看到如下打印,才能确认spinorflash工作正常,否则请确认spi的gpio配置是否有冲突,或者spinorflash驱动和dts是否配置正常。

            1 Reply Last reply Reply Quote Share 0
            • 1 / 1
            • First post
              Last post

            Copyright © 2024 深圳全志在线有限公司 粤ICP备2021084185号 粤公网安备44030502007680号

            行为准则 | 用户协议 | 隐私权政策