Skip to contentSkip to conversation

Make install target work

PATCH In review Martin Habets 2 participants 6 messages Jun 16, 2004 – Jun 18, 2004

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Make install target work

This patch makes the install target work. After all, it is already mentioned in the 'make help' output.
The only question is, should it install zImage by default? I always install vmlinux, so I used that.

Martin

arch/ppc/Makefile renamed from arch/ppc/Makefile.orig +2 -1
@@ -46,6 +46,7 @@
 drivers-$(CONFIG_OCP)		+= arch/ppc/ocp/
 
 BOOT_TARGETS = zImage zImage.initrd znetboot znetboot.initrd vmlinux.sm
+BOOT_TARGETS += install
 
 .PHONY: $(BOOT_TARGETS)
 
@@ -70,7 +71,7 @@
   @echo '  install         - Install kernel using'
   @echo '                    (your) ~/bin/installkernel or'
   @echo '                    (distribution) /sbin/installkernel or'
-  @echo '                    install to $$(INSTALL_PATH) and run lilo'
+  @echo '                    install to $$(INSTALL_PATH) and run ybin'
   @echo '  *_defconfig     - Select default config from arch/$(ARCH)/ppc/configs'
 endef
 
arch/ppc/boot/Makefile renamed from arch/ppc/boot/Makefile.orig +3 -0
@@ -32,3 +32,6 @@
 $(bootdir-y): $(addprefix $(obj)/,$(subdir-y)) \
 		$(addprefix $(obj)/,$(host-progs))
 	$(Q)$(MAKE) $(build)=$(obj)/$@ $(MAKECMDGOALS)
+
+install: vmlinux
+	sh $(srctree)/$(src)/install.sh $(KERNELRELEASE) $< System.map "$(INSTALL_PATH)"
arch/ppc/boot/install.sh renamed from arch/ppc/boot/install.sh.orig +50 -0

50 lines not on this page · raw message

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

#1 lore raw
Quoted 4 lines · Martin Habets

This patch makes the install target work. After all, it is already mentioned in the 'make help' output.
The only question is, should it install zImage by default? I always install vmlinux, so I used that.

Given the number of different ways we have to deal with (this really only handles pmac) I'd much rather just have boot/install.sh run either the distribution or user-provided script.

--
Tom Rini
http://gate.crashing.org/~trini/

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

#2 lore raw
Quoted 11 lines · Tom Rini
Quoted 4 lines · Martin Habets

This patch makes the install target work. After all, it is already mentioned in the 'make help' output.
The only question is, should it install zImage by default? I always install vmlinux, so I used that.

Given the number of different ways we have to deal with (this really only handles pmac) I'd much rather just have boot/install.sh run either the distribution or user-provided script.

Ehh.. that's exactly what install.sh tries to do! Only if both of these do not exist will the bottom part of the code be executed. The distribution provided scripts want an image to install. I agree that it is impossible to supply the right image for all systems. But maybe it is possible to echance this patch for some systems, providing a different image based on config settings?

--
Martin

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

#3 lore raw
Quoted 9 lines · Martin Habets
Quoted 8 lines · Tom Rini
Quoted 4 lines · Martin Habets

This patch makes the install target work. After all, it is already mentioned in the 'make help' output.
The only question is, should it install zImage by default? I always install vmlinux, so I used that.

Quoted 6 lines
Quoted 3 lines

Given the number of different ways we have to deal with (this really only handles pmac) I'd much rather just have boot/install.sh run either the distribution or user-provided script.

Ehh.. that's exactly what install.sh tries to do! Only if both of these do not exist will the bottom part of the code be executed.

Right. And it's the bits at the bottom that I don't like.

Quoted 4 lines

The distribution provided scripts want an image to install. I agree that it is impossible to supply the right image for all systems. But maybe it is possible to echance this patch for some systems, providing a different image based on config settings?

Possibly. But I'm not convinced that the complexity will buy us anything over the distribution script (which should cover all of the pmac cases, if not, bug your distribution :)) and the user provided hook.

--
Tom Rini
http://gate.crashing.org/~trini/

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

#4 lore raw
Quoted 12 lines · Tom Rini
Quoted 9 lines · Martin Habets
Quoted 8 lines · Tom Rini
Quoted 4 lines · Martin Habets

This patch makes the install target work. After all, it is already mentioned in the 'make help' output.
The only question is, should it install zImage by default? I always install vmlinux, so I used that.

