riscv64: sdcard: fix p2 (rootfs) generation
authorZoltan HERPAI <wigyori@uid0.hu>
Tue, 16 Oct 2018 14:25:55 +0000 (16:25 +0200)
committerZoltan HERPAI <wigyori@uid0.hu>
Tue, 16 Oct 2018 14:25:55 +0000 (16:25 +0200)
Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
target/linux/riscv64/image/gen_riscv64_sdcard_img.sh

index 374d78e813589448d07d3508c39e02000b054acc..d4b5f68889193db4e9fa99d992598019522f2ad6 100755 (executable)
@@ -24,15 +24,19 @@ ROOTFSSIZE="$5"
 
 #UBOOT="$6"
 
-FULLSIZE="$(($BOOTFSSIZE+$ROOTFSSIZE+1))"
+FULLSIZE="$(($BOOTFSSIZE+$ROOTFSSIZE+2))"
 echo "Full size is: ${FULLSIZE}M"
 
-ROOTFSOFFSET="$(($BOOTFSSIZE*1048576 / 512 + 2048))"
+ROOTFSOFFSET="$(($BOOTFSSIZE*1048576 / 512 + 2048))" #8187
+#ROOTFSOFFSET="$(($BOOTFSSIZE*1048576 / 512 + 4096))"
+
+
 echo "Rootfs offset is: $ROOTFSOFFSET"
 
 dd if=/dev/zero of=$OUTPUT bs=1M count=$FULLSIZE
 
-sgdisk --clear \
+#sgdisk --clear \
+/u/owrt2/sink-201810/staging_dir/host/bin/sgdisk --clear \
     --new=1:2048:${BOOTFSSIZE}M  --change-name=1:bootloader --typecode=1:${BBL_UUID} \
     --new=2:${ROOTFSOFFSET}:     --change-name=2:root       --typecode=2:${LINUX_UUID} $OUTPUT