openwrt 升级系统方法

  • Post author:
  • Post category:其他


最近在搞高通的IPQ806X方案,路由网关和无线一体化设备。ARM-V7双核CPU,NAT和BRIDGE的内外网转发性能都只有30多K,为了优化,要改内核驱动。

首先面临的是OPENWRT升级问题,下面总结一下方法:

一、在UBOOT下升级

1、设置本地IP和TFT服务器IP

set autostart no && set ipaddr 10.0.2.151 && set serverip 10.0.2.153

2、加载

tftpboot 0x42000000 ipq806x-nor-apps.img

3、烧录

sf probe && imageaddr=0x42000000 &&source 0x42000000:script

二、在linux系统下升级

方法有:

1.dd

2.sysupgrade

这两种方法都是需要先将文件tftp到系统中。

例子1:

升级UBOOT

dd if=openwrt-ipq806x-u-boot.mbn of=/dev/mtdblock8

例子2:

升级内核和文件系统

sysupgrade -i -v ipq806x-nor-apps.img

输出示例:

root@OpenWrt:/tmp# sysupgrade -i -v ipq806x-nor-apps.img

Warning: optional section “sbl1” missing from “ipq806x-nor-apps.img”. Continue…

Warning: optional section “sbl2” missing from “ipq806x-nor-apps.img”. Continue…

Warning: optional section “sbl3” missing from “ipq806x-nor-apps.img”. Continue…

Warning: optional section “u-boot” missing from “ipq806x-nor-apps.img”. Continue…

Warning: optional section “ddr-ap148” missing from “ipq806x-nor-apps.img”. Continue…

Warning: optional section “ssd” missing from “ipq806x-nor-apps.img”. Continue…

Warning: optional section “tz” missing from “ipq806x-nor-apps.img”. Continue…

Warning: optional section “rpm” missing from “ipq806x-nor-apps.img”. Continue…

Returning 0 from is_authentication_check_enabled

Keep config files over reflash (Y/n): y

Edit config file list (y/N): n

Saving config files…

etc/sysctl.conf

etc/slp.spi

etc/slp.reg

etc/slp.conf

etc/shells

etc/rc.local

etc/profile

etc/passwd

etc/inittab

etc/hosts

etc/group

etc/fw_env.config

etc/firewall.user

etc/dropbear/dropbear_rsa_host_key

etc/dropbear/dropbear_dss_host_key

etc/cups/printers.conf

etc/cups/client.conf

etc/config/upnpd

etc/config/uhttpd

etc/config/ucitrack

etc/config/ubootenv

etc/config/thermal

etc/config/system

etc/config/samba

etc/config/rstp

etc/config/ripd

etc/config/radvd

etc/config/pure-ftpd

etc/config/pppoe

etc/config/nss

etc/config/network

etc/config/mcproxy

etc/config/macsec

etc/config/luci

etc/config/firewall

etc/config/dropbear

etc/config/dhcp6c

etc/config/dhcp

etc/config/ddns

etc/config/alljoyn

Sending TERM to remaining processes … syslogd klogd hotplug2 ubusd netifd mcproxy cupsd slpd zebra Jan 5 05:18:49 watchquagga[2535]: zebra state -F

watchquagga Jan 5 05:18:49 watchquagga[2535]: Terminating on signal

uhttpd dbus-daemon dnsmasq smbd nmbd xl2tpd avahi-daemon alljoyn-daemon rngd ntpd thermald

Sending KILL to remaining processes … uhttpd

Switching to ramdisk…

Performing system upgrade…

Section script ignored

ash: can’t create /sys/devices/platform/msm_nand/boot_layout: nonexistent directory

find: /sys/block/mmcblk*/: No such file or directory

Unlocking kernel …

Erasing kernel …

Writing from to kernel … [w]1845248+0 records in

1845248+0 records out

Flashed hlos-894c257106b4e407230bdc07bedb9c44ce088f40

ash: can’t create /sys/devices/platform/msm_nand/boot_layout: nonexistent directory

find: /sys/block/mmcblk*/: No such file or directory

Unlocking rootfs …

Erasing rootfs …

Writing from to rootfs … [w]16685056+0 records in

16685056+0 records out

Flashed fs-73be11f50c9325ae68c43b1ae01663c947d14314

[ 735.875945] refresh_rootfs_split: updating partition “rootfs_data”, offset: 0x1510000 (0x810000)

ash: can’t create /sys/devices/platform/msm_nand/boot_layout: nonexistent directory

Refreshing partitions

Refreshing mtd partition rootfs …

find: /sys/block/mmcblk*/: No such file or directory

Unlocking rootfs_data …

Erasing rootfs_data …

Appending /tmp/sysupgrade.tgz to jffs2 partition rootfs_data

Upgrade completed

Reboot (Y/n): y

Rebooting system…

[ 839.041330] Restarting system.

[ 839.043423] Going down for restart now



版权声明:本文为snowpiaop原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。