Author Topic: read only SD card on TE0720 + TE0701  (Read 7730 times)

amb_kosh

  • Active Member
  • *
  • Posts: 16
read only SD card on TE0720 + TE0701
« on: August 07, 2014, 10:19:25 AM »
Hi,

I wanted to load a linux kernel and use a partition on the SD card as root filesystem.

What I have now observed is when booting from SD card (red LED blinking slowly) the kernel detects the card as read only. This makes the kernel reject the rootfs/partition. The bitstream I've used is from
https://github.com/Trenz-Electronic/TE0720-GigaZee-Reference-Designs/tree/master/TE0720-01_TE0701-03_Base_Vivado-2014.1
I've tried one self generated bitstream and the boot.bin from ready_for_download

When following the sequence
  • starting from QSPI
  • inserting SD card
  • TFTP'ing the same kernel as before
all is working fine and the SD card is detected rw.

Any idea what this is about? Or how I can use a boot.bin from SD card and keep this card writeable?

regards

Jörg

Antti Lukats

  • Hero Member
  • *****
  • Posts: 542
Re: read only SD card on TE0720 + TE0701
« Reply #1 on: August 12, 2014, 11:05:04 AM »
Hi

the old and now deprecated reference design PS configuration does not expose SD_WP pins to EMIO, they are marked as "not used" - one could think that this is valid, and all software drivers should recognize that, but it is not the case.

Card Detect and WP for SDIO_0 (SDIO_1 when eMMC is uses) _should_ be set to EMIO, and in the FPGA design they should be routed to IO or terminated  as needed. New 2014.2 reference designs do this properly.

If WP is not selected as EMIO, then it is maybe auto assigned to MIO0 ? can you try keeping MIO0 as GND?
We have not checked is that is the case, but if it is then MIO0=GND would make the card rw

amb_kosh

  • Active Member
  • *
  • Posts: 16
Re: read only SD card on TE0720 + TE0701
« Reply #2 on: August 13, 2014, 07:22:33 AM »
I had a look at the design and changed the WP-Signal to EMIO and connected it to constant net_gnd. But I still have to test this.

When and where will the 2014.2 Reference design be available?

Antti Lukats

  • Hero Member
  • *****
  • Posts: 542
Re: read only SD card on TE0720 + TE0701
« Reply #3 on: August 13, 2014, 10:50:25 AM »
I had a look at the design and changed the WP-Signal to EMIO and connected it to constant net_gnd. But I still have to test this.

When and where will the 2014.2 Reference design be available?

http://www.trenz-electronic.de/de/download/d0/Trenz_Electronic/d1/TE0720-GigaZee/d2/reference_designs/d3/petalinux-2014.2.html

beta available
* install board support files
* set ip repository
* use project snapshot, or create new
* install petalinux bsp in linux box

NOTE: in the prebuilt u-boot environment is set to SPI flash, so "run saveenv" would overwrite some sectors in SPI flash, also when boot was from SD card, possible corrupting the SPI flash image. Just booting from SD Card is safe it does not write anything by itself.






amb_kosh

  • Active Member
  • *
  • Posts: 16
Re: read only SD card on TE0720 + TE0701
« Reply #4 on: August 18, 2014, 01:48:15 PM »
Hi,

I had several tries in rebuilding the reference project but none of them worked.
First of all Vivado was complaining about missing IOs standards and pin connections. We tried to rework this using the old reference design.
The generation of the bitstream and the FSBL worked fine, but the UART frequency of the FSBL from 2014.2 had changed again (as I know now).

Then I decided to use the bitstream+fsbl provided in the BSP. In the petalinux configuration I changed the rootfs to mmcblk0p2. The build process didn't show any error, but unfortunately the kernel isn't starting up.
Furthermore I have the following error:
Quote
FS
SoM: TE0720
MAC: 00 04 A3 AC 3A CC


U-Boot 2014.01 (Aug 18 2014 - 12:51:26)

I2C:   ready
Memory: ECC disabled
DRAM:  1 GiB
MMC:   zynq_sdhci: 0
SF: Detected W25Q256 with page size 256 Bytes, erase size 4 KiB, total 32 MiB
*** Warning - bad CRC, using default environment

In:    serial
Out:   serial
Err:   serial
Net:   Gem.e000b000
Warning: failed to set MAC address

