public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: robert <c.robert.gabriel@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] RK3399 NanoPI-M4 boot issues
Date: Fri, 25 Oct 2019 02:02:07 -0700 (MST)	[thread overview]
Message-ID: <1571994127672-0.post@n7.nabble.com> (raw)

I'm trying to build a linux from source on a RK3399 nanopi-m4. I did the
below steps:
 
*###  Download and compile ARM-TF ###
*$ git clone https://github.com/ARM-software/arm-trusted-firmware.git
$ make CROSS_COMPILE=aarch64-linux-gnu- PLAT=rk3399 bl31
 
*### Download and complie U-Boot ###
*$ cd ..
$ git clone https://gitlab.denx.de/u-boot/u-boot.git
$ cd u-boot/
$ git checkout v2019.10
$ make CROSS_COMPILE=arm-linux-gnueabi- nanopi-m4-rk3399_defconfig
$ cp ../arm-trusted-firmware/build/rk3399/release/bl31/bl31.elf .
$ make ARCH=arm CROSS_COMPILE=aarch64-linux-gnu-
$ make ARCH=arm CROSS_COMPILE=aarch64-linux-gnu- u-boot.itb
$ ./tools/mkimage -n rk3399 -T rksd -d ./tpl/u-boot-tpl-dtb.bin
idbloader.img
Image Type:   Rockchip RK33 (SD/MMC) boot image
Data Size:    47104 bytes
$ cat spl/u-boot-spl-dtb.bin >> idbloader.img
 
*### Build kernel ###
*$ git
clone https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
$ cd linux
$ git checkout v5.1

**I've used the arm64 defconfig ***
$ make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- defconfig
$ make CROSS_COMPILE=aarch64-linux-gnu- ARCH=arm64
 
*### Create boot.img ###
*$ cd ..
$ mkdir boot
$ cp linux/arch/arm64/boot/dts/rockchip/rk3399-nanopi-m4.dtb boot/
$ cp arch/arm64/boot/Image boot/
$ cp linux/arch/arm64/boot/Image boot/
$ mkdir boot/extlinux
$ nano boot/extlinux/extlinux.conf
 
label NanoPi M4 5.1
  kernel /boot/Image
  devicetree /boot/rk3399-nanopi-m4.dtb
  append earlycon=uart8250,mmio32,0xff1a0000 root=/dev/mmcblk1p1 rootwait
 
$ dd if=/dev/zero of=boot.img bs=1M count=32
$ sudo mkfs.fat boot.img
$ mkdir tmp
$ sudo mount boot.img tmp/
$ cp -r boot/* tmp/
$ umount tmp
 
*** copy the images to a folder ***
$ mkdir images
$ cp boot.img images/ 
$ cp u-boot/idbloader.img images/
$ cp u-boot/u-boot.itb images/
 
*### Create sd card image ###
*$ cd images/

*** I'm using a VM so it was easier to use a loop device to create the image
***
$ dd if=/dev/zero of=sdcard.img bs=1024 count=0 seek=400000 || exit 1
$ sudo losetup -f
/dev/loop18
$ sudo losetup /dev/loop18 sdcard.img 
$ sudo dd if=idbloader.img of=/dev/loop18 seek=64
$ sudo dd if=u-boot.itb of=/dev/loop18 seek=16384
$ sudo dd if=boot.img of=/dev/loop18 seek=32768
$ sync

Flush the image(sdcard.img) with etcher to a card and place the card in the
board.
Plug the UART cable and power on the board. I receive the below message:
*/U-Boot TPL board init
sdram_init: data training failed
rk3399_dmc_init DRAM init failed -5/*
 
I'm not sure what am I doing wrong.
Can someone help me with this?




--
Sent from: http://u-boot.10912.n7.nabble.com/

             reply	other threads:[~2019-10-25  9:02 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-25  9:02 robert [this message]
2019-10-26 10:25 ` [U-Boot] RK3399 NanoPI-M4 boot issues Jagan Teki

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1571994127672-0.post@n7.nabble.com \
    --to=c.robert.gabriel@gmail.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox