config PHYS_OFFSET
        hex "Physical address of main memory" if MMU
-       depends on !ARM_PATCH_PHYS_VIRT
+       depends on !ARM_PATCH_PHYS_VIRT || !AUTO_ZRELADDR
        default DRAM_BASE if !MMU
        default 0x00000000 if ARCH_FOOTBRIDGE
        default 0x10000000 if ARCH_OMAP1 || ARCH_RPC
 
 zImage: Image
 
 $(BOOT_TARGETS): vmlinux
-       $(Q)$(MAKE) $(build)=$(boot) MACHINE=$(MACHINE) $(boot)/$@
+       $(Q)$(MAKE) $(build)=$(boot) $(boot)/$@
        @$(kecho) '  Kernel: $(boot)/$@ is ready'
 
 $(INSTALL_TARGETS): KBUILD_IMAGE = $(boot)/$(patsubst %install,%Image,$@)
 endif
 
 # My testing targets (bypasses dependencies)
-bp:;   $(Q)$(MAKE) $(build)=$(boot) MACHINE=$(MACHINE) $(boot)/bootpImage
+bp:;   $(Q)$(MAKE) $(build)=$(boot) $(boot)/bootpImage
 
 
 define archhelp
 
 #
 # Copyright (C) 1995-2002 Russell King
 #
-
 OBJCOPYFLAGS   :=-O binary -R .comment -S
 
-ifneq ($(MACHINE),)
-include $(MACHINE)/Makefile.boot
-endif
-
-# Note: the following conditions must always be true:
 #   ZRELADDR == virt_to_phys(PAGE_OFFSET + TEXT_OFFSET)
-#   PARAMS_PHYS must be within 4MB of ZRELADDR
-#   INITRD_PHYS must be in RAM
-ZRELADDR    := $(zreladdr-y)
-PARAMS_PHYS := $(params_phys-y)
-INITRD_PHYS := $(initrd_phys-y)
+ifdef CONFIG_PHYS_OFFSET
+add_hex = $(shell printf 0x%x $$(( $(1) + $(2) )) )
+ZRELADDR    := $(call add_hex, $(CONFIG_PHYS_OFFSET), $(TEXT_OFFSET))
+endif
 
-export ZRELADDR INITRD_PHYS PARAMS_PHYS
+PHYS_OFFSET := $(CONFIG_PHYS_OFFSET)
+export ZRELADDR PARAMS_PHYS PHYS_OFFSET
 
 targets := Image zImage xipImage bootpImage uImage
 
        @$(check_for_multiple_loadaddr)
        $(call if_changed,uimage)
 
-$(obj)/bootp/bootp: $(obj)/zImage initrd FORCE
+$(obj)/bootp/bootp: $(obj)/zImage FORCE
        $(Q)$(MAKE) $(build)=$(obj)/bootp $@
 
 $(obj)/bootpImage: $(obj)/bootp/bootp FORCE
        $(call if_changed,objcopy)
 
-PHONY += initrd
-initrd:
-       @test "$(INITRD_PHYS)" != "" || \
-       (echo This machine does not support INITRD; exit -1)
-       @test "$(INITRD)" != "" || \
-       (echo You must specify INITRD; exit -1)
-
 subdir-            := bootp compressed dts
 
 # This file is included by the global makefile so that you can add your own
 # architecture-specific flags and dependencies.
 #
-
 GCOV_PROFILE   := n
 
+ifdef PHYS_OFFSET
+add_hex = $(shell printf 0x%x $$(( $(1) + $(2) )) )
+
+# If PHYS_OFFSET is set, INITRD_PHYS and PARAMS_PHYS can be derived,
+# otherwise they must be passed on the command line.
+#
+# Note: the following conditions must always be true:
+#   PARAMS_PHYS must be within 4MB of ZRELADDR
+#   INITRD_PHYS must be in RAM
+
+PARAMS_PHYS := $(call add_hex, $(PHYS_OFFSET), 0x100)
+
+# guess an initrd location if possible
+initrd_offset-$(CONFIG_ARCH_FOOTBRIDGE)        += 0x00800000
+initrd_offset-$(CONFIG_ARCH_SA1100)    += 0x00800000
+initrd_offset-$(CONFIG_ARCH_RPC)       += 0x08000000
+INITRD_OFFSET := $(initrd_offset-y)
+ifdef INITRD_OFFSET
+INITRD_PHYS := $(call add_hex, $(PHYS_OFFSET), $(INITRD_OFFSET))
+endif
+
+endif
+
+PHONY += initrd
+initrd:
+       @test "$(PARAMS_PHYS)" != "" || \
+       (echo bootpImage: You must specify PHYS_OFFSET of PARAMS_PHYS ; exit -1)
+       @test "$(INITRD_PHYS)" != "" || \
+       (echo bootpImage: You must specify INITRD_OFFSET or INITRD_PHYS ; exit -1)
+       @test "$(INITRD)" != "" || \
+       (echo bootpImage: You must specify INITRD; exit -1)
+
 LDFLAGS_bootp  := --no-undefined -X \
                 --defsym initrd_phys=$(INITRD_PHYS) \
                 --defsym params_phys=$(PARAMS_PHYS) -T
 
 $(obj)/kernel.o: arch/arm/boot/zImage FORCE
 
