Преглед на файлове

conf: Enable hibernation package & swap partition

Signed-off-by: mason.huo <mason.huo@starfivetech.com>
mason.huo преди 1 година
родител
ревизия
4845f73f06
променени са 2 файла, в които са добавени 35 реда и са изтрити 8 реда
  1. 29 2
      README.md
  2. 6 6
      conf/genimage.cfg

+ 29 - 2
README.md

@@ -259,8 +259,35 @@ sudo resize2fs ${disk}${part}
 sudo fsck.ext4 ${disk}${part}
 ```
 
-## APPENDIX II: Using DTB Overlay Dynamically
+If you need to add a new partition, such as a swap partition (here we do set the rest of disk space to swap partition,
+but normally swap partition size should be the same as DDR size or double of DDR size),
+you can use the following shell script afer the image running on board:
+
+```bash
+#!bin/sh
+sgdisk -e /dev/mmcblk0
+disk=/dev/mmcblk0
+gdisk $disk << EOF
+p
+n
+5
+
 
+8200
+p
+c
+5
+hibernation
+w
+y
+EOF
+
+mkswap /dev/mmcblk0p5
+swapoff -a
+swapon /dev/mmcblk0p5
+```
+
+## APPENDIX II: Using DTB Overlay Dynamically
 The system support loading dtb overlay dynamically when the board is running. Run below on board:
 
 ```
@@ -312,4 +339,4 @@ Prepare the tftp sever. e.g. `sudo apt install tftpd-hpa` for Ubuntu host.
 
 ## APPENDIX IV:  How to Switch to 4G DDR or 8G DDR
 
-The detail process will add it later
+The detail process will add it later

+ 6 - 6
conf/genimage.cfg

@@ -4,17 +4,17 @@ image sdcard.img {
 	}
 
 	partition spl {
-		# image = "u-boot-spl.bin.normal.out"
-		partition-type-uuid = 5B193300-FC78-40CD-8002-E86C45580B47
-		offset = 1M
+		image = "work/u-boot-spl.bin.normal.out"
+		partition-type-uuid = 2E54B353-1271-4842-806F-E436D6AF6985
+		offset = 2M
 		size = 2M
 	}
 
 	partition uboot {
 		image = "work/evb_fw_payload.img"
-		partition-type-uuid = 2E54B353-1271-4842-806F-E436D6AF6985
-		offset = 3M
-		size = 5M
+		partition-type-uuid = 5B193300-FC78-40CD-8002-E86C45580B47
+		offset = 4M
+		size = 4M
 	}
 
 	partition image {