Closed wangqiangcc closed 6 years ago
It means that your firmware doesn't support "cfg" partition of flash. It's device-specific and some of configurations may lack support of cfg partition. But it's possible to add it via geom's "flashmap" or "map"
Hi Is in /data/freebsd/head/src/sys/mips/conf/MT7628_FDT file add "options GEOM_MAP" options, recompile it ? Thx! :)
FDT is specific case. I suppose FDT provides flash layout. You can reduce firmware partition and add cfg partition after "firmware". cfg should be small, no more than 128Kb. I guess your FDT flash layout is https://github.com/freebsd/freebsd/blob/master/sys/gnu/dts/mips/MT7628.dts#L31
Hi
My SPI NOR FLASH size is 32M, I modified the file
/data/freebsd/head/src/sys/gnu/dts/mips/MT7628.dts And recompile freebsd-wifi, brush into the JS7628 board, I run the following command
/dev/flash/spi0 /dev/flash/spi0s.firmware /dev/flash/spi0s.cfg /dev/flash/spi0s.u-boot /dev/flash/spi0s.factory /dev/flash/spi0s.u-boot-env
*** Storing configuration files from /etc/cfg/manifest -> .. dd: no value specified for of etc/cfg/manifest etc/master.passwd etc/group etc/cfg/rc.conf cpio: Can't lstat etc/dropbear/dropbear_ecdsa_host_key cpio: Can't lstat etc/openvpn.conf /etc/rc.conf 7 blocks
CFG_PATH="" CFG_SIZE="" RECOVERY_PIN="" RECOVERY_PIN_ACTIVE="" #
Then restart and found /etc/rc.conf file is not saved. Thx :)
MT7628.dts modified:
&spi0 { status = "okay";
m25p80@0 {
#address-cells = <1>;
#size-cells = <1>;
compatible = "jedec,spi-nor";
reg = <0>;
linux,modalias = "m25p80", "en25q64";
spi-max-frequency = <10000000>;
m25p,chunked-io = <32>;
partition@0 {
label = "u-boot";
reg = <0x0 0x30000>;
read-only;
};
partition@30000 {
label = "u-boot-env";
reg = <0x30000 0x10000>;
read-only;
};
factory: partition@40000 {
label = "factory";
reg = <0x40000 0x10000>;
read-only;
};
partition@50000 {
label = "firmware";
reg = <0x50000 0x7b0000>; //8MB flash
};
partition@800000 {
label = "cfg";
reg = <0x800000 0x1fb0000>; //23MB flash
};
};
};
dmesg info
KDB: debugger backends: ddb
KDB: current backend: ddb
Copyright (c) 1992-2017 The FreeBSD Project.
Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
The Regents of the University of California. All rights reserved.
FreeBSD is a registered trademark of The FreeBSD Foundation.
FreeBSD 11.1-RELEASE #7 r328037M: Thu Jan 25 00:27:49 CST 2018
dnybz@dnybz:/data/freebsd/head/obj/mipsel_ap/mips.mipsel/data/freebsd/head/src/sys/MT7628_FDT mips
gcc version 4.2.1 20070831 patched [FreeBSD]
WARNING: WITNESS option enabled, expect reduced performance.
MEMGUARD DEBUGGING ALLOCATOR INITIALIZED:
MEMGUARD map base: 0xc0800000
MEMGUARD map size: 104860 KBytes
Preloaded elf kernel "kernel" at 0x80c7fc50.
real memory = 268435456 (262144K bytes)
Physical memory chunk(s):
0x00d20000 - 0x0fb8cfff, 250007552 bytes (61037 pages)
avail memory = 242425856 (231MB)
ULE: setup cpu 0
random: entropy device external interface
mem:
I add storage partition /data/freebsd/freebsd-wifi-build/build/cfg/ralink After X_MAKEFS_ENDIAN add the following
BIN_CFG_PARTITION="/dev/flash/spi0s.cfg" BIN_CFG_SIZE="33226752" And recompile the system, when running cfg_save, restart the board when I can not start :(
Can provide similar openwrt storage solutions? Thx! :)
dev: size erasesize name mtd0: 00030000 00010000 "u-boot" mtd1: 00010000 00010000 "u-boot-env" mtd2: 00010000 00010000 "factory" mtd3: 01fb0000 00010000 "firmware" mtd4: 00116107 00010000 "kernel" mtd5: 01e99ef9 00010000 "rootfs" mtd6: 01ae0000 00010000 "rootfs_data"
Hi
1, running cfg_save command takes a long time, about 10 minutes 2, suggesting mistakes dd: no value specified for of 3, after the restart found that the contents of the amendment did not save
echo "ifconfig_rt0="inet 192.168.11.233 netmask 255.255.255.0"" >> /etc/rc.conf
echo "defaultrouter="192.168.11.254"" >> /etc/rc.conf
echo "nameserver 114.114.114.114" >> /etc/resolv.conf
echo "/etc/rc.conf" >> /etc/cfg/manifest
echo "/etc/resolv.conf" >> /etc/cfg/manifest
cfg_save -->Run for a long time, About 10 minutes or so.
*** Storing configuration files from /etc/cfg/manifest -> .. etc/cfg/manifest etc/master.passwd etc/group etc/cfg/rc.conf cpio: Can't lstat etc/dropbear/dropbear_ecdsa_host_key cpio: Can't lstat etc/openvpn.conf /etc/rc.conf /etc/resolv.conf 7 blocks dd: no value specified for of #
Thx! :)