aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/rdc
diff options
context:
space:
mode:
authorFlorian Fainelli <florian@openwrt.org>2009-11-08 22:48:19 +0000
committerFlorian Fainelli <florian@openwrt.org>2009-11-08 22:48:19 +0000
commitcce5a0876d97c07069f644dc027603cc23675023 (patch)
tree5065b356ffd9f23b526cfc01ebb014111fd9750c /target/linux/rdc
parent97fb4203ae9102fc9af9176f0c631093cf0ebf2a (diff)
downloadmaster-187ad058-cce5a0876d97c07069f644dc027603cc23675023.tar.gz
master-187ad058-cce5a0876d97c07069f644dc027603cc23675023.tar.bz2
master-187ad058-cce5a0876d97c07069f644dc027603cc23675023.zip
[rdc] make sure rdc321x specific patches apply (CONFIG_X86_RDC321X), patch from sn9
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@18346 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/rdc')
-rw-r--r--target/linux/rdc/patches-2.6.30/004-yenta_mystery.patch2
-rw-r--r--target/linux/rdc/patches-2.6.30/005-fix_amit_breakage.patch6
2 files changed, 4 insertions, 4 deletions
diff --git a/target/linux/rdc/patches-2.6.30/004-yenta_mystery.patch b/target/linux/rdc/patches-2.6.30/004-yenta_mystery.patch
index 4c2e2face0..92589ea548 100644
--- a/target/linux/rdc/patches-2.6.30/004-yenta_mystery.patch
+++ b/target/linux/rdc/patches-2.6.30/004-yenta_mystery.patch
@@ -4,7 +4,7 @@
/* We must finish initialization here */
-+#ifdef CONFIG_X86_RDC
++#ifdef CONFIG_X86_RDC321X
+/* #define YO_TI1510_DATASHEET_GUY_EXPLAIN_THIS_JUNK 0x0044f044 */
+#define YO_TI1510_DATASHEET_GUY_EXPLAIN_THIS_JUNK 0x0844b060
+/* #define YO_TI1510_DATASHEET_GUY_EXPLAIN_THIS_JUNK 0x0044d044 */
diff --git a/target/linux/rdc/patches-2.6.30/005-fix_amit_breakage.patch b/target/linux/rdc/patches-2.6.30/005-fix_amit_breakage.patch
index 92bce802bf..552e5f7eb9 100644
--- a/target/linux/rdc/patches-2.6.30/005-fix_amit_breakage.patch
+++ b/target/linux/rdc/patches-2.6.30/005-fix_amit_breakage.patch
@@ -15,8 +15,8 @@
#include "boot.h"
#include <asm/segment.h>
-+#ifdef CONFIG_X86_RDC
-+#include <asm/mach-rdc/rdc321x_defs.h>
++#ifdef CONFIG_X86_RDC321X
++#include <asm/rdc321x_defs.h>
+#endif
/*
@@ -25,7 +25,7 @@
die();
}
-+#ifdef CONFIG_X86_RDC
++#ifdef CONFIG_X86_RDC321X
+ {
+ u32 bootctl;
+
d='n202' href='#n202'>202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452
#
# Copyright (C) 2008-2011 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/image.mk

define imgname
$(BIN_DIR)/$(IMG_PREFIX)-$(2)-$(1)
endef

define sysupname
$(call imgname,$(1),$(2))-sysupgrade.bin
endef

VMLINUX:=$(IMG_PREFIX)-vmlinux
UIMAGE:=$(IMG_PREFIX)-uImage
fs_squash:=squashfs-only
ifeq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),y)
	fs_squash:=initramfs
	VMLINUX:=$(IMG_PREFIX)-vmlinux-initramfs
	UIMAGE:=$(IMG_PREFIX)-uImage-initramfs
endif

ifeq ($(CONFIG_RALINK_RT288X),y)
define kernel_entry
-a 0x88000000 -e 0x88000000
endef
else
define kernel_entry
-a 0x80000000 -e 0x80000000
endef
endif

define mkcmdline
board=$(1) console=$(2),$(3)
endef

define CompressLzma
  $(STAGING_DIR_HOST)/bin/lzma e $(1) -lc1 -lp2 -pb2 $(2)
endef

define PatchKernelLzma
	cp $(KDIR)/vmlinux $(KDIR)/vmlinux-$(1)
	$(STAGING_DIR_HOST)/bin/patch-cmdline $(KDIR)/vmlinux-$(1) '$(strip $(2))'
	$(call CompressLzma,$(KDIR)/vmlinux-$(1),$(KDIR)/vmlinux-$(1).bin.lzma)
endef

define MkImage
	mkimage -A mips -O linux -T kernel -C $(1) $(call kernel_entry)\
		-n 'MIPS OpenWrt Linux-$(LINUX_VERSION)' \
		-d $(2) $(3)
endef

define MkImageLzma
	$(call PatchKernelLzma,$(1),$(2))
	$(call MkImage,lzma,$(KDIR)/vmlinux-$(1).bin.lzma,$(KDIR)/vmlinux-$(1).uImage)
endef

define CatFiles
	if [ `stat -c%s "$(1)"` -gt $(2) ]; then \
		echo "Warning: $(1) is too big"; \
	else if [ `stat -c%s $(3)` -gt $(4) ]; then \
		echo "Warning: $(3) is too big"; \
	else \
		( dd if=$(1) bs=$(2) conv=sync; dd if=$(3) ) > $(5); \
	fi; fi
endef

define Sysupgrade/KRuImage
	$(call CatFiles,$(KDIR)/vmlinux-$(2).uImage,$(3),$(KDIR)/root.$(1),$(4),$(call sysupname,$(1),$(2)))
endef

define mkmtd
mtdparts=$(1):$(2)
endef

define mkmtd/phys
$(call mkmtd,physmap-flash.0,$(1))
endef

define mkmtd/spi
$(call mkmtd,spi0.0,$(1))
endef

define Image/BuildKernel
	cp $(KDIR)/vmlinux.elf $(BIN_DIR)/$(VMLINUX).elf
	cp $(KDIR)/vmlinux $(BIN_DIR)/$(VMLINUX).bin
	$(call CompressLzma,$(KDIR)/vmlinux,$(KDIR)/vmlinux.bin.lzma)
	$(call MkImage,lzma,$(KDIR)/vmlinux.bin.lzma,$(KDIR)/uImage.lzma)
	cp $(KDIR)/uImage.lzma $(BIN_DIR)/$(UIMAGE).bin
	$(call Image/Build/Initramfs)
endef

define BuildFirmware/Generic
	$(call MkImageLzma,$(2),$(3))
	$(call Sysupgrade/KRuImage,$(1),$(2),$(4),$(5))
endef

define BuildFirmware/Generic/initramfs
	$(call MkImageLzma,$(2),$(3))
	$(CP) $(KDIR)/vmlinux-$(2).uImage $(call imgname,$(1),$(2))-uImage.bin
endef

mtdlayout_4M=192k(u-boot)ro,64k(u-boot-env)ro,64k(factory)ro,896k(kernel),2880k(rootfs),3776k@0x50000(firmware)
define BuildFirmware/GENERIC_4M
	$(call BuildFirmware/Generic,$(1),$(2),$(call mkcmdline,$(3),$(4),$(5)) $(call mkmtd/$(6),$(mtdlayout_4M)),917504,2949120)
endef

define BuildFirmware/GENERIC_4M/initramfs
	$(call BuildFirmware/Generic/initramfs,$(1),$(2),$(call mkcmdline,$(3),$(4),$(5)) $(call mkmtd/$(6),$(mtdlayout_4M)))
endef

mtdlayout_8M=192k(u-boot)ro,64k(u-boot-env)ro,64k(factory)ro,896k(kernel),6976k(rootfs),7872k@0x50000(firmware)
kernel_size_8M=917504
rootfs_size_8M=7143424
define BuildFirmware/GENERIC_8M
	$(call BuildFirmware/Generic,$(1),$(2),$(call mkcmdline,$(3),$(4),$(5)) $(call mkmtd/$(6),$(mtdlayout_8M)),$(kernel_size_8M),$(rootfs_size_8M))
endef

define BuildFirmware/GENERIC_8M/initramfs
	$(call BuildFirmware/Generic/initramfs,$(1),$(2),$(call mkcmdline,$(3),$(4),$(5)) $(call mkmtd/$(6),$(mtdlayout_8M)))
endef

mtdlayout_argus_atp52b=192k(bootloader)ro,64k(config),64k(factory),1152k(kernel),6656k(rootfs),7808k@0x50000(firmware)
mtd_argus_atp52b_kernel_part_size=1179648
mtd_argus_atp52b_rootfs_part_size=6815744
define BuildFirmware/ARGUS_ATP52B
	$(call BuildFirmware/Generic,$(1),$(2),board=$(3) $(call mkmtd/phys,$(mtdlayout_argus_atp52b)),$(mtd_argus_atp52b_kernel_part_size),$(mtd_argus_atp52b_rootfs_part_size))
endef

define BuildFirmware/Buffalo
	$(call MkImageLzma,$(2),$(3))
	$(call Sysupgrade/KRuImage,$(1),$(2),$(4),$(5))
	if [ -e "$(call sysupname,$(1),$(2))" ]; then \
		buffalo-enc -p $(3) -v 1.76 \
			-i $(KDIR)/vmlinux-$(2).uImage \
			-o $(KDIR)/vmlinux-$(2).uImage.enc; \
		buffalo-enc -p $(3) -v 1.76 \
			-i $(KDIR)/root.$(1) \
			-o $(KDIR)/root.$(2).enc; \
		buffalo-tag -b $(3) -p $(3) -a ram -v 1.76 -m 1.01 \
			-l mlang8 -f 1 -r EU \
			-i $(KDIR)/vmlinux-$(2).uImage.enc \
			-i $(KDIR)/root.$(2).enc \
			-o $(call imgname,$(1),$(2))-factory-EU.bin; \
	fi
endef


define BuildFirmware/Buffalo2
	$(call BuildFirmware/Generic,$(1),$(2),board=$(3) $(4),$(5),$(6))
endef

mtdlayout_dir300b1=192k(u-boot)ro,64k(devdata)ro,64k(devconf)ro,896k(kernel),2880k(rootfs),3776k@0x50000(firmware)
mtd_dir300b1_kernel_part_size=917504
mtd_dir300b1_rootfs_part_size=2949120
define BuildFirmware/DIR300B1
	$(call BuildFirmware/Generic,$(1),$(2),board=$(3) $(call mkmtd/phys,$(mtdlayout_dir300b1)),$(mtd_dir300b1_kernel_part_size),$(mtd_dir300b1_rootfs_part_size))