Quoted 8 lines
Quoted 6 lines
Quoted 3 lines

Given the number of different ways we have to deal with (this really only handles pmac) I'd much rather just have boot/install.sh run either the distribution or user-provided script.

Ehh.. that's exactly what install.sh tries to do! Only if both of these do not exist will the bottom part of the code be executed.

Right. And it's the bits at the bottom that I don't like.

Ok, so you'd like to fail if neither nethod is avaiable (right?). I have no problem with that, but realize that it causes some inconsistent behaviour compared to other architectures.
Can you explain why or what you don't like, please?

Quoted 9 lines
Quoted 4 lines

The distribution provided scripts want an image to install. I agree that it is impossible to supply the right image for all systems. But maybe it is possible to echance this patch for some systems, providing a different image based on config settings?

Possibly. But I'm not convinced that the complexity will buy us anything over the distribution script (which should cover all of the pmac cases, if not, bug your distribution :)) and the user provided hook.

Yes, covering all cases in the kernel would be overkill, but I did not suggest that. Pushing all this to the distribution script is not right either. That's not much more than a fancy copy script, and keeping it in sync with kernel code (directory and filenames) would be impossible. Besides, this kind of logic belongs in the kernel, if anywhere.

But there is an intermediate solution, which should satisfy all users:
a makefile variable can be overruled by users, e.g.
make BOOTIMAGE=arch/ppc/boot/images/zImage.prep install
This can be used with a distribution script or a user provided one. If the distribution scripts ever become smart enough, which I seriously doubt, the override is no longer needed.
What do you think of this approach?

--
Martin

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

#5 lore raw
Quoted 17 lines · Martin Habets
Quoted 16 lines · Tom Rini
Quoted 13 lines · Martin Habets
Quoted 11 lines · Tom Rini
Quoted 4 lines · Martin Habets

This patch makes the install target work. After all, it is already mentioned in the 'make help' output.
The only question is, should it install zImage by default? I always install vmlinux, so I used that.

Given the number of different ways we have to deal with (this really only handles pmac) I'd much rather just have boot/install.sh run either the distribution or user-provided script.

Quoted 8 lines
Quoted 4 lines
Quoted 2 lines

Ehh.. that's exactly what install.sh tries to do! Only if both of these do not exist will the bottom part of the code be executed.

Right. And it's the bits at the bottom that I don't like.

Ok, so you'd like to fail if neither nethod is avaiable (right?). I have no problem with that, but realize that it causes some inconsistent behaviour compared to other architectures.

By fail just:
echo "No install method found, nothing installed"
is fine.

Quoted 7 lines

Can you explain why or what you don't like, please?

Quoted 5 lines
Quoted 4 lines

The distribution provided scripts want an image to install. I agree that it is impossible to supply the right image for all systems. But maybe it is possible to echance this patch for some systems, providing a different image based on config settings?

Quoted 7 lines
Quoted 4 lines

Possibly. But I'm not convinced that the complexity will buy us anything over the distribution script (which should cover all of the pmac cases, if not, bug your distribution :)) and the user provided hook.

Yes, covering all cases in the kernel would be overkill, but I did not suggest that.

I'm talking about the complexity of covering most of the cases, for non-pmac. But..

Quoted 2 lines

Pushing all this to the distribution script is not right either.

I disagree. Given that the common case is using yaboot, that's not a big burden on the distribution. But if one decides to support grub or U-Boot (with the latter being a bit more likely, IMHO, since it's what the Pegasos boards use, I believe), it does become a distribution problem to know how it set things up so that the user can add new kernels, not the kernels responsibility to know where it has to put something for a given distribution.

Quoted 2 lines

That's not much more than a fancy copy script, and keeping it in sync with kernel code (directory and filenames) would be impossible.

This is rather static information, and I've taken some pains to ensure that image names / locations have stayed consistent in 2.$(stable).

Quoted 5 lines

Besides, this kind of logic belongs in the kernel, if anywhere.

But there is an intermediate solution, which should satisfy all users:
a makefile variable can be overruled by users, e.g.
make BOOTIMAGE=arch/ppc/boot/images/zImage.prep install

Actually, Sam Ravnborg introduced a patch, which I think will be accepted soon, to add a BOOT_IMAGE variable to the Makefiles, so that 'make rpm/deb/tarball' will be cleaner. Once that happens, we can revisit the idea of hooking an install script up, for all of the various targets.

--
Tom Rini
http://gate.crashing.org/~trini/

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/