Booting linux from at91bootstrap failes

For SAMA5D2 Xplained, SAMA5D3 Xplained and SAMA5D4 Xplained

Moderator: nferre

mattthias
Posts: 2
Joined: Thu May 12, 2016 7:19 pm

Booting linux from at91bootstrap failes

Tue Jan 09, 2018 12:06 pm

Hello,

i want to boot a Linux kernel and DTB directly from at91bootstrap. The actual problem happens on a custom hardware but i can reproduce it on the SAMA5D3 Xplained evaluation board.

After copying kernel and dtb to the memory the uImage ssems to booting but the than the error message "Failed to load image" appears.

Code: Select all

  NAND: Image: Copy 0x3963a8 bytes from 0x200000 to 0x22000000
  NAND: dt blob: Copy 0x87ae bytes from 0x180000 to 0x21000000
  try zImage magic: 0x2e342d78 is found
  try uImage magic: 0x27051956 is found

  Booting uImage ......
  Relocating kernel image, dest: 0x20008000, src: 0x22000040
   ...... 0x396368 bytes data transferred

  Using device tree in place at 0x21000000
  NAND: Failed to load image
I checked that kernel and dtb are bootable using at91bootstrap and U-Boot. Anyone an idea what could be wrong here?


What i did:
  1. Build a Kernel from linux-at91 (tag: linux4sam_5.7) using the sama_defconfig

    Code: Select all

        git checkout -b matthias/linux4sam_5.7 linux4sam_5.7
        export ARCH=arm
        export CROSS_COMPILE=arm-linux-gnueabihf-
        make sama5_defconfig
        make -j4  LOADADDR=0x20008000 uImage dtbs
    
  2. Build at91bootstrap (with "Debug Level: even louder oputput")

    Code: Select all

        export CROSS_COMPILE=arm-linux-gnueabihf-
        git checkout -b matthias/v3.8.9 v3.8.9
        make mrproper
        make sama5d3_xplainednf_linux_image_dt_defconfig
        make menuconfig # (for Debug level)
        make
    
  3. Flashed the resulting binaries on the board using sam-ba 2.16
    Send Bootfile : sama5d3_xplained-nandflashboot-linux-image-dt-3.8.9.bin
    Send File to 0x180000: at91-sama5d3_xplained.dtb
    Send File to 0x200000: uImage
  4. Reset the board and watch the output:

    Code: Select all

      AT91Bootstrap 3.8.9 (Di 9. Jan 09:40:46 CET 2018)
    
      Auto-Config the TWI Bus by the board
      PHY: ETH0 PHY: Enter power down mode
      PHY: ETH1 PHY: Enter power down mode
      twi read: timeout to wait RXRDY bit
      twi read: timeout to wait RXRDY bit
      ACT8865: Disable ACT8865's I2C interface
      NAND: ONFI flash detected
      NAND: Manufacturer ID: 0x2c Chip ID: 0xda
      NAND: Page Bytes: 2048, Spare Bytes: 64
      NAND: ECC Correctability Bits: 4, ECC Sector Bytes: 512
      NAND: Disable On-Die ECC
      PMECC: version is: 0x112
      PMECC: page_size: 2048, oob_size: 64, pmecc_cap: 4, sector_size: 512
      NAND: Initialize PMECC params, cap: 4, sector: 512
      NAND: Image: Copy 0x3963a8 bytes from 0x200000 to 0x22000000
      NAND: dt blob: Copy 0x87ae bytes from 0x180000 to 0x21000000
      try zImage magic: 0x2e342d78 is found
      try uImage magic: 0x27051956 is found
    
      Booting uImage ......
      Relocating kernel image, dest: 0x20008000, src: 0x22000040
       ...... 0x396368 bytes data transferred
    
      Using device tree in place at 0x21000000
      NAND: Failed to load image
    



Best wishes,
Matthias
blue_z
Location: USA
Posts: 1568
Joined: Thu Apr 19, 2007 10:15 pm

Re: Booting linux from at91bootstrap failes

Tue Jan 09, 2018 11:44 pm

mattthias wrote:Anyone an idea what could be wrong here?
You've provided salient information except for details about your host environment, in particular the toolchain that you're using.
There have been a few instances where changing the toolchain resolved the boot issue, e.g. viewtopic.php?f=33&t=23932&start=15#p50096


Regards
mattthias
Posts: 2
Joined: Thu May 12, 2016 7:19 pm

Re: Booting linux from at91bootstrap failes

Wed Jan 10, 2018 10:11 am

Hello blue_z, hi *,
blue_z wrote: You've provided salient information except for details about your host environment, in particular the toolchain that you're using.
There have been a few instances where changing the toolchain resolved the boot issue, e.g. viewtopic.php?f=33&t=23932&start=15#p50096
thanks for the hint! Indeed i use gcc 6 ( https://releases.linaro.org/components/ ... ihf.tar.xz) on Debian GNU/Linux 9.3 (stretch).

Code: Select all

$ arm-linux-gnueabihf-gcc --version
arm-linux-gnueabihf-gcc (Linaro GCC 6.3-2017.05) 6.3.1 20170404

I'll install an older gcc version, try again and report back.

Best wishes,
Matthias

Return to “SAMA5 Xplained”

Who is online

Users browsing this forum: No registered users and 1 guest