ramips: convert rt2880 to new image building code

Signed-off-by: John Crispin <john@phrozen.org>
This commit is contained in:
John Crispin 2016-05-12 00:56:03 +02:00
parent 34b6c8b075
commit a55f0c32fa
4 changed files with 60 additions and 96 deletions

View file

@ -2,58 +2,70 @@
# RT288X Profiles # RT288X Profiles
# #
# Airlink101 AR670W -- LZMA without uImage header define Build/gemtek-header
define BuildFirmware/AR670W/squashfs mkheader_gemtek $@ $@.new $(1) && mv $@.new $@
$(call PatchKernelLzmaDtb,$(2),$(3),$(5))
$(eval output_name=$(IMG_PREFIX)-$(2)-$(1)-$(if $(4),$(4),sysupgrade).bin)
$(eval factory_name=$(IMG_PREFIX)-$(2)-$(1)-factory.bin)
( dd if=$(KDIR)/vmlinux-$(2).bin.lzma bs=65536 \
conv=sync; dd if=$(KDIR)/root.$(1) ) > $(KDIR)/$(output_name)
$(call prepare_generic_squashfs,$(KDIR)/$(output_name))
if [ `stat -c%s "$(KDIR)/$(output_name)"` \
-gt $(ralink_default_fw_size_4M) ]; then \
echo "Warning: $(KDIR)/$(output_name) is too big" >&2; \
else \
mkwrgimg -i $(KDIR)/$(output_name) \
-d "/dev/mtdblock/2" \
-s "wrgn16a_airlink_ar670w" \
-o $(BIN_DIR)/$(factory_name); \
$(CP) $(KDIR)/$(output_name) $(BIN_DIR)/$(output_name); \
fi
endef endef
define BuildFirmware/Gemtek/squashfs define Build/airlink-header
$(call BuildFirmware/Default4M/$(1),$(1),$(2),$(3)) mkwrgimg -i $@ \
if [ -e "$(call sysupname,$(1),$(2))" ]; then \ -d "/dev/mtdblock/2" \
mkheader_gemtek "$(call sysupname,$(1),$(2))" \ -s "wrgn16a_airlink_ar670w" \
"$(call imgname,$(1),$(2))-factory.bin" $(2) || \ -o $@.new && mv $@.new $@
rm -f "$(call imgname,$(1),$(2))-factory.bin"; \
fi
endef endef
BuildFirmware/Gemtek/initramfs=$(call BuildFirmware/OF/initramfs,$(1),$(2),$(3))
define Device/ar670w
DTS := AR670W
DEVICE_TITLE := Airlink AR670W
IMAGE_SIZE := $(ralink_default_fw_size_4M)
KERNEL := $(KERNEL_DTB)
IMAGES += factory.bin
IMAGE/factory.bin := $$(IMAGE/sysupgrade.bin) | gemtek-header ar725w
endef
TARGET_DEVICES += ar725w
define Device/ar725w
DTS := AR725W
DEVICE_TITLE := Gemtek AR725W
IMAGES += factory.bin
IMAGE/factory.bin := $$(IMAGE/sysupgrade.bin) | gemtek-header ar725w
endef
TARGET_DEVICES += ar725w
Image/Build/Profile/AR670W=$(call BuildFirmware/AR670W/$(1),$(1),ar670w,AR670W)
Image/Build/Profile/AR725W=$(call BuildFirmware/Gemtek/$(1),$(1),ar725w,AR725W)
# 0x790000
belkin_f5d8235v1_mtd_size=7929856 belkin_f5d8235v1_mtd_size=7929856
Image/Build/Profile/F5D8235V1=$(call BuildFirmware/CustomFlash/$(1),$(1),f5d8235v1,F5D8235_V1,$(belkin_f5d8235v1_mtd_size)) define Device/f5d8235v1
Image/Build/Profile/RTN15=$(call BuildFirmware/Default4M/$(1),$(1),rt-n15,RT-N15) DTS := F5D8235_V1
Image/Build/Profile/V11STFE=$(call BuildFirmware/Default4M/$(1),$(1),v11st-fe,V11STFE) IMAGE_SIZE := $(belkin_f5d8235v1_mtd_size)
Image/Build/Profile/WLITX4AG300N=$(call BuildFirmware/Default4M/$(1),$(1),wli-tx4-ag300n,WLI-TX4-AG300N) DEVICE_TITLE := Belkin F5D8235 V1
Image/Build/Profile/WZRAGL300NH=$(call BuildFirmware/Default4M/$(1),$(1),wzr-agl300nh,WZR-AGL300NH) DEVICE_PACKAGES := kmod-switch-rtl8366s
define Image/Build/Profile/Default
$(call Image/Build/Profile/AR670W,$(1))
$(call Image/Build/Profile/AR725W,$(1))
$(call Image/Build/Profile/F5D8235V1,$(1))
$(call Image/Build/Profile/RTN15,$(1))
$(call Image/Build/Profile/V11STFE,$(1))
$(call Image/Build/Profile/WLITX4AG300N,$(1))
$(call Image/Build/Profile/WZRAGL300NH,$(1))
endef endef
TARGET_DEVICES += f5d8235v1
define Device/rt-n15
DTS := RT-N15
IMAGE_SIZE := $(ralink_default_fw_size_4M)
DEVICE_TITLE := Asus RT-N15
DEVICE_PACKAGES := kmod-switch-rtl8366s
endef
TARGET_DEVICES += rt-n15
define Device/v11st-fe
DTS := V11STFE
IMAGE_SIZE := $(ralink_default_fw_size_4M)
DEVICE_TITLE := Ralink V11ST-FE
endef
TARGET_DEVICES += v11st-fe
define Device/wli-tx4-ag300n
DTS := WLI-TX4-AG300N
IMAGE_SIZE := $(ralink_default_fw_size_4M)
DEVICE_TITLE := Buffalo WLI-TX4-AG300N
endef
TARGET_DEVICES += wli-tx4-ag300n
define Device/wzr-agl300nh
DTS := WZR-AGL300NH
IMAGE_SIZE := $(ralink_default_fw_size_4M)
DEVICE_TITLE := Buffalo WZR-AGL300NH
DEVICE_PACKAGES := kmod-switch-rtl8366s
endef
TARGET_DEVICES += wzr-agl300nh

View file

@ -1,16 +0,0 @@
#
# Copyright (C) 2010 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
define Profile/Default
NAME:=Default Profile
PACKAGES:=kmod-switch-rtl8366s kmod-swconfig swconfig
endef
define Profile/Default/Description
Default package set compatible with most boards.
endef
$(eval $(call Profile,Default))

View file

@ -1,16 +0,0 @@
#
# Copyright (C) 2011 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
define Profile/RTN15
NAME:=Asus RT-N15
PACKAGES:=kmod-switch-rtl8366s kmod-swconfig swconfig
endef
define Profile/RTN15/Description
Package set for Asus RT-N15 board
endef
$(eval $(call Profile,RTN15))

View file

@ -1,16 +0,0 @@
#
# Copyright (C) 2011 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
define Profile/F5D8235V1
NAME:=Belkin F5D8235 V1
PACKAGES:=kmod-switch-rtl8366s kmod-swconfig swconfig
endef
define Profile/F5D8235V1/Description
Package set for Belkin F5D8235 V1
endef
$(eval $(call Profile,F5D8235V1))