- Timestamp:
- 2019-06-27T08:51:20Z (6 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 8add15e0
- Parents:
- ad40b74b (diff), aeba767 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - Location:
- tools
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
tools/autocheck.awk
rad40b74b rbc73be3 33 33 BEGIN { 34 34 filename = ARGV[1] 35 output_lines = 0 35 36 print "// Generated file. Fix the included header if static assert fails." 36 print "#include \"" filename "\"" 37 print "// Inlined \"" filename "\"" 38 } 39 40 { 41 print $0 37 42 } 38 43 … … 44 49 } 45 50 macro_name = toupper(struct_name) "_SIZE" 46 print"_Static_assert(" macro_name " == sizeof(struct " struct_name "), \"\");"51 output[output_lines++] = "_Static_assert(" macro_name " == sizeof(struct " struct_name "), \"\");" 47 52 struct_name = "" 48 53 } … … 55 60 56 61 macro_name = toupper(struct_name) "_OFFSET_" toupper(member) 57 print"_Static_assert(" macro_name " == __builtin_offsetof(struct " struct_name ", " member "), \"\");"62 output[output_lines++] = "_Static_assert(" macro_name " == __builtin_offsetof(struct " struct_name ", " member "), \"\");" 58 63 59 64 macro_name = toupper(struct_name) "_SIZE_" toupper(member) 60 print"#ifdef " macro_name61 print"_Static_assert(" macro_name " == sizeof(((struct " struct_name "){ })." member "), \"\");"62 print"#endif"65 output[output_lines++] = "#ifdef " macro_name 66 output[output_lines++] = "_Static_assert(" macro_name " == sizeof(((struct " struct_name "){ })." member "), \"\");" 67 output[output_lines++] = "#endif" 63 68 } 64 69 } … … 67 72 struct_name = $3 68 73 } 74 75 END { 76 for ( i = 0; i < output_lines; i++ ) { 77 print output[i] 78 } 79 } -
tools/autotool.py
rad40b74b rbc73be3 1 #!/usr/bin/env python 21 #!/usr/bin/env python 2 2 # 3 3 # Copyright (c) 2010 Martin Decky … … 201 201 target = "arm-helenos" 202 202 203 if (config['PLATFORM'] == "arm64"): 204 platform = config['PLATFORM'] 205 target = "aarch64-helenos" 206 203 207 if (config['PLATFORM'] == "ia32"): 204 208 platform = config['PLATFORM'] … … 633 637 634 638 # Platform-specific utilities 635 if ( (config['BARCH'] == "amd64") or (config['BARCH'] == "ia32") or (config['BARCH'] == "ppc32") or (config['BARCH'] == "sparc64")):639 if (config['BARCH'] in ('amd64', 'arm64', 'ia32', 'ppc32', 'sparc64')): 636 640 common['GENISOIMAGE'] = check_app_alternatives(["genisoimage", "mkisofs", "xorriso"], ["--version"], "ISO 9660 creation utility", "usually part of genisoimage") 637 641 if common['GENISOIMAGE'] == 'xorriso': -
tools/build-ccheck.sh
rad40b74b rbc73be3 1 1 #!/bin/bash 2 2 # 3 # Copyright (c) 201 8Jiri Svoboda3 # Copyright (c) 2019 Jiri Svoboda 4 4 # All rights reserved. 5 5 # … … 29 29 30 30 SYCEK_GIT="https://github.com/jxsvoboda/sycek" 31 SYCEK_REV="4 2fe0d77819f0ec05f17e40ea54c7b62073c8e97"31 SYCEK_REV="4dc1760741efdd84506478ab6effd68812b4726a" 32 32 33 33 if [ ! -d sycek ]; then -
tools/config.py
rad40b74b rbc73be3 47 47 PRESETS_DIR = 'defaults' 48 48 49 class BinaryOp: 50 def __init__(self, operator, left, right): 51 assert operator in ('&', '|', '=', '!=') 52 53 self._operator = operator 54 self._left = left 55 self._right = right 56 57 def evaluate(self, config): 58 if self._operator == '&': 59 return self._left.evaluate(config) and \ 60 self._right.evaluate(config) 61 if self._operator == '|': 62 return self._left.evaluate(config) or \ 63 self._right.evaluate(config) 64 65 # '=' or '!=' 66 if not self._left in config: 67 config_val = '' 68 else: 69 config_val = config[self._left] 70 if config_val == '*': 71 config_val = 'y' 72 73 if self._operator == '=': 74 return self._right == config_val 75 return self._right != config_val 76 77 # Expression parser 78 class CondParser: 79 TOKEN_EOE = 0 80 TOKEN_SPECIAL = 1 81 TOKEN_STRING = 2 82 83 def __init__(self, text): 84 self._text = text 85 86 def parse(self): 87 self._position = -1 88 self._next_char() 89 self._next_token() 90 91 res = self._parse_expr() 92 if self._token_type != self.TOKEN_EOE: 93 self._error("Expected end of expression") 94 return res 95 96 def _next_char(self): 97 self._position += 1 98 if self._position >= len(self._text): 99 self._char = None 100 else: 101 self._char = self._text[self._position] 102 self._is_special_char = self._char in \ 103 ('&', '|', '=', '!', '(', ')') 104 105 def _error(self, msg): 106 raise RuntimeError("Error parsing expression: %s:\n%s\n%s^" % 107 (msg, self._text, " " * self._token_position)) 108 109 def _next_token(self): 110 self._token_position = self._position 111 112 # End of expression 113 if self._char == None: 114 self._token = None 115 self._token_type = self.TOKEN_EOE 116 return 117 118 # '&', '|', '=', '!=', '(', ')' 119 if self._is_special_char: 120 self._token = self._char 121 self._next_char() 122 if self._token == '!': 123 if self._char != '=': 124 self._error("Expected '='") 125 self._token += self._char 126 self._next_char() 127 self._token_type = self.TOKEN_SPECIAL 128 return 129 130 # <var> or <val> 131 self._token = '' 132 self._token_type = self.TOKEN_STRING 133 while True: 134 self._token += self._char 135 self._next_char() 136 if self._is_special_char or self._char == None: 137 break 138 139 def _parse_expr(self): 140 """ <expr> ::= <or_expr> ('&' <or_expr>)* """ 141 142 left = self._parse_or_expr() 143 while self._token == '&': 144 self._next_token() 145 left = BinaryOp('&', left, self._parse_or_expr()) 146 return left 147 148 def _parse_or_expr(self): 149 """ <or_expr> ::= <factor> ('|' <factor>)* """ 150 151 left = self._parse_factor() 152 while self._token == '|': 153 self._next_token() 154 left = BinaryOp('|', left, self._parse_factor()) 155 return left 156 157 def _parse_factor(self): 158 """ <factor> ::= <var> <cond> | '(' <expr> ')' """ 159 160 if self._token == '(': 161 self._next_token() 162 res = self._parse_expr() 163 if self._token != ')': 164 self._error("Expected ')'") 165 self._next_token() 166 return res 167 168 if self._token_type == self.TOKEN_STRING: 169 var = self._token 170 self._next_token() 171 return self._parse_cond(var) 172 173 self._error("Expected '(' or <var>") 174 175 def _parse_cond(self, var): 176 """ <cond> ::= '=' <val> | '!=' <val> """ 177 178 if self._token not in ('=', '!='): 179 self._error("Expected '=' or '!='") 180 181 oper = self._token 182 self._next_token() 183 184 if self._token_type != self.TOKEN_STRING: 185 self._error("Expected <val>") 186 187 val = self._token 188 self._next_token() 189 190 return BinaryOp(oper, var, val) 191 49 192 def read_config(fname, config): 50 193 "Read saved values from last configuration run or a preset file" … … 59 202 inf.close() 60 203 61 def check_condition(text, config, rules):62 "Check that the condition specified on input line is True (only CNF and DNF is supported)"63 64 ctype = 'cnf'65 66 if (')|' in text) or ('|(' in text):67 ctype = 'dnf'68 69 if ctype == 'cnf':70 conds = text.split('&')71 else:72 conds = text.split('|')73 74 for cond in conds:75 if cond.startswith('(') and cond.endswith(')'):76 cond = cond[1:-1]77 78 inside = check_inside(cond, config, ctype)79 80 if (ctype == 'cnf') and (not inside):81 return False82 83 if (ctype == 'dnf') and inside:84 return True85 86 if ctype == 'cnf':87 return True88 89 return False90 91 def check_inside(text, config, ctype):92 "Check for condition"93 94 if ctype == 'cnf':95 conds = text.split('|')96 else:97 conds = text.split('&')98 99 for cond in conds:100 res = re.match(r'^(.*?)(!?=)(.*)$', cond)101 if not res:102 raise RuntimeError("Invalid condition: %s" % cond)103 104 condname = res.group(1)105 oper = res.group(2)106 condval = res.group(3)107 108 if not condname in config:109 varval = ''110 else:111 varval = config[condname]112 if (varval == '*'):113 varval = 'y'114 115 if ctype == 'cnf':116 if (oper == '=') and (condval == varval):117 return True118 119 if (oper == '!=') and (condval != varval):120 return True121 else:122 if (oper == '=') and (condval != varval):123 return False124 125 if (oper == '!=') and (condval == varval):126 return False127 128 if ctype == 'cnf':129 return False130 131 return True132 133 204 def parse_rules(fname, rules): 134 205 "Parse rules file" … … 149 220 150 221 cond = res.group(1) 222 if cond: 223 cond = CondParser(cond).parse() 151 224 varname = res.group(2) 152 225 vartype = res.group(3) … … 232 305 varname, vartype, name, choices, cond = rule 233 306 234 if cond and (not check_condition(cond, config, rules)):307 if cond and not cond.evaluate(config): 235 308 continue 236 309 … … 279 352 280 353 # First check that this rule would make sense 281 if cond: 282 if not check_condition(cond, config, rules): 283 return random_choices(config, rules, start_index + 1) 354 if cond and not cond.evaluate(config): 355 return random_choices(config, rules, start_index + 1) 284 356 285 357 # Remember previous choices for backtracking … … 487 559 488 560 for varname, vartype, name, choices, cond in rules: 489 if cond and (not check_condition(cond, config, rules)):561 if cond and not cond.evaluate(config): 490 562 continue 491 563 … … 514 586 outmk.write('TIMESTAMP_UNIX = %d\n' % timestamp_unix) 515 587 outmc.write('#define TIMESTAMP_UNIX %d\n' % timestamp_unix) 516 defs += ' "-DTIMESTAMP_UNIX=%d" \n' % timestamp_unix588 defs += ' "-DTIMESTAMP_UNIX=%d"' % timestamp_unix 517 589 518 590 outmk.write('TIMESTAMP = %s\n' % timestamp) 519 591 outmc.write('#define TIMESTAMP %s\n' % timestamp) 520 defs += ' "-DTIMESTAMP=%s" \n' % timestamp521 522 outmk.write( defs)592 defs += ' "-DTIMESTAMP=%s"' % timestamp 593 594 outmk.write('%s\n' % defs) 523 595 524 596 outmk.close() … … 676 748 varname, vartype, name, choices, cond = rule 677 749 678 if cond and (not check_condition(cond, config, rules)):750 if cond and not cond.evaluate(config): 679 751 continue 680 752 -
tools/ew.py
rad40b74b rbc73be3 57 57 58 58 def termemu_detect(): 59 for termemu in ['xfce4-terminal', 'xterm']: 59 emus = ['gnome-terminal', 'xfce4-terminal', 'xterm'] 60 for termemu in emus: 60 61 try: 61 62 subprocess.check_output('which ' + termemu, shell = True) … … 64 65 pass 65 66 67 print('Could not find any of the terminal emulators %s.'%(emus)) 68 sys.exit(1) 69 66 70 def run_in_console(cmd, title): 67 ecmd = cmd.replace('"', '\\"') 68 cmdline = termemu_detect() + ' -T ' + '"' + title + '"' + ' -e "' + ecmd + '"' 71 temu = termemu_detect() 72 if temu == 'gnome-terminal': 73 cmdline = temu + ' -- ' + cmd 74 else: 75 ecmd = cmd.replace('"', '\\"') 76 cmdline = temu + ' -T ' + '"' + title + '"' + ' -e "' + ecmd + '"' 77 69 78 print(cmdline) 70 79 if not is_override('dryrun'): … … 87 96 88 97 def malta_options(): 89 return '-cpu 4Kc' 98 return '-cpu 4Kc -append "console=devices/\\hw\\pci0\\00:0a.0\\com1\\a"' 99 100 def find_firmware(name, environ_var, default_paths, extra_info=None): 101 """Find firmware image(s).""" 102 103 if environ_var in os.environ: 104 return os.environ[environ_var] 105 106 for path in default_paths: 107 if os.path.exists(path): 108 return path 109 110 sys.stderr.write("Cannot find %s binary image(s)!\n" % name) 111 sys.stderr.write( 112 "Either set %s environment variable accordingly or place the image(s) in one of the default locations: %s.\n" % 113 (environ_var, ", ".join(default_paths))) 114 if extra_info is not None: 115 sys.stderr.write(extra_info) 116 return None 90 117 91 118 def platform_to_qemu_options(platform, machine, processor): … … 94 121 elif platform == 'arm32': 95 122 return 'system-arm', '-M integratorcp' 123 elif platform == 'arm64': 124 # Search for the EDK2 firmware image 125 default_paths = ( 126 '/usr/local/qemu-efi-aarch64/QEMU_EFI.fd', # Custom 127 '/usr/share/edk2/aarch64/QEMU_EFI.fd', # Fedora 128 '/usr/share/qemu-efi-aarch64/QEMU_EFI.fd', # Ubuntu 129 ) 130 extra_info = ("Pre-compiled binary can be obtained from " 131 "http://snapshots.linaro.org/components/kernel/leg-virt-tianocore-edk2-upstream/latest/QEMU-AARCH64/RELEASE_GCC49/QEMU_EFI.fd.\n") 132 efi_path = find_firmware( 133 "EDK2", 'EW_QEMU_EFI_AARCH64', default_paths, extra_info) 134 if efi_path is None: 135 raise Exception 136 137 return 'system-aarch64', \ 138 '-M virt -cpu cortex-a57 -m 1024 -bios %s' % efi_path 96 139 elif platform == 'ia32': 97 140 return 'system-i386', pc_options(32) … … 108 151 if processor == 'us': 109 152 return 'system-sparc64', '-M sun4u --prom-env boot-args="console=devices/\\hw\\pci0\\01:01.0\\com1\\a"' 110 elif processor == 'sun4v': 111 default_path = '/usr/local/opensparc/image/' 112 try: 113 if os.path.exists(default_path): 114 opensparc_bins = default_path 115 elif os.path.exists(os.environ['OPENSPARC_BINARIES']): 116 opensparc_bins = os.environ['OPENSPARC_BINARIES'] 117 else: 118 raise Exception 119 except: 120 print("Cannot find OpenSPARC binary images!") 121 print("Either set OPENSPARC_BINARIES environment variable accordingly or place the images in %s." % (default_path)) 153 154 # processor = 'sun4v' 155 opensparc_bins = find_firmware( 156 "OpenSPARC", 'OPENSPARC_BINARIES', 157 ('/usr/local/opensparc/image/', )) 158 if opensparc_bins is None: 122 159 raise Exception 123 160 … … 135 172 hdisk_mk() 136 173 137 return ' -drive file=hdisk.img,index=0,media=disk,format=raw' 174 hdd_options = '' 175 if 'hdd' in overrides.keys(): 176 if 'ata' in overrides['hdd'].keys(): 177 hdd_options += '' 178 elif 'virtio-blk' in overrides['hdd'].keys(): 179 hdd_options += ',if=virtio' 180 181 return ' -drive file=hdisk.img,index=0,media=disk,format=raw' + hdd_options 138 182 139 183 def qemu_nic_ne2k_options(): … … 201 245 cmdline += ' ' + options 202 246 203 cmdline += qemu_bd_options()204 247 if (not 'hdd' in cfg.keys() or cfg['hdd']): 248 cmdline += qemu_bd_options() 205 249 if (not 'net' in cfg.keys()) or cfg['net']: 206 250 cmdline += qemu_net_options() … … 227 271 if cfg['image'] == 'image.iso': 228 272 cmdline += ' -boot d -cdrom image.iso' 273 elif cfg['image'] == 'image.iso@arm64': 274 # Define image.iso cdrom backend. 275 cmdline += ' -drive if=none,file=image.iso,id=cdrom,media=cdrom' 276 # Define scsi bus. 277 cmdline += ' -device virtio-scsi-device' 278 # Define cdrom frontend connected to this scsi bus. 279 cmdline += ' -device scsi-cd,drive=cdrom' 229 280 elif cfg['image'] == 'image.boot': 230 281 cmdline += ' -kernel image.boot' … … 269 320 'xhci' : False, 270 321 'tablet' : False 322 } 323 }, 324 'arm64' : { 325 'virt' : { 326 'run' : qemu_run, 327 'image' : 'image.iso@arm64', 328 'audio' : False, 329 'console' : True, 330 'hdd' : False, 331 'net' : False, 332 'tablet' : False, 333 'usb' : False, 334 'xhci' : False 271 335 } 272 336 }, … … 336 400 def usage(): 337 401 print("%s - emulator wrapper for running HelenOS\n" % os.path.basename(sys.argv[0])) 338 print("%s [-d] [-h] [-net e1k|rtl8139|ne2k|virtio-net] [- nohdd] [-nokvm] [-nonet] [-nosnd] [-nousb] [-noxhci] [-notablet]\n" %402 print("%s [-d] [-h] [-net e1k|rtl8139|ne2k|virtio-net] [-hdd ata|virtio-blk] [-nohdd] [-nokvm] [-nonet] [-nosnd] [-nousb] [-noxhci] [-notablet]\n" % 339 403 os.path.basename(sys.argv[0])) 340 404 print("-d\tDry run: do not run the emulation, just print the command line.") … … 357 421 def run(): 358 422 expect_nic = False 423 expect_hdd = False 359 424 expect_qemu = False 360 425 … … 378 443 continue 379 444 445 if expect_hdd: 446 expect_hdd = False 447 if not 'hdd' in overrides.keys(): 448 overrides['hdd'] = {} 449 if sys.argv[i] == 'ata': 450 overrides['hdd']['ata'] = True 451 elif sys.argv[i] == 'virtio-blk': 452 overrides['hdd']['virtio-blk'] = True 453 else: 454 usage() 455 exit() 456 continue 457 380 458 if expect_qemu: 381 459 expect_qemu = False … … 389 467 elif sys.argv[i] == '-net' and i < len(sys.argv) - 1: 390 468 expect_nic = True 469 elif sys.argv[i] == '-hdd' and i < len(sys.argv) - 1: 470 expect_hdd = True 391 471 elif sys.argv[i] == '-nohdd': 392 472 overrides['nohdd'] = True -
tools/grub/grub-update.sh
rad40b74b rbc73be3 40 40 grub_rev="bc220962e366b1b46769ed6f9fa5be603ba58ab5" 41 41 42 build_ia32amd64_pc=false 43 build_ia32amd64_efi=false 44 build_arm64_efi=false 45 42 46 function grub_build() 43 47 { 44 target="$1" 45 platform="$2" 48 platform="$1" 49 conf_target="$2" 50 conf_platform="$3" 46 51 47 ./configure --prefix="$builddir/$ target-$platform" --target="$target" --with-platform="$platform" --disable-werror || exit 152 ./configure --prefix="$builddir/$platform" --target="$conf_target" --with-platform="$conf_platform" --disable-werror || exit 1 48 53 make clean || exit 1 49 54 make install || exit 1 … … 55 60 platform="$2" 56 61 57 rm -rf "$helenosdir"/boot/"$gdir"/"$platform" || exit 1 58 cp -R "$builddir"/"$platform"/lib64/grub/"$platform" "$helenosdir"/boot/"$gdir" || exit 1 59 rm -f "$helenosdir"/boot/"$gdir"/"$platform"/*.image || exit 1 60 rm -f "$helenosdir"/boot/"$gdir"/"$platform"/*.module || exit 1 61 git add "$helenosdir"/boot/"$gdir"/"$platform" || exit 1 62 echo "$grub_rev" > "$helenosdir"/boot/grub/"$gdir"/REVISION || exit 1 63 rm -rf "$helenosdir"/boot/grub/"$gdir"/"$platform" || exit 1 64 cp -R "$builddir"/"$platform"/lib*/grub/"$platform" "$helenosdir"/boot/grub/"$gdir" || exit 1 65 rm -f "$helenosdir"/boot/grub/"$gdir"/"$platform"/*.image || exit 1 66 rm -f "$helenosdir"/boot/grub/"$gdir"/"$platform"/*.module || exit 1 67 git add "$helenosdir"/boot/grub/"$gdir"/"$platform" || exit 1 62 68 } 69 70 function show_usage() 71 { 72 echo "Script to generate/update prebuild Grub2 in HelenOS source tree" 73 echo 74 echo "Syntax:" 75 echo " $0 <target>" 76 echo 77 echo "Possible targets are:" 78 echo " ia32+amd64-pc" 79 echo " ia32+amd64-efi" 80 echo " arm64-efi" 81 echo " all build all targets" 82 echo 83 84 exit 3 85 } 86 87 if [ "$#" -ne "1" ] ; then 88 show_usage 89 fi 90 91 case "$1" in 92 ia32+amd64-pc) 93 build_ia32amd64_pc=true 94 ;; 95 ia32+amd64-efi) 96 build_ia32amd64_efi=true 97 ;; 98 arm64-efi) 99 build_arm64_efi=true 100 ;; 101 all) 102 build_ia32amd64_pc=true 103 build_ia32amd64_efi=true 104 build_arm64_efi=true 105 ;; 106 *) 107 show_usage 108 ;; 109 esac 63 110 64 111 # Prepare a clone of Grub2 repo … … 72 119 git reset --hard "$grub_rev" || exit 1 73 120 74 echo "$grub_rev" >"$helenosdir"/boot/grub.pc/REVISION || exit 1 75 echo "$grub_rev" > "$helenosdir"/boot/grub.efi/REVISION || exit 1 121 ./autogen.sh || exit 1 76 122 77 # Build each platform to a different directory 78 ./autogen.sh || exit 1 79 grub_build i386 pc 80 grub_build i386 efi 81 grub_build x86_64 efi 123 if $build_ia32amd64_pc ; then 124 cd "$workdir" || exit 1 125 grub_build i386-pc i386 pc 82 126 83 # Extract El Torrito boot image for i386-pc84 cd "$helenosdir"/boot/grub.pc || exit 185 rm -f pc.img || exit 186 "$builddir"/i386-pc/bin/grub-mkrescue -o phony --xorriso="$origdir/getimage.sh" || exit 1127 # Extract El Torrito boot image for i386-pc 128 cd "$helenosdir"/boot/grub/ia32-pc || exit 1 129 rm -f pc.img || exit 1 130 "$builddir"/i386-pc/bin/grub-mkrescue -o phony --xorriso="$origdir/getimage.sh" || exit 1 87 131 88 # Extract El Torrito boot image for i386-efi 89 cd "$helenosdir"/boot/grub.efi || exit 1 90 rm -f efi.img.gz || exit 1 91 "$builddir"/i386-efi/bin/grub-mkrescue -o phony --xorriso="$origdir/getimage.sh" || exit 1 92 mv efi.img i386-efi.img 132 grub_files_update ia32-pc i386-pc 133 fi 93 134 94 # Extract El Torrito boot image for x86_64-efi 95 cd "$helenosdir"/boot/grub.efi || exit 1 96 rm -f efi.img.gz || exit 1 97 "$builddir"/x86_64-efi/bin/grub-mkrescue -o phony --xorriso="$origdir/getimage.sh" || exit 1 135 if $build_ia32amd64_efi ; then 136 cd "$workdir" || exit 1 98 137 99 # Combine El Torrito boot images for x86_64-efi and i386-efi 100 mkdir tmp || exit 1 101 mcopy -ns -i i386-efi.img ::efi tmp || exit 1 102 mcopy -s -i efi.img tmp/* :: || exit 1 103 gzip efi.img || exit 1 104 rm -rf tmp || exit 1 105 rm -f i386-efi.img || exit 1 138 # Build each platform to a different directory 139 grub_build i386-efi i386 efi 140 grub_build x86_64-efi x86_64 efi 106 141 107 # Update Grub files for all platforms 108 grub_files_update grub.pc i386-pc 109 grub_files_update grub.efi i386-efi 110 grub_files_update grub.efi x86_64-efi 142 # Extract El Torrito boot image for i386-efi 143 cd "$helenosdir"/boot/grub/ia32-efi || exit 1 144 rm -f efi.img.gz || exit 1 145 "$builddir"/i386-efi/bin/grub-mkrescue -o phony --xorriso="$origdir/getimage.sh" || exit 1 146 mv efi.img i386-efi.img 147 148 # Extract El Torrito boot image for x86_64-efi 149 cd "$helenosdir"/boot/grub/ia32-efi || exit 1 150 rm -f efi.img.gz || exit 1 151 "$builddir"/x86_64-efi/bin/grub-mkrescue -o phony --xorriso="$origdir/getimage.sh" || exit 1 152 153 # Combine El Torrito boot images for x86_64-efi and i386-efi 154 mkdir tmp || exit 1 155 mcopy -ns -i i386-efi.img ::efi tmp || exit 1 156 mcopy -s -i efi.img tmp/* :: || exit 1 157 gzip efi.img || exit 1 158 rm -rf tmp || exit 1 159 rm -f i386-efi.img || exit 1 160 161 # Update Grub files for all platforms 162 grub_files_update ia32-efi i386-efi 163 grub_files_update ia32-efi x86_64-efi 164 fi 165 166 if $build_arm64_efi ; then 167 cd "$workdir" || exit 1 168 169 # Check that the expected compiler is present on PATH 170 if ! [ -x "$(command -v aarch64-linux-gnu-gcc)" ] ; then 171 echo "Error: aarch64-linux-gnu-gcc is missing" >&2 172 exit 1 173 fi 174 175 grub_build arm64-efi aarch64-linux-gnu efi 176 177 # Extract El Torrito boot image for arm64-efi 178 cd "$helenosdir"/boot/grub/arm64-efi || exit 1 179 rm -f efi.img.gz || exit 1 180 "$builddir"/arm64-efi/bin/grub-mkrescue -o phony --xorriso="$origdir/getimage.sh" || exit 1 181 gzip efi.img || exit 1 182 183 grub_files_update arm64-efi arm64-efi 184 fi 111 185 112 186 echo "GRUB update successful." -
tools/grub/mkimage.sh
rad40b74b rbc73be3 39 39 orig_dir="$(cd "$(dirname "$0")" && pwd)" 40 40 grub_tools_dir="$orig_dir/grub-build/i386-pc/bin" 41 grub_mod_dir="$orig_dir/../../boot/grub .pc/i386-pc"41 grub_mod_dir="$orig_dir/../../boot/grub/ia32-pc/i386-pc" 42 42 43 43 "$grub_tools_dir"/grub-mkimage --directory "$grub_mod_dir" \ -
tools/toolchain.sh
rad40b74b rbc73be3 66 66 echo " amd64 AMD64 (x86-64, x64)" 67 67 echo " arm32 ARM 32b" 68 echo " arm64 AArch64" 68 69 echo " ia32 IA-32 (x86, i386)" 69 70 echo " ia64 IA-64 (Itanium)" … … 103 104 104 105 if [ -z "$1" ] || [ "$1" == "all" ] ; then 105 PLATFORMS=("amd64" "arm32" " ia32" "ia64" "mips32" "mips32eb" "ppc32" "riscv64" "sparc64")106 PLATFORMS=("amd64" "arm32" "arm64" "ia32" "ia64" "mips32" "mips32eb" "ppc32" "riscv64" "sparc64") 106 107 else 107 108 PLATFORMS=("$1") … … 275 276 "arm32") 276 277 GNU_ARCH="arm" 278 ;; 279 "arm64") 280 GNU_ARCH="aarch64" 277 281 ;; 278 282 "ia32") … … 497 501 test_version 498 502 ;; 499 amd64|arm32| ia32|ia64|mips32|mips32eb|ppc32|riscv64|sparc64)503 amd64|arm32|arm64|ia32|ia64|mips32|mips32eb|ppc32|riscv64|sparc64) 500 504 prepare 501 505 build_target "$1" … … 505 509 build_target "amd64" 506 510 build_target "arm32" 511 build_target "arm64" 507 512 build_target "ia32" 508 513 build_target "ia64" … … 517 522 build_target "amd64" 518 523 build_target "arm32" 524 build_target "arm64" 519 525 build_target "ia32" 520 526 build_target "ia64" … … 528 534 build_target "amd64" & 529 535 build_target "arm32" & 536 build_target "arm64" & 530 537 build_target "ia32" & 531 538 build_target "ia64" & … … 543 550 wait 544 551 552 build_target "arm64" & 545 553 build_target "ia32" & 554 wait 555 546 556 build_target "ia64" & 557 build_target "mips32" & 547 558 wait 548 559 549 build_target "mips32" &550 560 build_target "mips32eb" & 561 build_target "ppc32" & 551 562 wait 552 563 553 build_target "ppc32" &554 564 build_target "riscv64" & 555 wait556 557 565 build_target "sparc64" & 558 566 wait -
tools/travis.sh
rad40b74b rbc73be3 52 52 arm32/integratorcp:arm-helenos:image.boot 53 53 arm32/raspberrypi:arm-helenos:uImage.bin 54 arm64/virt:aarch64-helenos:image.iso 54 55 ia32:i686-helenos:image.iso 55 56 ia64/i460GX:ia64-helenos:image.boot
Note:
See TracChangeset
for help on using the changeset viewer.