Skip to contentSkip to conversation

dtbsinstall: don't move target directory out of the way

PATCH RESEND In review Russell King 5 participants 6 messages Oct 20, 2015 – Jan 28, 2016

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH RESEND 1/1 dtbsinstall: don't move target directory out of the way

No other kernel installation target moves the target directory out of the way, even deleting an old version of it. These are destructive operations, ones which the kernel build system should not be making.

This behaviour prevents being able to do:

make install INSTALL_PATH=/some/path/boot make dtbs_install INSTALL_DTBS_PATH=/some/path/boot

As it causes the boot directory containing the kernel installed in step 1 to be moved to /some/path/boot.old. Things get even more fun if you do:

make install dtbs_install INSTALL_PATH=/some/path/boot INSTALL_DTBS_PATH=/some/path/boot

The kernel gets installed into /some/path/boot, then the directory gets renamed to /some/path/boot.old, and a new directory created to hold the dtbs. Even more fun if you supply -j2 when we end up with races in make.

Remove this behaviour.

If this behaviour is required at installation time, this should be done by the installation external to the kernel makefiles, just like it would be done for 'make modules_install'.

---
 scripts/Makefile.dtbinst | 2 --
 1 file changed, 2 deletions(-)
scripts/Makefile.dtbinst +0 -2
index 1c15717e0d56..a1be75d0a5fd 100644
@@ -23,8 +23,6 @@ include $(src)/Makefile
 PHONY += __dtbs_install_prep
 __dtbs_install_prep:
 ifeq ("$(dtbinst-root)", "$(obj)")
-	$(Q)if [ -d $(INSTALL_DTBS_PATH).old ]; then rm -rf $(INSTALL_DTBS_PATH).old; fi
-	$(Q)if [ -d $(INSTALL_DTBS_PATH) ]; then mv $(INSTALL_DTBS_PATH) $(INSTALL_DTBS_PATH).old; fi
 	$(Q)mkdir -p $(INSTALL_DTBS_PATH)
 endif
 
Signature · 1 line
2.1.0
Acked-by on v1 1/1
#1 lore raw

Hey Russell,

Quoted 20 lines · Russell King

No other kernel installation target moves the target directory out of the way, even deleting an old version of it. These are destructive operations, ones which the kernel build system should not be making.

This behaviour prevents being able to do:

make install INSTALL_PATH=/some/path/boot make dtbs_install INSTALL_DTBS_PATH=/some/path/boot

As it causes the boot directory containing the kernel installed in step 1 to be moved to /some/path/boot.old. Things get even more fun if you do:

make install dtbs_install INSTALL_PATH=/some/path/boot INSTALL_DTBS_PATH=/some/path/boot

The kernel gets installed into /some/path/boot, then the directory gets renamed to /some/path/boot.old, and a new directory created to hold the dtbs. Even more fun if you supply -j2 when we end up with races in make.

Quoted 7 lines

Remove this behaviour.

If this behaviour is required at installation time, this should be done by the installation external to the kernel makefiles, just like it would be done for 'make modules_install'.

fwiw, I honestly don't remember adding this brokenness, but the git history doesn't lie:

f4d4ffc03efc8 kbuild: dtbs_install: new make target

thx,

Jason.

Quoted 20 lines
---
 scripts/Makefile.dtbinst | 2 --
 1 file changed, 2 deletions(-)
scripts/Makefile.dtbinst +0 -2
index 1c15717e0d56..a1be75d0a5fd 100644
@@ -23,8 +23,6 @@ include $(src)/Makefile
 PHONY += __dtbs_install_prep
 __dtbs_install_prep:
 ifeq ("$(dtbinst-root)", "$(obj)")
-	$(Q)if [ -d $(INSTALL_DTBS_PATH).old ]; then rm -rf $(INSTALL_DTBS_PATH).old; fi
-	$(Q)if [ -d $(INSTALL_DTBS_PATH) ]; then mv $(INSTALL_DTBS_PATH) $(INSTALL_DTBS_PATH).old; fi
 	$(Q)mkdir -p $(INSTALL_DTBS_PATH)
 endif
 
Signature · 1 line
2.1.0
#2 lore raw

So what needs to happen to get this change merged?

Quoted 62 lines · Jason Cooper

Hey Russell,

Quoted 20 lines · Russell King

No other kernel installation target moves the target directory out of the way, even deleting an old version of it. These are destructive operations, ones which the kernel build system should not be making.

This behaviour prevents being able to do:

make install INSTALL_PATH=/some/path/boot make dtbs_install INSTALL_DTBS_PATH=/some/path/boot

As it causes the boot directory containing the kernel installed in step 1 to be moved to /some/path/boot.old. Things get even more fun if you do:

make install dtbs_install INSTALL_PATH=/some/path/boot INSTALL_DTBS_PATH=/some/path/boot

The kernel gets installed into /some/path/boot, then the directory gets renamed to /some/path/boot.old, and a new directory created to hold the dtbs. Even more fun if you supply -j2 when we end up with races in make.

Quoted 7 lines

Remove this behaviour.

If this behaviour is required at installation time, this should be done by the installation external to the kernel makefiles, just like it would be done for 'make modules_install'.

fwiw, I honestly don't remember adding this brokenness, but the git history doesn't lie:

f4d4ffc03efc8 kbuild: dtbs_install: new make target

thx,

Jason.

Quoted 20 lines
---
 scripts/Makefile.dtbinst | 2 --
 1 file changed, 2 deletions(-)
scripts/Makefile.dtbinst +0 -2
index 1c15717e0d56..a1be75d0a5fd 100644
@@ -23,8 +23,6 @@ include $(src)/Makefile
 PHONY += __dtbs_install_prep
 __dtbs_install_prep:
 ifeq ("$(dtbinst-root)", "$(obj)")
-	$(Q)if [ -d $(INSTALL_DTBS_PATH).old ]; then rm -rf $(INSTALL_DTBS_PATH).old; fi
-	$(Q)if [ -d $(INSTALL_DTBS_PATH) ]; then mv $(INSTALL_DTBS_PATH) $(INSTALL_DTBS_PATH).old; fi
 	$(Q)mkdir -p $(INSTALL_DTBS_PATH)
 endif
 
Signature · 1 line
2.1.0
Signature · 3 lines
RMK's Patch system: http://www.arm.linux.org.uk/developer/patches/
FTTC broadband for 0.8mile line: currently at 9.6Mbps down 400kbps up
according to speedtest.net.
#3 lore raw

Dne 27.1.2016 v 21:18 Russell King - ARM Linux napsal(a):

Quoted 1 line

So what needs to happen to get this change merged?

Rob, Grant, shall I merged it to the kbuild tree or do you want to take it?

Thanks,
Michal

Acked-by
#4 lore raw
Quoted 4 lines · Michal Marek

Dne 27.1.2016 v 21:18 Russell King - ARM Linux napsal(a):

Quoted 1 line

So what needs to happen to get this change merged?

Rob, Grant, shall I merged it to the kbuild tree or do you want to take it?

Yes, please take it.

Rob

#5 lore raw

Dne 28.1.2016 v 02:13 Rob Herring napsal(a):

Quoted 9 lines · Michal Marek
Quoted 4 lines

Dne 27.1.2016 v 21:18 Russell King - ARM Linux napsal(a):

Quoted 1 line

So what needs to happen to get this change merged?

Rob, Grant, shall I merged it to the kbuild tree or do you want to take it?

Yes, please take it.

Done.

Michal