[U-Boot] [PATCH] Trimslice config: update for Trimslice so SPI flash works

Steve Arnold nerdboy422 at gmail.com
Tue Jul 26 20:49:38 CEST 2016


I did mention it was black and showed nothing on serial console with the
default values, ie, building as-is doesn't even show u-boot trying to load
(after flashing it to the SPI flash the last thing you see is
"Resetting...").  Power it back up and nothing happens, no u-boot, nada.

U-Boot 2016.07-dirty (Jul 22 2016 - 22:02:41 -0700)

TEGRA20
Model: Compulab TrimSlice board
Board: Compulab Trimslice
DRAM:  1 GiB
MMC:   Tegra SD/MMC: 0, Tegra SD/MMC: 1
SF: Detected W25Q80BL with page size 256 Bytes, erase size 4 KiB, total 1
MiB
In:    serial
Out:   serial
Err:   serial
Net:   No ethernet found.
>>> Verifying image in RAM...
crc32 for 001b6000 ... 00236fff ==> d3ffb253
>>> Selecting SPI device...
SF: Detected W25Q80BL with page size 256 Bytes, erase size 4 KiB, total 1
MiB
>>> Erasing SPI...
SF: 1048576 bytes @ 0x0 Erased: OK
>>> Writing image back to SPI...
device 0 offset 0x0, size 0x81000
SF: 528384 bytes @ 0x0 Written: OK
>>> Reading image back from SPI...
device 0 offset 0x0, size 0x81000
SF: 528384 bytes @ 0x0 Read: OK
>>> Verifying image from flash...
crc32 for 00237000 ... 002b7fff ==> d3ffb253
>>> Setting up environment...
## Resetting to default environment
Saving Environment to SPI Flash...
Erasing SPI flash...Writing to SPI flash...done
>>> Flashing OK, rebooting...
resetting ...


When I download and and "exec" u-boot it ignores the mmc (with new u-boot
on the sdcard) and falls back to USB, then reads the (old) boot.scr and
boots.  The mmc errors depend on whether the sdcard has a boot.scr or not,
as it ignores the the extlinux.conf settings and then fails to read the
kernel.  Essentially it can't read the mmc device correctly; it starts but
then fails.

U-Boot 2016.07-dirty (Jul 22 2016 - 22:02:41 -0700)

TEGRA20
Model: Compulab TrimSlice board
Board: Compulab Trimslice
DRAM:  1 GiB
MMC:   Tegra SD/MMC: 0, Tegra SD/MMC: 1
SF: Detected W25Q80BL with page size 256 Bytes, erase size 4 KiB, total 1
MiB
In:    serial
Out:   serial
Err:   serial
Net:   No ethernet found.
Hit any key to stop autoboot:  2  1  0
Scanning MMC card ...
switch to partitions #0, OK
mmc0 is current device
Scanning fat mmc 0 on prefix / ...
** Unrecognized filesystem type **
Scanning ext2 mmc 0 on prefix / ...
419 bytes read in 45 ms (8.8 KiB/s)
boot.scr found! Executing ...
## Executing script at 00408000
** Bad device specification : zImage **
** Bad device specification : tegra20-trimslice **
Bad Linux ARM zImage magic!
Scanning fat mmc 0 on prefix /boot/ ...
** Unrecognized filesystem type **
Scanning ext2 mmc 0 on prefix /boot/ ...
** File not found /boot/boot.scr **
Scanning USB key ...
starting USB...
USB0:   USB EHCI 1.00
scanning bus 1 for devices... 2 USB Device(s) found
Scanning fat usb 0 on prefix / ...
** Unrecognized filesystem type **
Scanning ext2 usb 0 on prefix / ...
488 bytes read in 81 ms (5.9 KiB/s)
boot.scr found! Executing ...
## Executing script at 00408000
5314344 bytes read in 538 ms (9.4 MiB/s)
21172 bytes read in 269 ms (76.2 KiB/s)
Kernel image @ 0x408000 [ 0x000000 - 0x511728 ]
## Flattened Device Tree blob at 2c000000
   Booting using the fdt blob at 0x2c000000
   Loading Device Tree to 2bff7000, end 2bfff2b3 ... OK

If you have any specific suggestions on what to change/test (besides "don't
do that") I'm all ears...

Steve

On Tue, Jul 26, 2016 at 11:17 AM, Stephen Warren <swarren at wwwdotorg.org>
wrote:

> On 07/25/2016 01:02 PM, Stephen Arnold wrote:
>
>> From: Steve Arnold <stephen.arnold42 at gmail.com>
>>
>> This updates the defaults for trimslice so it matches the last vendor
>> config.  Use the tegra-uboot-flasher tools to create mmc and spi flash
>> images and flash to the device. Can optionally replace boot.scr with
>> extlinux.conf configuration. Tested on Trimslice Diskless (with SSD).
>>
>
> There should be no need for any of the values to be specific to Trimslice.
> What issues does this patch attempt to solve? Note: I'm looking for a
> specific debugged problem, not a generic "it doesn't work" explanation. To
> work out what's wrong, you likely need to connect to the serial port on
> Trimslice and view its output. At least my Trimslice came with the required
> cable for this, assuming you have a regular RS-232 level DB-9/DE-9 UART on
> some other PC to connect it to.
>
> diff --git a/include/configs/tegra20-common.h
>> b/include/configs/tegra20-common.h
>>
>
> +#ifndef CONFIG_TARGET_TRIMSLICE
>>  #define CONFIG_SYS_TEXT_BASE   0x00110000
>> +#endif
>>
>
> I can't think why you'd need to change this; it's a value that's internal
> to U-Boot, and the only reason to change it would be if the delta between
> CONFIG_SPL_TEXT_BASE and this value isn't large enough to fit SPL
> text+data+bss. If that's the case, this value should be changed for all
> Tegra20 boards, perhaps even all Tegra SoCs.
>
> +#ifndef CONFIG_TARGET_TRIMSLICE
>>  #define CONFIG_LOADADDR 0x01000000
>>  #define MEM_LAYOUT_ENV_SETTINGS \
>>         "scriptaddr=0x10000000\0" \
>> @@ -65,6 +68,7 @@
>>         "kernel_addr_r=" __stringify(CONFIG_LOADADDR) "\0" \
>>         "fdt_addr_r=0x02000000\0" \
>>         "ramdisk_addr_r=0x02100000\0"
>> +#endif
>>
>
> Those values should work just fine for Trimslice; again they're entirely
> internal to U-Boot and simply control where U-Boot loads various images
> into RAM. Everything U-Boot loads (kernel, DTB, initrd) can be loaded at a
> variety of addresses without issue, so there's no need for these values to
> exactly match the original U-Boot that Compulab published.
>
> +#ifndef CONFIG_TARGET_TRIMSLICE
>>  #define CONFIG_SYS_USB_EHCI_MAX_ROOT_PORTS 1
>> +#endif
>>
>
> I believe this controls the number of ports within a USB controller, not
> the number of USB controllers. If so, the correct number is 1 for all Tegra
> SoCs, and the value isn't board-specific.
>



-- 
--
nerdboy _at_ gentoo dot org
http://dev.gentoo.org~/nerdboy


More information about the U-Boot mailing list