Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
en:c2_adjust_ddrclk [2016/09/22 19:25] joy.cho [DDR Clock Adjustment] |
en:c2_adjust_ddrclk [2017/07/06 16:18] (current) codewalker [3. Update Guide (2) for Android] |
||
---|---|---|---|
Line 3: | Line 3: | ||
* [[en:c2_adjust_ddrclk#update_guide_1_for_ubuntu|Update Guide (1) for Ubuntu ]] | * [[en:c2_adjust_ddrclk#update_guide_1_for_ubuntu|Update Guide (1) for Ubuntu ]] | ||
* [[en:c2_adjust_ddrclk#update_guide_2_for_android|Update Guide (2) for Android]] | * [[en:c2_adjust_ddrclk#update_guide_2_for_android|Update Guide (2) for Android]] | ||
- | * How to confirm if bl1 boot with the new DDR clock has been updated well | + | * [[en:c2_adjust_ddrclk#how_to_confirm_bl1_boot_with_the_new_ddr_clock_has_been_updated_well|How to confirm bl1 boot of the new DDR clock has been updated well]] |
==== 1. Brief DDR spec. of ODROID-C2 and available DDR clock sets ==== | ==== 1. Brief DDR spec. of ODROID-C2 and available DDR clock sets ==== | ||
Line 28: | Line 28: | ||
<code> | <code> | ||
- | $ wget http://dn.odroid.com/S905/BootLoader/ODROID-C2/c2_update_ddrclk.sh | + | $ wget https://dn.odroid.com/S905/BootLoader/ODROID-C2/c2_update_ddrclk.sh |
$ chmod +x ./c2_update_ddrclk.sh | $ chmod +x ./c2_update_ddrclk.sh | ||
</code> | </code> | ||
Line 45: | Line 45: | ||
== c2_update_ddrclk.sh == | == c2_update_ddrclk.sh == | ||
- | Here is the script, c2_update_ddrclk.sh. | + | Here is c2_update_ddrclk.sh. |
<file sh c2_update_ddrclk.sh> | <file sh c2_update_ddrclk.sh> | ||
#!/bin/sh | #!/bin/sh | ||
Line 116: | Line 116: | ||
This section is for Android. | This section is for Android. | ||
- | First, download **c2_update_ddrclk_android.sh** as following. | ||
- | Run the application, **Terminal Emulator** on your C2 board. | + | Run Browser and open https://dn.odroid.com/S905/BootLoader/ODROID-C2/ |
- | <code> | + | |
- | # su | + | |
- | # wget http://dn.odroid.com/S905/BootLoader/ODROID-C2/c2_update_ddrclk_android.sh | + | |
- | $ chmod 755 ./c2_update_ddrclk.sh | + | |
- | </code> | + | |
- | The usage of c2_update_ddrclk_android.sh is as following. | + | {{:en:screenshot_20170630-135248.png?nolink|}} |
- | <code> | + | |
- | Usage : ./c2_update_ddrclk_android.sh < DDR_CLK (1104 | 912 | 792 | 408) > | + | |
- | </code> | + | |
- | After updating, you must run **reboot** the system. | + | Download files. |
- | <code> | + | updatepackage-odroidc2-ddr-408.zip |
- | $ ./c2_update_ddrclk.sh 1104 | + | |
- | $ reboot | + | |
- | </code> | + | |
- | == c2_update_ddrclk_android.sh == | + | updatepackage-odroidc2-ddr-792.zip |
- | Here is the script, c2_update_ddrclk_android.sh. | + | |
- | <file sh c2_update_ddrclk_android.sh> | + | |
- | #!/bin/sh | + | |
- | # | + | |
- | # Copyright (C) 2016 Hardkernel Co,. Ltd | + | |
- | # Joy Cho <joy.cho@hardkernel.com> | + | |
- | # | + | |
- | # SPDX-License-Identifier: GPL-2.0+ | + | |
- | # | + | |
- | # update ddr clock for Android | + | |
- | # | + | |
- | if [ -z $1 ]; then | + | updatepackage-odroidc2-ddr-912.zip |
- | echo "Usage ./c2_update_ddrclk_android.sh <DDR_CLK (1104 | 912 | 792 | 408)>" | + | |
- | exit 1 | + | |
- | fi | + | |
- | if [ $1 != 1104 -a $1 != 912 -a $1 != 792 -a $1 != 408 ]; then | + | updatepackage-odroidc2-ddr-1104.zip |
- | echo "Wrong DDRCLK! Usage ./c2_update_ddrclk_android.sh <DDR_CLK (1104 | 912 | 792 | 408)>" | + | |
- | exit 1 | + | |
- | fi | + | |
- | DDRCLK=$1 | + | Run ODROID Utility app. |
+ | Click menu and Select "Package install from storage" | ||
- | bl1=/bl1.bin.hardkernel.$DDRCLK | + | {{:en:screenshot_20170630-134124.png?nolink|}} |
- | tmp=/temp.bin | + | |
- | ##### 1. check the current DDR clock #### | + | Select "File Manager" -> "Download" folder |
- | dd if=/dev/block/mmcblk0 of=$tmp bs=1 count=2 skip=43530 | + | |
- | CUR_DDRCLK=$(hexdump -e '"%d"' $tmp) | + | |
- | if [ $DDRCLK -eq $CUR_DDRCLK ]; then | + | {{:en:screenshot_20170630-134134.png?nolink|}} |
- | echo "current ddr clk is already set as $DDRCLK MHz" | + | |
- | exit 1 | + | |
- | fi | + | |
- | echo "existing DDR clk is $CUR_DDRCLK" | + | Select updatepackage-odroidc2-ddr-xxx.zip wanted DDR clock. |
- | ##### 2. download bl1 binary from dn server #### | + | {{:en:screenshot_20170630-134141.png?nolink|}} |
- | wget http://dn.odroid.com/S905/BootLoader/ODROID-C2/bl1.bin.hardkernel.$DDRCLK | + | |
- | if [ ! -f $bl1 ];then | + | |
- | echo "error: bl1 binary doesn't exist" | + | |
- | exit 1 | + | |
- | fi | + | |
- | dd if=$bl1 of=/dev/block/mmcblk0 bs=1 count=442 | + | Process "recovery" |
- | dd if=$bl1 of=/dev/block/mmcblk0 bs=512 skip=1 seek=1 | + | |
- | echo "Update done!" | + | {{:en:screenshot_20170630-135845.png?nolink|}} |
- | ##### 3. check the updated DDR clock #### | + | current DDR clock. |
- | echo "Now let's check if update has been completed..." | + | |
- | dd if=/dev/block/mmcblk0 of=$tmp bs=1 count=2 skip=43530 | + | {{:en:screenshot_20170706-073355.png?nolink|}} |
- | CUR_DDRCLK=$(hexdump -e '"%d"' $tmp) | + | ==== 4. How to confirm bl1 boot with the new DDR clock has been updated well ==== |
- | echo "updated DDR clk is $CUR_DDRCLK" | + | |
- | + | ||
- | if [ $DDRCLK != $CUR_DDRCLK ]; then | + | |
- | echo "updating DDR clock FAIL!!! Expected : $DDRCLK, Updated : $CUR_DDRCLK" | + | |
- | else | + | |
- | echo "updating DDR clock has been completed!!!" | + | |
- | fi | + | |
- | + | ||
- | rm $bl1 | + | |
- | rm $tmp | + | |
- | </file> | + | |
- | ==== 4. How to confirm if bl1 boot with the new DDR clock has been updated well ==== | + | |
Wht the output message while updating with c2_update_ddrclk.sh, you can confirm if update is done with the new DDR clock you choose as following. | Wht the output message while updating with c2_update_ddrclk.sh, you can confirm if update is done with the new DDR clock you choose as following. |