Skip to contentSkip to conversation

grub2: if BR2_STRIP_none is 'y' then grub2 will not build

PATCH New Charles Hardin 3 participants 4 messages May 21, 2016 – Jul 31, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 grub2: if BR2_STRIP_none is 'y' then grub2 will not build

grub2 assumes the strip command will generate output and the output should always be stripped - so, just use the $(TARGET_CROSS)strip to make sure that the build succeeds regards of the buildroot strip configuration.

---
 boot/grub2/grub2.mk | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
boot/grub2/grub2.mk +4 -1
index 88a46f4..e656265 100644
@@ -45,6 +45,9 @@ endif
 # the confusion, it also uses NM, OBJCOPY and STRIP to build the
 # bootloader itself; none of these are used to build the native
 # tools.
+#
+# NOTE: TARGET_STRIP is overridden by BR2_STRIP_none, so always
+# use the cross compile variant to ensure grub2 builds
 
 GRUB2_CONF_ENV = \
 	$(HOST_CONFIGURE_OPTS) \
@@ -55,7 +58,7 @@ GRUB2_CONF_ENV = \
 	TARGET_LDFLAGS="$(TARGET_LDFLAGS)" \
 	NM="$(TARGET_NM)" \
 	OBJCOPY="$(TARGET_OBJCOPY)" \
-	STRIP="$(TARGET_STRIP)"
+	STRIP="$(TARGET_CROSS)strip"
 
 GRUB2_CONF_OPTS = \
 	--target=$(GRUB2_TARGET) \
Signature · 1 line
2.7.4 (Apple Git-66)
#1 lore raw

PATCH 1/1 sysvinit: update the inittab to support "single" from the kernel

When the kernel passes single in the command line, this translates into an init -s option that is suppose to drop into a shell after the sysinit and before the runlevel.

So, in busybox this is hardcoded - but, in sysvinit using the sysinit action for the rcS means that it will always be executed even when trying to get into single user mode for repair.

This change should run rcS in all of the expected runlevels 1-5 and should achieve the desired result compared to the busybox and still allow a single user shell to get started as expected before running rcS.

---
 package/sysvinit/inittab | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
package/sysvinit/inittab +1 -1
index 27eb4a6..fad91ea 100644
@@ -10,7 +10,7 @@ si2::sysinit:/bin/mkdir -p /dev/pts
 si3::sysinit:/bin/mkdir -p /dev/shm
 si4::sysinit:/bin/mount -a
 si5::sysinit:/bin/hostname -F /etc/hostname
-si6::sysinit:/etc/init.d/rcS
+rcS:12345:wait:/etc/init.d/rcS
 
 # S0:1:respawn:/sbin/getty -L ttyS0 115200 vt100 # GENERIC_SERIAL
 
Signature · 1 line
2.7.4 (Apple Git-66)
#2 lore raw

PATCH 1/1 grub2: if BR2_STRIP_none is 'y' then grub2 will not build

In reply to Charles Hardin

Charles, All,

On 2016-05-21 13:11 -0700, Charles Hardin spake thusly:

Quoted 3 lines

grub2 assumes the strip command will generate output and the output should always be stripped - so, just use the $(TARGET_CROSS)strip to make sure that the build succeeds regards of the buildroot

                                       ^^^^^^^

*regardless

Quoted 3 lines

strip configuration.

Otherwise:

Regards,
Yann E. MORIN.

Quoted 34 lines
---
 boot/grub2/grub2.mk | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
boot/grub2/grub2.mk +4 -1
index 88a46f4..e656265 100644
@@ -45,6 +45,9 @@ endif
 # the confusion, it also uses NM, OBJCOPY and STRIP to build the
 # bootloader itself; none of these are used to build the native
 # tools.
+#
+# NOTE: TARGET_STRIP is overridden by BR2_STRIP_none, so always
+# use the cross compile variant to ensure grub2 builds
 
 GRUB2_CONF_ENV = \
 	$(HOST_CONFIGURE_OPTS) \
@@ -55,7 +58,7 @@ GRUB2_CONF_ENV = \
 	TARGET_LDFLAGS="$(TARGET_LDFLAGS)" \
 	NM="$(TARGET_NM)" \
 	OBJCOPY="$(TARGET_OBJCOPY)" \
-	STRIP="$(TARGET_STRIP)"
+	STRIP="$(TARGET_CROSS)strip"
 
 GRUB2_CONF_OPTS = \
 	--target=$(GRUB2_TARGET) \
Signature · 6 lines
2.7.4 (Apple Git-66)

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#3 lore raw

PATCH 1/1 grub2: if BR2_STRIP_none is 'y' then grub2 will not build

In reply to Charles Hardin
Quoted 8 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Charles" == Charles Hardin <[email protected]> writes:

grub2 assumes the strip command will generate output and the output should always be stripped - so, just use the $(TARGET_CROSS)strip to make sure that the build succeeds regards of the buildroot strip configuration.

Committed, thanks.

Signature · 1 line
Bye, Peter Korsgaard