页次: 1
Sunxi-tools 里边有提取fex的工具
https://github.com/linux-sunxi/sunxi-tools/blob/master/script_extractor.c
哈哈,刚看见, 谢谢啦, 不过如果是刚捡来的垃圾, dd还是更方便一些的
捡垃圾是一种爱好
当捡来一块 A33 板子,读出它的fex文件是特别关键的
买了一块 https://whycan.com/t_5484.html
A33的fex是一块固定的内存区域,因此dd出来就ok
dd if=/dev/mem of=/sdcard/script.bin bs=1 count=262144 skip=1124073472
然后使用bin2fex script.bin > sysfex.fex
看到论坛里面有好多人问, 我也查了好多资料, 最终根据https://whycan.cn/t_3138.html 解决, 单独拿出来, 方便大家搜索

如图所示,这里应该有个m25p80开头的,但是这里没有,在卡住的上边有一行
[    1.294661] ALSA device list:
[    1.297627]   #0: Loopback 1
因此开启
次进入配置界面:make ARCH=arm menuconfig
    Device Drivers  --->Block devices  --->
        [v]Loopback device support,勾选,
然后
这里m25p80, 未识别的ID, 这里我买的licheepi SPI FLASH是 xt25f128b 的, 因此在 drivers/mtd/spi-nor/spi-nor.c里面添加
{ "xt25f128b", INFO(0x0b4018, 0, 64 * 1024, 256, 0) },
后来提示
[    0.905624] m25p80 spi0.0: found xt25f128b, expected w25q128
[    0.911440] m25p80 spi0.0: xt25f128b (16384 Kbytes)
然后,添加dts:
&spi0 {
    pinctrl-names = "default";
    pinctrl-0 = <&spi0_pins_a>;
    status = "okay";
    spi-max-frequency = <60000000>;
    flash: xt25f128b@0 {
        #address-cells = <1>;
        #size-cells = <1>;
        compatible = "winbond,w25q128,xt25f128b", "jedec,spi-nor";
        reg = <0>;
        spi-max-frequency = <60000000>;
        partitions {
            compatible = "fixed-partitions";
            #address-cells = <1>;
            #size-cells = <1>;
            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>;
            };
        };
    };
};
最后:
[    0.918276] Creating 4 MTD partitions on "spi0.0":
[    0.923197] 0x000000000000-0x000000100000 : "u-boot"
[    0.930860] 0x000000100000-0x000000110000 : "dtb"
[    0.938055] 0x000000110000-0x000000510000 : "kernel"
[    0.945687] 0x000000510000-0x000001000000 : "rootfs"
成功!
哈哈,我之前看过一个,上传图片做成安卓 扁平化的样式的网站
页次: 1