{"id":1058,"date":"2019-12-09T17:46:25","date_gmt":"2019-12-10T02:46:25","guid":{"rendered":"\/blog\/?p=1058"},"modified":"2023-09-21T09:26:45","modified_gmt":"2023-09-21T00:26:45","slug":"iptime-%ea%b3%b5%ec%9c%a0%ea%b8%b0-%ec%bb%a4%ec%8a%a4%ed%85%80-%ed%8e%8c%ec%9b%a8%ec%96%b4-%ed%94%8c%eb%9e%98%ec%8b%b1-%eb%b0%a9%eb%b2%95","status":"publish","type":"post","link":"https:\/\/hasu0707.duckdns.org\/blog\/?p=1058","title":{"rendered":"ipTIME \uacf5\uc720\uae30 \ucee4\uc2a4\ud140 \ud38c\uc6e8\uc5b4 \ud50c\ub798\uc2f1 \ubc29\ubc95"},"content":{"rendered":"<pre>\n\u25ce\ud14c\uc2a4\ud2b8 \uc7a5\ube44: ipTIME A1004 (Entry Point Address: 0x8000C150)\n\u25ce\uc2e0 \uc774\ubbf8\uc9c0: openwrt-18.06.5-ramips-mt7620-mt7620a_mt7530-squashfs-sysupgrade.bin\n\u25ce\uc900\ube44\ubb3c: HxD Hexa Editor, CRC32 \uccb4\ud06c\uc12c (<a href=\"https:\/\/emn178.github.io\/online-tools\/crc32_checksum.html\" target=\"_blank\" rel=\"noopener noreferrer\">https:\/\/emn178.github.io\/online-tools\/crc32_checksum.html<\/a>)\n\n<\/pre>\n<!-- \/wp:post-content -->\n<!-- \/wp:syntaxhighlighter\/code -->\n<!-- \/wp:syntaxhighlighter\/code -->\n\n\n<pre>\n\u203buImage Header\n\/*\n * Legacy format image header,\n * all data in network byte order (aka natural aka bigendian).\n *\/\ntypedef struct image_header {\n        uint32_t        ih_magic;       \/* Image Header Magic Number    *\/\n        uint32_t        ih_hcrc;        \/* Image Header CRC Checksum    *\/\n        uint32_t        ih_time;        \/* Image Creation Timestamp     *\/\n        uint32_t        ih_size;        \/* Image Data Size              *\/\n        uint32_t        ih_load;        \/* Data  Load  Address          *\/\n        uint32_t        ih_ep;          \/* Entry Point Address          *\/\n        uint32_t        ih_dcrc;        \/* Image Data CRC Checksum      *\/\n        uint8_t         ih_os;          \/* Operating System             *\/\n        uint8_t         ih_arch;        \/* CPU architecture             *\/\n        uint8_t         ih_type;        \/* Image Type                   *\/\n        uint8_t         ih_comp;        \/* Compression Type             *\/\n        uint8_t         ih_name[IH_NMLEN];      \/* Image Name           *\/\n} image_header_t;\n\n\u203bipTIME \uacf5\uc720\uae30\uc758 Original uImage Header \ubd80\ubd84 \n<img decoding=\"async\" alt=\"iptime_uimage_header.png\" data-file-srl=\"8093\" editor_component=\"image_link\" src=\"\/blog\/wp-content\/uploads\/cms_xe\/img0150.png\" \/>\n<\/pre>\n<!-- \/wp:syntaxhighlighter\/code -->\n<!-- \/wp:syntaxhighlighter\/code -->\n<!-- \/wp:syntaxhighlighter\/code -->\n\n\n<pre>\n\u203bOpenWRT\uc758 Original uImage Header \ubd80\ubd84\n\n<img decoding=\"async\" alt=\"openwrt_uimage_header.png\" data-file-srl=\"8095\" editor_component=\"image_link\" src=\"\/blog\/wp-content\/uploads\/cms_xe\/img0831.png\" \/><\/pre>\n<!-- \/wp:syntaxhighlighter\/code -->\n<!-- \/wp:syntaxhighlighter\/code -->\n<!-- \/wp:syntaxhighlighter\/code -->\n\n\n<p>&nbsp;<\/p>\n\n<pre>\n1. \uacf5\uc2dd \ud38c\uc6e8\uc5b4\ub97c \ub2e4\uc6b4\ub85c\ub4dc \ud558\uc5ec Hexa \uc5d0\ub514\ud130\ub85c \ubaa8\ub378\uba85\uc744 \ud655\uc778\ud55c\ub2e4. \uc544\ub798 \uadf8\ub9bc\uc740 \ud5e4\ub354\uc758 Image Name \ubc0f \ubaa8\ub378\uba85 \ubd80\ubd84\uc774\ub2e4.\n<img decoding=\"async\" alt=\"iptime_image_name.png\" data-file-srl=\"8090\" editor_component=\"image_link\" src=\"\/blog\/wp-content\/uploads\/cms_xe\/img0124.png\" \/><\/pre>\n<!-- \/wp:syntaxhighlighter\/code -->\n<!-- \/wp:syntaxhighlighter\/code -->\n<!-- \/wp:syntaxhighlighter\/code -->\n\n\n<p>&nbsp;<\/p>\n\n<pre>\n2. \uc2e0 \uc774\ubbf8\uc9c0\uc758 Image name \ubd80\ubd84\uc744 \uacf5\uc720\uae30 \ubaa8\ub378\uba85\uc73c\ub85c \ubcc0\uacbd\ud574 \uc900\ub2e4. \ub610\ud55c \ud544\uc694\ud560 \uacbd\uc6b0 <span style=\"color:#c0392b;\">Entry Point<\/span> \uac12\ub3c4 \ubcc0\uacbd\ud574 \uc900\ub2e4.\n\n3. \uc544\ub798 \uadf8\ub9bc\uacfc \uac19\uc774 \uc2e0 \uc774\ubbf8\uc9c0\uc758 uImage Header CRC Checksum \ubd80\ubd84\uc744 0\uc73c\ub85c \ucc98\ub9ac\ud558\uace0 uImage Header\ub9cc \ubcc4\ub3c4\uc758 \ubc14\uc774\ub108\ub9ac \ud30c\uc77c\ub85c \ub9cc\ub4e4\uc5b4 \uc800\uc7a5\ud55c \ud6c4 CRC32 \uccb4\ud06c\uc12c \uac12\uc744 \uc54c\uc544\ub0b8\ub2e4.\n<img decoding=\"async\" alt=\"openwrt_modify_header.png\" data-file-srl=\"8091\" editor_component=\"image_link\" src=\"\/blog\/wp-content\/uploads\/cms_xe\/img0477.png\" \/><\/pre>\n<!-- \/wp:syntaxhighlighter\/code -->\n<!-- \/wp:syntaxhighlighter\/code -->\n<!-- \/wp:syntaxhighlighter\/code -->\n\n\n<p>&nbsp;<\/p>\n\n<pre>\n4. \uc54c\uc544\ub0b8 \uccb4\ud06c\uc12c\uc744 \uc2e0 \uc774\ubbf8\uc9c0\uc758 uImage Header CRC Checksum \ubd80\ubd84\uc5d0 \uae30\ub85d\ud558\uace0 \uc800\uc7a5\ud55c\ub2e4.\n<img decoding=\"async\" alt=\"iptime_crc32_header_checksum.png\" data-file-srl=\"8092\" editor_component=\"image_link\" src=\"\/blog\/wp-content\/uploads\/cms_xe\/img0516.png\" \/><\/pre>\n<!-- \/wp:syntaxhighlighter\/code -->\n<!-- \/wp:syntaxhighlighter\/code -->\n<!-- \/wp:syntaxhighlighter\/code -->\n\n\n<p>&nbsp;<\/p>\n\n<pre>\n5. ipTIME \uacf5\uc720\uae30\uc5d0 USB-TTL \uc2dc\ub9ac\uc5bc\uc744 \uc5f0\uacb0\ud55c \ud6c4 \uc544\ub798\uc640 \uac19\uc740 \ubc29\ubc95\uc73c\ub85c \ud50c\ub798\uc2f1 \ud55c\ub2e4.\n\n<span style=\"color:#7f8c8d;\">============================================\nRalink UBoot Version: 4.1.2.0\n--------------------------------------------\nASIC 7620_MP (Port5&lt;-&gt;GigaSW)\nDRAM component: 512 Mbits DDR, width 16\nDRAM bus: 16 bit\nTotal memory: 64 MBytes\nFlash component: SPI Flash\nDate:Mar 11 2014  Time:14:18:46\n============================================\nicache: sets:512, ways:4, linesz:32 ,total:65536\ndcache: sets:256, ways:4, linesz:32 ,total:32768\n\n ##### The CPU freq = 580 MHZ ####\n estimate memory size =64 Mbytes\n#Reset_MT7530\nDisable WAN port....\n          cur reg0 =  00001040\n          new reg0 =  00001840\n\nPlease choose the operation: (t:tftp server\/b(boot now)\/f(flash test))<\/span> <span style=\"color:#c0392b;\">&larr; \uc5ec\uae30\uc11c \uc5f0\uc18d\ud558\uc5ec t\ub97c \ub204\ub978\ub2e4.<\/span>\n\n<span style=\"color:#7f8c8d;\">ETH_STATE_ACTIVE!!\nTFTP server start\nIP address: 192.168.0.1\nLoad address: 0x80100000\nReading: <\/span>..... <span style=\"color:#16a085;\">&larr; \ud50c\ub798\uc2f1 \ub300\uae30 \uc0c1\ud0dc<\/span>\n\n\uc708\ub3c4\uc6b0 \uba85\ub839\ud589 \ud504\ub86c\ud504\ud2b8\uc5d0\uc11c tftp\ub97c \uc368\uc11c \uc774\ubbf8\uc9c0\ub97c \ud50c\ub798\uc2f1 \ud55c\ub2e4.\n\n<span style=\"background-color:#f1c40f;\">tftp -i 192.168.0.1 put openwrt-18.06.5-ramips-mt7620-mt7620a_mt7530-squashfs-sysupgrade.bin<\/span>\n\n<span style=\"color:#7f8c8d;\">###########<\/span>... <span style=\"color:#2980b9;\">&larr; \ud50c\ub798\uc2f1<\/span>\n<span style=\"color:#7f8c8d;\">done\nBytes transferred = 7078067 (6c00b3 hex)\nCheck Firmware:80100000 =&gt;[ Check Alias ... [a1004],[a1004] ] -&gt;[ RUN : OK ]\nRun Firmware Found!!\nraspi_erase_write: offs:30000, count:6c00b3\nAbort: image size larger than <\/span><span style=\"color:#d35400;\">3997696<\/span><span style=\"color:#7f8c8d;\">!<\/span>\n\n<span style=\"background-color:#bdc3c7;\">\uc2e0 \uc774\ubbf8\uc9c0\uac00 3997696\ubc14\uc774\ud2b8 \ubcf4\ub2e4 \ucee4\uc11c \ud50c\ub798\uc2f1 \uc2e4\ud328. \ud06c\uae30\ub97c \uc904\uc5ec\ub3c4 sysupgrade\uac00 \uc544\ub2cc ramdisk \uc774\ubbf8\uc9c0\ub97c \uc0ac\uc6a9\ud558\uc5ec \ud50c\ub798\uc2f1\ud574\uc57c \ud560\ub4ef \ud558\ub2e4.<\/span>\n\n\ud558\uc9c0\ub9cc \uc774\ub7ec\ud55c \ubc29\ubc95\uc73c\ub85c ipTIME\uc758 u-boot \ub0b4\ubd80 \uccb4\ud06c \ud504\ub85c\uc138\uc2a4\ub97c \uc6b0\ud68c\ud558\uc5ec \ud50c\ub798\uc2f1\uc740 \uac00\ub2a5\ud558\ub2e4.\n\uc544\ub798\ub294 \uc774 \uacfc\uc815\uc744 \uc77c\uad04\ucc98\ub9ac \ud560 \uc218 \uc788\ub294 \uc2a4\ud06c\ub9bd\ud2b8 \uc774\ub2e4.\n<\/pre>\n<!-- \/wp:syntaxhighlighter\/code -->\n<!-- \/wp:syntaxhighlighter\/code -->\n<!-- \/wp:syntaxhighlighter\/code -->\n\n&nbsp;\n\n<!-- wp:syntaxhighlighter\/code {\"language\":\"bash\"} -->\n<pre class=\"wp-block-syntaxhighlighter-code\">\n#!\/bin\/bash\n######################################################################\n#\n# OpenWRT \uc774\ubbf8\uc9c0\ub97c ipTIME \uacf5\uc720\uae30\uac00 \uc778\uc2dd\ud558\ub3c4\ub85d uImage \ud5e4\ub354\ub97c \uc218\uc815\ud55c\ub2e4.\n#\n######################################################################\nIMAGE_NAME=&quot;a1004&quot;\nCMD_CRC32=&quot;crc32&quot;\nTMP_FILE=&quot;\/tmp\/__tmp_file__&quot;\n\nIMAGE_NAME_LEN=${#IMAGE_NAME}\n######################################################################\n#\n# \uc0ac\uc6a9\ubc29\ubc95 \ucd9c\ub825\n#\n######################################################################\nfunction usage() {\n  echo &quot;&quot;\n  echo &quot;$0 (bin file)&quot;\n  echo &quot;&quot;\n}\n\n######################################################################\n#\n# uImage \ud5e4\ub354\ub97c \ud328\uce58\ud55c\ub2e4.\n#\n######################################################################\nfunction patch_uimage_header() {\n  if [ ! -f ${1} ]\n  then\n    echo &quot;File not found !&quot;\n    exit 1\n  fi\n\n  # Header CRC checksum\uacfc Image Name \ucd08\uae30\ud654\n  dd if=\/dev\/zero of=${1} bs=1 seek=4 count=4 conv=notrunc\n  dd if=\/dev\/zero of=${1} bs=1 seek=32 count=32 conv=notrunc\n\n  # Image Name \uae30\ub85d\n  echo -n &quot;${IMAGE_NAME}&quot; | dd of=${1} bs=1 seek=32 conv=notrunc\n  dd if=${1} of=${TMP_FILE} bs=1 seek=0 count=64 conv=notrunc\n\n  # CRC32 checksum \uc5f0\uc0b0\n  CRC32_CHECKSUM=$(${CMD_CRC32} ${TMP_FILE})\n  echo &quot;*** CRC32 Checksum: ${CRC32_CHECKSUM}&quot;\n\n  # CRC32 checksum \uae30\ub85d\n  echo &quot;${CRC32_CHECKSUM}&quot; | xxd -r -p &gt; ${TMP_FILE}\n  dd if=${TMP_FILE} of=${1} bs=1 seek=4 count=4 conv=notrunc\n\n  rm -f ${TMP_FILE}\n  xxd -g 1 -c 16 -l 64 ${1}\n}\n\n######################################################################\n#\n# arguments\uac00 1\uacfc \ub2e4\ub974\uba74 \uc798\ubabb\ub41c \uc635\uc158 \uc9c0\uc815\uc774\ubbc0\ub85c \ub05d\ub0b8\ub2e4.\n#\n######################################################################\nif [ $# -ne 1 ]\nthen\n  usage\n  exit 1\nfi\n\necho &quot;*** Filename: ${1}&quot;\npatch_uimage_header ${1}\n<\/pre>\n<!-- \/wp:syntaxhighlighter\/code -->\n<!-- \/wp:syntaxhighlighter\/code -->\n<!-- \/wp:syntaxhighlighter\/code -->\n\n\n<!-- wp:file {\"id\":2202,\"href\":\"\/blog\/wp-content\/uploads\/cms_xe\/bin0050\"} -->\n<div class=\"wp-block-file\"><a href=\"\/blog\/wp-content\/uploads\/cms_xe\/bin0050\">crc32<\/a><a href=\"\/blog\/wp-content\/uploads\/cms_xe\/bin0050\" class=\"wp-block-file__button\" download>\ub2e4\uc6b4\ub85c\ub4dc<\/a><\/div>\n<!-- \/wp:file -->","protected":false},"excerpt":{"rendered":"<p>\u25ce\ud14c\uc2a4\ud2b8 \uc7a5\ube44: ipTIME A1004 (Entry Point Address: 0x8000C150) \u25ce\uc2e0 \uc774\ubbf8\uc9c0: openwrt-18.06.5-ramips-mt7620-mt7620a_mt7530-squashfs-sysupgrade.bin \u25ce\uc900\ube44\ubb3c: HxD Hexa Editor, CRC32 \uccb4\ud06c\uc12c (https:\/\/emn178.github.io\/online-tools\/crc32_checksum.html) \u203buImage Header \/* * Legacy format image header, * all data in network byte order (aka natural aka bigendian). *\/ typedef struct image_header { uint32_t ih_magic; \/* Image Header Magic Number *\/ uint32_t ih_hcrc; \/* Image Header [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_import_markdown_pro_load_document_selector":0,"_import_markdown_pro_submit_text_textarea":"","site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[21],"tags":[],"class_list":["post-1058","post","type-post","status-publish","format-standard","hentry","category-development_openwrt"],"_links":{"self":[{"href":"https:\/\/hasu0707.duckdns.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1058","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/hasu0707.duckdns.org\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/hasu0707.duckdns.org\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/hasu0707.duckdns.org\/blog\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/hasu0707.duckdns.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1058"}],"version-history":[{"count":0,"href":"https:\/\/hasu0707.duckdns.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1058\/revisions"}],"wp:attachment":[{"href":"https:\/\/hasu0707.duckdns.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1058"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/hasu0707.duckdns.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1058"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/hasu0707.duckdns.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1058"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}