[Solved] Does alarm support rock64v3?

This is for ARMv8 based devices

[Solved] Does alarm support rock64v3?

Postby ramsey » Thu Jul 02, 2020 11:36 pm

I've done a fresh install on a new board, but I cannot ssh into the device. The white and red led stay lit when powered on, whereas on a rock64v2, the red led blinks twice after boot is completed. I won't have a chance to try connecting a serial cable this weekend, so I just wondered if anyone has had success with this board? Thanks.
Last edited by ramsey on Mon Jul 20, 2020 10:19 am, edited 1 time in total.
ramsey
 
Posts: 28
Joined: Mon Aug 14, 2017 3:46 pm

Re: Does alarm support rock64v3?

Postby ramsey » Mon Jul 20, 2020 10:11 am

It appears the current uboot binaries are too old to support the v3 boards.

I've built ARM Trusted Firmware (with binary blobs deleted) and the u-boot binaries from source and use them. Now alarm works. For anyone interested, I include my procedure here. I build the firmware and uboot in a docker container so it's very portable. If you have any aarch64 board with docker installed, you should be able to build them with this Dockerfile.

$this->bbcode_second_pass_code('', '
FROM debian:10.4
RUN apt-get update
RUN apt-get upgrade -y
RUN apt-get install -y build-essential git gcc-arm-none-eabi device-tree-compiler bison flex swig python3 python3-distutils python3-dev
RUN git clone https://github.com/ARM-software/arm-trusted-firmware
WORKDIR /arm-trusted-firmware
RUN find . -name '*.bin' -exec rm -rf {} \;
RUN make PLAT=rk3328
WORKDIR /
ENV BL31=/arm-trusted-firmware/build/rk3328/release/bl31/bl31.elf
#This place is slow, using github mirror instead
#RUN git clone https://gitlab.denx.de/u-boot/u-boot.git/
RUN git clone https://github.com/u-boot/u-boot.git
WORKDIR /u-boot
RUN make rock64-rk3328_defconfig
RUN sed -i 's/CONFIG_IDENT_STRING=""/CONFIG_IDENT_STRING="Arch Linux ARM"/' .config
RUN make
')

I probably should checkout a tagged commit, but latest seems to be working okay so far. Once it is built, I copied idbloader.img and u-boot.itb out of the image (found in /u-boot) and use them in place of idbloader.img and uboot.img (respectively) in the offical alarm install instructions. trust.img isn't needed, because the bl31.elf is include in the u-boot.itb, I believe. Also, I did not pacman -Sy uboot-rock64 at the end of the instructions since that would have overwritten my uboot with the non-working ones.
ramsey
 
Posts: 28
Joined: Mon Aug 14, 2017 3:46 pm

Re: [Solved] Does alarm support rock64v3?

Postby ramsey » Tue Jul 21, 2020 10:03 am

Well, almost solved :D I have several rock64v3 boards, but they all get the same mac address. Setting mac address in boot.txt and rerunning the mkimage in the /boot dir doesn't appear to have any effect. I get a boot.scr, and I can see the mac address I set in it, but it doesn't apply on boot.
ramsey
 
Posts: 28
Joined: Mon Aug 14, 2017 3:46 pm

Re: [Solved] Does alarm support rock64v3?

Postby ramsey » Tue Jul 21, 2020 9:49 pm

I looked for what sets the mac address but came up empty handed. I've settled for letting systemd set the mac using a service template /usr/lib/systemd/system/macspoof@.service like that mentioned in the arch linux wiki. Works nicely and having the same initial mac on all boards actually made setting them up one at a time a little easier.
ramsey
 
Posts: 28
Joined: Mon Aug 14, 2017 3:46 pm


Return to ARMv8 Devices

Who is online

Users browsing this forum: No registered users and 21 guests