wok-current rev 23972

ipxe: add isgt command
author Pascal Bellard <pascal.bellard@slitaz.org>
date Wed Oct 21 13:33:36 2020 +0000 (2020-10-21)
parents ee961aa986c8
children 848e2021d813
files buildroot/receipt ipxe/receipt ipxe/stuff/cmd_isgt.u
line diff
     1.1 --- a/buildroot/receipt	Thu Oct 08 16:37:16 2020 +0000
     1.2 +++ b/buildroot/receipt	Wed Oct 21 13:33:36 2020 +0000
     1.3 @@ -13,7 +13,7 @@
     1.4  
     1.5  SUGGESTED="subversion bazaar git elfkickers ccache bison flex gettext texinfo"
     1.6  DEPENDS="bash bc bzip2 ncurses ncurses-dev ncursesw-extra patch \
     1.7 -	perl python rsync slitaz-toolchain tar unzip wget"
     1.8 +	perl python rsync slitaz-toolchain tar unzip wget pkg-config Qt4-dev"
     1.9  
    1.10  # Rules to gen a SliTaz package suitable for Tazpkg.
    1.11  genpkg_rules()
    1.12 @@ -30,6 +30,6 @@
    1.13  	cat <<EOT
    1.14  Now you can do:
    1.15  $ cd /usr/lib/buildroot
    1.16 -$ make menuconfig
    1.17 +$ make xconfig
    1.18  EOT
    1.19  }
     2.1 --- a/ipxe/receipt	Thu Oct 08 16:37:16 2020 +0000
     2.2 +++ b/ipxe/receipt	Wed Oct 21 13:33:36 2020 +0000
     2.3 @@ -17,6 +17,7 @@
     2.4  compile_rules()
     2.5  {
     2.6  	cd $src/src
     2.7 +	patch -p1 < $stuff/cmd_isgt.u
     2.8  	sed -i 's|SIZEOF_LOW_4GB / SIZEOF_2MB_PAGE|1 << (SIZEOF_LOW_4GB_LOG2 - SIZEOF_2MB_PAGE_LOG2)|' arch/x86/transitions/librm.S
     2.9  	sed -i 's/-llzma/& -lpthread/' Makefile.*
    2.10  	sed -i 's|//\(#define.*CONSOLE_FRAMEBUFFER\)|\1|' config/console.h
     3.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     3.2 +++ b/ipxe/stuff/cmd_isgt.u	Wed Oct 21 13:33:36 2020 +0000
     3.3 @@ -0,0 +1,52 @@
     3.4 +--- src/core/exec.c
     3.5 ++++ src/core/exec.c
     3.6 +@@ -549,6 +549,49 @@
     3.7 + 	.exec = iseq_exec,
     3.8 + };
     3.9 + 
    3.10 ++/** "isgt" options */
    3.11 ++struct isgt_options {};
    3.12 ++
    3.13 ++/** "isgt" option list */
    3.14 ++static struct option_descriptor isgt_opts[] = {};
    3.15 ++
    3.16 ++/** "isgt" command descriptor */
    3.17 ++static struct command_descriptor isgt_cmd =
    3.18 ++	COMMAND_DESC ( struct isgt_options, isgt_opts, 2, 2,
    3.19 ++		       "<value1> <value2>" );
    3.20 ++
    3.21 ++/**
    3.22 ++ * "isgt" command
    3.23 ++ *
    3.24 ++ * @v argc		Argument count
    3.25 ++ * @v argv		Argument list
    3.26 ++ * @ret rc		Return status code
    3.27 ++ */
    3.28 ++static int isgt_exec ( int argc, char **argv ) {
    3.29 ++	struct isgt_options opts;
    3.30 ++	unsigned int a, b;
    3.31 ++	int rc;
    3.32 ++
    3.33 ++	/* Parse options */
    3.34 ++	if ( ( rc = parse_options ( argc, argv, &isgt_cmd, &opts ) ) != 0 )
    3.35 ++		return rc;
    3.36 ++
    3.37 ++	/* Parse numbers */
    3.38 ++	if ( ( rc = parse_integer ( argv[optind], &a ) ) != 0 )
    3.39 ++		return rc;
    3.40 ++	if ( ( rc = parse_integer ( argv[optind + 1], &b ) ) != 0 )
    3.41 ++		return rc;
    3.42 ++
    3.43 ++	/* Return success if a is greater than b */
    3.44 ++	return ( ( a > b ) ? 0 : -ERANGE );
    3.45 ++}
    3.46 ++
    3.47 ++/** "isgt" command */
    3.48 ++struct command isgt_command __command = {
    3.49 ++	.name = "isgt",
    3.50 ++	.exec = isgt_exec,
    3.51 ++};
    3.52 ++
    3.53 + /** "sleep" options */
    3.54 + struct sleep_options {};
    3.55 +