Code: Select all
#Uncomment/set below if in u-boot you need to input something and kerboard not working.
## usb start
#Below enable uboot hdmi device
video-mode=sunxi:1024x768-24@60,monitor=hdmi,hpd=0,edud=1
stdout=serial,vidconsole
stdin=serial,usbkbd
...
...
...
This is under mainline u-boot? My post are for mainline u-boot.jyoung wrote:I added those lines to uEnv.txt. The new kernel still gave me a blank screen, and the old working kernel booted as normal, but the first lines I saw were from the kernel. I never saw the uboot screen, or any uboot info.
This pastebin seems expired or is wrong.jyoung wrote:I tried both the working and the mainline uboot. Here's the .config for uboot.
https://pastebin.com/XH7vPupy
I got it. I will review it and let you know,jyoung wrote:Hmm, weird, pastbin doesn't want to let me share this unless I'm logged in. This should work
http://pastebin.com/Xv8NYX7R
Code: Select all
CONFIG_SYS_BOOTM_LEN=0x800000Code: Select all
video-mode=sunxi_de:1024x768-24@60,monitor=hdmi,hpd=0,edud=1Code: Select all
dd if= u-boot-sunxi-with-spl.bin of=/dev/mmcblk0 bs=1024 seek=8Code: Select all
Loading Environment from FAT... Unable to read "uboot.env" from mmc0:1...Code: Select all
bootargs=console=ttyS0,115200 console=tty0 sunxi_ve_mem_reserve=0 sunxi_g2d_mem_reserve=0 sunxi_no_mali_mem_reserve console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline rootwait
bootcmd=tftp 40008000 uImage; bootmCode: Select all
mkenvimage -s 0x4200 -o uboot.env uboot-env.txtAnyhow, it seems that uboot detects and partly accepts this uboot.env file, but something's still not right, since it's now producing the error messageThe -s option allows to specify the size of the image to create. It must match the size of the flash area reserved for the U-Boot environment.
Code: Select all
Loading Environment from FAT... *** Warning - bad CRC, using default environmentThe boot.env should be uboot.env.pingtoo wrote:It looks like you need to change uEnv.txt to boot.env. Based on your .config at line #972.
jyoung wrote:have some error in it, The "bootcmd=tftp 40008000 uImage; bootm" need some work, using tftp you will need to setup network prior to issue that tftp command, and the "bootm" mising argument for where loaded kernel memory address.Code: Select all
bootargs=console=ttyS0,115200 console=tty0 sunxi_ve_mem_reserve=0 sunxi_g2d_mem_reserve=0 sunxi_no_mali_mem_reserve console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline rootwait bootcmd=tftp 40008000 uImage; bootm
the "bootargs=..." most likely will work for your old kernel, Most likely will not work for new kernel.
For your old kernel with new u-boot code, you can try put below in to uboot.envI am not convince this will work, however I think it might give you more information.Code: Select all
bootargs=console=ttyS0,115200 console=tty0 sunxi_ve_mem_reserve=0 sunxi_g2d_mem_reserve=0 sunxi_no_mali_mem_reserve console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline rootwait aload_script=fatload mmc 0 0x43000000 script.bin; aload_kernel=fatload mmc 0 0x40008000 uImage; bootm 0x40008000; bootcmd=run aload_script aload_kernel
The "script.bin" is actual Allwinner's version of Device tree (fdt/dt for modern linux)
Which tutorial?jyoung wrote:Should we be using the script.bin that came from the tutorial? A new copy of it wasn't built with the new uboot.
Code: Select all
in uboot.bin
bootcmd=run distro_bootcmd
bootdelay=2
preboot=usb start
distro_bootcmd=scsi_need_init=; for target in ${boot_targets}; do run bootcmd_${target}; done
boot_targets=fel mmc0 scsi0 usb0 pxe dhcp
bootcmd_mmc0=devnum=0; run mmc_boot
mmc_boot=if mmc dev ${devnum};\
then devtype=mmc;\
run scan_dev_for_boot_part;\
fi
scan_dev_for_boot_part=part list ${devtype} ${devnum} -bootable devplist;\
env exists devplist || setenv devplist 1;\
for distro_bootpart in ${devplist};\
do if fstype ${devtype} ${devnum}:${distro_bootpart} bootfstype;\
then run scan_dev_for_boot;\
fi;\
done;\
setenv devplist
scan_dev_for_boot=echo Scanning ${devtype} ${devnum}:${distro_bootpart}...;\
for prefix in ${boot_prefixes};\
do run scan_dev_for_extlinux;\
run scan_dev_for_scripts;\
done;\
run scan_dev_for_efi;
scan_dev_for_extlinux=if test -e ${devtype} ${devnum}:${distro_bootpart} ${prefix}${boot_syslinux_conf};\
then echo Found ${prefix}${boot_syslinux_conf};\
run boot_extlinux;\
echo SCRIPT FAILED:\
continuing...;\
fi
boot_extlinux=sysboot ${devtype} ${devnum}:${distro_bootpart} any ${scriptaddr} ${prefix}${boot_syslinux_conf}
boot_syslinux_conf=extlinux/extlinux.conf
scan_dev_for_scripts=for script in ${boot_scripts};\
do if test -e ${devtype} ${devnum}:${distro_bootpart} ${prefix}${script};\
then echo Found U-Boot script ${prefix}${script};\
run boot_a_script;\
echo SCRIPT FAILED: continuing...;\
fi;\
done
boot_a_script=load ${devtype} ${devnum}:${distro_bootpart} ${scriptaddr} ${prefix}${script};\
source ${scriptaddr}Code: Select all
setenv bootargs console=ttyS0,115200 console=tty1 root=/dev/mmcblk0p2 rootwait panic=10
fatload mmc 0 ${kernel_addr_r} gentoo-5.15.74.uimg
fatload mmc 0 ${ramdisk_addr_r} gentoo-initrd-5.15.74.uimg
fatload mmc 0 ${fdt_addr_r} sun7i-a20-bananapi.dtb.uimg
bootm ${kernel_addr_r} [$ramdisk_addr_r}|-] [${fdt_addr_r}]Code: Select all
default Gentoo linux
prompt 0
timeout 3
label Gentoo linux
menu title My Gentoo Linux kernel
kernel gentoo-5.15.74.uimg
initrd gentoo-initrd-5.15.74.uimg
fdt sun7i-a20-bananapi.dtb.uimg
append console=ttyS0,115200 console=tty1 root=/dev/mmcblk0p2 rootwait panic=10You don't have to use one. I place there as example in case you are using.jyoung wrote:Do you think this needs an initrd? I haven't generated one.
From the source code it looks to me it need a file in uimage format aka, mkimage ... but I am not very sure about that, you can try to start without place it directly, if kernel not able to boot then you can try to use mkimage to convert it.jyoung wrote:What about sun7i-a20-bananapi.dtb.uimg? I have sun7i-a20-bananapi.dtb. This almost sounds like something we'd generate with mkimage, but it doesn't look like mkimage can generate dtb or fdt images.