mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [ANNOUNCEMENT] Getting more of Barebox
@ 2022-04-01 14:59 Jules Maselbas
  2022-04-01 16:45 ` Ahmad Fatoum
  0 siblings, 1 reply; 3+ messages in thread
From: Jules Maselbas @ 2022-04-01 14:59 UTC (permalink / raw)
  To: barebox


Does booting linux is too slow ? Are you tired of linux getting in the
way? Can't you have something that just works™?

Why having to wait for linux to boot when you could join IRC channels
right from the start. There is nothing more to do, right? Then I have
the solution for you, introducing IRCbox: the true unlimited IRC
experience you always wished to exists!

IRCbox is a true suckless IRC client, it runs on the barebox bootloader
with the addition of a stupid TCP implementation. This is for the adept
that seek the true IRC experience, without any compromises. Forget all
distractions and embrace the true nature of IRC: join and chat with the
vast and infinite wired.

You can check it out here: https://github.com/jmaselbas/IRCbox

See you on IRC





_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Getting more of Barebox
  2022-04-01 14:59 [ANNOUNCEMENT] Getting more of Barebox Jules Maselbas
@ 2022-04-01 16:45 ` Ahmad Fatoum
  2022-04-01 17:43   ` Jules Maselbas
  0 siblings, 1 reply; 3+ messages in thread
From: Ahmad Fatoum @ 2022-04-01 16:45 UTC (permalink / raw)
  To: barebox; +Cc: Ahmad Fatoum

Finally, a no-frills way to join the currently relevant $supportgroup. Thx!

Please squash below for v2, so I don't need to carry patch for

  global.boot.default="$global.boot.default helpme"

around. Appreciated!

-------- 8< --------

 arch/arm/configs/ircbox_defconfig        |  1 +
 defaultenv/defaultenv-2-base/boot/helpme | 21 +++++++++++++++++++++
 net/irc.c                                | 13 +++++++++++--
 3 files changed, 33 insertions(+), 2 deletions(-)
 create mode 100755 defaultenv/defaultenv-2-base/boot/helpme

diff --git a/arch/arm/configs/ircbox_defconfig b/arch/arm/configs/ircbox_defconfig
index 854a80775d79..0232156e624e 100644
--- a/arch/arm/configs/ircbox_defconfig
+++ b/arch/arm/configs/ircbox_defconfig
@@ -13,6 +13,7 @@ CONFIG_CONSOLE_ACTIVATE_NONE=y
 CONFIG_CONSOLE_ALLOW_COLOR=y
 CONFIG_PARTITION_DISK_EFI=y
 CONFIG_DEFAULT_ENVIRONMENT_GENERIC_NEW=y
+CONFIG_DEFAULT_ENVIRONMENT_GENERIC_NEW_IKCONFIG=y
 CONFIG_STATE=y
 CONFIG_BOOTCHOOSER=y
 CONFIG_RESET_SOURCE=y
diff --git a/defaultenv/defaultenv-2-base/boot/helpme b/defaultenv/defaultenv-2-base/boot/helpme
new file mode 100755
index 000000000000..750445f297d7
--- /dev/null
+++ b/defaultenv/defaultenv-2-base/boot/helpme
@@ -0,0 +1,21 @@
+#!/bin/sh
+
+. /env/data/config
+
+if [ -n "$CONFIG_ARM" ]; then
+  supportgroup="armlinux"
+elif [ -n "$CONFIG_RISCV" ]; then
+  supportgroup="riscv"
+elif [ -n "$CONFIG_OPENRISC" ]; then
+  supportgroup="openrisc"
+fi
+
+if [ -n "$supportgroup" ]; then
+  readline "Want to ask for support on $supportgroup? [Y/n]  " linuxsupport
+fi
+
+if [ "$linuxsupport" != "Y" ]; then
+  supportgroup=barebox
+fi
+
+irc -n $global.user -c "/j $supportgroup" irc.libera.chat
diff --git a/net/irc.c b/net/irc.c
index 5ce2dbb4c8be..b42d4afc2c30 100644
--- a/net/irc.c
+++ b/net/irc.c
@@ -469,11 +469,15 @@ static int do_irc(int argc, char *argv[])
 {
 	int ret;
 	char *host, *p;
+	const char *command = NULL;
 	uint16_t port = 6667;
 	int opt;
 
-	while ((opt = getopt(argc, argv, "n:")) > 0) {
+	while ((opt = getopt(argc, argv, "c:n:")) > 0) {
 		switch (opt) {
+		case 'c':
+			command = optarg;
+			break;
 		case 'n':
 			strlcpy(nick, optarg, sizeof(nick));
 			break;
@@ -516,6 +520,10 @@ static int do_irc(int argc, char *argv[])
 	if (nick[0] == '\0')
 		strlcpy(nick, "barebox", sizeof(nick));
 	irc_login(host, "barebox");
+
+	if (command)
+		irc_input(command);
+
 	while (con->state == TCP_ESTABLISHED) {
 		int len;
 		len = irc_readline(input_line, sizeof(input_line) - 1);
@@ -541,11 +549,12 @@ out:
 BAREBOX_CMD_HELP_START(irc)
 BAREBOX_CMD_HELP_TEXT("Options:")
 BAREBOX_CMD_HELP_OPT ("-n NICK\t", "nick to use")
+BAREBOX_CMD_HELP_OPT ("-c COMMAND\t", "command to run after login")
 BAREBOX_CMD_HELP_END
 
 BAREBOX_CMD_START(irc)
 	.cmd		= do_irc,
 	BAREBOX_CMD_DESC("IRC client")
-	BAREBOX_CMD_OPTS("[-n] DESTINATION[[/]PORT]")
+	BAREBOX_CMD_OPTS("[-nc] DESTINATION[[/]PORT]")
 	BAREBOX_CMD_GROUP(CMD_GRP_NET)
 BAREBOX_CMD_END
-- 
2.34.1


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Getting more of Barebox
  2022-04-01 16:45 ` Ahmad Fatoum
