mirror of https://github.com/OpenIPC/firmware.git
				
				
				
			Update build scripts
							parent
							
								
									3fd67c9385
								
							
						
					
					
						commit
						13427f4283
					
				|  | @ -44,7 +44,7 @@ BR2_GLOBAL_PATCH_DIR="$(TOPDIR)/../general/package/patches" | |||
| BR2_PACKAGE_BUSYBOX_CONFIG="$(TOPDIR)/../general/package/configs/busybox.config" | ||||
| BR2_PACKAGE_DROPBEAR=y | ||||
| BR2_PACKAGE_FWPRINTENV_NG=y | ||||
| # BR2_PACKAGE_XIONGMAI_OSDRV_XM530 is not set | ||||
| BR2_PACKAGE_XIONGMAI_OSDRV_XM530=y | ||||
| BR2_PACKAGE_IPCTOOL=y | ||||
| BR2_PACKAGE_JSON_C=y | ||||
| BR2_PACKAGE_LAME=y | ||||
|  |  | |||
|  | @ -5,8 +5,8 @@ | |||
| #    default : rmmod all moules and then insmod them | ||||
| # | ||||
| 
 | ||||
| #内存和地址单位M | ||||
| MEM_ALL=64 | ||||
| #MEM_ALL=128 | ||||
| MEM_START=0x800 | ||||
| MEM_SAMALL_LIN=0x1 | ||||
| 
 | ||||
|  | @ -1,143 +0,0 @@ | |||
| #!/bin/sh | ||||
| # Useage: ./loadxm530 [ -r|-i|-a ] | ||||
| #         -r : rmmod all modules | ||||
| #         -i : insmod all modules | ||||
| #    default : rmmod all moules and then insmod them | ||||
| # | ||||
| 
 | ||||
| #内存和地址单位M | ||||
| MEM_ALL=128 | ||||
| MEM_START=0x800 | ||||
| MEM_SAMALL_LIN=0x1 | ||||
| 
 | ||||
| MEM_OS=`cat /proc/cmdline  | awk '{print $1}' | sed -e 's/mem=//' -e 's/M//'` | ||||
| MEM_LEN=`echo "$MEM_ALL $MEM_OS"|awk '{printf("0x%03x00000",$1-$2)}'` | ||||
| MEM_START=`echo "$MEM_START $MEM_SAMALL_LIN $MEM_OS"|awk '{printf("0x%03x00000",$1+$2*$3)}'` | ||||
| echo MEM_START=$MEM_START  MEM_LEN=$MEM_LEN | ||||
| 
 | ||||
| VI_BUFF=2 | ||||
| 
 | ||||
| report_error() | ||||
| { | ||||
| 	echo "******* Error: There's something wrong, please check! *****" | ||||
| 		exit 1 | ||||
| } | ||||
| 
 | ||||
| insert_audio() | ||||
| { | ||||
| 	echo "insert audio" | ||||
| 	insmod xm_i2s.ko | ||||
| 	insmod acodec.ko | ||||
| } | ||||
| 
 | ||||
| insert_h265() | ||||
| { | ||||
|         echo "insert h265" | ||||
|         insmod mve_rsrc.ko | ||||
|         insmod mve_base.ko | ||||
| } | ||||
| 
 | ||||
| insert_vo() | ||||
| { | ||||
| 	regs 20000000 1 | ||||
| 	regs 20000010 12042d02 | ||||
| 	regs 20000044 0x2777 | ||||
| 	regs 20000048 0x3 | ||||
| 	regs 2000004C 01020102 | ||||
| 	regs 20000000 0 | ||||
| 
 | ||||
| 	insmod xm530_vo.ko | ||||
| 	insmod xm530_vdec.ko | ||||
| } | ||||
| 
 | ||||
| remove_audio() | ||||
| { | ||||
| 	echo "remove audio" | ||||
| 	rmmod acodec | ||||
| 	rmmod xm_i2s | ||||
| } | ||||
| 
 | ||||
| insert_sns() | ||||
| { | ||||
|     #Sensor clock 27MHz | ||||
| 		#regs 0x2000002c 1; | ||||
| 		#regs 0x2000000c 0x10110010; | ||||
| 		#regs 0x20000010 0x901F0010; | ||||
| 		#regs 0x20000014 0x01120000; | ||||
| 		#regs 0x2000002c 0; | ||||
| 		#sleep 0.1; | ||||
| 		insmod xm_i2c.ko; | ||||
| } | ||||
| 
 | ||||
| remove_sns() | ||||
| { | ||||
| 	rmmod xm_i2c &> /dev/null | ||||
| 	rmmod ssp_sony &> /dev/null | ||||
| } | ||||
| 
 | ||||
