BUilding everything from scratch (buildroot)
#1
Hi,

I bought rock64 and now I am trying to prepare very minimal script that will build all steps from scratch. Intend is to publish it to buildroot repository later. But I have problem booting kernel. Some information what have I already done and where I am stuck.

1. tpl, spl and uboot are build from ayufan repository, branch "2017.09-rockchip-ayufan-1035-gd646df03ac", and "rock64-rk3328_defconfig", no changes have been made to the files. To create tpl/spl image I use these commands (this is flashed to 0x40). Note, no rockchip binary blobs anywhere!

Code:
$MKIMAGE -n rk3328 -T rksd -d $BINARIES_DIR/u-boot-tpl.bin $BINARIES_DIR/u-boot-tpl.img
cat $BINARIES_DIR/u-boot-tpl.img $BINARIES_DIR/u-boot-spl.bin > $BINARIES_DIR/u-boot-tpl-spl.img

2. then ATF is built, also from ayufan repository and "rk3328" as a platform. Generated BL31 is used to generate u-boot.itb (with make u-boot.itb from ayufan repo). That u-boot.itb is flashed to 0x200 on sdcard.

3. Kernel, no surprise here, it's from ayufan repo, "rockchip_linux_defconfig" used and "rockchip/rk3328-rock64" dts from in-tree, again no changes have been made.

4. Now sdcard image is generated with this config:

Code:
image sdcard.img {
   hdimage {
   }

   partition uboot-spl {
       in-partition-table = "no"
       image = "u-boot-tpl-spl.img"
       offset = 32768 # 512 * 0x40 from start of sd card
   }

   partition uboot {
       in-partition-table = "no"
       image = "u-boot.itb"
       offset = 262144 # 512 * 0x200 from start of sd card
   }

   partition rootfs {
       partition-type = 0x83
       image = "rootfs.ext4"
       size = 500M
   }
}

It's in mbr dos format (so no gpt). On rootfs there is extlinux, Image and dtb in /boot directory.

5. Toolchain is gcc 7.x and binutils 2.29.x.

Now logs,


Code:
<debug_uart> U-Boot TPL board init
configuring DDR parameters
LPDDR3
DRAM frequency: 800MHz
configuring DDR parameters
Trying to boot from BOOTROM
Returning to boot ROM...

U-Boot SPL 2017.09 (Nov 11 2018 - 00:07:11)
setup_ddr_param  1
booted from SD
Trying to boot from MMC2


U-Boot 2017.09 (Nov 11 2018 - 00:07:11 +0100)

Model: Pine64 Rock64
DRAM:  4 GiB
MMC:   rksdmmc@ff520000: 0, rksdmmc@ff500000: 1
SF: Detected gd25q128 with page size 256 Bytes, erase size 4 KiB, total 16 MiB
*** Warning - bad CRC, using default environment

In:    serial@ff130000
Out:   serial@ff130000
Err:   serial@ff130000
Model: Pine64 Rock64
misc_init_r
cpuid=00000000000000000000000000000000
serial=0
Net:   eth0: ethernet@ff540000
Hit any key to stop autoboot:  0
Card did not respond to voltage select!
mmc_init: -95, time 10
switch to partitions #0, OK
mmc1 is current device
Scanning mmc 1:1...
Found /boot/extlinux/extlinux.conf
Retrieving file: /boot/extlinux/extlinux.conf
205 bytes read in 36 ms (4.9 KiB/s)
1:      rock64 linux-next
Retrieving file: /boot/Image
20054024 bytes read in 17452 ms (1.1 MiB/s)
append: earlyprintk earlycon=uart8250,mmio32,0xff130000 console=ttyS2,1500000n8 console=tty0 root=/dev/mmcblk0p1 rootwait
Retrieving file: /boot/rk3328-rock64.dtb
70953 bytes read in 29 ms (2.3 MiB/s)
## Flattened Device Tree blob at 01f00000
  Booting using the fdt blob at 0x1f00000
  Loading Device Tree to 00000000fceed000, end 00000000fcf01528 ... OK

Starting kernel ...


And that's it. No more output and I am completaly out of ideas how to proceed.

u-boot properly boots, it finds my kernel and dtb, it loads it but it fails to boot it. Kernel and dtb are good, I downloaded slackware image for rock64 and replaced Image and dtb, and it started - I could see todays date and my build host in kernel message, so it's enough of a proof linux and dtb are generated properly.

Anybody got any idea what am I missing? I was thinking that it might be mbr instead of gpt or missing initrd, but slackware image doesn't use them as well. I would appreciate any advice or ideas how to proceed with that.


Messages In This Thread
BUilding everything from scratch (buildroot) - by lm- - 11-10-2018, 05:22 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Hoe to Update Buildroot Package config from SDK build.sh file shivarj89 0 1,699 09-09-2019, 09:39 AM
Last Post: shivarj89
  Error when building kernel - realtek krystian 1 2,289 02-25-2018, 03:58 AM
Last Post: krystian

Forum Jump:


Users browsing this thread: 1 Guest(s)