@ 2022-04-01 17:43   ` Jules Maselbas
  0 siblings, 0 replies; 3+ messages in thread
From: Jules Maselbas @ 2022-04-01 17:43 UTC (permalink / raw)
  To: Ahmad Fatoum; +Cc: barebox

On Fri, Apr 01, 2022 at 06:45:58PM +0200, Ahmad Fatoum wrote:
> Finally, a no-frills way to join the currently relevant $supportgroup. Thx!
> 
> Please squash below for v2, so I don't need to carry patch for
> 
>   global.boot.default="$global.boot.default helpme"
> 
> around. Appreciated!
Thanks, applied as fixup for now. :)

> 
> -------- 8< --------
> 
>  arch/arm/configs/ircbox_defconfig        |  1 +
>  defaultenv/defaultenv-2-base/boot/helpme | 21 +++++++++++++++++++++
>  net/irc.c                                | 13 +++++++++++--
>  3 files changed, 33 insertions(+), 2 deletions(-)
>  create mode 100755 defaultenv/defaultenv-2-base/boot/helpme
> 
> diff --git a/arch/arm/configs/ircbox_defconfig b/arch/arm/configs/ircbox_defconfig
> index 854a80775d79..0232156e624e 100644
> --- a/arch/arm/configs/ircbox_defconfig
> +++ b/arch/arm/configs/ircbox_defconfig
> @@ -13,6 +13,7 @@ CONFIG_CONSOLE_ACTIVATE_NONE=y
>  CONFIG_CONSOLE_ALLOW_COLOR=y
>  CONFIG_PARTITION_DISK_EFI=y
>  CONFIG_DEFAULT_ENVIRONMENT_GENERIC_NEW=y
> +CONFIG_DEFAULT_ENVIRONMENT_GENERIC_NEW_IKCONFIG=y
>  CONFIG_STATE=y
>  CONFIG_BOOTCHOOSER=y
>  CONFIG_RESET_SOURCE=y
> diff --git a/defaultenv/defaultenv-2-base/boot/helpme b/defaultenv/defaultenv-2-base/boot/helpme
> new file mode 100755
> index 000000000000..750445f297d7
> --- /dev/null
> +++ b/defaultenv/defaultenv-2-base/boot/helpme
> @@ -0,0 +1,21 @@
> +#!/bin/sh
> +
> +. /env/data/config
> +
> +if [ -n "$CONFIG_ARM" ]; then
> +  supportgroup="armlinux"
> +elif [ -n "$CONFIG_RISCV" ]; then
> +  supportgroup="riscv"
> +elif [ -n "$CONFIG_OPENRISC" ]; then
> +  supportgroup="openrisc"
> +fi
> +
> +if [ -n "$supportgroup" ]; then
> +  readline "Want to ask for support on $supportgroup? [Y/n]  " linuxsupport
> +fi
> +
> +if [ "$linuxsupport" != "Y" ]; then
> +  supportgroup=barebox
> +fi
> +
> +irc -n $global.user -c "/j $supportgroup" irc.libera.chat
> diff --git a/net/irc.c b/net/irc.c
> index 5ce2dbb4c8be..b42d4afc2c30 100644
> --- a/net/irc.c
> +++ b/net/irc.c
> @@ -469,11 +469,15 @@ static int do_irc(int argc, char *argv[])
>  {
>  	int ret;
>  	char *host, *p;
> +	const char *command = NULL;
>  	uint16_t port = 6667;
>  	int opt;
>  
> -	while ((opt = getopt(argc, argv, "n:")) > 0) {
> +	while ((opt = getopt(argc, argv, "c:n:")) > 0) {
>  		switch (opt) {
> +		case 'c':
> +			command = optarg;
> +			break;
>  		case 'n':
>  			strlcpy(nick, optarg, sizeof(nick));
>  			break;
> @@ -516,6 +520,10 @@ static int do_irc(int argc, char *argv[])
>  	if (nick[0] == '\0')
>  		strlcpy(nick, "barebox", sizeof(nick));
>  	irc_login(host, "barebox");
> +
> +	if (command)
> +		irc_input(command);
> +
>  	while (con->state == TCP_ESTABLISHED) {
>  		int len;
>  		len = irc_readline(input_line, sizeof(input_line) - 1);
> @@ -541,11 +549,12 @@ out:
>  BAREBOX_CMD_HELP_START(irc)
>  BAREBOX_CMD_HELP_TEXT("Options:")
>  BAREBOX_CMD_HELP_OPT ("-n NICK\t", "nick to use")
> +BAREBOX_CMD_HELP_OPT ("-c COMMAND\t", "command to run after login")
>  BAREBOX_CMD_HELP_END
>  
>  BAREBOX_CMD_START(irc)
>  	.cmd		= do_irc,
>  	BAREBOX_CMD_DESC("IRC client")
> -	BAREBOX_CMD_OPTS("[-n] DESTINATION[[/]PORT]")
> +	BAREBOX_CMD_OPTS("[-nc] DESTINATION[[/]PORT]")
>  	BAREBOX_CMD_GROUP(CMD_GRP_NET)
>  BAREBOX_CMD_END
> -- 
> 2.34.1
> 
> 
> _______________________________________________
> barebox mailing list
> barebox@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/barebox
> 
> 
> To declare a filtering error, please use the following link : https://www.security-mail.net/reporter.php?mid=15e93.62472cc9.7208e.0&r=jmaselbas%40kalray.eu&s=barebox-bounces%2Bjmaselbas%3Dkalray.eu%40lists.infradead.org&o=Re%3A+Getting+more+of+Barebox&verdict=C&c=727c2b6f1cada1d321c2737135dbdd0d0d4abeda
> 





_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-04-01 17:44 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-01 14:59 [ANNOUNCEMENT] Getting more of Barebox Jules Maselbas
2022-04-01 16:45 ` Ahmad Fatoum
2022-04-01 17:43   ` Jules Maselbas

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox