Navigation

    全志在线开发者论坛

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

    H616 buildroot2024.02 主线启动

    H/F/TV Series
    1
    2
    1864
    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.
    • J
      jonsen LV 3 last edited by

      在此记录 H616 buildroot2024.02 主线启动

      1. 下载buildroot
      git clone git://git.buildroot.net/buildroot
      cd buildroot
      
      
      1. 察看config文件发现没有zero 2 的配置文件 只有zero3的,
        orangepi_zero3_defconfig 进入config文件加
      cp  orangepi_zero3_defconfig orangepi_zero2_defconfig
      

      这样就有了

      1. 选择zero2的设备树
      make menuconfig
      

      kernel
      (allwinner/sun50i-h616-orangepi-zero2) In-tree Device Tree Source file names

      4.修改genimage.cfg文件
      "buildroot-2024.02/board/orangepi/common/genimage.cfg"

      image bootfs.vfat {
      	vfat {
      		files = {
      			      "Image",
      			      "allwinner/sun50i-h616-orangepi-zero2.dtb"
      		}
      	}
      	size = 64M
      }
      
      
      image sdcard.img {
          partition u-boot {
              in-partition-table = false
              image = "u-boot-sunxi-with-spl.bin"
              offset = 8K
              size = 1000K # 1MB - 8KB(offset)
          }
          
          hdimage {}
          
        	partition boot {
        		partition-type = 0xC
        		bootable = "true"
        		image = "bootfs.vfat"
        	}   
           
          partition rootfs {
              image = "rootfs.ext4"
              partition-type = 0x83
               
          }
      }
      
      make -j1024
      
      1. dd 命令 将 img文件 烧录 sd卡

      7.设置bootcmd 和bootargs ,上电 uboot启动 后按回车

      setenv bootargs 'console=ttyS0,115200 root=/dev/mmcblk0p2 rootfstype=ext4 rootwait rw'
      
      setenv bootcmd 'fatload mmc 0:1 0x40200000 Image;fatload mmc 0:1 0x4fa00000 sun50i-h616-orangepi-zero2.dtb;booti 0x40200000 - 0x4fa00000'
      
      saveenv
      
      1. reset ! 全体起立!主线启动!
      1 Reply Last reply Reply Quote Share 1
      • J
        jonsen LV 3 last edited by

        bootcmd 和 boot args 可以在 uboot 中设置
        [*] Enable boot arguments │ │
        │ │ (console=ttyS0,115200 root=/dev/mmcblk0p2 rootfstype=ext4 rootwait rw) Boot arguments

        [*] Enable a default value for bootcmd │ │
        │ │ (fatload mmc 0:1 0x40200000 Image;fatload mmc 0:1 0x4fa00000 sun50i-h616-orangepi-zero2.dtb;booti 0x40200000│ │

        这样编译后直接能启动

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

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

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