离线
离线
谢谢分享好工具
离线
晕哥,修复下下载文件,打开是失败的
离线
离线
离线
离线
一个疑问:
加载到 0x81700000 是因为配置中有,
CONFIG_SYS_TEXT_BASE=0x81700000如果我想验证 SPL 或者是 SPL + UBOOT (u-boot-sunxi-with-spl.bin), 这个可以通过 xfel 实现吗?
(类似于 sunxi-fel uboot ...的功能)
离线
一个疑问:
加载到 0x81700000 是因为配置中有,CONFIG_SYS_TEXT_BASE=0x81700000如果我想验证 SPL 或者是 SPL + UBOOT (u-boot-sunxi-with-spl.bin), 这个可以通过 xfel 实现吗?
(类似于 sunxi-fel uboot ...的功能)
这个问题建议看下 sunxi-fel 的 uboot 命令实现源码。
离线
xfel在芯片损坏的时候运行 xfel ddr 显示ddr初始化完成,已经验证了芯片挂了
离线
@哇酷小二 
晕哥请问用xfel如何烧其他的固件 您这边只烧了一个uboot 请问烧写其他的dtb zImage rootfs该怎么烧写
也是用xfel write 0x81700000 zImage dtb rootfs这样挨个烧写吗
离线
@哇酷小二
晕哥请问用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离线
@哇酷小二 
晕哥我再请假下 这里的<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>是指文件的大小吗?
离线
	
	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能起来
离线
现在烧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'
=>离线
@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>, 这个分区在设备树中这样定义的
离线
我想了一下,前面我说的不对。
烧录地址是看这个文件 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分区。
离线
@哇酷小二 
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!
离线
感谢 @xboot,同时也感谢 @HongSang,你是第一个用xfel公开烧写 @aodzip buildroot sdk nand img,并验证通过的朋友。
多谢各位大佬无私的贡献和开源以及晕哥的帮忙!信晕哥,得别墅!
离线