leeboby / opizero3-uboot-dtb

保存opizero3 1.5gb和4gb版本的开发板linux6.x系统需要替换的u-boot和dtb文件
28 stars 3 forks source link

U-Boot source code #2

Open rtissera opened 11 months ago

rtissera commented 11 months ago

Hello, please provide the source code for your opizero 3 1.5 GB and 4 GB build so we can rebuild :) Thanks for your time :)

pixdrift commented 7 months ago

Hi @leeboby, I have the same question as above, would it be possible to get the source for these uboot images? or perhaps details on how they were built such as base images that were used and the changes that were made so they can be re-created?

Interested in the reasons why the 1.5GB and 4GB hardware requires different uboot configuration.

johndo100 commented 7 months ago

I'm interested too. I'm finding a way to make Alpine Linux image for sdcard.

pixdrift commented 7 months ago

Looking at the contents of the .deb packages and config files it looks like these images were generated with the Orange Pi SDK, not mainline u-boot. The SDK documentation is very good, although the u-boot used in the SDK is falling a bit behind

http://www.orangepi.org/orangepiwiki/index.php/Orange_Pi_Zero_3#Linux_SDK.E2.80.94.E2.80.94orangepi-build_instruction

The build tool script scripts/compilation.sh has the configuration setting that changes between 1.5GB / 4GB images (answering my original question)

                        if [[ ${BOARDFAMILY} == "sun50iw9" && ${BRANCH} == "next" ]]; then
                                if [[ ${MEM_TYPE} == "1500MB" ]]; then

                                        sed -i 's/^.*CONFIG_DRAM_SUN50I_H616_TRIM_SIZE*/CONFIG_DRAM_SUN50I_H616_TRIM_SIZE=y/g' .config
                                else
                                        sed -i 's/^.*CONFIG_DRAM_SUN50I_H616_TRIM_SIZE*/# CONFIG_DRAM_SUN50I_H616_TRIM_SIZE is not set/g' .config
                                fi
                        fi
diemlk commented 7 months ago

my opi zero3 1.5G ram . i flash to 32g sd class10 and use virtual linux terminal to fix u-boot : 首先下载1.5g内存u-boot的bin文件:1.5gb内存u-boot的bin文件 然后将烧录好opizero3 linux6.x系统的tf卡插入其他的linux机器中 然后使用sudo fdisk -l命令查看tf卡的设备名: 比如: /dev/sdX 然后使用下面的命令将u-boot的bin文件更新到tf中 sudo dd bs=1k seek=8 if=u-boot-sunxi-with-spl-opizero3-1.5gb.bin of=/dev/sdX it not boot on my opi zero3. have any boot can run 1

johndo100 commented 6 months ago

Mainline u-boot didn't work. I'm using the one I extract from Orange Pi OS and it works.

Crazy-Child commented 6 months ago

Mainline u-boot didn't work. I'm using the one I extract from Orange Pi OS and it works.

Could you share?

qichunren commented 5 months ago

Please share your steps to build u-boot. Official build sdk not work

johndo100 commented 4 months ago

Last time checked, u-boot works. Just clone the source then build. Or you can grab Armbian source code and build, it has u-boot. Mainline Armbian image works just fine, I'm install it on several 1GB version.

lalakii commented 3 months ago
// I only have a 1.5 GiB board.

// For 1.5GiB boards

// file: u-boot/arch/arm/mach-sunxi/dram_sun50i_h616.c 

static unsigned long mctl_calc_size(const struct dram_config *config)
{
        u8 width = config->bus_full_width ? 4 : 2;

        /* 8 banks */
        unsigned long size;
        size = (1ULL << (config->cols + config->rows + 3)) * width * config->ranks;
        // 1.5GiB  Need to add this line
        size = (size * 3) / 4;
        // End
        return size;
}

I tried it and it works fine.

Can someone add it to the u-boot source code according to the standard?

rtissera commented 3 months ago

It is in mainline uboot now you can close.