#!/bin/bash # # Build U-Boot image when `mkimage' tool is available. # global MKIMAGE := $[type -path "$(CROSS_COMPILE)mkimage] if test -z $(MKIMAGE) { global MKIMAGE := $[type -path mkimage] if test -z $(MKIMAGE) { # Doesn't exist echo '"mkimage" command not found - U-Boot images will not be built' > !2 exit 1; } } # Call "mkimage" to create U-Boot image $(MKIMAGE) @Argv (CommandList children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:MKIMAGE) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [(C {(type)} {(-path)} {(DQ (${ VSub_Name CROSS_COMPILE) (mkimage))})] ) left_token: spids: [15 26] ) } spids: [14] ) ] spids: [14] ) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other "[")} {(-z)} {(DQ (${ VSub_Name MKIMAGE))} {(Lit_Other "]")}) terminator: ) ] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:MKIMAGE) op: Equal rhs: { (CommandSubPart command_list: (CommandList children:[(C {(type)} {(-path)} {(mkimage)})]) left_token: spids: [48 54] ) } spids: [47] ) ] spids: [47] ) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other "[")} {(-z)} {(DQ (${ VSub_Name MKIMAGE))} {(Lit_Other "]")}) terminator: ) ] action: [ (SimpleCommand words: [ {(echo)} {(SQ <"\"mkimage\" command not found - U-Boot images will not be built">)} ] redirects: [(Redir op_id:Redir_GreatAnd fd:-1 arg_word:{(2)} spids:[85])] ) (Sentence child:(C {(exit)} {(1)}) terminator:) ] spids: [-1 72] ) ] spids: [-1 95] ) ] spids: [-1 44] ) ] spids: [-1 97] ) (C {(${ VSub_Name MKIMAGE)} {(DQ ($ VSub_At "$@"))}) ] )