U-BOOT for TE0720-02

Hit any key to stop autoboot:  0
U-Boot-TE0720> run load_kernel
*** ERROR: `ethaddr' not set
Gem.e000b000 Waiting for PHY auto negotiation to complete....... done

Antti Lukats

  • Hero Member
  • *****
  • Posts: 542
Re: read only SD card on TE0720 + TE0701
« Reply #5 on: August 18, 2014, 03:07:51 PM »
Warning: failed to set MAC address

this is unfortunately normal :(

MAC address was ALREADY set, but it is not possible to disable that in uboot to make uboot not to try to set it again, hence the warning

We have not yet tried to have rootfs on mmc with petalinux builds, but this should not disable the boot completely, even if something wrong with rootfs

amb_kosh

  • Active Member
  • *
  • Posts: 16
Re: read only SD card on TE0720 + TE0701
« Reply #6 on: August 18, 2014, 03:39:17 PM »
At the moment I have two problems.

The first, when I put the kernel on the SD Card, the kernel is loaded and then the screen stays blank - nothing happens any more and the green LED stays as ethernet data LED. This looks a bit like the UART-problem I had last month.

The second, is the network issue from above. But I think the line that matters is the first one with the ""*** Error"

Antti Lukats

  • Hero Member
  • *****
  • Posts: 542
Re: read only SD card on TE0720 + TE0701
« Reply #7 on: August 18, 2014, 03:46:13 PM »
look the uboot environment

"load_kernel=tftp ${clobstart} ${kernel_img}\0" \

run load_kernel tries to load from the network.. not from SD!

amb_kosh

  • Active Member
  • *
  • Posts: 16
Re: read only SD card on TE0720 + TE0701
« Reply #8 on: August 18, 2014, 03:53:04 PM »
First I wanted to use the SD card, but as this didn't work, I found it more comfortable to load the new kernels via TFTP.
But my most urgent problem is this one:
Quote
U-Boot-TE0720> run sdboot
boot Petalinux
Device: zynq_sdhci
Manufacturer ID: 3
OEM: 5344
Name: SU08G
Tran Speed: 50000000
Rd Block Len: 512
SD version 3.0
High Capacity: Yes
Capacity: 7.4 GiB
Bus Width: 4-bit
reading image.ub
3471156 bytes read in 308 ms (10.7 MiB/s)
## Loading kernel from FIT Image at 01000000 ...
   Using 'conf@1' configuration
   Trying 'kernel@1' kernel subimage
     Description:  PetaLinux Kernel
     Type:         Kernel Image
     Compression:  gzip compressed
     Data Start:   0x010000f0
     Data Size:    3453320 Bytes = 3.3 MiB
     Architecture: ARM
     OS:           Linux
     Load Address: 0x00008000
     Entry Point:  0x00008000
     Hash algo:    sha1
     Hash value:   478e76dfee02f7d65d70fae688aab2d5e196e1f1
   Verifying Hash Integrity ... sha1+ OK
## Loading fdt from FIT Image at 01000000 ...
   Using 'conf@1' configuration
   Trying 'fdt@1' fdt subimage
     Description:  Flattened Device Tree blob
     Type:         Flat Device Tree
     Compression:  uncompressed
     Data Start:   0x0134b36c
     Data Size:    16539 Bytes = 16.2 KiB
     Architecture: ARM
     Hash algo:    sha1
     Hash value:   0cb967d386e8c9a9e93c7b931918a5923ee12eeb
   Verifying Hash Integrity ... sha1+ OK
   Booting using the fdt blob at 0x134b36c
   Uncompressing Kernel Image ... OK
   Loading Device Tree to 07ff8000, end 07fff09a ... OK

Starting kernel ...



amb_kosh

  • Active Member
  • *
  • Posts: 16

Antti Lukats

  • Hero Member
  • *****
  • Posts: 542
Re: read only SD card on TE0720 + TE0701
« Reply #10 on: August 18, 2014, 04:07:19 PM »
Hi

our petalinux BSP is beta, we are testing it as we speak..

I am using centos.6-5.gnome.x86 ready made VM for development, we did not see any big issued with the petalinux builds..

our petalinux images work from SD and spi flash, and ethernet works at least from linux as well.