OpenWrt Branch lede embedded No Line customization by System-2. Custom firmware

Source: Internet
Author: User
Tags custom name

# Select target Build firmware platform

CD ~/source

# pre-edit Check

Make Defconfigmake Prereq

# Set firmware default size and customize new hardware

# to create a custom name firmware, machine model needs to be modified 8 Locations

# Motherboard CPU is mt7620n

# Hardware is the same as zbt WR8305RT hardware

# The real model on the board is jgx-x5

# Firmware capacity: 16M

# 16 binary: 0xfb0000

# decimal: 16121856≈15.375

CD ~/source/target/linux/ramips/

# Section 1 Step: Define profile files, for make menuconfig Show Menu

File= "./image/mt7620.mk" Cat >> $file <<eof define DEVICE/JLCSSWRT dts:= jlcsswrt device_title: = Mywrtendeftarget_devices + = jlcsswrteof

# Section 2 step:sed when using "":\\t represents a tab character

File= "./base-files/lib/ramips.sh" grep "Jlcsswrt" $fileif [$?-ne 0];then num= ' grep-a1-n ' name.*wr8305rt.* ' $file |g Rep ';; ' |awk-f '-' {print $NR} ' sed-i ' ${num}a\\\t*\ "mywrt\") "$file num=$[$num +1] sed-i" ${num}a\\\t\\tname=\ "Jlcsswrt\" "$file num=$[$num +1] sed-i" ${num}a\\\t\\t;; "$filefi grep". *jlcsswrt.* "$file-c4-i

# Section 3 step:sed when using ':\ t represents a tab character

File= "./base-files/lib/upgrade/platform.sh" grep "Jlcsswrt" $fileif [$?-ne 0];then sed-i '/wr8305rt/a\\tjlcsswrt |\\ ' $filefigrep "jlcsswrt" $file-c1

# Section 4 Step:

File= "./base-files/etc/diag.sh" grep "Jlcsswrt" $fileif [$?-ne 0];then sed-i '/wr8305rt/i\\tjlcsswrt|\\ ' $filefigrep ' Jlcsswrt ' $file-c1

# Section 5 Step: Define the system LEDs Interface

File= "./base-files/etc/board.d/01_leds" grep "Jlcsswrt" $fileif [$?-ne 0];then sed-i '/wr8305rt/i\jlcsswrt|\\ ' $filef Igrep "Jlcsswrt" $file-a1

# Section 6 Step: Define network Interface

File= "./base-files/etc/board.d/02_network" grep "Jlcsswrt" $fileif [$?-ne 0];then sed-i '/wr8305rt/i\\tjlcsswrt|\\ ' $ Filefigrep "Jlcsswrt" $file-c1

# Section 7 Step: Define DTS file, device model, memory size, partition information, etc.

# Modify Flash Partitioning

# since our flash is 16M , modify the firmware partition size to 0xfb0000(L45)

# (firmware) + (Factory) + (uboot-env) + (uboot) =flash

# (Kernel) + (ROOTFS) =firmware

# (SQUASHFS (RO)) + (JFFS2 (rw,rootfs_data)) =rootfs

\CP./dts/zbt-wr8305rt.dts./dts/mywrt.dtsfile= "./dts/mywrt.dts" com= ' grep ' compatible.*mt7620n.*$ ' $file |awk-f ' "" {print $} ' sed-i ' s#${com} #jlcsswrt #g "$filemodel = ' grep ' model.* ' $file |awk-f '" ' {print $} ' sed-i ' S#${model} #MYWRT #g "$filelabel = ' echo $com |awk-f ', ' {print $} ' sed-i ' S#${label} #jlcsswrt #g" $filesed-i "/0x50000/s/0x7b0000/ 0xfb0000/g ' $file #设置固件大小为16M grep-i ' mywrt ' $file

# Section 8 Step : deleting files and re-selecting target firmware

RM-RF ~/source/tmp

# Go to the Build menu, select Target Platform

make menuconfig target system  (mediatek ralink mips)   --->  (X)  MediaTek Ralink MIPS  #选择厂商Subtarget   (mt7620 based boards)   --- > (X)  MT7620 based boards          #选择CPU类型Target  Profile  (MYWRT)   ---> (X)  MYWRT                  #选择目标平台LuCI  --->1. Collections  ---> <*> luci                                           #启用web界面支持LuCI  --->2. Modules  ---> translations  ---><*> Chinese  (ZH-CN)      #添加中文语言包LuCI  -- ->2. modules --->Translations ---><*> English  (en)                  #添加英文语言包

# Save before exiting

# Download-only no edits (v=s Show Details )

Make Download V=s

# Other software can be used to download the required source code package, copied to the ~/lede/source/dl directory

# Start the first compilation #

The first compile time is best not to use multi-threaded compilation, compile once, later can be multithreaded compilation;

Make v=s# or Make-j8 v=s


This article is from the "your attitude determines your future" blog, please be sure to keep this source http://marse.blog.51cto.com/11586237/1888840

OpenWrt Branch lede embedded No Line customization by System-2. Custom firmware

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.