zoukankan      html  css  js  c++  java
  • openwrt

    squashfs-sysupgrade.bin 生成过程图

    openwrt-image-follow

    路径变量

    $(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
    
  • 相关阅读:
    SQL Server(00):JSON 函数
    Oracle(00):SQL Developer官方工具 初探
    SQL Server(00):搜索特定的对象
    三星平板SM-T320刷机
    SQL Server(00):聚合函数
    SQL Server(00):日期时间函数
    SQL Server(00):字符串函数
    SQL Server(00):文本和图像函数
    SQL Server(00):数学函数
    SQL Server(00):元数据函数
  • 原文地址:https://www.cnblogs.com/sammei/p/3983605.html
Copyright © 2011-2022 走看看