| 
									
										
										
										
											2024-09-28 14:24:04 +08:00
										 |  |  | #!/bin/bash
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | rm -f ../Makefile | 
					
						
							|  |  |  | ln -s ./build/Makefile ../Makefile | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | FLASH_SIZE_nM=4 | 
					
						
							|  |  |  | CLEANUP_OPT="1" | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | #print help info. | 
					
						
							|  |  |  | if [ "?" == "$1" ]; then | 
					
						
							|  |  |  |     echo  "*$0 [NOT_CLEAN]" | 
					
						
							|  |  |  |     echo  "*   [NOT_CLEAN] -- Optional, clean or not, 'not_clean' means incremental build, default is cleanup." | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     exit 0 | 
					
						
							|  |  |  | fi | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | #incremental build option. | 
					
						
							|  |  |  | for k in $@; do | 
					
						
							|  |  |  |     if [ "${k}" == "not_clean" ]; then | 
					
						
							|  |  |  |         CLEANUP_OPT="0" | 
					
						
							|  |  |  |     fi | 
					
						
							|  |  |  | done | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | #include kl3 environment | 
					
						
							|  |  |  | . env_kunlun3_tool.sh | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | export build_amp_type=0 | 
					
						
							|  |  |  | export psram_enable=0 | 
					
						
							|  |  |  | export layout_index=1 | 
					
						
							|  |  |  | export dtest_only=1 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | set -o errexit | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2025-01-09 14:31:08 +08:00
										 |  |  | export CLEANUP_OPT | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-09-28 14:24:04 +08:00
										 |  |  | if [ "${CLEANUP_OPT}" == "1" ]; then | 
					
						
							| 
									
										
										
										
											2025-01-06 17:15:25 +08:00
										 |  |  |     make -j -C .. clobber | 
					
						
							|  |  |  |     make -j -C .. dtest_clean | 
					
						
							| 
									
										
										
										
											2024-09-28 14:24:04 +08:00
										 |  |  | fi | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | # build kl3 dtest | 
					
						
							| 
									
										
										
										
											2025-01-06 17:15:25 +08:00
										 |  |  | make -j -C .. dtest opt_build=1 |