DISCLAIMER, wrong usage of ntx_hwconfig can >> BRICK << your device.
That being said, this is a small tutorial on how to use ntx_hwconfig.
In the example I am updating the Boot Options to enable boot from external mmc/sd card.
Its just a random option I picked because it happens to be a good example.
1. Update HWconfig Device Node first, (this fixes: [WARNING]Config version too old)
This updates your device configuration to match the version of the ntx_hwconfig tool. Do not skip this step.
-s : file name is system device node (seeksize=524288) .
* devicenode = /dev/mmcblk0 (internal Multi Media/SD card)
* devicenode = /dev/mmcblk1 (external Multi Media/SD card)
-u : upgrade config format .
2. Get the BootOpt field value in human readable format
-s : file name is system device node (seeksize=524288) .
* devicenode = /dev/mmcblk0 (internal Multi Media/SD card)
* devicenode = /dev/mmcblk1 (external Multi Media/SD card)
-a [Action type] : [hwcfg(default)|cmd2|cmd_test]
* action type = hwcfg
* field value = BootOpt
Result Good: [47] BootOpt=ESD:OFF
Result Bad (goto step 1): [47] BootOpt='[+] 0x00'
3. Get the BootOpt field value (digital)
same as above only we want the digital field value
-d : force set/get field value as digital .
Result: [47] BootOpt=0x00
4. Set the BootOpt field value to 1 (digital)
same as above only we want to 'set' the digital field value
1 = the value we want to set
write = the action we want to perform
-f : force write hardware setting without protection .
Result: Hw config field "BootOpt" set as "1" success !!
5. Get the BootOpt value, to see if its updated.
Result: [47] BootOpt=0x01
6. Get the BootOpt field value in human readable format
Result: [47] BootOpt=ESD:ON
Enjoy
That being said, this is a small tutorial on how to use ntx_hwconfig.
In the example I am updating the Boot Options to enable boot from external mmc/sd card.
Its just a random option I picked because it happens to be a good example.
1. Update HWconfig Device Node first, (this fixes: [WARNING]Config version too old)
This updates your device configuration to match the version of the ntx_hwconfig tool. Do not skip this step.
-s : file name is system device node (seeksize=524288) .
* devicenode = /dev/mmcblk0 (internal Multi Media/SD card)
* devicenode = /dev/mmcblk1 (external Multi Media/SD card)
-u : upgrade config format .
Code:
ntx_hwconfig -u -s /dev/mmcblk0
2. Get the BootOpt field value in human readable format
-s : file name is system device node (seeksize=524288) .
* devicenode = /dev/mmcblk0 (internal Multi Media/SD card)
* devicenode = /dev/mmcblk1 (external Multi Media/SD card)
-a [Action type] : [hwcfg(default)|cmd2|cmd_test]
* action type = hwcfg
* field value = BootOpt
Code:
ntx_hwconfig -s /dev/mmcblk0 -a hwcfg BootOpt
Result Bad (goto step 1): [47] BootOpt='[+] 0x00'
3. Get the BootOpt field value (digital)
same as above only we want the digital field value
-d : force set/get field value as digital .
Code:
ntx_hwconfig -d -s /dev/mmcblk0 -a hwcfg BootOpt
4. Set the BootOpt field value to 1 (digital)
same as above only we want to 'set' the digital field value
1 = the value we want to set
write = the action we want to perform
-f : force write hardware setting without protection .
Code:
ntx_hwconfig -d -s /dev/mmcblk0 -a hwcfg BootOpt 1 write -f
5. Get the BootOpt value, to see if its updated.
Code:
ntx_hwconfig -d -s /dev/mmcblk0 -a hwcfg BootOpt
6. Get the BootOpt field value in human readable format
Code:
ntx_hwconfig -s /dev/mmcblk0 BootOpt
Enjoy