#57 Add rock64 to boards.d
Closed 4 months ago by pbrobinson. Opened 4 months ago by caxica.
https://github.com/caxica/arm-image-installer.git add-rock64-board  into  master

Add rock64 to boards.d
Serge de Souza • 4 months ago  
boards.d/rock64
file added
+1
@@ -0,0 +1,1 @@

+ ../socs.d/Rockchips-ARMv8 

\ No newline at end of file

no initial comment

This is required so that rock64 is a supported target for arm-image-installer.
This target is referenced in the SUPPORTED-BOARDS file but is actually missing from the boards.d directory.

The reason it's explicitly not linked to any boards at the moment is the offset means it gets written right through the middle of the VFAT partition.

Nothing you've done here resolves that issue. That issue is one of the reasons we don't currently deal with Rockchip devices here. The other reason is Rock64 has SPI flash so once that is properly working we actually don't need to write out U-Boot on the filesystem.

Pull-Request has been closed by pbrobinson

4 months ago

Sorry I don't follow, I am new to this.

Which one of the the dd commands are you saying is writing in the middle of the VFAT partition? I assume you are talking about the VFAT partition that starts at sector 2048 as it seems to be the only one.

In socs.d/Rockchips-ARMv8 there are two dd commands :

  • dd if=$PREFIX/usr/share/uboot/$TARGET/idbloader.img of=$MEDIA seek=64

$ ls -l /usr/share/uboot/rock64-rk3328/idbloader.img
-rw-r--r--. 1 root root 85309 May 21 20:56 /usr/share/uboot/rock64-rk3328/idbloader.img
idbloader.img is 85309 bytes and ends at byte 84373 ( 64+85309 ) if dd'ed so that is well within the first 2048 sectors

  • dd if=$PREFIX/usr/share/uboot/$TARGET/u-boot.itb of=$MEDIA seek=16384

$ ls -l /usr/share/uboot/rock64-rk3328/u-boot.itb
-rw-r--r--. 1 root root 734872 May 21 20:56 /usr/share/uboot/rock64-rk3328/u-boot.itb
u-boot.itb is 734872 bytes and end at byte 751256 (=16384+734872) if dd'ed so that is also well within the first 2048 sectors

What am I missing? I tested this and it works.
One thing that is wrong with this pull request is that the file must be named rock, I have fixed this in my branch.

dd if=$PREFIX/usr/share/uboot/$TARGET/u-boot.itb of=$MEDIA seek=16384
u-boot.itb is 734872 bytes and end at byte 751256 (=16384+734872) if dd'ed so that is also well within the first 2048 sectors
What am I missing? I tested this and it works.

try "man dd" and look for the seek option. To quote "seek=N skip N obs-sized blocks at start of output" which based on a 512 byte block start writing that out at 8Mb, partitions start at 2Mb.

It probably "works" for you because it likely puts the blocks over the top of the Raspberry Pi firmware so it's likely more luck than anything else.

Metadata