| insert_ko() | ||||
| { | ||||
| # driver load | ||||
| 		insert_sns > /dev/null | ||||
| 		insmod mmz.ko mmz_start=$MEM_START mmz_size=$MEM_LEN | ||||
| 		insmod xm530_vi.ko buffer=$VI_BUFF | ||||
| 		insmod xm530_isp.ko | ||||
| 		insmod xm530_rgn.ko | ||||
| 		insmod xm530_h264.ko | ||||
| 		insmod xm_rtc.ko | ||||
| 		#insmod xm_wdt.ko | ||||
| 		insmod log.ko | ||||
| 
 | ||||
| 		insert_audio | ||||
| 		#insert_h265 | ||||
| 		#insert_vo | ||||
| } | ||||
| 
 | ||||
| remove_ko() | ||||
| { | ||||
| 	#remove_audio | ||||
| 	#rmmod xm_wdt | ||||
| 	#rmmod xm_rtc | ||||
| 	rmmod xm530_h264 | ||||
| 	rmmod xm530_rgn | ||||
| 	rmmod xm530_isp | ||||
| 	rmmod xm530_vi | ||||
| 	rmmod mmz | ||||
| 
 | ||||
| 	remove_sns | ||||
| } | ||||
| 
 | ||||
| load_usage() | ||||
| { | ||||
| 	echo "Usage:  ./loadxm530 [-option]" | ||||
| 		echo "options:" | ||||
| 		echo "    -i                       insert modules" | ||||
| 		echo "    -r                       remove modules" | ||||
| 		echo "    -h                       help information" | ||||
| 		echo -e "for example: ./loadxm530 -i\n" | ||||
| } | ||||
| 
 | ||||
| # load module. | ||||
| if [ "$1" = "-i" ] | ||||
| then | ||||
| cd /lib/modules/3.10.103/xiongmai | ||||
| insert_ko | ||||
| fi | ||||
| 
 | ||||
| if [ "$1" = "-r" ] | ||||
| then | ||||
| remove_ko | ||||
| fi | ||||
| 
 | ||||
| if [ "$1" = "-h" ] | ||||
| then | ||||
| load_usage | ||||
| exit | ||||
| fi | ||||
| 
 | ||||
| if [ $# -eq 0 ] || [ "$1" = "-a" ] | ||||
| then | ||||
| remove_ko | ||||
| insert_ko | ||||
| fi | ||||
| 
 | ||||
|  | @ -30,12 +30,12 @@ define XIONGMAI_OSDRV_XM530_INSTALL_TARGET_CMDS | |||
| 	$(INSTALL) -m 755 -d $(TARGET_DIR)/etc/sensors | ||||
| 	# $(INSTALL) -m 644 -t $(TARGET_DIR)/etc/sensors $(BR2_EXTERNAL_XIONGMAI_PATH)/package/xiongmai-osdrv-xm530/files/sensor/config/*.ini | ||||
| 
 | ||||
| 	$(INSTALL) -m 755 -d $(TARGET_DIR)/lib/modules/3.10.103/xiongmai | ||||
| 	$(INSTALL) -m 644 -t $(TARGET_DIR)/lib/modules/3.10.103/xiongmai $(BR2_EXTERNAL_XIONGMAI_PATH)/package/xiongmai-osdrv-xm530/files/kmod/*.ko | ||||
| 	$(INSTALL) -m 644 -t $(TARGET_DIR)/lib/modules/3.10.103/xiongmai $(BR2_EXTERNAL_XIONGMAI_PATH)/package/xiongmai-osdrv-xm530/files/kmod/usb/*.ko | ||||
| 	$(INSTALL) -m 755 -d $(TARGET_DIR)/lib/modules/3.10.103+/xiongmai | ||||
| 	$(INSTALL) -m 644 -t $(TARGET_DIR)/lib/modules/3.10.103+/xiongmai $(BR2_EXTERNAL_XIONGMAI_PATH)/package/xiongmai-osdrv-xm530/files/kmod/*.ko | ||||
| 	$(INSTALL) -m 644 -t $(TARGET_DIR)/lib/modules/3.10.103+/xiongmai $(BR2_EXTERNAL_XIONGMAI_PATH)/package/xiongmai-osdrv-xm530/files/kmod/usb/*.ko | ||||
| 
 | ||||
| 	# $(INSTALL) -m 755 -d $(TARGET_DIR)/usr/bin | ||||
| 	# $(INSTALL) -m 755 -t $(TARGET_DIR)/usr/bin $(BR2_EXTERNAL_XIONGMAI_PATH)/package/xiongmai-osdrv-xm530/files/script/* | ||||
| 	$(INSTALL) -m 755 -d $(TARGET_DIR)/usr/bin | ||||
| 	$(INSTALL) -m 755 -t $(TARGET_DIR)/usr/bin $(BR2_EXTERNAL_XIONGMAI_PATH)/package/xiongmai-osdrv-xm530/files/script/* | ||||
| 
 | ||||
| 	# $(INSTALL) -m 755 -d $(TARGET_DIR)/usr/lib/fonts | ||||
| 	# $(INSTALL) -m 644 -t $(TARGET_DIR)/usr/lib/fonts $(BR2_EXTERNAL_XIONGMAI_PATH)/package/xiongmai-osdrv-xm530/files/fonts/*.bin | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue