您尚未登录。

楼主 # 2021-06-01 11:53:19

哇酷小二
wechat微信:whycan_cn
所在地: 你猜
注册时间: 2020-04-22
已发帖子: 3,378
积分: 1902
个人网站

①用 xfel.exe 初始化 F1C100s DDR, ②把可执行文件下载到DDR ③执行程序

2021-06-01_114853.png



xfel.exe & u-boot.bin 二进制文件下载:f1c_xfel_run_uboot_20210603.zip (修复找不到动态链接库问题)

①用 xfel.exe 初始化 F1C100s DDR
②把可执行文件下载到DDR
③执行程序





离线

楼主 #1 2021-06-01 11:56:48

哇酷小二
wechat微信:whycan_cn
所在地: 你猜
注册时间: 2020-04-22
已发帖子: 3,378
积分: 1902
个人网站

Re: ①用 xfel.exe 初始化 F1C100s DDR, ②把可执行文件下载到DDR ③执行程序

可以建立批处理文件:

run.bat

xfel_20210530 ddr ddr2
xfel_20210530 write 0x81700000 u-boot.bin
xfel_20210530 exec 0x81700000

sleep 10

双击就能运行了.





离线

#2 2021-06-01 21:25:20

sea18c
会员
注册时间: 2019-08-05
已发帖子: 230
积分: 222.5

Re: ①用 xfel.exe 初始化 F1C100s DDR, ②把可执行文件下载到DDR ③执行程序

谢谢分享好工具

离线

#3 2021-06-01 21:27:33

sea18c
会员
注册时间: 2019-08-05
已发帖子: 230
积分: 222.5

Re: ①用 xfel.exe 初始化 F1C100s DDR, ②把可执行文件下载到DDR ③执行程序

晕哥,修复下下载文件,打开是失败的

离线

楼主 #4 2021-06-01 21:43:00

哇酷小二
wechat微信:whycan_cn
所在地: 你猜
注册时间: 2020-04-22
已发帖子: 3,378
积分: 1902
个人网站

Re: ①用 xfel.exe 初始化 F1C100s DDR, ②把可执行文件下载到DDR ③执行程序

sea18c 说:

晕哥,修复下下载文件,打开是失败的

我这里下载,解压是正常的.



检查一下 md5码:
md5sum f1c_xfel_run_uboot_20210601.zip
39df3d9625a54797cfddf053e56829dc





离线

#5 2021-06-01 22:24:42

迪卡
会员
所在地: 河北
注册时间: 2018-11-02
已发帖子: 916
积分: 903
个人网站

Re: ①用 xfel.exe 初始化 F1C100s DDR, ②把可执行文件下载到DDR ③执行程序

是不是支持全志全系列?
dktool可以升级了

离线

#6 2021-06-03 10:10:51

tianjjff
会员
注册时间: 2018-12-24
已发帖子: 129
积分: 22

Re: ①用 xfel.exe 初始化 F1C100s DDR, ②把可执行文件下载到DDR ③执行程序

该评论内容与本帖子无关,鼓励各位坑友积极发言讨论与帖子有关的内容!

离线

  • 不通过:与技术无关

楼主 #7 2021-06-03 10:23:19

哇酷小二
wechat微信:whycan_cn
所在地: 你猜
注册时间: 2020-04-22
已发帖子: 3,378
积分: 1902
个人网站

Re: ①用 xfel.exe 初始化 F1C100s DDR, ②把可执行文件下载到DDR ③执行程序

sea18c 说:

晕哥,修复下下载文件,打开是失败的


QQ截图20210603102141.png

有网友反应依赖两个C库, 我参考这个 https://segmentfault.com/a/1190000011748576

编译成了[真]静态链接版本.

下载地址: f1c_xfel_run_uboot_20210603.zip





离线

#8 2021-12-19 17:12:50

gerryqd
会员
注册时间: 2021-11-22
已发帖子: 10
积分: 5

Re: ①用 xfel.exe 初始化 F1C100s DDR, ②把可执行文件下载到DDR ③执行程序

一个疑问:
加载到 0x81700000 是因为配置中有,

CONFIG_SYS_TEXT_BASE=0x81700000

如果我想验证 SPL 或者是 SPL + UBOOT (u-boot-sunxi-with-spl.bin), 这个可以通过 xfel 实现吗?
(类似于 sunxi-fel uboot ...的功能)

离线

楼主 #9 2021-12-19 17:21:19

哇酷小二
wechat微信:whycan_cn
所在地: 你猜
注册时间: 2020-04-22
已发帖子: 3,378
积分: 1902
个人网站

Re: ①用 xfel.exe 初始化 F1C100s DDR, ②把可执行文件下载到DDR ③执行程序

gerryqd 说:

一个疑问:
加载到 0x81700000 是因为配置中有,

CONFIG_SYS_TEXT_BASE=0x81700000

如果我想验证 SPL 或者是 SPL + UBOOT (u-boot-sunxi-with-spl.bin), 这个可以通过 xfel 实现吗?
(类似于 sunxi-fel uboot ...的功能)

这个问题建议看下 sunxi-fel 的 uboot 命令实现源码。





离线

#10 2021-12-25 15:37:56

YuzukiTsuru
会员
注册时间: 2020-09-19
已发帖子: 41
积分: 370.5
个人网站

Re: ①用 xfel.exe 初始化 F1C100s DDR, ②把可执行文件下载到DDR ③执行程序

xfel在芯片损坏的时候运行 xfel ddr 显示ddr初始化完成,已经验证了芯片挂了
ddr

离线

#11 2022-01-17 14:58:06

HongSang
会员
注册时间: 2021-08-12
已发帖子: 42
积分: 16.5

Re: ①用 xfel.exe 初始化 F1C100s DDR, ②把可执行文件下载到DDR ③执行程序

@哇酷小二
晕哥请问用xfel如何烧其他的固件 您这边只烧了一个uboot 请问烧写其他的dtb zImage rootfs该怎么烧写
也是用xfel write 0x81700000 zImage dtb rootfs这样挨个烧写吗

离线

楼主 #12 2022-01-17 15:16:44

哇酷小二
wechat微信:whycan_cn
所在地: 你猜
注册时间: 2020-04-22
已发帖子: 3,378
积分: 1902
个人网站

Re: ①用 xfel.exe 初始化 F1C100s DDR, ②把可执行文件下载到DDR ③执行程序

HongSang 说:

@哇酷小二
晕哥请问用xfel如何烧其他的固件 您这边只烧了一个uboot 请问烧写其他的dtb zImage rootfs该怎么烧写
也是用xfel write 0x81700000 zImage dtb rootfs这样挨个烧写吗

write 是写到 ddr的,
写 flash 用 spinor 子目录:

    xfel spinor                                 - Detect spi nor flash
    xfel spinor read <address> <length> <file>  - Read spi nor flash to file
    xfel spinor write <address> <file>          - Write file to spi nor flash
    xfel spinand                                - Detect spi nand flash
    xfel spinand read <address> <length> <file> - Read spi nand flash to file
    xfel spinand write <address> <file>         - Write file to spi nand flash




离线

#13 2022-01-17 15:26:05

HongSang
会员
注册时间: 2021-08-12
已发帖子: 42
积分: 16.5

Re: ①用 xfel.exe 初始化 F1C100s DDR, ②把可执行文件下载到DDR ③执行程序

@哇酷小二
晕哥我再请假下 这里的<address>是指烧入分区的起始地址吗?就是在如下设备树中的定义的 reg?
例如烧写uboot    xfel spinor write 0x000000 u-boot.bin
烧写dtb              xfel spinor write 0x100000  .dtb
烧写zImage       xfel spinor write 0x110000 zIamge

            partition@0 {
                label = "u-boot";
                reg = <0x000000 0x100000>;
                read-only;
            };

            partition@100000 {
                label = "dtb";
                reg = <0x100000 0x10000>;
                read-only;
            };

            partition@110000 {
                label = "kernel";
                reg = <0x110000 0x400000>;
                read-only;
            };

            partition@510000 {
                label = "rootfs";
                reg = <0x510000 0xAF0000>;
				//reg = <0x510000 0xBF0000>;
            };

<length>是指文件的大小吗?

离线

楼主 #14 2022-01-17 15:28:50

哇酷小二
wechat微信:whycan_cn
所在地: 你猜
注册时间: 2020-04-22
已发帖子: 3,378
积分: 1902
个人网站

Re: ①用 xfel.exe 初始化 F1C100s DDR, ②把可执行文件下载到DDR ③执行程序

