Ticket #5970: webupgrade.makefile_wrt350nv2_image.r17986.patch

File webupgrade.makefile_wrt350nv2_image.r17986.patch, 1.8 KB (added by Maddes <maddes_trac@…>, 8 years ago)

using "wrt350nv2-builder" to create the webupgrade image for wrt350n v2.x

  • target/linux/orion/image/Makefile

     
    11# 
    2 # Copyright (C) 2008 OpenWrt.org 
     2# Copyright (C) 2008-2009 OpenWrt.org 
    33# 
    44# This is free software, licensed under the GNU General Public License v2. 
    55# See /LICENSE for more information. 
    66# 
     7 
    78include $(TOPDIR)/rules.mk 
    89include $(INCLUDE_DIR)/image.mk 
    910 
     
    4849endef 
    4950 
    5051define Image/Build/Linksys 
    51 # placeholder for the WRT350N v2 
     52        # WRT350N v2 sysupgrade image 
     53        ( \ 
     54                dd if="${KDIR}/$2-uImage" bs=$5 conv=sync; \ 
     55                dd if="${KDIR}/root.$1" bs=64k conv=sync; \ 
     56        ) > "${BIN_DIR}/openwrt-$2-$1.img" 
     57        # WRT350N v2 webupgrade image for stock firmware 
     58        rm -rf "${TMP_DIR}/$2_webupgrade" 
     59        mkdir "${TMP_DIR}/$2_webupgrade" 
     60        # create parameter file 
     61        echo ":kernel $5 ${BIN_DIR}/openwrt-$2-uImage" >"${TMP_DIR}/$2_webupgrade/$2.par" 
     62        echo ":rootfs 0 ${KDIR}/root.$1" >>"${TMP_DIR}/$2_webupgrade/$2.par" 
     63        ( [ -f "${STAGING_DIR_HOST}/bin/$2-u-boot.bin" ] && echo ":u-boot 0 ${STAGING_DIR_HOST}/bin/$2-u-boot.bin" >>"${TMP_DIR}/$2_webupgrade/$2.par"; ) || ( exit 0; ) 
     64        # create webupgrade file 
     65        ( cd "${TMP_DIR}/$2_webupgrade"; "${STAGING_DIR_HOST}/bin/$2-builder" -v "${TMP_DIR}/$2_webupgrade/$2.par" "${BIN_DIR}/openwrt-$2-$(1)-webupgrade.img"; ) 
     66        rm -rf "${TMP_DIR}/$2_webupgrade" 
    5267endef 
    5368 
    5469define Image/Build/Freecom 
     
    6479define Image/Build 
    6580        $(call Image/Build/$(1),$(1)) 
    6681        $(call Image/Build/Netgear,$(1),wnr854t,NG_WNR854T,$(1)) 
    67         $(call Image/Build/Linksys,$(1),wrt350nv2,WNR350Nv2,$(1)) 
     82        $(call Image/Build/Linksys,$(1),wrt350nv2,WNR350Nv2,$(1),1048576)       # 5th parameter is kernel mtd size 0x00100000 = 1048576 / 0x001A0000 = 1703936 
    6883        $(call Image/Build/Freecom,$(1),dt2,DT,$(1)) 
    6984endef 
    7085