View Single Post
Old 04-07-2019, 06:08 AM   #1
BloodRagg
Zealot
BloodRagg ought to be getting tired of karma fortunes by now.BloodRagg ought to be getting tired of karma fortunes by now.BloodRagg ought to be getting tired of karma fortunes by now.BloodRagg ought to be getting tired of karma fortunes by now.BloodRagg ought to be getting tired of karma fortunes by now.BloodRagg ought to be getting tired of karma fortunes by now.BloodRagg ought to be getting tired of karma fortunes by now.BloodRagg ought to be getting tired of karma fortunes by now.BloodRagg ought to be getting tired of karma fortunes by now.BloodRagg ought to be getting tired of karma fortunes by now.BloodRagg ought to be getting tired of karma fortunes by now.
 
BloodRagg's Avatar
 
Posts: 128
Karma: 842196
Join Date: Feb 2019
Device: none
Talking NTX hwconfig tutorial, updating values

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 .

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 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 .

Code:
ntx_hwconfig -d -s /dev/mmcblk0 -a hwcfg BootOpt
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 .

Code:
ntx_hwconfig -d -s /dev/mmcblk0 -a hwcfg BootOpt 1 write -f
Result: Hw config field "BootOpt" set as "1" success !!


5. Get the BootOpt value, to see if its updated.
Code:
ntx_hwconfig -d -s /dev/mmcblk0 -a hwcfg BootOpt
Result: [47] BootOpt=0x01


6. Get the BootOpt field value in human readable format

Code:
ntx_hwconfig -s /dev/mmcblk0 BootOpt
Result: [47] BootOpt=ESD:ON


Enjoy

Last edited by BloodRagg; 04-07-2019 at 07:06 AM. Reason: Fixed some typo;s
BloodRagg is offline   Reply With Quote