Using a Partition Parameter
When you roll out the same Custom Partition contents to many devices, you may still want the application to use different data or options on some of the devices. Partition parameters allow you to do this.
This is how you add a partition parameter to our "Hello World" program.
Setting a Partition Parameter in the Setup
Go to System > Firmware Customization > Custom Partition > Partition.
In the Partitions Parameters list, click .
In the dialog that opens, enter
NAME
as the Name andAlice
as the Value. Click OK.Click Apply.
Getting the Value of a Partition Parameter
This is the command line for getting or setting a Partition Parameter's value:
customparam [get|set] PARAMETER_NAME [PARAMETER_VALUE]
Change the
hello.sh
script to use this command to get the parameter value:#!/bin/bash
gtkmessage -m "Hello $(customparam get NAME)!" -t "Hello" -o "Close"Click the Hello Application desktop icon.
You should see the following: