Currently latest version of uboot is working well on VoCore2. But because of the partition is not big enough for all uboot features, we have to do such cut off.
We upload the config to https://github.com/Vonger/vocore2/blob/master/uboot/vocore2_defconfig
Have a try 🙂 https://vonger.cn/misc/vocore2/u-boot-with-spl.bin
1. This is for 192KB partition of uboot, for mainline version you will need to adjust the uboot partition size to 312KB, but that will also need to modify Linux partition DTS file.
This define is in vocore2_defconfig of uboot: CONFIG_MTDPARTS_DEFAULT=”spi0.0:192k(u-boot),64k(env),64k(factory),-(kernel)”
2. uboot will not boot Linux after install, you will need to setup, choose and run one of the following uboot commands.
=fast bootup=========================
setenv bootcmd 'bootm 0xbc050000'
saveenv
reset
=common bootup=========================
setenv bootcmd 'sf probe; sf read ${loadaddr} 0x50000 0x200000; bootm;'
saveenv
reset
Note: it works after setup env, common bootup pretty slow at load firmware, take totally 15s to load Linux then unzip. fast bootup has limit, your compressed kernel can not >4MB
Note: 0xbc000000 is flash map to memory, and first 0x50000 we used for uboot and factory, so start at 0xbc050000
mainline uboot support
Now VoCore2 has mainline uboot available, but need more testing to verify that everything is stable.
if you need it, see below:
before replace uboot ,you need read how to fix dead uboot: https://vonger.cn/?p=8054
flash layout difference of mainline uboot and ralink uboot:
mainline uboot:
uboot | uboot-env | factory | firmware |
---|---|---|---|
312k | 4k | 4k | – |
uboot from mtk:
uboot | uboot-env | factory | firmware |
---|---|---|---|
192k | 64k | 64k | – |
mainline uboot’s layout can include more code in uboot, but it not compatible with the mtk’s uboot.
if you need 192k mainline uboot, please use uboot/vocore2_defconfig to compile maineline uboot:
cp path/to/thisrepo/uboot/vocore2_defconfig path/to/mainlineubootsrc/.config
note: before replace uboot, you must ensure your ‘u-boot-with-spl.bin’ size is < 192k
To support mainline of the uboot, also need to modify Linux kernel partition DTS. openwrt/target/linux/ramips/dts/mt7628an_vocore_vocore2.dts
partition@0 {
label = "u-boot";
reg = <0x0 0x4e000>;
read-only;
};
partition@30000 {
label = "u-boot-env";
reg = <0x30000 0x1000>;
read-only;
};
factory: partition@40000 {
label = "factory";
reg = <0x40000 0x1000>;
read-only;
};
PS: before do anything change to your VoCore, better to backup the hole flash to avoid any calibrate data lost.