Buildroot.rk3308

I’ve created a new repo for building a minimal sdcard for this board.
I compiles well, however I need some help getting the bootload working on the sdcard.

You can see it here :


If you prefer to use gitlab, you can see it here :
https://gitlab.com/flatmax/buildroot.rk3308

To build the image, it is really quite simple :

git clone git@github.com:flatmax/buildroot.rk3308.git
git clone git://git.busybox.net/buildroot buildroot
source buildroot.rk3308/setup.rockPiS.sh yourPath/buildroot
make

The sdcard image is output at the end of the compilation.

NOTE: some better clone source and make commands are in a message below : Buildroot.rk3308

1 Like

uboot is now building and the kernel is booting, however the console looses kernel output - missing a parameter in the bootargs to route the kernel’s console to uart0. See here :
Kernel bootargs

Their entire buildroot system is now working.
You can clone, make and install to SDcard. Then login as root.

The buildroot system now uses device tree overlays.
Add any overlays you want to load here :

1 Like

The buildroot system now has an example out of tree kernel overlay and module in place.

Just one (maybe stupid) question: would it be possible to build and run a 32bit version of this as well? I need to use some static libs that are only available for 32 bit arm.

yes it probably is possible. You would have to alter the build system. You would also have to check that the devicetree is there for 32 bit compilation. Some iuboot modifications may be necessary as well.

2 Likes

Hi! Can you share description on how to create buildroot on Radxa Zero eMMC?
Maybe this overlays can help: https://wiki.radxa.com/Device-tree-overlays
I would create a detail instruction for all if success. (Example)
Thanks :grinning:

Hi im trying to build an image but i encountered this error:

Kconfig file or fragment '/home/buildroot.rk3308/board/RK3308/rk3308_linux_defconfig' for 'linux' does not exist

make: *** [linux/linux.mk:569: /home/buildroot.rk3308/board/RK3308/rk3308_linux_defconfig] Error 1

got any idea?

which setup file did you use ?

did this exactly:

git clone git@github.com:flatmax/buildroot.rk3308.git
git clone git://git.busybox.net/buildroot buildroot
source buildroot.rk3308/setup.rk3308.sh buildroot
make

OK I just refreshed the buildroot external here : https://github.com/flatmax/buildroot.rockchip
It should work now. I did a test build and run.

Here are some changes to your methodology above :

export localDir=`pwd` 
git clone git@github.com:flatmax/buildroot.rockchip.git
git clone git://git.busybox.net/buildroot buildroot
cd buildroot
git checkout 58fc4b5085763cf1837cab22e98b0eaa7fefaac5
source $localDir/buildroot.rockchip/setup.rockPiS.sh $localDir/buildroot
make

If you have previously built in the buildroot directory run the following before you source and make above :

make distclean

Works great, thank you.

another question, if one would want to add packages to the image (example: rockchip-adbd for connecting via adb) how can it be done?

also i tried to login over ssh (username: root, password: ) but it says: Permission denied, please try again.

For networking and SSH, first start by adding the following to the buildroot.rockchip/configs/rickpis_defconfig file :

BR2_PACKAGE_OPENSSH=y
BR2_PACKAGE_OPENSSH_SERVER=y
BR2_PACKAGE_OPENSSH_CLIENT=y
BR2_SYSTEM_DHCP="eth0"
BR2_PACKAGE_AVAHI=y
BR2_PACKAGE_AVAHI_DAEMON=y

Not sure what you have to clean or if you need to make distclean first, but those extra packages will install openssh and the server/client for them.
Next, copy your public RSA id to the overlays folder as the authorized_keys like so (assumes you are using Linux with the regular RSA id locations) ;

mkdir -p buildroot.rockchip/overlays/root/.ssh
cp ~/.ssh/id_rsa.pub buildroot.rockchip/overlays/root/.ssh/authorized_keys
# fix directory and file permissions to make it secure

Now when you build and boot from the sdcard, your RSA id will be on the board. You can just do

ssh root@rock3a.local

OK regarding your qustion about rockchip-adbd, are you wanting to install ADBD ? I haven’t used that, however I found it in the standard buildroot packages.

make menuconfig

Then look in Target Packages-> System Tools -> android-tools. You can either select it manually or add the correct variables to the rockpis_defconfig file to make it always auto select adbd.

Perfect, thank you very much!

Dear flatmax, ive encountered an issue with the clock, it says the date is 1970
ive tried install ntpd but it fails to update the date
the hwclock give me this error: can't open '/dev/misc/rtc': No such file or directory
any idea what im missing?

Typically for network time protocol I add the following to the config file :

BR2_PACKAGE_NTP=y
BR2_PACKAGE_NTP_NTPDATE=y

Not sure about the rtc issue you are noticing. Perhaps if that device is missing, you should start a new thread on that issue - hoping for a response from the Radxa people.

Dear flatmax, have you had any success of writing a build to SD Nand?
when i try to use the radxa rkdeveloptool with the included bootloader it doesnt work.

Once the system is built, it outputs the command to write the image to sdcard to the console. Normally just cut and paste that to write to sdcard. Here it is in the code base :

Personally I haven’t used the rkdeveloptool.