ROM doesn't load U-Boot on imx6solo - embedded-linux

I'm trying to upgrade my u-boot from 2009 to 2020 using buildroot, but when I build the new one it doesn't boot (and I don't have JTAG).
When I load it with imx_usb_loader it works but when I flash it on the Nand, it doesn't boot on it.
As u-boot files, I use mx6sabreauto.c, mx6solo.cfg and mx6sabreauto.h
I don't use SPL or DTS, I only generate u-boot.imx
Boot logs with imx_usb_loader :
U-Boot 2020.04 (Feb 11 2023 - 15:41:38 +0100)
CPU: i.MX6SOLO rev1.3 at 792MHz
CPU: Industrial temperature grade (-40C to 105C) at 50C
Reset cause: POR
Model: i.MX6 DualLite/Solo SABRE Automotive Board
Board: MX6Q-Sabreauto rev#
DRAM: 2 GiB
NAND: nand_base: device found, Manufacturer ID: 0x2c, Chip ID: 0xd3
nand_base: Micron NAND 1GiB 3,3V 8-bit
nand_base: Micron NAND 1GiB 3,3V 8-bit
nand_base: 1024 MiB, SLC, erase size: 256 KiB, page size: 4096, OOB size: 128
use legacy bch geometry
1024 MiB
MMC: FSL_SDHC: 0, FSL_SDHC: 2
Loading Environment from MMC... MMC: no card present
mmc_init: -123, time 2
Warning - No block device, using default environment
Loading Environment from NAND... Scanning device for bad blocks
Warning - bad CRC, using default environment
No panel detected: default to Hannstar-XGA
Display: Hannstar-XGA (1024x768)
In: serial
Out: serial
Err: serial
Net: FEC [PRIME]
Warning: FEC (eth0) using random MAC address - ea:37:e5:51:c1:86
Boot from USB for mfgtools
Warning - Use default environment for
using default environment
Hit any key to stop autoboot: 0
Flash logs :
=> nand erase 0x0 0x40000000
NAND erase: device 0 whole chip
Erasing at 0x3ffc0000 -- 100% complete.
OK
=> tftp 0x10800000 u-boot.imx
Using FEC device
TFTP from server 192.168.30.30; our IP address is 192.168.30.10
Filename 'u-boot.imx'.
Load address: 0x10800000
Loading: #####################################################
3.9 MiB/s
done
Bytes transferred = 777216 (bdc00 hex)
=> nand read 0x10800000 0x00000000 777216
NAND read: device 0 offset 0x0, size 0x777216
7827990 bytes read: OK
=> reset
resetting ...

It worked when I flashed from the Linux rootfs using these commands :
$ flash_erase /dev/mtd0 0 0
$ kobs-ng init -x u-boot.imx --search_exponent=1 -v
It seems that the "search-exponent" option did the trick.

Related

agl-sota u-boot raspberrypi3 - Card did not respond to voltage select! Device 0: unknown device

I am building an automotive-grade-linux demo image using yocto for raspberrypi3.
I am adding a layer agl-sota for OTA feature. This is where my u-boot breaks.
While booting up according to defconfig CONFIG_ENV_EXT4_DEVICE_AND_PART="0:1" u-boot takes mmc0 which is sd card that can be verified through 'mmc info' and partition 1.
Yet it shows:
U-Boot 2020.10 (Jun 29 2020 - 03:06:40 +0000)
DRAM: 768 MiB
RPI 3 Model B (0xa02082)
MMC: mmc#7e202000: 0, sdhci#7e300000: 1
Loading Environment from FAT... *** Warning - bad CRC, using default environment
In: serial
Out: vidconsole
Err: vidconsole
Net: No ethernet found.
starting USB...
Bus usb#7e980000: USB DWC2
scanning bus usb#7e980000 for devices... 3 USB Device(s) found
scanning usb for storage devices... 0 Storage Device(s) found
Hit any key to stop autoboot: 0
switch to partitions #0, OK
mmc0 is current device
Scanning mmc 0:1...
Card did not respond to voltage select!
Device 0: unknown device
Waiting for Ethernet connection... unable to connect.
...
...
u-boot >
'mmc info' output:
U-Boot> mmc info
Device: mmc#7e202000
Manufacturer ID: 3
OEM: 5344
Name: SU16G
Bus Speed: 50000000
Mode: SD High Speed (50MHz)
Rd Block Len: 512
SD version 3.0
High Capacity: Yes
Capacity: 14.8 GiB
Bus Width: 4-bit
Erase Group Size: 512 Bytes
What configuration issue is disallowing u-boot to boot the kernel.?
I am using raspberrypi imager for flashing the wic.xz image.

u-boot booting. appear warning message. this must be solved?

I create a linux booting image using TI SDK (am335x) and booting Beaglebone black.
and u-boot boot message is..
U-Boot SPL 2019.01-gf95c3e0297-dirty (Oct 15 2019 - 08:45:45 +0900)
Trying to boot from MMC1
U-Boot 2019.01-gf95c3e0297-dirty (Oct 15 2019 - 08:45:45 +0900)
CPU : AM335X-GP rev 2.1
Model: TI AM335x BeagleBone Black
DRAM: 512 MiB
NAND: 0 MiB
MMC: OMAP SD/MMC: 0, OMAP SD/MMC: 1
Loading Environment from FAT... *** Warning - bad CRC, using default environment
<ethaddr> not set. Validating first E-fuse MAC
Net: eth0: ethernet#4a100000
Warning: usb_ether MAC addresses don't match:
Address in ROM is de:ad:be:ef:00:01
Address in environment is f4:e1:1e:ce:d7:49
, eth1: usb_ether
Hit any key to stop autoboot: 0
switch to partitions #0, OK
mmc0 is current device
SD/MMC found on device 0
** Unable to read file boot.scr **
** Unable to read file uEnv.txt **
switch to partitions #0, OK
mmc0 is current device
Scanning mmc 0:1...
switch to partitions #0, OK
mmc0 is current device
SD/MMC found on device 0
4080128 bytes read in 266 ms (14.6 MiB/s)
36717 bytes read in 3 ms (11.7 MiB/s)
## Flattened Device Tree blob at 88000000
Booting using the fdt blob at 0x88000000
Loading Device Tree to 8fff4000, end 8fffff6c ... OK
Starting kernel ...
and i can't decide three warning message need to solved.
Loading Environment from FAT... *** Warning - bad CRC, using default environment ** Unable to read file boot.scr ** ** Unable to read file uEnv.txt **
u-boot and linux kernel work properly.
Do I need solve this warning ?.
Maybe your u-boot script didn't switch to the right partition of MMC before started reading uEnv.txt or so. This is okay if you are fine with booting behavior. These files contain things like do you want to enable HDMI, or console, etc. But the same could be done directly in u-boot env.

Allwinner A13 hang on boot and return "SPL:Unsupported Boot Device!" error

I am new in here and I am sorry my bad English.
I have OLinuXino A13 board. I endeavor kernel and boot events. So I try boot OLinuxino-A13 via spiflash(in FEL mode). I connected board to my PC(USB OTG). I Sending commands from my computer for writing to spiflash. And differently I build second connect with usb-ttl. So I can see opening writing of board with CuteCom program from my PC. And I use sunxi-tools for write to spiflash of my board.
And I did this:
I compiled kernel and I created u-boot-sunxi-with-spl.bin file. After I entered FEL mode and I wrote this file to on my board with ./sunxi-fel spiflash-write 0 /path/u-boot-sunxi-with-spl.bin. When I use boot my board from PC with ./sunxi-fel uboot /path/u-boot-sunxi-with-spl.bin, my board start and it work for find to sd card. Result this:
U-Boot SPL 2019.04-rc1-00141-g63f7e3fca3 (Feb 19 2019 - 17:23:48 +0300)
DRAM: 512 MiB
CPU: 1008000000Hz, AXI/AHB/APB: 3/2/2
Trying to boot from FEL
U-Boot 2019.04-rc1-00141-g63f7e3fca3 (Feb 19 2019 - 17:23:48 +0300) Allwinner Technology
CPU: Allwinner A13 (SUN5I)
Model: Olimex A13-Olinuxino
I2C: ready
DRAM: 512 MiB
MMC: mmc#1c0f000: 0
Loading Environment from FAT... MMC: no card present
Setting up a 1024x768 vga console (overscan 0x0)
In: serial
Out: vga
Err: vga
Allwinner mUSB OTG (Peripheral)
Net:
Warning: usb_ether using MAC address from ROM
eth0: usb_ether
starting USB...
USB0: USB EHCI 1.00
USB1: USB OHCI 1.0
scanning bus 0 for devices... 1 USB Device(s) found
scanning bus 1 for devices... 1 USB Device(s) found
scanning usb for storage devices... 0 Storage Device(s) found
Hit any key to stop autoboot: 2 <0x08><0x08><0x08> 1 <0x08><0x08><0x08> 0
MMC: no card present
Device 0: unknown device
But differently if I restart my board after(card is out of fel mode) ./sunxi-fel spiflash-write 0 /path/u-boot-sunxi-with-spl.bin command. Result this:
U-Boot SPL 2019.04-rc1-00141-g63f7e3fca3 (Feb 19 2019 - 17:23:48 +0300)
DRAM: 512 MiB
CPU: 1008000000Hz, AXI/AHB/APB: 3/2/2
SPL: Unsupported Boot Device!
SPL: failed to boot from all boot devices
### ERROR ### Please RESET the board ###
A13-OLinuxino_defconfig file:
CONFIG_ARM=y
CONFIG_ARCH_SUNXI=y
CONFIG_SPL=y
CONFIG_MACH_SUN5I=y
CONFIG_DRAM_CLK=408
CONFIG_DRAM_EMR1=0
CONFIG_MMC0_CD_PIN="PG0"
CONFIG_USB0_VBUS_DET="PG1"
CONFIG_USB1_VBUS_PIN="PG11"
CONFIG_AXP_GPIO=y
# CONFIG_VIDEO_HDMI is not set
CONFIG_VIDEO_VGA_VIA_LCD=y
CONFIG_VIDEO_VGA_VIA_LCD_FORCE_SYNC_ACTIVE_HIGH=y
CONFIG_VIDEO_LCD_POWER="AXP0-0"
CONFIG_VIDEO_LCD_BL_PWM="PB2"
CONFIG_NR_DRAM_BANKS=1
# CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
CONFIG_SPL_I2C_SUPPORT=y
CONFIG_CMD_DFU=y
# CONFIG_CMD_FLASH is not set
CONFIG_CMD_USB_MASS_STORAGE=y
# CONFIG_SPL_DOS_PARTITION is not set
# CONFIG_SPL_PARTITION_UUIDS is not set
CONFIG_DEFAULT_DEVICE_TREE="sun5i-a13-olinuxino"
CONFIG_DFU_RAM=y
CONFIG_FASTBOOT_CMD_OEM_FORMAT=y
CONFIG_AXP_ALDO3_VOLT=3300
CONFIG_CONS_INDEX=2
CONFIG_USB_EHCI_HCD=y
CONFIG_USB_OHCI_HCD=y
CONFIG_USB_MUSB_GADGET=y
CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=yONFIG_AXP_ALDO3_VOLT=3300
CONFIG_CONS_INDEX=2
CONFIG_USB_EHCI_HCD=y
CONFIG_USB_OHCI_HCD=y
CONFIG_USB_MUSB_GADGET=y
CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
I struggle for exceed this error and want to see result like on above. How can I fix this error?

AT91SAM9263ek booting Linux with Device Tree failed

I have problem booting Linux 3.16.1. I have compiled sources from http://www.kernel.org with at91sam9263_defconfig.
I have added Flattened Device Tree support in Boot options.
Followin tips suggested in this (https://www.slideshare.net/softpapa/device-tree-support-on-arm-linux-8930303) presentation to turn on Support device tree in /proc but i don't have that option in menuconfig.
I have U-Boot bootloader version 2014.10rc2 which supports device tree.
I have generated dtb from script shipped with kernel:
make at91sam9263ek.dtb
And now i'm getting this error:
Welcome to minicom 2.5
OPTIONS: I18n
Compiled on Feb 9 2011, 14:45:00.
Port /dev/ttyS0
Press CTRL-A Z for help on special keys
RomBOOT
>
U-Boot 2014.10-rc2-00200-g9170818-dirty (Sep 23 2014 - 15:16:39)
CPU: AT91SAM9263
Crystal frequency: 16.368 MHz
CPU clock : 199.919 MHz
Master clock : 99.960 MHz
DRAM: 64 MiB
WARNING: Caches not enabled
NAND: 256 MiB
MMC: mci: 0
In: serial
Out: serial
Err: serial
Net: macb0
Warning: Your board does not use generic board. Please read
doc/README.generic-board and take action. Boards not
upgraded by the late 2014 may break or be removed.
Hit any key to stop autoboot: 0
U-Boot> tftp uImage
macb0: Starting autonegotiation...
macb0: Autonegotiation complete
macb0: link up, 100Mbps full-duplex (lpa: 0xcde1)
Using macb0 device
TFTP from server 192.168.1.247; our IP address is 192.168.1.240
Filename 'uImage'.
Load address: 0x22000000
Loading: #################################################################
#################################################################
#################################################################
##############
1.2 MiB/s
done
Bytes transferred = 3068016 (2ed070 hex)
U-Boot> tftp 20000000 dt
macb0: link up, 100Mbps full-duplex (lpa: 0xcde1)
Using macb0 device
TFTP from server 192.168.1.247; our IP address is 192.168.1.240
Filename 'dt'.
Load address: 0x20000000
Loading: #
340.8 KiB/s
done
Bytes transferred = 13279 (33df hex)
U-Boot> bootm 22000000 - 20000000
## Booting kernel from Legacy Image at 22000000 ...
Image Name: Linux-3.16.1
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 3067952 Bytes = 2.9 MiB
Load Address: 20008000
Entry Point: 20008000
Verifying Checksum ... OK
## Flattened Device Tree blob at 20000000
Booting using the fdt blob at 0x20000000
Loading Kernel Image ... OK
Loading Device Tree to 23ea3000, end 23ea93de ... OK
Starting kernel ...
Uncompressing Linux... done, booting the kernel.
Error: unrecognized/unsupported device tree compatible list:
[ 'atmel,at91sam9263ek' 'atmel,at91sam9263' 'atmel,at91sam9' ]
Available machine support:
ID (hex) NAME
000004b2 Atmel AT91SAM9263-EK
Please check your kernel config and/or bootloader.
Solution:
Add this line to .config:
CONFIG_MACH_AT91SAM9_DT=y
The correct configuration for this board when using device tree is at91_dt_defconfig.
However, I am quite surprised to see someone trying to use such an old kernel. This board is fully supported upstream. Why don't you use v5.3? If this doesn't work, please report any bug, we will be happy to help correct them.

How to set up the Machine Type (arch_id) for Linux Kernel Arm Cross-Compile

I would like to know how to set the correct MACH_TYPE or arch_id for the kernel. I searched and found at least 2 references where the kernel would hang at "Starting Kernel ... ". These came with the same answer. Correctly set your Machine Type. But then neither mentions how to do so. Anyone know how to do this?
Pretty good explanation for the hang. and Another good description.
Both of these are close to what I am experiencing when I try to boot my kernel. It gets stuck on "Starting Kernel..." and won't continue. I have built the kernel several times from .configs that were supposed to be exactly for my model.
Timesys (LinuxLink) provides a .config that is supposed to match the kernel that they provide with their free build service. But that doesn't work either. If I use their pre-built kernel it boots up no problem. So I know it is not my u-boot or how I have configured my SD-card. The problem must come from the kernel build.
I run my make like: make ARCH=arm CROSS_COMPILE=${PATH_TO_TOOLCHAIN}/bin/armv7l-timesys-linux-gnueabi- uImage and make my image as follows: sudo mkimage -A arm -O linux -T kernel -C none -a 0x70800000 -e 0x70800000 -n "Linux-2.6.35-ts-armv7l" -d arch/arm/boot/uImage ../../uImage
I am working with a Freescale i.MX53 Eval Board. When I try to run the kernel:
U-Boot 2009.08-dirty (Aug 02 2013 - 19:57:03)
CPU: Freescale i.MX53 family 2.1V at 800 MHz
mx53 pll1: 800MHz
mx53 pll2: 400MHz
mx53 pll3: 432MHz
mx53 pll4: 455MHz
ipg clock : 66666666Hz
ipg per clock : 33333333Hz
uart clock : 66666666Hz
cspi clock : 108000000Hz
ahb clock : 133333333Hz
axi_a clock : 400000000Hz
axi_b clock : 200000000Hz
emi_slow clock: 133333333Hz
ddr clock : 400000000Hz
esdhc1 clock : 80000000Hz
esdhc2 clock : 80000000Hz
esdhc3 clock : 80000000Hz
esdhc4 clock : 80000000Hz
nfc clock : 26666666Hz
Board: MX53-LOCO 1.0 Rev. B
Boot Reason: [POR]
Boot Device: SD
I2C: ready
DRAM: 1 GB
MMC: FSL_ESDHC: 0,FSL_ESDHC: 1
In: serial
Out: serial
Err: serial
Serial reinitilized!
Net: got MAC address from IIM: 00:04:9f:01:f7:ce
FEC0 [PRIME]
Hit any key to stop autoboot: 0
mmc0 is current device
MMC read: dev # 0, block # 2048, count 8192 ... 8192 blocks read: OK
## Booting kernel from Legacy Image at 70800000 ...
Image Name: Linux-2.6.35-ts-armv7l
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 2999932 Bytes = 2.9 MB
Load Address: 70800000
Entry Point: 70800000
Verifying Checksum ... OK
XIP Kernel Image ... OK
OK
Starting kernel ...
u-boot env:
bootdelay=3
baudrate=115200
netdev=eth0
ethprime=FEC0
uboot=u-boot.bin
kernel=uImage
nfsroot=/opt/eldk/arm
bootargs_base=setenv bootargs console=ttymxc0,115200
bootargs_nfs=setenv bootargs ${bootargs} root=/dev/nfs ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp
bootcmd_net=run bootargs_base bootargs_nfs; tftpboot ${loadaddr} ${kernel}; bootm
bootcmd=run bootcmd_mmc
ethact=FEC0
lcd=video=mxcdi0fb:RGB24,SEIKO-WVGA di0_primary
bootargs_mmc=setenv bootargs ${bootargs} gpu_nommu ${lcd} ip=dhcp root=/dev/mmcblk0p1 rootwait rw
bootargs=console=ttymxc0,115200 gpu_nommu video=mxcdi0fb:RGB24,SEIKO-WVGA di0_primary ip=dhcp root=/dev/mmcblk0p1 rootwait rw
bootcmd_mmc=run bootargs_base bootargs_mmc; mmc dev 0; mmc read ${loadaddr} 0x800 0x2000; bootm
loadaddr=0x70800000
stdin=serial
stdout=serial
stderr=serial
The issue is that a double u-boot header has been applied to the image. As per unixsmurf.

Resources