flatmax/buildroot.rockchip

Rock Pi S

Closed this issue · 8 comments

Hi there, first thanks for your efforts. I'm attempting to build an image for the rock pi s. I found the missing .bin files from the TODO here:

https://github.com/radxa/rkbin/tree/master/bin/rk33

and managed to get it to produce a sdcard.img. However, when I put that on an sdcard, no boot activity happens. I have a usb -> uart bridge plugged into the appropriate pins (at least for the radxa stock debian image).

This is on v12 hardware.

I started with buildroot 2022.02.1 and 80af258 of this repo.

Any suggestions would be very welcomed.

I've just done a test build to confirm everything was building as expected and nothing was missing. The repo commit for buildroot.rockchip is : commit 80af258

I am using the serial console set to the speed 115200. The serial connections are on the main header next to the red +5v pins. At boot time - the serial console is active and shows everything booting.
Once booted I can ping the device :

ping rockpis.local
PING rockpis.local (192.168.1.35) 56(84) bytes of data.
64 bytes from 192.168.1.35 (192.168.1.35): icmp_seq=1 ttl=64 time=1.47 ms
64 bytes from 192.168.1.35 (192.168.1.35): icmp_seq=2 ttl=64 time=0.772 ms

Build like so :

. ~/buildroot.rockchip/setup.rockPiS.sh /path/buildroot.rockPiS

Now I am in the /path/buildroot.rockPiS directory. I clean my entire buildroot system to make sure nothing is resident.
make distclean

Check that we are on the correct tag :
git checkout 2022.02.1

Setup again :
. ~/buildroot.rockchip/setup.rockPiS.sh /path/buildroot.rockPiS

Now make : make

Just to be sure, I commented out "BR2_DL_DIR="$(BASE_DIR)/../../buildroot.dl" in the rockpis_defconfig file. This will force clean downloads of all the software at build time - not strictly necessary, but good for testing.

I repeated following the above including the extra setup step. No dice.

I didn't notice the first time round, but even though it completed there is a message a few lines back from the end (when it runs mkimage)

Warning: SPL image is too large (size 0x1e800) and will not boot
Error: image verification failed

What OS are you using, and what version of sh? I'm also seeing some shenanigans with the boardDir=dirname $_ in post-image.sh that I initially worked around (I'm using sh 5.1 on Gentoo).

All of the system requirements are met ? If so, then try on something generic like a virtual ubuntu machine.

All of the system requirements "were met", but there's an implicit one :)

It turns out that the post-image.sh and post-build.sh require dash, not just sh (Debian derivatives use dash, but others [fedora, suse, gentoo) use bash). I guess either the scripts could be updated to have dash in the shebang, or alternatively the README.md could be updated to state it requires sh to be dash.

There were a few other missing deps when I ran on a plain ubuntu docker (cpio, unzip, rsync and python3 were all missing after running the dpkg commands).

What do you suggest? I'm happy to make a couple PRs to address these.

That would be fabulous, lets give your PRs a go.

Here you are.

PS. do you answer your email in your commits? I have an off-topic question I'd like to ask that doesn't belong in this issue.

Thanks for the pull requests - merged. Lets chat !

Excellent, closing. I'll reach out.