对的。





离线

#15 2022-01-17 18:43:52

HongSang
会员
注册时间: 2021-08-12
已发帖子: 42
积分: 16.5

Re: ①用 xfel.exe 初始化 F1C100s DDR, ②把可执行文件下载到DDR ③执行程序

	

	partitions {
			compatible = "fixed-partitions";
			#address-cells = <1>;
			#size-cells = <1>;

			partition@0 {
				label = "u-boot";
				reg = <0x000000 0x100000>;
				read-only;
			};

			partition@1 {
				label = "kernel";
				reg = <0x100000 0x500000>;
				read-only;
			};

			partition@2 {
				label = "rom";
				reg = <0x600000 0x2a00000>;
				read-only;
			};

			partition@3 {
				label = "vendor";
				reg = <0x3000000 0x1000000>;
			};

			partition@4 {
				label = "overlay";
				reg = <0x4000000 0x3000000>;
			};
		};

晕哥请问 芒果派r3 是这样分区的  后面的设备树和文件系统该怎么填地址呢  好像是用的overlay分区
xfel spinand write  0x000000 uboot.bin
xfel spinand write  0x100000 zImage

还有我这里如果有一个镜像文件system-nand.img,已经包含了uboot、kernel、dtb、rootfs 该怎么烧写呢
xfel spinand write 0x000000 system-nand.img 试过了没有用 只有uboot能起来

离线

楼主 #16 2022-01-17 18:45:46

哇酷小二
wechat微信:whycan_cn
所在地: 你猜
注册时间: 2020-04-22
已发帖子: 3,378
积分: 1902
个人网站

Re: ①用 xfel.exe 初始化 F1C100s DDR, ②把可执行文件下载到DDR ③执行程序

现在烧uboot能不能跑起来?





离线

#17 2022-01-18 10:08:05

HongSang
会员
注册时间: 2021-08-12
已发帖子: 42
积分: 16.5

Re: ①用 xfel.exe 初始化 F1C100s DDR, ②把可执行文件下载到DDR ③执行程序

哇酷小二 说:

现在烧uboot能不能跑起来?

可以跑起来的 log ↓:

U-Boot 2020.07 (Jan 18 2022 - 09:53:19 +0800) Allwinner Technology

CPU:   Allwinner F Series (SUNIV)
Model: Allwinner F1C100s Generic Device
DRAM:  64 MiB
MMC:   mmc@1c0f000: 0, mmc@1c10000: 1
Setting up a 480x480 lcd console (overscan 0x0)
In:    serial
Out:   serial
Err:   serial
Allwinner mUSB OTG (Peripheral)
Hit any key to stop autoboot:  0
Card did not respond to voltage select!
Card did not respond to voltage select!
unrecognized JEDEC id bytes: ff, c8, f1
Failed to initialize SPI flash at 0:0 (error -2)
List of MTD devices:
* spi-nand0
  - device: spi-nand@1
  - parent: spi@1c05000
  - driver: spi_nand
  - type: NAND flash
  - block size: 0x20000 bytes
  - min I/O: 0x800 bytes
  - OOB size: 64 bytes
  - OOB available: 31 bytes
  - 0x000000000000-0x000008000000 : "spi-nand0"
=========================
Boot Device: spi
Boot Slot 0: empty
Boot Slot 1: spi-nand
=========================
Reading 524288 byte(s) (256 page(s)) at offset 0x00080000
Unknown command 'bmp' - try 'help'
gpio: pin 134 (gpio 134) value is 1
DFU waiting on SPI-NAND...
musb-hdrc: peripheral reset irq lost!
Booting from SPI-NAND...
Reading 5242880 byte(s) (2560 page(s)) at offset 0x00100000
Wrong Image Format for bootm command
ERROR: can't get kernel image!
DFU waiting on SPI-NAND...

烧写zImage后

U-Boot SPL 2020.07 (Jan 18 2022 - 09:53:19 +0800)
board init start
DRAM: 64 MiB
board init start
Start GPIO Testing
Trying to boot from MMC1
Card did not respond to voltage select!
spl: mmc init failed with error: -95
Trying to boot from MMC2
Card did not respond to voltage select!
spl: mmc init failed with error: -95
Trying to boot from sunxi SPI
SPI-NAND: GigaDevice GD5F1GQ4UAYIG
SPI-NAND: U-Boot address: 53248


U-Boot 2020.07 (Jan 18 2022 - 09:53:19 +0800) Allwinner Technology

CPU:   Allwinner F Series (SUNIV)
Model: Allwinner F1C100s Generic Device
DRAM:  64 MiB
MMC:   mmc@1c0f000: 0, mmc@1c10000: 1
Setting up a 480x480 lcd console (overscan 0x0)
In:    serial
Out:   serial
Err:   serial
Allwinner mUSB OTG (Peripheral)
Hit any key to stop autoboot:  0
=> FU waiting on SPI-NAND...
Unknown command 'FU' - try 'help'
=>

离线

楼主 #18 2022-01-18 10:27:45

哇酷小二
wechat微信:whycan_cn
所在地: 你猜
注册时间: 2020-04-22
已发帖子: 3,378
积分: 1902
个人网站

Re: ①用 xfel.exe 初始化 F1C100s DDR, ②把可执行文件下载到DDR ③执行程序

手动执行那几行加载 zImage 和 dtb 到 ddr的命令试一试,我感觉地址没对上。





离线

楼主 #19 2022-01-18 10:53:18

哇酷小二
wechat微信:whycan_cn
所在地: 你猜
注册时间: 2020-04-22
已发帖子: 3,378
积分: 1902
个人网站

Re: ①用 xfel.exe 初始化 F1C100s DDR, ②把可执行文件下载到DDR ③执行程序

@HongSang
建议把dtb和zImage读到内存之后,再校验一次crc32,确认数据没有问题。





离线

#20 2022-01-18 11:06:16

HongSang
会员
注册时间: 2021-08-12
已发帖子: 42
积分: 16.5

Re: ①用 xfel.exe 初始化 F1C100s DDR, ②把可执行文件下载到DDR ③执行程序

哇酷小二 说:

@HongSang
建议把dtb和zImage读到内存之后,再校验一次crc32,确认数据没有问题。

	partitions {
			compatible = "fixed-partitions";
			#address-cells = <1>;
			#size-cells = <1>;

			partition@0 {
				label = "u-boot";
				reg = <0x000000 0x100000>;
				read-only;
			};

			partition@1 {
				label = "kernel";
				reg = <0x100000 0x500000>;
				read-only;
			};

			partition@2 {
				label = "rom";
				reg = <0x600000 0x2a00000>;
				read-only;
			};

			partition@3 {
				label = "vendor";
				reg = <0x3000000 0x1000000>;
			};

			partition@4 {
				label = "overlay";
				reg = <0x4000000 0x3000000>;
			};
		};

现在问题是我不知道如何将dtb和rootfs读进nand分区,那么读到ddr分区也不知道它的<address>,  这个分区在设备树中这样定义的

离线

楼主 #21 2022-01-18 11:11:11

哇酷小二
wechat微信:whycan_cn
所在地: 你猜
注册时间: 2020-04-22
已发帖子: 3,378
积分: 1902
个人网站

Re: ①用 xfel.exe 初始化 F1C100s DDR, ②把可执行文件下载到DDR ③执行程序

我想了一下,前面我说的不对。

烧录地址是看这个文件 board/allwinner/suniv-f1c100s/genimage-nand.cfg

flash nand-128M {
        pebsize = 128K
        numpebs = 1024
        minimum-io-unit-size = 2048
}

image sysimage-nand.img {
        flash {
        }

        flashtype = "nand-128M"

        partition u-boot {
                image = "u-boot-sunxi-with-nand-spl.bin"
                size = 512K
        }

        partition dtb {
                offset = 0x80000
                image = "devicetree.dtb"
                size = 128K
        }

        partition kernel {
                offset = 0x100000
                image = "zImage"
                size = 7M
        }

        partition rom {
                offset = 0x800000
                image = "rootfs.squashfs"
        }
}

烧录地址和前面那个 dts 文件无关,那个文件只会影响到Linux启动后的mtd分区。





离线

#22 2022-01-18 15:14:08

HongSang
会员
注册时间: 2021-08-12
已发帖子: 42
积分: 16.5

Re: ①用 xfel.exe 初始化 F1C100s DDR, ②把可执行文件下载到DDR ③执行程序

@哇酷小二
OK!!! 这似乎是解决问题的关键所在  我buildroot编译完固件也有看到这样的信息

