10-14-2017, 06:59 AM
(This post was last modified: 10-14-2017, 11:28 AM by consoleadam.)
FIXED
the trick was to re-create the paritions after dd'ing, as following:
making dummy system.img (of size 2000 MB)
--------------------------------------------
consoleadam@barbarian:~/rock64$ dd status=progress if=/dev/zero of=system.img bs=1M count=0 seek=2000 status=none
adding my custom built images to the dummy image
-----------------------------------------------------------------
consoleadam@barbarian:~/rock64$ umount /media/consoleadam/*
consoleadam@barbarian:~/rock64$ dd status=progress if=idbloader.img of=system.img seek=64 conv=fsync status=none
consoleadam@barbarian:~/rock64$ dd status=progress if=uboot.img of=system.img seek=16384 conv=fsync status=none
consoleadam@barbarian:~/rock64$ dd status=progress if=rk3328evb-trust.img of=system.img seek=24576 conv=fsync status=none
you can add kernel/rootfs images to dummy system.img from another built image as following:
-------------------------------------------------------------------------------------------------------------
consoleadam@barbarian:~/rock64$ dd status=progress if=jessie-openmediavault-rock64-0.5.10-118-arm64.img of=system.img seek=32768 skip=32768 count=229376 conv=fsync status=none
consoleadam@barbarian:~/rock64$ dd status=progress if=jessie-openmediavault-rock64-0.5.10-118-arm64.img of=system.img seek=262144 skip=262144 count=4194304 conv=fsync status=none
consoleadam@barbarian:~/rock64$ sync
re-partitioning the dummy image
--------------------------------------
consoleadam@barbarian:~/rock64$ parted -s system.img mklabel gpt
consoleadam@barbarian:~/rock64$ parted -s system.img unit s mkpart loader1 64 8063
consoleadam@barbarian:~/rock64$ parted -s system.img unit s mkpart reserved1 8064 8191
consoleadam@barbarian:~/rock64$ parted -s system.img unit s mkpart reserved2 8192 16383
consoleadam@barbarian:~/rock64$ parted -s system.img unit s mkpart loader2 16384 24575
consoleadam@barbarian:~/rock64$ parted -s system.img unit s mkpart atf 24576 32767
consoleadam@barbarian:~/rock64$ parted -s system.img unit s mkpart reserved3 32768 262143
consoleadam@barbarian:~/rock64$ parted -s system.img unit s mkpart root 262144 100%
consoleadam@barbarian:~/rock64$ parted -s system.img set 7 boot on
below in one go:
-----------------
consoleadam@barbarian:~/rock64$ parted -s system.img mklabel gpt; \
> sync; \
> parted -s system.img unit s mkpart loader1 64 8063; \
> sync; \
> parted -s system.img unit s mkpart reserved1 8064 8191; \
> sync; \
> parted -s system.img unit s mkpart reserved2 8192 16383; \
> sync; \
> parted -s system.img unit s mkpart loader2 16384 24575; \
> sync; \
> parted -s system.img unit s mkpart atf 24576 32767; \
> sync; \
> parted -s system.img unit s mkpart reserved3 32768 262143; \
> parted -s system.img unit s mkpart root 262144 100%; \
> sync;\
> parted -s system.img set 7 boot on
burning the dummy image to SDcard
-------------------------------------------
consoleadam@barbarian:~/rock64$ sudo dd status=progress if=system.img of=/dev/sdb conv=fsync
Note that you can only dd specific parts [dd status=progress if=idbloader.img of=system.img seek=64 conv=fsync status=none] directly to SDcard instead of to dummy image (system.img) but also make sure to repartition the SDcard after dd'ing!
the trick was to re-create the paritions after dd'ing, as following:
making dummy system.img (of size 2000 MB)
--------------------------------------------
consoleadam@barbarian:~/rock64$ dd status=progress if=/dev/zero of=system.img bs=1M count=0 seek=2000 status=none
adding my custom built images to the dummy image
-----------------------------------------------------------------
consoleadam@barbarian:~/rock64$ umount /media/consoleadam/*
consoleadam@barbarian:~/rock64$ dd status=progress if=idbloader.img of=system.img seek=64 conv=fsync status=none
consoleadam@barbarian:~/rock64$ dd status=progress if=uboot.img of=system.img seek=16384 conv=fsync status=none
consoleadam@barbarian:~/rock64$ dd status=progress if=rk3328evb-trust.img of=system.img seek=24576 conv=fsync status=none
you can add kernel/rootfs images to dummy system.img from another built image as following:
-------------------------------------------------------------------------------------------------------------
consoleadam@barbarian:~/rock64$ dd status=progress if=jessie-openmediavault-rock64-0.5.10-118-arm64.img of=system.img seek=32768 skip=32768 count=229376 conv=fsync status=none
consoleadam@barbarian:~/rock64$ dd status=progress if=jessie-openmediavault-rock64-0.5.10-118-arm64.img of=system.img seek=262144 skip=262144 count=4194304 conv=fsync status=none
consoleadam@barbarian:~/rock64$ sync
re-partitioning the dummy image
--------------------------------------
consoleadam@barbarian:~/rock64$ parted -s system.img mklabel gpt
consoleadam@barbarian:~/rock64$ parted -s system.img unit s mkpart loader1 64 8063
consoleadam@barbarian:~/rock64$ parted -s system.img unit s mkpart reserved1 8064 8191
consoleadam@barbarian:~/rock64$ parted -s system.img unit s mkpart reserved2 8192 16383
consoleadam@barbarian:~/rock64$ parted -s system.img unit s mkpart loader2 16384 24575
consoleadam@barbarian:~/rock64$ parted -s system.img unit s mkpart atf 24576 32767
consoleadam@barbarian:~/rock64$ parted -s system.img unit s mkpart reserved3 32768 262143
consoleadam@barbarian:~/rock64$ parted -s system.img unit s mkpart root 262144 100%
consoleadam@barbarian:~/rock64$ parted -s system.img set 7 boot on
below in one go:
-----------------
consoleadam@barbarian:~/rock64$ parted -s system.img mklabel gpt; \
> sync; \
> parted -s system.img unit s mkpart loader1 64 8063; \
> sync; \
> parted -s system.img unit s mkpart reserved1 8064 8191; \
> sync; \
> parted -s system.img unit s mkpart reserved2 8192 16383; \
> sync; \
> parted -s system.img unit s mkpart loader2 16384 24575; \
> sync; \
> parted -s system.img unit s mkpart atf 24576 32767; \
> sync; \
> parted -s system.img unit s mkpart reserved3 32768 262143; \
> parted -s system.img unit s mkpart root 262144 100%; \
> sync;\
> parted -s system.img set 7 boot on
burning the dummy image to SDcard
-------------------------------------------
consoleadam@barbarian:~/rock64$ sudo dd status=progress if=system.img of=/dev/sdb conv=fsync
Note that you can only dd specific parts [dd status=progress if=idbloader.img of=system.img seek=64 conv=fsync status=none] directly to SDcard instead of to dummy image (system.img) but also make sure to repartition the SDcard after dd'ing!