Giter Club home page Giter Club logo

lede's Introduction

欢迎来到 Lean 的 Openwrt 源码仓库

如何编译自己需要的 OpenWrt 固件 English

官方讨论群

如有技术问题需要讨论或者交流,欢迎加入以下群:

  1. QQ 讨论群: Op固件技术研究群 ,号码 891659613 ,加群链接:点击加入
  2. TG 讨论群: OP 编译官方大群 ,加群链接:点击加入

注意

  1. 不要用 root 用户进行编译
  2. 国内用户编译前最好准备好梯子
  3. 默认登陆IP 192.168.1.1 密码 firefly

编译命令

  1. 首先装好 Linux 系统,推荐 Debian 11 或 Ubuntu LTS

  2. 安装编译依赖

    sudo apt update -y
    sudo apt full-upgrade -y
    sudo apt install -y ack antlr3 asciidoc autoconf automake autopoint binutils bison build-essential \
    bzip2 ccache cmake cpio curl device-tree-compiler fastjar flex gawk gettext gcc-multilib g++-multilib \
    git gperf haveged help2man intltool libc6-dev-i386 libelf-dev libglib2.0-dev libgmp3-dev libltdl-dev \
    libmpc-dev libmpfr-dev libncurses5-dev libncursesw5-dev libreadline-dev libssl-dev libtool lrzsz \
    mkisofs msmtp nano ninja-build p7zip p7zip-full patch pkgconf python2.7 python3 python3-pip libpython3-dev qemu-utils \
    rsync scons squashfs-tools subversion swig texinfo uglifyjs upx-ucl unzip vim wget xmlto xxd zlib1g-dev
  3. 下载源代码,更新 feeds 并选择配置

    git clone https://github.com/coolsnowwolf/lede
    cd lede
    ./scripts/feeds update -a
    ./scripts/feeds install -a
    make menuconfig
  4. 下载 dl 库,编译固件 (-j 后面是线程数,第一次编译推荐用单线程)

    make download -j8
    make V=s -j1

本套代码保证肯定可以编译成功。里面包括了 R21 所有源代码,包括 IPK 的。

你可以自由使用,但源码编译二次发布请注明我的 GitHub 仓库链接。谢谢合作!

二次编译:

cd lede
git pull
./scripts/feeds update -a
./scripts/feeds install -a
make defconfig
make download -j8
make V=s -j$(nproc)

如果需要重新配置:

rm -rf ./tmp && rm -rf .config
make menuconfig
make V=s -j$(nproc)

编译完成后输出路径:bin/targets

如果你使用 WSL/WSL2 进行编译

由于 WSL 的 PATH 中包含带有空格的 Windows 路径,有可能会导致编译失败,请在 make 前面加上:

PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin

macOS 原生系统进行编译

  1. 在 AppStore 中安装 Xcode

  2. 安装 Homebrew:

    /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
  3. 使用 Homebrew 安装工具链、依赖与基础软件包:

    brew unlink awk
    brew install coreutils diffutils findutils gawk gnu-getopt gnu-tar grep make ncurses pkg-config wget quilt xz
    brew install gcc@11
  4. 然后输入以下命令,添加到系统环境变量中:

    echo 'export PATH="/usr/local/opt/coreutils/libexec/gnubin:$PATH"' >> ~/.bashrc
    echo 'export PATH="/usr/local/opt/findutils/libexec/gnubin:$PATH"' >> ~/.bashrc
    echo 'export PATH="/usr/local/opt/gnu-getopt/bin:$PATH"' >> ~/.bashrc
    echo 'export PATH="/usr/local/opt/gnu-tar/libexec/gnubin:$PATH"' >> ~/.bashrc
    echo 'export PATH="/usr/local/opt/grep/libexec/gnubin:$PATH"' >> ~/.bashrc
    echo 'export PATH="/usr/local/opt/gnu-sed/libexec/gnubin:$PATH"' >> ~/.bashrc
    echo 'export PATH="/usr/local/opt/make/libexec/gnubin:$PATH"' >> ~/.bashrc
  5. 重新加载一下 shell 启动文件 source ~/.bashrc,然后输入 bash 进入 bash shell,就可以和 Linux 一样正常编译了

lede's People

Contributors

1715173329 avatar aakkll avatar aiamadeus avatar aooom avatar asushugo avatar beginner-go avatar benihi avatar bobppy avatar boos4721 avatar breakings avatar coolsnowwolf avatar dpy013 avatar elonh avatar ennawyang avatar graysky2 avatar hauke avatar imbrolla avatar javier-huang avatar kfermercer avatar libc0607 avatar lpddr6-10000mhz avatar luxiaok avatar mattraks avatar nbd168 avatar neheb avatar ntlf9t avatar ricksuzade-maker avatar saxon-sun avatar sharermax avatar tossp avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

lede's Issues

WEB界面无法使用编译生成的固件升级

反馈bug/问题模板,提建议请删除

1.关于你要提交的问题

Q:是否搜索了issue (使用 "x" 选择)

  • 没有类似的issue

