openwrt - squashfs-sysupgrade.bin 的生成过程
squashfs-sysupgrade.bin 生成过程图

路径变量
$(KERNEL_BUILD_DIR)=”/home/sam/Projects/openwrt-mt7620n/build_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/linux-ramips_mt7620n/linux-3.14.18“
$(KDIR)=“/home/sam/Projects/openwrt-mt7620n/build_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/linux-ramips_mt7620n”
$(STAGING_DIR_HOST)=“/home/sam/Projects/openwrt-mt7620n/staging_dir/host”
图中标有序号的步骤,执行命令如下:
mipsel-openwrt-linux-uclibc-objcopy -O binary -R .reginfo -R .notes -R .note -R .comment -R .mdebug -R .note.gnu.build-id -S $(KERNEL_BUILD_DIR)/vmlinux $(KDIR)/vmlinux
mipsel-openwrt-linux-uclibc-objcopy -R .reginfo -R .notes -R .note -R .comment -R .mdebug -R .note.gnu.build-id -S $(KERNEL_BUILD_DIR)/vmlinux $(KDIR)/vmlinux.elf
$(STAGING_DIR_HOST)/bin/lzma e $(KDIR)/vmlinux -lc1 -lp2 -pb2 $(KDIR)/vmlinux.bin.lzma
mkimage -A mips -O linux -T kernel -C lzma -a 0x80000000 -e 0x80000000 -n "MIPS OpenWrt Linux-3.14.18" -d $(KDIR)/vmlinux.bin.lzma $(KDIR)/uImage.lzma
Image Name: MIPS OpenWrt Linux-3.14.18
Created: Sat Sep 20 16:28:05 2014
Image Type: MIPS Linux Kernel Image (lzma compressed)
Data Size: 1051164 Bytes = 1026.53 kB = 1.00 MB
Load Address: 80000000
Entry Point: 80000000
$(STAGING_DIR_HOST)/bin/mksquashfs4 /home/sam/Projects/openwrt-mt7620n/build_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/root-ramips $(KDIR)/root.squashfs -nopad -noappend -root-owned -comp xz -Xpreset 9 -Xe -Xlc 0 -Xlp 2 -Xpb 2 -b 256k -p '/dev d 755 0 0' -p '/dev/console c 600 0 0 5 1' -processors 1
dd if=$(KDIR)/root.squashfs of=/home/sam/Projects/openwrt-mt7620n/bin/ramips/openwrt-ramips-mt7620n-root.squashfs bs=128k conv=sync
$(KERNEL_BUILD_DIR)/scripts/dtc/dtc -O dtb -o $(KDIR)/WRTNODE.dtb ../dts/WRTNODE.dts
$(STAGING_DIR_HOST)/bin/patch-dtb $(KDIR)/vmlinux-wrtnode $(KDIR)/WRTNODE.dtb
$(STAGING_DIR_HOST)/bin/lzma e $(KDIR)/vmlinux-wrtnode -lc1 -lp2 -pb2 $(KDIR)/vmlinux-wrtnode.bin.lzma
mkimage -A mips -O linux -T kernel -C lzma -a 0x80000000 -e 0x80000000 -n "MIPS OpenWrt Linux-3.14.18" -d $(KDIR)/vmlinux-wrtnode.bin.lzma $(KDIR)/vmlinux-wrtnode.uImage
cat $(KDIR)/vmlinux-wrtnode.uImage $(KDIR)/root.squashfs > $(KDIR)/openwrt-ramips-mt7620n-wrtnode-squashfs-sysupgrade.bin
$(STAGING_DIR_HOST)/bin/padjffs2 $(KDIR)/openwrt-ramips-mt7620n-wrtnode-squashfs-sysupgrade.bin 4 8 16 64 128 256
Image Name: MIPS OpenWrt Linux-3.14.18
Created: Sat Sep 20 16:28:15 2014
Image Type: MIPS Linux Kernel Image (lzma compressed)
Data Size: 1052354 Bytes = 1027.69 kB = 1.00 MB
Load Address: 80000000
Entry Point: 80000000
openwrt - squashfs-sysupgrade.bin 的生成过程的更多相关文章
- openwrt的sysupgrade和factory固件的区别
openwrt的固件一般分两种类型:factory原厂固件.sysupgrade固件 factory多了一些验证的东西,用于在原厂固件的基础上进行升级. 普通家用路由一般不是openwrt固件,如果要 ...
- openwrt环境中某个运行在host端的软件如何安装到openwrt的$(STAGING_DIR_HOST)/bin下
可参考示例:见'git grep host-build.mk package/{system,utils}'
- openwrt的编译系统是如何生成squashfs文件系统的
答:请看include/image.mk中的以下定义: define Image/mkfs/squashfs $(STAGING_DIR_HOST)/bin/mksquashfs4 $(call mk ...
- 【转载】OpenWrt sysupgrade 命令行更新固件到最新版
OpenWrt sysupgrade 命令行更新固件到最新版 下面我们要使用 sysupgrade 更新固件到trunk最新版. 要注意的是,trunk包含试验的功能,可能不稳定,刷机风险自己承担. ...
- openwrt: Makefile 框架分析
openwrt: Makefile 框架分析 原文链接:blog.chinaunix.net/uid-26675482-id-4704952.html 本篇的主要目的是想通过分析Makefile,了解 ...
- 转:openwrt 框架分析
本文是本人对OpenWrt的Makefile的理解,并非转载.OpenWrt是一个典型的嵌入式Linux工程,了解OpenWrt的Makefile的工作过程对提高嵌入式Linux工程的开发能力有极其重 ...
- openwrt固件编译过程
主Makefile分析 注:1)make -n可打印makefile执行的命令,而不执行. 2)可以在规则的命令中增加echo跟踪执行进度. 顶层目录的Makefile是openert的总Makefi ...
- 制作Cubie版OpenWRT(功能齐全,大小仅有11M)
Allwinner Sun4i/5i/6i/7i (sunxi) Various vendors are offering development boards / single-board comp ...
- OpenWRT mt7620n 系统升级引起的问题
版权声明:本文为博主原创文章,未经博主同意不得转载. https://blog.csdn.net/qianguozheng/article/details/27237175 OpenWRT系统升级採用 ...
随机推荐
- 工作记录:maven远程下载的问题
最近使用maven的时候遇到一个问题,每次构建都从https://repository.apache.org/snapshots仓库下载一些maven-metadata.xml,但是公司的环境又连不上 ...
- SAXException Parser configuration problem: namespace reporting is not enabled
问题描述: 用sax的方式组装xml,在tomcat上正常运行,在weblogic12c上报错: SAXException Parser configuration problem: namespac ...
- STM32F407 ADC 个人笔记
1. ADC概述(STM32F4xx系列) 3 个 ADC 可分别独立使用 也可使用双重/三重模式(提高采样率) 2 个通道组 规则通道:相当于正常运行的程序 注入通道:相当于中断(可以打断规则通道的 ...
- CF802D
D. Marmots (easy) time limit per test 2 seconds memory limit per test 256 megabytes input standard i ...
- Playrix Codescapes Cup (Codeforces Round #413, rated, Div. 1 + Div. 2) D. Field expansion
D. Field expansion time limit per test 1 second memory limit per test 256 megabytes input standard i ...
- 【二分+扫描线乱搞】B. Producing Snow
注意二分写法... http://codeforces.com/problemset/problem/923/B #include<cstdio> #include<string.h ...
- 【bzoj2733】[HNOI2012]永无乡 线段树合并
Description 永无乡包含 n 座岛,编号从 1 到 n,每座岛都有自己的独一无二的重要度,按照重要度可 以将这 n 座岛排名,名次用 1 到 n 来表示.某些岛之间由巨大的桥连接,通过桥可以 ...
- 关于虚拟机IP网段和公司内网网段的问题?
开发四年只会写业务代码,分布式高并发都不会还做程序员?->>> 请教一个问题,为了解决电脑换网络环境就连不上虚拟机的问题,我虚拟机使用的nat模式,我的VMnet8IP是192 ...
- msp430入门学习43
msp430的其他十一 msp430入门学习
- Laravel 中视图中使用PHP代码
{{ $name }}{{ date('Y-m-d H:i:s',time()) }}{{ in_array($name,$arr)?'true':'false' }} {{ isset($name) ...