Initial Commit
- initial default booting image
This commit is contained in:
@@ -0,0 +1,38 @@
|
||||
From 4fa85c85b9a76afd3b19ed75bf17ccd2940f1f55 Mon Sep 17 00:00:00 2001
|
||||
From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
|
||||
Date: Sun, 16 Feb 2020 16:18:48 +0100
|
||||
Subject: [PATCH] input.h: add missing include on stdio.h
|
||||
|
||||
This will fix the following build failure on uclibc:
|
||||
|
||||
test -n "/usr/lfs/hdd_v1/rc-buildroot-test/scripts/instance-2/output/host/bin/arm-linux-ranlib" && /usr/lfs/hdd_v1/rc-buildroot-test/scripts/instance-2/output/host/bin/arm-linux-ranlib libsh.a
|
||||
In file included from ./exec.def:71:
|
||||
../input.h:76:3: error: unknown type name 'FILE'
|
||||
FILE *file;
|
||||
^~~~
|
||||
|
||||
Fixes:
|
||||
- http://autobuild.buildroot.org/results/bfca306868df54c567215c45c8cdac838d02f567
|
||||
|
||||
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
|
||||
[Upstream status: https://savannah.gnu.org/support/?110196]
|
||||
---
|
||||
input.h | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/input.h b/input.h
|
||||
index 6aef1269..08b0fdea 100644
|
||||
--- a/input.h
|
||||
+++ b/input.h
|
||||
@@ -21,6 +21,8 @@
|
||||
#if !defined (_INPUT_H_)
|
||||
#define _INPUT_H_
|
||||
|
||||
+#include <stdio.h>
|
||||
+
|
||||
#include "stdc.h"
|
||||
|
||||
/* Function pointers can be declared as (Function *)foo. */
|
||||
--
|
||||
2.24.1
|
||||
|
||||
@@ -0,0 +1,63 @@
|
||||
From 0217fc2816e47ee296472df71d1011f0eb2937e6 Mon Sep 17 00:00:00 2001
|
||||
From: Vincent Fazio <vfazio@gmail.com>
|
||||
Date: Fri, 27 Jan 2023 14:37:26 -0600
|
||||
Subject: [PATCH] parse.y: fix compilation for non-multibyte builds
|
||||
|
||||
Builds configured with --disable-multibyte or when the toolchain does
|
||||
not have WCHAR support would encounter a compile error due to an
|
||||
undeclared reference to shell_input_line_property in shell_getc.
|
||||
|
||||
Add a HANDLE_MULTIBYTE guard to conditionally compile the block that
|
||||
references shell_input_line_property in shell_getc as it's only declared
|
||||
when HANDLE_MULTIBYTE is defined.
|
||||
|
||||
Signed-off-by: Vincent Fazio <vfazio@gmail.com>
|
||||
[Upstream status: https://savannah.gnu.org/patch/index.php?10309]
|
||||
---
|
||||
parse.y | 2 ++
|
||||
y.tab.c | 2 ++
|
||||
2 files changed, 4 insertions(+)
|
||||
|
||||
diff --git a/parse.y b/parse.y
|
||||
index 1d12e639..8f1355c6 100644
|
||||
--- a/parse.y
|
||||
+++ b/parse.y
|
||||
@@ -2640,6 +2640,7 @@ next_alias_char:
|
||||
parser_state |= PST_ENDALIAS;
|
||||
/* We need to do this to make sure last_shell_getc_is_singlebyte returns
|
||||
true, since we are returning a single-byte space. */
|
||||
+#if defined (HANDLE_MULTIBYTE)
|
||||
if (shell_input_line_index == shell_input_line_len && last_shell_getc_is_singlebyte == 0)
|
||||
{
|
||||
#if 0
|
||||
@@ -2653,6 +2654,7 @@ next_alias_char:
|
||||
shell_input_line_property[shell_input_line_index - 1] = 1;
|
||||
#endif
|
||||
}
|
||||
+#endif /* HANDLE_MULTIBYTE */
|
||||
return ' '; /* END_ALIAS */
|
||||
}
|
||||
#endif
|
||||
diff --git a/y.tab.c b/y.tab.c
|
||||
index 50c5845b..799f730f 100644
|
||||
--- a/y.tab.c
|
||||
+++ b/y.tab.c
|
||||
@@ -4955,6 +4955,7 @@ next_alias_char:
|
||||
parser_state |= PST_ENDALIAS;
|
||||
/* We need to do this to make sure last_shell_getc_is_singlebyte returns
|
||||
true, since we are returning a single-byte space. */
|
||||
+#if defined (HANDLE_MULTIBYTE)
|
||||
if (shell_input_line_index == shell_input_line_len && last_shell_getc_is_singlebyte == 0)
|
||||
{
|
||||
#if 0
|
||||
@@ -4968,6 +4969,7 @@ next_alias_char:
|
||||
shell_input_line_property[shell_input_line_index - 1] = 1;
|
||||
#endif
|
||||
}
|
||||
+#endif /* HANDLE_MULTIBYTE */
|
||||
return ' '; /* END_ALIAS */
|
||||
}
|
||||
#endif
|
||||
--
|
||||
2.25.1
|
||||
|
||||
25
package/bash/Config.in
Normal file
25
package/bash/Config.in
Normal file
@@ -0,0 +1,25 @@
|
||||
config BR2_PACKAGE_BASH
|
||||
bool "bash"
|
||||
# uses fork()
|
||||
depends on BR2_USE_MMU
|
||||
depends on BR2_PACKAGE_BUSYBOX_SHOW_OTHERS
|
||||
select BR2_PACKAGE_NCURSES
|
||||
select BR2_PACKAGE_READLINE
|
||||
help
|
||||
The standard GNU Bourne again shell.
|
||||
|
||||
http://tiswww.case.edu/php/chet/bash/bashtop.html
|
||||
|
||||
if BR2_PACKAGE_BASH
|
||||
|
||||
config BR2_PACKAGE_BASH_LOADABLE_EXAMPLES
|
||||
bool "loadable examples"
|
||||
depends on !BR2_STATIC_LIBS
|
||||
help
|
||||
This option will enable the installation of the "loadable"
|
||||
examples, which are dynamically loadable extension providing
|
||||
additional built-ins commands to bash. There are typically
|
||||
not needed as they are provided as regular, external
|
||||
commands.
|
||||
|
||||
endif
|
||||
4
package/bash/bash.hash
Normal file
4
package/bash/bash.hash
Normal file
@@ -0,0 +1,4 @@
|
||||
# Locally calculated after checking pgp signature from
|
||||
# https://ftp.gnu.org/gnu/bash/bash-5.2.37.tar.gz.sig
|
||||
sha256 9599b22ecd1d5787ad7d3b7bf0c59f312b3396d1e281175dd1f8a4014da621ff bash-5.2.37.tar.gz
|
||||
sha256 8ceb4b9ee5adedde47b31e975c1d90c73ad27b6b165a1dcd80c7c545eb65b903 COPYING
|
||||
80
package/bash/bash.mk
Normal file
80
package/bash/bash.mk
Normal file
@@ -0,0 +1,80 @@
|
||||
################################################################################
|
||||
#
|
||||
# bash
|
||||
#
|
||||
################################################################################
|
||||
|
||||
BASH_VERSION = 5.2.37
|
||||
BASH_SITE = $(BR2_GNU_MIRROR)/bash
|
||||
BASH_DEPENDENCIES = ncurses readline host-bison
|
||||
BASH_LICENSE = GPL-3.0+
|
||||
BASH_LICENSE_FILES = COPYING
|
||||
BASH_CPE_ID_VENDOR = gnu
|
||||
|
||||
# We want the bash binary in /bin
|
||||
BASH_CONF_OPTS = \
|
||||
--bindir=/bin \
|
||||
--with-installed-readline \
|
||||
--without-bash-malloc
|
||||
|
||||
BASH_CONF_ENV = \
|
||||
ac_cv_rl_prefix="$(STAGING_DIR)" \
|
||||
ac_cv_rl_version="$(READLINE_VERSION)" \
|
||||
bash_cv_getcwd_malloc=yes \
|
||||
bash_cv_job_control_missing=present \
|
||||
bash_cv_sys_named_pipes=present \
|
||||
bash_cv_func_sigsetjmp=present \
|
||||
bash_cv_printf_a_format=yes
|
||||
|
||||
# Can be dropped when bash is bumped to 5.3 or newer.
|
||||
ifeq ($(BR2_TOOLCHAIN_GCC_AT_LEAST_15),y)
|
||||
BASH_CONF_ENV += CFLAGS="$(TARGET_CFLAGS) -std=gnu17"
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_HOST_GCC_AT_LEAST_15),y)
|
||||
BASH_CONF_ENV += CFLAGS_FOR_BUILD="$(HOST_CFLAGS) -std=gnu17"
|
||||
endif
|
||||
|
||||
# The static build needs some trickery
|
||||
ifeq ($(BR2_STATIC_LIBS),y)
|
||||
BASH_CONF_OPTS += --enable-static-link
|
||||
# bash wants to redefine the getenv() function. To check whether this is
|
||||
# possible, AC_TRY_RUN is used which is not possible in
|
||||
# cross-compilation.
|
||||
# On uClibc, redefining getenv is not possible; on glibc and musl it is.
|
||||
# Related:
|
||||
# http://lists.gnu.org/archive/html/bug-bash/2012-03/msg00052.html
|
||||
ifeq ($(BR2_TOOLCHAIN_USES_UCLIBC),y)
|
||||
BASH_CONF_ENV += bash_cv_getenv_redef=no
|
||||
else
|
||||
BASH_CONF_ENV += bash_cv_getenv_redef=yes
|
||||
endif
|
||||
endif
|
||||
|
||||
define BASH_REMOVE_UNUSED_FILES
|
||||
rm -f $(TARGET_DIR)/bin/bashbug
|
||||
endef
|
||||
BASH_POST_INSTALL_TARGET_HOOKS += BASH_REMOVE_UNUSED_FILES
|
||||
|
||||
ifeq ($(BR2_PACKAGE_BASH_LOADABLE_EXAMPLES),y)
|
||||
define BASH_REMOVE_LOADABLE_UNUSED_FILES
|
||||
rm -f $(TARGET_DIR)/usr/lib/bash/Makefile.inc
|
||||
rm -f $(TARGET_DIR)/usr/lib/bash/loadables.h
|
||||
endef
|
||||
BASH_POST_INSTALL_TARGET_HOOKS += BASH_REMOVE_LOADABLE_UNUSED_FILES
|
||||
else
|
||||
define BASH_REMOVE_LOADABLE_EXAMPLES
|
||||
rm -rf $(TARGET_DIR)/usr/lib/bash
|
||||
endef
|
||||
BASH_POST_INSTALL_TARGET_HOOKS += BASH_REMOVE_LOADABLE_EXAMPLES
|
||||
endif
|
||||
|
||||
# Add /bin/bash to /etc/shells otherwise some login tools like dropbear
|
||||
# can reject the user connection. See man shells.
|
||||
define BASH_ADD_BASH_TO_SHELLS
|
||||
grep -qsE '^/bin/bash$$' $(TARGET_DIR)/etc/shells \
|
||||
|| echo "/bin/bash" >> $(TARGET_DIR)/etc/shells
|
||||
endef
|
||||
BASH_TARGET_FINALIZE_HOOKS += BASH_ADD_BASH_TO_SHELLS
|
||||
|
||||
$(eval $(autotools-package))
|
||||
Reference in New Issue
Block a user