-$(obj)/initrd.o: $(INITRD) FORCE
+$(obj)/initrd.o: initrd $(INITRD) FORCE
 
 PHONY += $(INITRD)
 
+++ /dev/null
-# SPDX-License-Identifier: GPL-2.0-only
-# Empty file waiting for deletion once Makefile.boot isn't needed any more.
-# Patch waits for application at
-# https://www.arm.linux.org.uk/developer/patches/viewpatch.php?id=7889/1 .
 
+++ /dev/null
-# SPDX-License-Identifier: GPL-2.0
-zreladdr-$(CONFIG_ARCH_DAVINCI_DA8XX)          += 0xc0008000
-params_phys-$(CONFIG_ARCH_DAVINCI_DA8XX)       := 0xc0000100
-initrd_phys-$(CONFIG_ARCH_DAVINCI_DA8XX)       := 0xc0800000
-
-zreladdr-$(CONFIG_ARCH_DAVINCI_DMx)            += 0x80008000
-params_phys-$(CONFIG_ARCH_DAVINCI_DMx)         := 0x80000100
-initrd_phys-$(CONFIG_ARCH_DAVINCI_DMx)         := 0x80800000
 
+++ /dev/null
-# SPDX-License-Identifier: GPL-2.0-only
-   zreladdr-y  += 0x00008000
-params_phys-y  := 0x00000100
-initrd_phys-y  := 0x00800000
 
+++ /dev/null
-# SPDX-License-Identifier: GPL-2.0-only
-# Empty file waiting for deletion once Makefile.boot isn't needed any more.
 
+++ /dev/null
-# SPDX-License-Identifier: GPL-2.0-only
-   zreladdr-y  += 0x00008000
-params_phys-y  := 0x00000100
-initrd_phys-y  := 0x00800000
-
 
+++ /dev/null
-# SPDX-License-Identifier: GPL-2.0-only
-   zreladdr-y  += 0xa0008000
-params_phys-y  := 0xa0000100
-initrd_phys-y  := 0xa0800000
 
+++ /dev/null
-# SPDX-License-Identifier: GPL-2.0-only
-# Empty file waiting for deletion once Makefile.boot isn't needed any more.
-# Patch waits for application at
-# http://www.arm.linux.org.uk/developer/patches/viewpatch.php?id=7889/1 .
 
+++ /dev/null
-# SPDX-License-Identifier: GPL-2.0-only
-   zreladdr-y  += 0x80008000
-params_phys-y  := 0x80000100
-initrd_phys-y  := 0x82000000
 
+++ /dev/null
-# SPDX-License-Identifier: GPL-2.0-only
-   zreladdr-y          += 0x10008000
-params_phys-y          := 0x10000100
-initrd_phys-y          := 0x10800000
 
+++ /dev/null
-# SPDX-License-Identifier: GPL-2.0-only
-   zreladdr-y  += 0x10008000
-params_phys-y  := 0x10000100
-initrd_phys-y  := 0x18000000
-
 
+++ /dev/null
-# SPDX-License-Identifier: GPL-2.0
-
-ifeq ($(CONFIG_PM_H1940),y)
-       zreladdr-y      += 0x30108000
-       params_phys-y   := 0x30100100
-else
-       zreladdr-y      += 0x30008000
-       params_phys-y   := 0x30000100
-endif
 
+++ /dev/null
-# SPDX-License-Identifier: GPL-2.0-only
-ifeq ($(CONFIG_SA1111),y)
-   zreladdr-y  += 0xc0208000
-else
-   zreladdr-y  += 0xc0008000
-endif
-params_phys-y  := 0xc0000100
-initrd_phys-y  := 0xc0800000
-
 
+++ /dev/null
-# SPDX-License-Identifier: GPL-2.0-only
-# Empty file waiting for deletion once Makefile.boot isn't needed any more.
-# Patch waits for application at
-# https://www.arm.linux.org.uk/developer/patches/viewpatch.php?id=7889/1 .
 
+++ /dev/null
-# SPDX-License-Identifier: GPL-2.0-only
-# Empty file waiting for deletion once Makefile.boot isn't needed any more.
-# Patch waits for application at
-# http://www.arm.linux.org.uk/developer/patches/viewpatch.php?id=7889/1 .
 
+++ /dev/null
-# SPDX-License-Identifier: GPL-2.0-only
-   zreladdr-y  += 0x00008000
-params_phys-y  := 0x00000100
-initrd_phys-y  := 0x01000000