{"id":876,"date":"2018-04-16T15:58:44","date_gmt":"2018-04-17T00:58:44","guid":{"rendered":"\/blog\/?p=876"},"modified":"2023-09-21T09:37:34","modified_gmt":"2023-09-21T00:37:34","slug":"openwrt-%eb%b9%8c%eb%93%9c%ed%99%98%ea%b2%bd-%ea%b5%ac%ec%b6%95-ubuntu","status":"publish","type":"post","link":"https:\/\/hasu0707.duckdns.org\/blog\/?p=876","title":{"rendered":"OpenWRT \ube4c\ub4dc\ud658\uacbd \uad6c\ucd95 (Ubuntu)"},"content":{"rendered":"\n<div style=\"\"><div style=\"\"><span style=\"font-size: 12px; font-family: GulimChe, &quot;Courier New&quot;, &quot;Lucida Console&quot;;\">1. SDK \ub2e4\uc6b4\ub85c\ub4dc (toolchain \ud3ec\ud568)<\/span><\/div><div style=\"\"><span style=\"font-size: 12px;\"><br \/><\/span><\/div><div style=\"\"><span style=\"font-size: 12px; font-family: GulimChe, &quot;Courier New&quot;, &quot;Lucida Console&quot;;\">http:\/\/downloads.openwrt.org\/ \uc5d0\uc11c \uc6d0\ud558\ub294 target\uc5d0 \ub300\ud55c SDK\ub97c \ub2e4\uc6b4\ub85c\ub4dc.<\/span><\/div><div style=\"\"><span style=\"font-size: 12px;\"><br \/><\/span><\/div><div style=\"\"><span style=\"font-size: 12px; font-family: GulimChe, &quot;Courier New&quot;, &quot;Lucida Console&quot;;\">\uc608) bcm53xx target\uc5d0 \ub300\ud55c SDK \ub2e4\uc6b4\ub85c\ub4dc \ub9c1\ud06c<\/span><\/div><div style=\"\"><span style=\"font-size: 12px; font-family: GulimChe, &quot;Courier New&quot;, &quot;Lucida Console&quot;;\">http:\/\/downloads.openwrt.org\/releases\/17.01.4\/targets\/bcm53xx\/generic\/lede-sdk-17.01.4-bcm53xx_gcc-5.4.0_musl-1.1.16_eabi.Linux-x86_64.tar.xz<\/span><\/div><div style=\"\"><span style=\"font-size: 12px;\"><br \/><\/span><\/div><div style=\"\"><span style=\"font-size: 12px; font-family: GulimChe, &quot;Courier New&quot;, &quot;Lucida Console&quot;;\">\ub2e4\uc6b4 \ub85c\ub4dc \ud6c4 \uc544\ub798\uc758 \uba85\ub839\uc73c\ub85c \uc555\ucd95\uc744 \ud574\uc81c\ud55c\ub2e4.<\/span><\/div><div style=\"\"><span style=\"font-size: 12px;\"><br \/><\/span><\/div><div style=\"\"><span style=\"font-size: 12px; font-family: GulimChe, &quot;Courier New&quot;, &quot;Lucida Console&quot;;\">export SDKFILE=lede-sdk-17.01.4-bcm53xx_gcc-5.4.0_musl-1.1.16_eabi.Linux-x86_64<\/span><\/div><div style=\"\"><span style=\"font-size: 12px; font-family: GulimChe, &quot;Courier New&quot;, &quot;Lucida Console&quot;;\">tar xJf ${SDKFILE}.tar.xz<\/span><\/div><div style=\"\"><span style=\"font-size: 12px; font-family: GulimChe, &quot;Courier New&quot;, &quot;Lucida Console&quot;;\">ln -s ${SDKFILE}\/ sdk<\/span><\/div><div style=\"\"><span style=\"font-size: 12px; font-family: GulimChe, &quot;Courier New&quot;, &quot;Lucida Console&quot;;\">rm -f ${SDKFILE}.tar.xz<\/span><\/div><div style=\"\"><span style=\"font-size: 12px;\"><br \/><\/span><\/div><div style=\"\"><span style=\"font-size: 12px; font-family: GulimChe, &quot;Courier New&quot;, &quot;Lucida Console&quot;;\">2. \ud658\uacbd\ubcc0\uc218 \uc124\uc815<\/span><\/div><div style=\"\"><span style=\"font-size: 12px;\"><br \/><\/span><\/div><div style=\"\"><span style=\"font-size: 12px; font-family: GulimChe, &quot;Courier New&quot;, &quot;Lucida Console&quot;;\">~\/.profile\uc5d0 \ucd94\uac00\ud55c\ub2e4.<\/span><\/div><div style=\"\"><span style=\"font-size: 12px;\"><br \/><\/span><\/div><div style=\"\"><span style=\"font-size: 12px; font-family: GulimChe, &quot;Courier New&quot;, &quot;Lucida Console&quot;;\">export OPENWRT_ARCH=arm<\/span><\/div><div style=\"\"><span style=\"font-size: 12px; font-family: GulimChe, &quot;Courier New&quot;, &quot;Lucida Console&quot;;\">export OPENWRT_TARGET=bcm53xx<\/span><\/div><div style=\"\"><span style=\"font-size: 12px; font-family: GulimChe, &quot;Courier New&quot;, &quot;Lucida Console&quot;;\">export OPENWRT_BASE_DIR=\/work<\/span><\/div><div style=\"\"><span style=\"font-size: 12px;\"><br \/><\/span><\/div><div style=\"\"><span style=\"font-size: 12px; font-family: GulimChe, &quot;Courier New&quot;, &quot;Lucida Console&quot;;\">export OPENWRT_SRC_DIR=${OPENWRT_BASE_DIR}\/openwrt<\/span><\/div><div style=\"\"><span style=\"font-size: 12px; font-family: GulimChe, &quot;Courier New&quot;, &quot;Lucida Console&quot;;\">export STAGING_DIR=${OPENWRT_BASE_DIR}\/sdk\/staging_dir\/toolchain-arm_cortex-a9_gcc-5.4.0_musl-1.1.16_eabi<\/span><\/div><div style=\"\"><span style=\"font-size: 12px; font-family: GulimChe, &quot;Courier New&quot;, &quot;Lucida Console&quot;;\">export PATH=${PATH}:${HOME}\/bin:${STAGING_DIR}\/bin:${OPENWRT_BASE_DIR}\/fmk<\/span><\/div><div style=\"\"><span style=\"font-size: 12px; font-family: GulimChe, &quot;Courier New&quot;, &quot;Lucida Console&quot;;\">export AR=${STAGING_DIR}\/bin\/${OPENWRT_ARCH}-openwrt-linux-ar<\/span><\/div><div style=\"\"><span style=\"font-size: 12px; font-family: GulimChe, &quot;Courier New&quot;, &quot;Lucida Console&quot;;\">export AS=${STAGING_DIR}\/bin\/${OPENWRT_ARCH}-openwrt-linux-as<\/span><\/div><div style=\"\"><span style=\"font-size: 12px; font-family: GulimChe, &quot;Courier New&quot;, &quot;Lucida Console&quot;;\">export LD=${STAGING_DIR}\/bin\/${OPENWRT_ARCH}-openwrt-linux-ld<\/span><\/div><div style=\"\"><span style=\"font-size: 12px; font-family: GulimChe, &quot;Courier New&quot;, &quot;Lucida Console&quot;;\">export NM=${STAGING_DIR}\/bin\/${OPENWRT_ARCH}-openwrt-linux-gcc-nm<\/span><\/div><div style=\"\"><span style=\"font-size: 12px; font-family: GulimChe, &quot;Courier New&quot;, &quot;Lucida Console&quot;;\">export CC=${OPENWRT_ARCH}-openwrt-linux-gcc<\/span><\/div><div style=\"\"><span style=\"font-size: 12px; font-family: GulimChe, &quot;Courier New&quot;, &quot;Lucida Console&quot;;\">export CPP=${OPENWRT_ARCH}-openwrt-linux-cpp<\/span><\/div><div style=\"\"><span style=\"font-size: 12px; font-family: GulimChe, &quot;Courier New&quot;, &quot;Lucida Console&quot;;\">export GCC=${OPENWRT_ARCH}-openwrt-linux-gcc<\/span><\/div><div style=\"\"><span style=\"font-size: 12px; font-family: GulimChe, &quot;Courier New&quot;, &quot;Lucida Console&quot;;\">export CXX=${OPENWRT_ARCH}-openwrt-linux-c++<\/span><\/div><div style=\"\"><span style=\"font-size: 12px; font-family: GulimChe, &quot;Courier New&quot;, &quot;Lucida Console&quot;;\">export RANLIB=${OPENWRT_ARCH}-openwrt-linux-ranlib<\/span><\/div><div style=\"\"><span style=\"font-size: 12px; font-family: GulimChe, &quot;Courier New&quot;, &quot;Lucida Console&quot;;\">export LDFLAGS=\"-static\"<\/span><\/div><div style=\"\"><span style=\"font-size: 12px; font-family: GulimChe, &quot;Courier New&quot;, &quot;Lucida Console&quot;;\">export CFLAGS=\"-Os -s\"<\/span><\/div><div style=\"\"><span style=\"font-size: 12px;\"><br \/><\/span><\/div><div style=\"\"><span style=\"font-size: 12px; font-family: GulimChe, &quot;Courier New&quot;, &quot;Lucida Console&quot;;\">3. ubuntu\uc5d0 \ud544\uc694\ud55c \ud328\ud0a4\uc9c0 \uc124\uce58<\/span><\/div><div style=\"\"><span style=\"font-size: 12px; font-family: GulimChe, &quot;Courier New&quot;, &quot;Lucida Console&quot;;\">apt-get update<\/span><\/div><div style=\"\"><span style=\"font-size: 12px; font-family: GulimChe, &quot;Courier New&quot;, &quot;Lucida Console&quot;;\">apt-get install -y git-core build-essential libssl-dev libncurses5-dev unzip gawk zlib1g-dev ccache gettext xsltproc wget liblzma-dev python-magic<\/span><\/div><div style=\"\"><span style=\"font-size: 12px; font-family: GulimChe, &quot;Courier New&quot;, &quot;Lucida Console&quot;;\">apt-get install -y binwalk<\/span><\/div><div style=\"\"><span style=\"font-size: 12px; font-family: GulimChe, &quot;Courier New&quot;, &quot;Lucida Console&quot;;\">apt-get install -y qemu<\/span><\/div><div style=\"\"><span style=\"font-size: 12px; font-family: GulimChe, &quot;Courier New&quot;, &quot;Lucida Console&quot;;\">apt-get install -y subversion mercurial<\/span><\/div><div style=\"\"><span style=\"font-size: 12px;\"><br \/><\/span><\/div><div style=\"\"><span style=\"font-size: 12px; font-family: GulimChe, &quot;Courier New&quot;, &quot;Lucida Console&quot;;\">4. openwrt \uc18c\uc2a4\ucf54\ub4dc \uc5c5\ub370\uc774\ud2b8<\/span><\/div><div style=\"\"><span style=\"font-size: 12px; font-family: GulimChe, &quot;Courier New&quot;, &quot;Lucida Console&quot;;\">unset AR AS LD NM CC CP GCC CXX RANLIB LDFLAGS CFLAGS<\/span><\/div><div style=\"\"><span style=\"font-size: 12px; font-family: GulimChe, &quot;Courier New&quot;, &quot;Lucida Console&quot;;\">git clone https:\/\/github.com\/openwrt\/openwrt.git<\/span><\/div><div style=\"\"><span style=\"font-size: 12px; font-family: GulimChe, &quot;Courier New&quot;, &quot;Lucida Console&quot;;\">cd openwrt<\/span><\/div><div style=\"\"><span style=\"font-size: 12px; font-family: GulimChe, &quot;Courier New&quot;, &quot;Lucida Console&quot;;\">.\/scripts\/feeds update -a<\/span><\/div><div style=\"\"><span style=\"font-size: 12px; font-family: GulimChe, &quot;Courier New&quot;, &quot;Lucida Console&quot;;\">.\/scripts\/feeds install -a<\/span><\/div><div style=\"\"><span style=\"font-size: 12px; font-family: GulimChe, &quot;Courier New&quot;, &quot;Lucida Console&quot;;\">#make menuconfig<\/span><\/div><div style=\"\"><span style=\"font-size: 12px;\"><br \/><\/span><\/div><div style=\"\"><span style=\"font-size: 12px; font-family: GulimChe, &quot;Courier New&quot;, &quot;Lucida Console&quot;;\">5. Firmware Mod Kit \uc124\uce58<\/span><\/div><div style=\"\"><span style=\"font-size: 12px; font-family: GulimChe, &quot;Courier New&quot;, &quot;Lucida Console&quot;;\">unset AR AS LD NM CC CP GCC CXX RANLIB LDFLAGS CFLAGS<\/span><\/div><div style=\"\"><span style=\"font-size: 12px; font-family: GulimChe, &quot;Courier New&quot;, &quot;Lucida Console&quot;;\">git clone https:\/\/github.com\/rampageX\/firmware-mod-kit.git<\/span><\/div><div style=\"\"><span style=\"font-size: 12px; font-family: GulimChe, &quot;Courier New&quot;, &quot;Lucida Console&quot;;\">mv firmware-mod-kit fmk<\/span><\/div><div style=\"\"><span style=\"font-size: 12px; font-family: GulimChe, &quot;Courier New&quot;, &quot;Lucida Console&quot;;\">cd fmk\/src<\/span><\/div><div style=\"\"><span style=\"font-size: 12px; font-family: GulimChe, &quot;Courier New&quot;, &quot;Lucida Console&quot;;\">.\/configure<\/span><\/div><div style=\"\"><span style=\"font-size: 12px; font-family: GulimChe, &quot;Courier New&quot;, &quot;Lucida Console&quot;;\">make<\/span><\/div><div style=\"\"><span style=\"font-size: 12px; font-family: GulimChe, &quot;Courier New&quot;, &quot;Lucida Console&quot;;\">cd ..\/..\/<\/span><\/div><\/div>\n","protected":false},"excerpt":{"rendered":"<p>1. SDK \ub2e4\uc6b4\ub85c\ub4dc (toolchain \ud3ec\ud568) http:\/\/downloads.openwrt.org\/ \uc5d0\uc11c \uc6d0\ud558\ub294 target\uc5d0 \ub300\ud55c SDK\ub97c \ub2e4\uc6b4\ub85c\ub4dc. \uc608) bcm53xx target\uc5d0 \ub300\ud55c SDK \ub2e4\uc6b4\ub85c\ub4dc \ub9c1\ud06c http:\/\/downloads.openwrt.org\/releases\/17.01.4\/targets\/bcm53xx\/generic\/lede-sdk-17.01.4-bcm53xx_gcc-5.4.0_musl-1.1.16_eabi.Linux-x86_64.tar.xz \ub2e4\uc6b4 \ub85c\ub4dc \ud6c4 \uc544\ub798\uc758 \uba85\ub839\uc73c\ub85c \uc555\ucd95\uc744 \ud574\uc81c\ud55c\ub2e4. export SDKFILE=lede-sdk-17.01.4-bcm53xx_gcc-5.4.0_musl-1.1.16_eabi.Linux-x86_64 tar xJf ${SDKFILE}.tar.xz ln -s ${SDKFILE}\/ sdk rm -f ${SDKFILE}.tar.xz 2. \ud658\uacbd\ubcc0\uc218 \uc124\uc815 ~\/.profile\uc5d0 \ucd94\uac00\ud55c\ub2e4. export OPENWRT_ARCH=arm export OPENWRT_TARGET=bcm53xx export OPENWRT_BASE_DIR=\/work export OPENWRT_SRC_DIR=${OPENWRT_BASE_DIR}\/openwrt export STAGING_DIR=${OPENWRT_BASE_DIR}\/sdk\/staging_dir\/toolchain-arm_cortex-a9_gcc-5.4.0_musl-1.1.16_eabi export [&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-876","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\/876","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=876"}],"version-history":[{"count":0,"href":"https:\/\/hasu0707.duckdns.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/876\/revisions"}],"wp:attachment":[{"href":"https:\/\/hasu0707.duckdns.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=876"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/hasu0707.duckdns.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=876"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/hasu0707.duckdns.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=876"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}