FX30 MTD partitioning update to increase rootfs size

Hello everyone,

I would like to add packages to the rootfs of my FX30 but the rootfs size is constrained to 32MB.
Did anyone manage to change the partitioning scheme of MTD ?

My idea would be to lower the size of the USER partition and therefore to increase the size of the ROOTFS partition but MTD paritioning is given to Linux via the kernel command line. The kernel command line is built within the LK package which takes the partitioning details from somewhere…

Any idea would be really appreciated,
Kind regards,
Gautier.

@rkirk, are you able to answer Gautier’s question?

Thanks,
Chris

Hi @cchenry, @nM_GHa,

There’s a good description here: Flash partitions

I’d just emphasize that this is a dangerous operation. As @amitchell mentions, it’s destructive and erases partitions if the start address changes, or size is reduced. It’s also very important that you don’t reduce the LK or Kernel below what you need. The AT command will not be available to revert the issue, if the system no longer boots after the change. Your plan to increase rootfs and decrease user sounds safe though.

As you allude to, LK is providing this info to the kernel. But if you remap the partitions there, Sierra CWE download will no longer work for the affected partitions, because the original partition table, used for flash programming from SBL (System Bootloader) will not be updated.

These considerations are the reason the command is not currently supported on the WP76xx/WP77xx variants.

Ryan

Hello Ryan,

I do thank your for your reply. Before queryring the forum I had a look to the link you posted. I tested the AT!APPPARTCHG command but as far as I remember it has no effect on the FX30. Do you confirm it cannot be used on WP8548 ?

Shall I understand that there is no way now to increase the rootfs size?

Kind regards,
Gautier

Hi Gautier,

I think it does work on all WP8548 releases, including the version included in FX30. I tested it out quickly, but on a standalone WP8548 on MangOH:
Before:
root@swi-mdm9x15:~# cat /proc/mtd
dev: size erasesize name
mtd0: 00100000 00020000 "bootloader"
mtd1: 01400000 00020000 "kernel"
mtd2: 03140000 00020000 "rootfs"
mtd3: 02780000 00020000 "user0"
mtd4: 08b80000 00020000 "user1"
mtd5: 00500000 00020000 "user2"
mtd6: 00200000 00020000 "user3"

at!apppartchg?
Total APP partition size: 253952 kB
APPSBL,PAD,APPS,PAD,SYSTEM,PAD,USERDATA,PAD,USERAPP,PAD =
896,128,20096,384,50048,384,37888,2560,140288,1280
OK

I shifted 12800 from user1 into both rootfs and user0:
at!apppartchg=896,128,20096,384,62848,384,50688,2560,114688,1280
OK

root@swi-mdm9x15:~# cat /proc/mtd
dev: size erasesize name
mtd0: 00100000 00020000 "bootloader"
mtd1: 01400000 00020000 "kernel"
mtd2: 03dc0000 00020000 "rootfs"
mtd3: 03400000 00020000 "user0"
mtd4: 07280000 00020000 "user1"
mtd5: 00500000 00020000 "user2"
mtd6: 00200000 00020000 "user3"

Are you able to observe the similar result?

Ryan

Hello Ryan,

I tested the AT!APPPARTCHG? command on the /dev/ttyAT character device and the system only responds with ERROR…

Other commands work properly such as:

  • AT+GMR
    SWI9X15Y_07.12.09.00 r34123 CARMD-EV-FRMWR1 2017/04/26 23:34:19
  • AT!PACKAGE?
    1103214_9906645_FX30_07.11.22.00_00_AirLink_001.002_000
  • AT!PRIID?
    PRI Part Number: 9906645
    Revision: 01.02
    Carrier PRI: 9999999_9904559_SWI9X15Y_07.12.09.00_00_GENERIC_001.033_000
    OK
  • AT!PATEMP?
    Temp state: Normal
    Temperature: 30 degC

I don’t know if this brand new FX30 is “password protected” by default, do you think it could be the cause of such behavior ?

My MTD partitions correspond to your defaults.

Best regards,
Gautier.

Hi Gautier,

I should have specified, the command is Level 2 password protected. On a stock WP8548, that would require AT!ENTERCND=“A710” first, to access both the query and set operations.

Ryan

Hi Ryan,

Thank you very much :raised_hands: !

I was able to unlock the module with AT!ENTERCND="A710", as you pointed it out.
Now, executing AT!APPPARTCHG? gives me the same output as your.

Therefore, I am going to update partition sizes as suggested.

:information_source: Hint for other users who may have the same issue:
DO NOT copy-paste formatted double-quotation marks ("…")
This leads to wrong characters and mis-interpreted command line.
=> It is better to type the command manually

Again, Ryan, I thank you for your help.
Best regards,
Gautier.