INFO: cmd: "find '/home/linux/mango/buildroot-tiny200/output/build/genimage.tmp/root' -depth -type d -printf '%P\0' | xargs -0 -I {} touch -r '/tmp/tmp.pBLtte62uT/{}' '/home/linux/mango/buildroot-tiny200/output/build/genimage.tmp/root/{}'" (stderr):
INFO: cmd: "mkdir -p "/home/linux/mango/buildroot-tiny200/output/images"" (stderr):
INFO: flash(sysimage-nor.img): writing image partition 'u-boot' (0x80000@0x0)
INFO: flash(sysimage-nor.img): writing image partition 'splash' (0x80000@0x80000)
INFO: flash(sysimage-nor.img): writing image partition 'kernel' (0x500000@0x100000)
INFO: flash(sysimage-nor.img): writing image partition 'rom' (0xa00000@0x600000)
board/allwinner/generic/genimage-nand.cfg:33: no sub-section title/index for 'config'
INFO: cmd: "mkdir -p "/home/linux/mango/buildroot-tiny200/output/build/genimage.tmp"" (stderr):
INFO: cmd: "rm -rf "/home/linux/mango/buildroot-tiny200/output/build/genimage.tmp"/*" (stderr):
INFO: cmd: "mkdir -p "/home/linux/mango/buildroot-tiny200/output/build/genimage.tmp"" (stderr):
INFO: cmd: "cp -a "/tmp/tmp.1SJGd7hvCu" "/home/linux/mango/buildroot-tiny200/output/build/genimage.tmp/root"" (stderr):
INFO: cmd: "find '/home/linux/mango/buildroot-tiny200/output/build/genimage.tmp/root' -depth -type d -printf '%P\0' | xargs -0 -I {} touch -r '/tmp/tmp.1SJGd7hvCu/{}' '/home/linux/mango/buildroot-tiny200/output/build/genimage.tmp/root/{}'" (stderr):
INFO: cmd: "mkdir -p "/home/linux/mango/buildroot-tiny200/output/images"" (stderr):
INFO: flash(sysimage-nand.img): writing image partition 'u-boot' (0x80000@0x0)
INFO: flash(sysimage-nand.img): writing image partition 'splash' (0x80000@0x80000)
INFO: flash(sysimage-nand.img): writing image partition 'kernel' (0x500000@0x100000)
INFO: flash(sysimage-nand.img): writing image partition 'rom' (0x7a00000@0x600000)

我的执行指令是这样的

xfel  spinand
xfel spinand erase 0x000000 134217728
 xfel spinand write 0x000000 u-boot-sunxi-with-nand-spl.bin 
 xfel spinand write 0x80000 splash.bmp 
 xfel spinand write 0x100000 kernel.itb 
 xfel spinand write 0x600000 rootfs.squashfs 

晕哥yyds!xfel yyds!

之前是换成120nand想用芒果派r3的固件但是在fel->dfu分区的时候我这里出了点小问题,幸亏有了xboot的xfel!

离线

楼主 #23 2022-01-18 15:57:53

哇酷小二
wechat微信:whycan_cn
所在地: 你猜
注册时间: 2020-04-22
已发帖子: 3,378
积分: 1902
个人网站

Re: ①用 xfel.exe 初始化 F1C100s DDR, ②把可执行文件下载到DDR ③执行程序

感谢 @xboot,同时也感谢 @HongSang,你是第一个用xfel公开烧写 @aodzip buildroot sdk nand img,并验证通过的朋友。





离线

#24 2022-01-18 16:02:11

HongSang
会员
注册时间: 2021-08-12
已发帖子: 42
积分: 16.5

Re: ①用 xfel.exe 初始化 F1C100s DDR, ②把可执行文件下载到DDR ③执行程序

哇酷小二 说:

感谢 @xboot,同时也感谢 @HongSang,你是第一个用xfel公开烧写 @aodzip buildroot sdk nand img,并验证通过的朋友。

多谢各位大佬无私的贡献和开源以及晕哥的帮忙!信晕哥,得别墅!

离线

页脚

工信部备案:粤ICP备20025096号 Powered by FluxBB

感谢为中文互联网持续输出优质内容的各位老铁们。 QQ: 516333132, 微信(wechat): whycan_cn (哇酷网/挖坑网/填坑网) service@whycan.cn