bootwrapper: Add support for the sandpoint platform
Subsystems (2)
PATCH 6/6 bootwrapper: Add support for the sandpoint platform
This patch adds support for the Freescale Sandpoint platform to the bootwrapper.
--
Makefile | 3 + mpc10x.c | 109 ++++++++++++++++++++++++++++++++++++++++++++ sandpoint.c | 147 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 259 insertions(+)
--
arch/powerpc/boot/Makefile +3 -0
@@ -40,6 +40,9 @@ src-boot := crt0.S string.S stdio.c main ifeq ($(CONFIG_PPC_MULTIPLATFORM),y) src-boot += of.c endif +ifeq ($(CONFIG_SANDPOINT),y) +src-boot += sandpoint.c mpc10x.c dink.c serial.c ns16550.c util.S +endif src-boot += $(zlib) src-boot := $(addprefix $(obj)/, $(src-boot)) obj-boot := $(addsuffix .o, $(basename $(src-boot)))
arch/powerpc/boot/mpc10x.c new file +109 -0
109 lines not on this page · raw message
arch/powerpc/boot/sandpoint.c new file +147 -0
147 lines not on this page · raw message
Quoted 2 lines · Mark A. Greer
This patch adds support for the Freescale Sandpoint platform to the bootwrapper.
Mark,
you put sandpoint.c and mpc10x.c under boot... I don't quite understand your concept now: you mean this is the code needed to __boot__ sandpoint. Ok. I can also imagine that as soon as the system is up you don't need any further specific code - only .init* sections. But - does this mean that every platform will now put its support flat under boot? Or is it a special case? Or are there also run-time fixups that you didn't include with this patch-series? Also <board>_reset doesn't quite fit under boot, or am I misunderstanding something?
Thanks
Guennadi
---
Guennadi Liakhovetski
Quoted 4 lines · Guennadi Liakhovetski
Quoted 2 lines · Mark A. Greer
This patch adds support for the Freescale Sandpoint platform to the bootwrapper.
Hi Guennadi.
Quoted 4 lines
Mark,
you put
sandpoint.candmpc10x.cunder boot... I don't quite understand your concept now: you mean this is the code needed to__boot__sandpoint.
Depends on what you mean by "__boot__". This is the code needed to prepare things--the flat dev tree in this case--so that the kernel can boot when running the DINK firmware on a sandpoint.
Quoted 3 lines
Ok. I can also imagine that as soon as the system is up you don't need any further specific code - only .init* sections. But - does this mean that every platform will now put its support flat under boot?
You need to read <file:Documentation/powerpc/booting-without-of.txt>.
Quoted 3 lines
Or is it a
special case? Or are there also run-time fixups that you didn't include with this patch-series? Also <board>_reset doesn't quite fit under boot,
Yes it does. Follow exit().
Quoted 1 line
or am I misunderstanding something?
Yes, you're missing the whole point of the patch series...
Did you read "[PATCH 0/6] bootwrapper: arch/powerpc/boot code reorg patches"?
The intent was not to add kernel support for the sanpoint. The intent was to solicit comments on a reorg of the bootwrapper code.
Mark
Quoted 2 lines · Mark A. Greer
prepare things--the flat dev tree in this case--so that the kernel can boot when running the DINK firmware on a sandpoint.
I should rephrase this to, "so that the kernel will boot on a system that has DINK as its firmware."
Mark
Quoted 3 lines · Mark A. Greer
Depends on what you mean by "
__boot__". This is the code needed to prepare things--the flat dev tree in this case--so that the kernel can boot when running the DINK firmware on a sandpoint.
...after getting some vitamins on irc and re-reading some emails, I finally realised what the stuff under boot is for. Expect more confusion from me:-)
Thanks
Guennadi
---
Guennadi Liakhovetski
Quoted 9 lines · Guennadi Liakhovetski
Quoted 3 lines · Mark A. Greer
Depends on what you mean by "
__boot__". This is the code needed to prepare things--the flat dev tree in this case--so that the kernel can boot when running the DINK firmware on a sandpoint....after getting some vitamins on irc and re-reading some emails, I finally realised what the stuff under boot is for. Expect more confusion from me:-)
Ok, I think, now I have an idea what all these wrappers are about:
we want to be able to boot linux from a number of different environments:
OF
various firmwares / boot ROMs / bootloaders with very different capabilities of running foreign code and different calling conventions
"native" Linux bootloaders like u-Boot, etc.
kexec
...
and the chosen approach is to have a kernel proper common to all these possibilities, and "wrappers". These wrappers are boot-method and board specific, are distributed with the kernel, located under arch/powerpc/boot, get linked with the kernel proper, fdt, with various compression possibilities...
Have I got it right now? One of the reasons of me having problems to understand this is that on ARM we just say "to boot kernel you have to have MMU switched off, registers must contain this and that, you have to prepare a list of ATAGs, copy the kernel to a certain address, and jump to it. If you don't do that you cannot run Linux on your system":-)
Thanks
Guennadi
---
Guennadi Liakhovetski
Quoted 33 lines · Guennadi Liakhovetski
Quoted 9 lines · Guennadi Liakhovetski
Quoted 3 lines · Mark A. Greer
Depends on what you mean by "
__boot__". This is the code needed to prepare things--the flat dev tree in this case--so that the kernel can boot when running the DINK firmware on a sandpoint....after getting some vitamins on irc and re-reading some emails, I finally realised what the stuff under boot is for. Expect more confusion from me:-)
Ok, I think, now I have an idea what all these wrappers are about:
we want to be able to boot linux from a number of different environments:
OF
various firmwares / boot ROMs / bootloaders with very different capabilities of running foreign code and different calling conventions
"native" Linux bootloaders like u-Boot, etc.
kexec
...
and the chosen approach is to have a kernel proper common to all these possibilities, and "wrappers". These wrappers are boot-method and board specific, are distributed with the kernel, located under
arch/powerpc/boot, get linked with the kernel proper, fdt, with various compression possibilities...
Quoted 5 lines
Have I got it right now? One of the reasons of me having problems to understand this is that on ARM we just say "to boot kernel you have to have MMU switched off, registers must contain this and that, you have to prepare a list of ATAGs, copy the kernel to a certain address, and jump to it. If you don't do that you cannot run Linux on your system":-)
Sure, everybody that's familiar with ARM Linux is aware of that. That's what the new fdt requirement in arch/powerpc/ does for PPC as well. arch/powerpc/boot/ wrapper code isn't technically part of the kernel, it's merely distributed with the kernel source for convenience. It's a boot shim to translate from "legacy" firmwares (since they aren't easily replaced) to the standard method. It is independent of the kernel proper.
-Matt
Re: [PATCH 6/6] Add support for the sandpoint platform
In reply to Mark A. GreerThis patch adds support for the Freescale Sandpoint platform to the bootwrapper.
--
boot/Makefile | 3 boot/dts/sandpoint.dts | 218 +++++++ boot/mpc10x.c | 109 +++ boot/sandpoint.c | 147 +++++ configs/sandpoint_defconfig | 1111 ++++++++++++++++++++++++++++++++++++++ platforms/embedded6xx/Kconfig | 2 platforms/embedded6xx/Makefile | 1 platforms/embedded6xx/sandpoint.c | 385 +++++++++++++ 8 files changed, 1976 insertions(+)
--
arch/powerpc/boot/Makefile +3 -0
@@ -42,6 +42,9 @@ src-boot += of.c else src-boot += flatdevtree_misc.c endif +ifeq ($(CONFIG_SANDPOINT),y) +src-boot += sandpoint.c mpc10x.c simple_alloc.c serial.c ns16550.c util.S +endif src-boot += $(zlib) src-boot := $(addprefix $(obj)/, $(src-boot)) obj-boot := $(addsuffix .o, $(basename $(src-boot)))
arch/powerpc/boot/dts/sandpoint.dts new file +218 -0
218 lines not on this page · raw message
arch/powerpc/boot/mpc10x.c new file +109 -0
109 lines not on this page · raw message
arch/powerpc/boot/sandpoint.c new file +147 -0
147 lines not on this page · raw message
arch/powerpc/configs/sandpoint_defconfig new file +1111 -0
1,111 lines not on this page · raw message
arch/powerpc/platforms/embedded6xx/Kconfig +2 -0
@@ -69,7 +69,9 @@ config PRPMC800 config SANDPOINT bool "Motorola-Sandpoint" + select MPIC select PPC_I8259 + select PPC_UDBG_16550 help Select SANDPOINT if configuring for a Motorola Sandpoint X3 (any flavor).
arch/powerpc/platforms/embedded6xx/Makefile +1 -0
@@ -2,3 +2,4 @@ # # Makefile for the 6xx/7xx/7xxxx linux kernel. # obj-$(CONFIG_MPC7448HPC2) += mpc7448_hpc2.o +obj-$(CONFIG_SANDPOINT) += sandpoint.o
arch/powerpc/platforms/embedded6xx/sandpoint.c new file +385 -0
385 lines not on this page · raw message
Re: [PATCH 6/6] Add support for the sandpoint platform
This replaces the previous patch in this thread which had some errors in the sandpoint.dts file.
Mark
--
This patch adds support for the Freescale Sandpoint platform to the bootwrapper.
--
boot/Makefile | 3 boot/dts/sandpoint.dts | 217 +++++++ boot/mpc10x.c | 109 +++ boot/sandpoint.c | 147 +++++ configs/sandpoint_defconfig | 1111 ++++++++++++++++++++++++++++++++++++++ platforms/embedded6xx/Kconfig | 2 platforms/embedded6xx/Makefile | 1 platforms/embedded6xx/sandpoint.c | 385 +++++++++++++ 8 files changed, 1975 insertions(+)
--
arch/powerpc/boot/Makefile +3 -0
@@ -42,6 +42,9 @@ src-boot += of.c else src-boot += flatdevtree_misc.c endif +ifeq ($(CONFIG_SANDPOINT),y) +src-boot += sandpoint.c mpc10x.c simple_alloc.c serial.c ns16550.c util.S +endif src-boot += $(zlib) src-boot := $(addprefix $(obj)/, $(src-boot)) obj-boot := $(addsuffix .o, $(basename $(src-boot)))
arch/powerpc/boot/dts/sandpoint.dts new file +217 -0
217 lines not on this page · raw message
arch/powerpc/boot/mpc10x.c new file +109 -0
109 lines not on this page · raw message
arch/powerpc/boot/sandpoint.c new file +147 -0
147 lines not on this page · raw message
arch/powerpc/configs/sandpoint_defconfig new file +1111 -0
1,111 lines not on this page · raw message
arch/powerpc/platforms/embedded6xx/Kconfig +2 -0
@@ -69,7 +69,9 @@ config PRPMC800 config SANDPOINT bool "Motorola-Sandpoint" + select MPIC select PPC_I8259 + select PPC_UDBG_16550 help Select SANDPOINT if configuring for a Motorola Sandpoint X3 (any flavor).
arch/powerpc/platforms/embedded6xx/Makefile +1 -0
@@ -2,3 +2,4 @@ # # Makefile for the 6xx/7xx/7xxxx linux kernel. # obj-$(CONFIG_MPC7448HPC2) += mpc7448_hpc2.o +obj-$(CONFIG_SANDPOINT) += sandpoint.o
arch/powerpc/platforms/embedded6xx/sandpoint.c new file +385 -0
385 lines not on this page · raw message