Open bam80 opened 5 years ago
You have to change partition size inside device tree(s), not just size of actual partition. Search github for dtbSplit or dtbTool scripts, someone reverse-engineered aml-s version of dtbTool to split and combine DTBs from/into dtb.img
@Stane1983 If I understand you right I've already done all the needed:
--- a/arch/arm/boot/dts/amlogic/partition_mbox_normal_P_32.dtsi
+++ b/arch/arm/boot/dts/amlogic/partition_mbox_normal_P_32.dtsi
@@ -102,7 +102,7 @@
system:system
{
pname = "system";
- size = <0x0 0x50000000>;
+ size = <0x0 0x46000000>;
mask = <1>;
};
product:product{
@@ -113,7 +113,7 @@
cache:cache
{
pname = "cache";
- size = <0x0 0x46000000>;
+ size = <0x0 0x25000000>;
mask = <2>;
};
data:data
--- a/SWG2001A/BoardConfig.mk
+++ b/SWG2001A/BoardConfig.mk
@@ -83,7 +83,7 @@ BOARD_HAVE_FLASHLIGHT := false
BOARD_HAVE_HW_JPEGENC := true
TARGET_USERIMAGES_USE_EXT4 := true
-BOARD_USERDATAIMAGE_PARTITION_SIZE := 576716800
+BOARD_USERDATAIMAGE_PARTITION_SIZE := 4294967296
BOARD_FLASH_BLOCK_SIZE := 4096
BOARD_VENDORIMAGE_FILE_SYSTEM_TYPE := ext4
@@ -112,7 +112,7 @@ BOARD_VENDORIMAGE_PARTITION_SIZE := 268435456
BOARD_ODMIMAGE_PARTITION_SIZE := 134217728
BOARD_PRODUCTIMAGE_PARTITION_SIZE := 134217728
else
-BOARD_SYSTEMIMAGE_PARTITION_SIZE := 1342177280
+BOARD_SYSTEMIMAGE_PARTITION_SIZE := 1174405120
BOARD_VENDORIMAGE_PARTITION_SIZE := 268435456
BOARD_ODMIMAGE_PARTITION_SIZE := 134217728
BOARD_PRODUCTIMAGE_PARTITION_SIZE := 134217728
Nevertheless, the tool didn't flash the DTB changes.
Again, the same aml_upgrade_package.img flashed fine with USB Burning Tool, so I assume there is problem with this tool. Sorry if I misunderstand something.
@Stane1983 any thoughts?
DTB seem just doesn't flashed for some reason. If I flash it afterwards (with fastboot) - all is OK
Can it be due to this condition: "$parts" != "dtb"
?
https://github.com/Stane1983/aml-linux-usb-burn/blob/257b808ba8550db023875b139db2eca9d11d55a4/aml-flash#L771
All files here are collected from http://openlinux.amlogic.com:8000/download/A113/Tool/flash-tool-v4.7/flash-tool/ as mentioned in readme. I don't have time anymore to debug this script, you can fork it and continue maintaining it if you wish.
Ok, I'll try to fix it.
Seems this part from http://openlinux.amlogic.com:8000/download/A113/DOC/Amlogic_update_usb_tool_user_guide.pdf is skipped in the script due aforementioned "$parts" != "dtb"
condition:
3.3.1 Commonly way to upgrading dtb
Step 1. Download dtb.img to memory
update mwrite z:\xxx\p200\dtb.img mem 0x1080000 normal
Step 2. Using flash command to updating the dtb.img
update bulkcmd "store dtb write 0x1080000"
3.3.2 Newly way to upgrading dtb
If your uboot code is the latest version, try this combined command to upgrading dtb:
update partition _aml_dtb z:/xxx/dtb.img
I changed partition sizes in aml_upgrade_package.img, but after flashing it, bootloader still sees old partition table - system and cache sizes are wrong:
In the result box can't boot and resets to USB Burning mode:
Flashing the same image with official USB Burning Tool has no problem.