2. 详细叙述

(1) 具体问题

A:使用的ROC-RK3568-PC板子,先用MASKROM升级了openwrt固件,然后使用WEB尝试升级,提示不支持的固件格式,然后在命令行使用sysupgrade升级,提示“Unable to determine upgrade device”,加-F,也没有升级

(2) 路由器型号和固件版本

A:ROC-RK3568-PC

(3) 详细日志

A:
使用WEB界面升级命令行提示:
root@EdgeGateway:/# logread -f
Mon Jul 17 11:28:26 2023 daemon.err uhttpd[1758]: Unable to determine upgrade device
Mon Jul 17 11:28:26 2023 daemon.err uhttpd[1758]: Image check failed.

使用命令行sysupgrade -F :
root@EdgeGateway:/tmp# sysupgrade -F -v http://192.168.1.188:12311/openwrt-rockc
hip-armv8-hy_hyd3568-ext4-sysupgrade.img.gz
--2023-07-17 11:29:30-- http://192.168.1.188:12311/openwrt-rockchip-armv8-hy_hyd3568-ext4-sysupgrade.img.gz
Connecting to 192.168.1.188:12311... connected.
HTTP request sent, awaiting response... 200 OK
Length: 24213119 (23M) [application/octet-stream]
Saving to: '/tmp/sysupgrade.img'

/tmp/sysupgrade.img 100%[===================>] 23.09M 10.8MB/s in 2.1s

2023-07-17 11:29:32 (10.8 MB/s) - '/tmp/sysupgrade.img' saved [24213119/24213119]

Unable to determine upgrade device
Image check failed but --force given - will update anyway!
Mon Jul 17 11:29:32 CST 2023 upgrade: Saving config files...
etc/config/arpbind
etc/config/autoreboot
etc/config/ddns
etc/config/dhcp
etc/config/dropbear
etc/config/etherwake
etc/config/firewall
etc/config/fstab
etc/config/ipsec
etc/config/luci
etc/config/mia
etc/config/network
etc/config/nlbwmon
etc/config/openssl
etc/config/rpcd
etc/config/samba
etc/config/system
etc/config/ttyd
etc/config/turboacc
etc/config/ucitrack
etc/config/uhttpd
etc/config/upnpd
etc/config/vlmcsd
etc/config/vsftpd
etc/config/wireless
etc/config/zerotier
etc/crontabs/root
etc/dnsmasq.conf
etc/dropbear/dropbear_ed25519_host_key
etc/dropbear/dropbear_rsa_host_key
etc/firewall.user
etc/group
etc/hosts
etc/inittab
etc/luci-uploads/.placeholder
etc/opkg/keys/b5043e70f9a75cde
etc/opkg/keys/c95c3199e0063048
etc/passwd
etc/profile
etc/rc.local
etc/samba/smbpasswd
etc/shadow
etc/shells
etc/shinit
etc/strongswan.d/charon-logging.conf
etc/strongswan.d/charon.conf
etc/strongswan.d/charon/aes.conf
etc/strongswan.d/charon/gmp.conf
etc/strongswan.d/charon/hmac.conf
etc/strongswan.d/charon/kernel-libipsec.conf
etc/strongswan.d/charon/kernel-netlink.conf
etc/strongswan.d/charon/nonce.conf
etc/strongswan.d/charon/pubkey.conf
etc/strongswan.d/charon/random.conf
etc/strongswan.d/charon/sha1.conf
etc/strongswan.d/charon/socket-default.conf
etc/strongswan.d/charon/stroke.conf
etc/strongswan.d/charon/updown.conf
etc/strongswan.d/charon/x509.conf
etc/strongswan.d/charon/xauth-generic.conf
etc/strongswan.d/charon/xcbc.conf
etc/sysctl.conf
etc/uhttpd.crt
etc/uhttpd.key
etc/uhttpd.key
etc/uhttpd.crt
Mon Jul 17 11:29:33 CST 2023 upgrade: Commencing upgrade. Closing all shell sessions.
[217255.435999] device wlan0 left promiscuous mode
[217255.436488] br-lan: port 2(wlan0) entered disabled state
[217259.561222] stage2 (3510): drop_caches: 3
[217260.414622] EXT4-fs (mmcblk1p3): re-mounted. Quota mode: none.
[217260.418109] EXT4-fs (mmcblk1p2): unmounting filesystem.
[217260.424882] EXT4-fs (mmcblk1p3): unmounting filesystem.
[217261.527265] reboot: Restarting system
▒DDR V1.16 6f71c736ce typ 23/03/02-20:01:48
In
LP4/4x derate en, other dram:1x trefi
ddrconfig:0

启动之后还是原来的版本

WEB界面无法使用编译生成的固件升级

反馈bug/问题模板,提建议请删除

1.关于你要提交的问题

Q:是否搜索了issue (使用 "x" 选择)

  • 没有类似的issue

2. 详细叙述

(1) 具体问题

A:

(2) 路由器型号和固件版本

A:

(3) 详细日志

A:

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.