R64 mainline OpenWRT on sdcard

Is there a procedure to update a sdcard image of openwrt?

I have created a new openwrt 21.01 image with additional kernel drivers which I need to load onto the currently running openwrt image on sdcard.

The current sdcard layout looks like this:

root@build001:~# fdisk -l /dev/sdc The backup GPT table is corrupt, but the primary appears OK, so that will be used.

Disk /dev/sdc: 29.7 GiB, 31914983424 bytes, 62333952 sectors

Units: sectors of 1 * 512 = 512 bytes

Sector size (logical/physical): 512 bytes / 512 bytes

I/O size (minimum/optimal): 512 bytes / 512 bytes

Disklabel type: gpt

Disk identifier: 5452574F-2211-4433-5566-778899AABB00

Device Start End Sectors Size Type

/dev/sdc1 1024 2047 1024 512K Linux filesystem

/dev/sdc2 4096 8191 4096 2M EFI System

/dev/sdc3 8192 10239 2048 1M Linux filesystem

/dev/sdc4 12288 77823 65536 32M Linux filesystem

/dev/sdc5 77824 92159 14336 7M Linux filesystem

/dev/sdc6 92160 305151 212992 104M unknown

/dev/sdc128 34 1023 990 495K BIOS boot

Partition table entries are not in disk order.

I would like to increase the space of /dev/sdc6 which I am assuimg holds the rootfs of openwrt.

I believe the command should look something like this:

dd if=/openwrtimage.img offset=47185920(512 * start block), loopback of=/dev/sdc6

Can someone please point me in the right direction I am stuck

Afaik you can just use sysupgrade emmc.img.gz and that should work [tm]…

Be aware that post-21.02 the image for the BPi-R64 has changed and you will loose your configuration when upgrading to 22.xx or OpenWrt snapshot.

Emmc version for sdcard? At least atf is different as it needs device as compile-param. And sysupgrade can be written to sdcard?

If you have booted from SD Card, then sysupgrade will apply the new image to the SD card as well.

What are the options I need to select in the menu to create a mmc image and SDCARD image? I though it is a combined image, thanks for the correction?

I have a SDCARD image and sysupgrade image, but now that I have tested the build in the sdcard I would like to take it to the Emmc.

Thanks a lot

I would recommend you to use OpenWrt master branch instead of the 21.02 release branch because the image generation code has seen a major rework. If you are using the latest OpenWrt there is only a single sysupgrade.fit image which works equally on all boot methods (SD Card, eMMC, SPI-NAND). For installation there is the sdcard.img.gz file which you can use to install OpenWrt onto the eMMC or onto the SPI-NAND, see here for instructions: