mirror of https://github.com/OpenIPC/firmware.git
				
				
				
			gcc 14
							parent
							
								
									e055f9b669
								
							
						
					
					
						commit
						6675fe109a
					
				
								
									
									
										
											7
										
									
									Makefile
									
									
									
									
								
								
							
							
										
											7
										
									
									Makefile
									
									
									
									
								|  | @ -36,7 +36,12 @@ defconfig: prepare | |||
| prepare: | ||||
| 	@if test ! -e $(TARGET)/buildroot-$(BR_VER); then \
 | ||||
| 		wget -c -q $(BR_LINK)/$(BR_VER).tar.gz -O $(BR_FILE); \
 | ||||
| 		mkdir -p $(TARGET); tar -xf $(BR_FILE) -C $(TARGET); fi | ||||
| 		mkdir -p $(TARGET); tar -xf $(BR_FILE) -C $(TARGET); \
 | ||||
| 		if grep "BR2_OPENIPC_SOC_FAMILY=\"k230\"" $(CONFIG) >/dev/null ; then \
 | ||||
| 			$(TARGET)/buildroot-$(BR_VER)/support/scripts/apply-patches.sh -s \
 | ||||
| 			$(TARGET)/buildroot-$(BR_VER)/ general/package/canaan_k230_sdk/buildroot_patch/ *.patch; fi; \
 | ||||
| 		fi | ||||
| 
 | ||||
| 
 | ||||
| help: | ||||
| 	@printf "BR-OpenIPC usage:\n \
 | ||||
|  |  | |||
|  | @ -0,0 +1,54 @@ | |||
| From 99d0e3e9da9aaf4c4cbf6a4b10d2ad558e65ed61 Mon Sep 17 00:00:00 2001 | ||||
| From: wangjianxin <wangjianxin@canaan-creative.com> | ||||
| Date: Fri, 30 May 2025 11:53:35 +0800 | ||||
| Subject: [PATCH] support gcc 14 | ||||
| 
 | ||||
| ---
 | ||||
|  toolchain/Config.in                                          | 5 +++++ | ||||
|  .../toolchain-external-custom/Config.in.options              | 4 ++++ | ||||
|  2 files changed, 9 insertions(+) | ||||
|  mode change 100644 => 100755 toolchain/Config.in | ||||
|  mode change 100644 => 100755 toolchain/toolchain-external/toolchain-external-custom/Config.in.options | ||||
| 
 | ||||
| diff --git a/toolchain/Config.in b/toolchain/Config.in
 | ||||
| old mode 100644 | ||||
| new mode 100755 | ||||
| index bd4f80bd..d0483628
 | ||||
| --- a/toolchain/Config.in
 | ||||
| +++ b/toolchain/Config.in
 | ||||
| @@ -792,10 +792,15 @@ config BR2_TOOLCHAIN_GCC_AT_LEAST_13
 | ||||
|  	bool | ||||
|  	select BR2_TOOLCHAIN_GCC_AT_LEAST_12 | ||||
|   | ||||
| +config BR2_TOOLCHAIN_GCC_AT_LEAST_14
 | ||||
| +	bool
 | ||||
| +	select BR2_TOOLCHAIN_GCC_AT_LEAST_13
 | ||||
| +
 | ||||
|  # This order guarantees that the highest version is set, as kconfig | ||||
|  # stops affecting a value on the first matching default. | ||||
|  config BR2_TOOLCHAIN_GCC_AT_LEAST | ||||
|  	string | ||||
| +	default "14"	if BR2_TOOLCHAIN_GCC_AT_LEAST_14
 | ||||
|  	default "13"	if BR2_TOOLCHAIN_GCC_AT_LEAST_13 | ||||
|  	default "12"	if BR2_TOOLCHAIN_GCC_AT_LEAST_12 | ||||
|  	default "11"	if BR2_TOOLCHAIN_GCC_AT_LEAST_11 | ||||
| diff --git a/toolchain/toolchain-external/toolchain-external-custom/Config.in.options b/toolchain/toolchain-external/toolchain-external-custom/Config.in.options
 | ||||
| old mode 100644 | ||||
| new mode 100755 | ||||
| index 5554d567..838ac79a
 | ||||
| --- a/toolchain/toolchain-external/toolchain-external-custom/Config.in.options
 | ||||
| +++ b/toolchain/toolchain-external/toolchain-external-custom/Config.in.options
 | ||||
| @@ -46,6 +46,10 @@ choice
 | ||||
|  	  Set to the gcc version that is used by your external | ||||
|  	  toolchain. | ||||
|   | ||||
| +config BR2_TOOLCHAIN_EXTERNAL_GCC_14
 | ||||
| +	bool "14.x"
 | ||||
| +	select BR2_TOOLCHAIN_GCC_AT_LEAST_14
 | ||||
| +
 | ||||
|  config BR2_TOOLCHAIN_EXTERNAL_GCC_13 | ||||
|  	bool "13.x" | ||||
|  	select BR2_TOOLCHAIN_GCC_AT_LEAST_13 | ||||
| -- 
 | ||||
| 2.46.0 | ||||
| 
 | ||||
|  | @ -0,0 +1,33 @@ | |||
| #!/bin/bash | ||||
| DATE=$(date +%y.%m.%d) | ||||
| FILE=${TARGET_DIR}/usr/lib/os-release | ||||
| 
 | ||||
| echo OPENIPC_VERSION=${DATE:0:1}.${DATE:1} >> ${FILE} | ||||
| date +GITHUB_VERSION="\"${GIT_BRANCH-local}+${GIT_HASH-build}, %Y-%m-%d"\" >> ${FILE} | ||||
| echo BUILD_OPTION=${OPENIPC_VARIANT} >> ${FILE} | ||||
| date +TIME_STAMP=%s >> ${FILE} | ||||
| 
 | ||||
| 
 | ||||
| k230_openipc_img_replace_rootfs() | ||||
| { | ||||
|     cd ${BINARIES_DIR} | ||||
|     ext4_pos="$(fdisk  -l sysimage-sdcard.img | grep sysimage-sdcard.img2 | cut -d ' ' -f2)" | ||||
|     dd if=rootfs.ext4  of=sysimage-sdcard.img seek=${ext4_pos} conv=notrunc | ||||
|     gzip -k -f sysimage-sdcard.img | ||||
|     chmod a+r sysimage-sdcard.img.gz | ||||
|     cd - | ||||
|     echo -e "k230 image is \033[31m ${BINARIES_DIR}/sysimage-sdcard.img.gz \033[0m" | ||||
| } | ||||
| k230_openipc_img_env_replace() | ||||
| { | ||||
|     cd ${BINARIES_DIR} | ||||
|     env; | ||||
|     mkenvimage -h; | ||||
|     mkenvimage  -s 0x10000 -o env.env  ${BR2_EXTERNAL}/package/canaan_k230_sdk/k230_env.env | ||||
| 
 | ||||
|     dd if=env.env  of=sysimage-sdcard.img seek=3840 conv=notrunc | ||||
|     cd -; | ||||
| } | ||||
| 
 | ||||
| k230_openipc_img_env_replace | ||||
| k230_openipc_img_replace_rootfs | ||||
|  | @ -0,0 +1,32 @@ | |||
| arch=riscv | ||||
| autoload=0 | ||||
| baudrate=115200 | ||||
| board=k230 | ||||
| board_name=k230 | ||||
| bootcmd=run blinux; | ||||
| bootcmd_baremetal= mmc dev ${mmc_boot_dev_num}; mmc read 0 0x5000 0xa000; boot_baremetal 1 0 1400000; | ||||
| bootcmd_usb=run usb_load; bootm $kernel_addr - $dtb_addr | ||||
| bootdelay=3 | ||||
| console_port=console=ttyS1,115200 | ||||
| cpu=k230 | ||||
| dtb_addr=0xa000000 | ||||
| fdt_high=0xa100000 | ||||
| fdtcontroladdr=80293880 | ||||
| gatewayip=10.99.105.254 | ||||
| ipaddr=10.99.105.44 | ||||
| kernel_addr=0xc100000 | ||||
| loadaddr=0xc000000 | ||||
| mmc_boot_dev_num=1 | ||||
| netmask=255.255.255.0 | ||||
| ramdisk_addr=0xa100000 | ||||
| serverip=10.10.1.94 | ||||
| vendor=canaan | ||||
| quick_boot=false | ||||
| k=Image | ||||
| kilp32=Image_ilp32 | ||||
| nuttex=nuttx-7000000-uart2.bin | ||||
| blinux=ext4load mmc ${mmc_boot_dev_num}:1 0x3000000 /fw_jump_add_uboot_head.bin && ext4load mmc ${mmc_boot_dev_num}:1 0x200000 /${k} && ext4load mmc ${mmc_boot_dev_num}:1 0x2200000 /k.dtb && bootm 0x3000000 - 0x2200000; | ||||
| blinuxilp32= setenv k Image_ilp32 && run blinux; | ||||
| bnuttx=ext4load mmc ${mmc_boot_dev_num}:1 0x7000000 /${nuttex} && boot_baremetal 0 0x${fileaddr} 0x${filesize}; | ||||
| wjx=xxxx | ||||
| ethaddr=22:22:22:22:22:22 | ||||
|  | @ -1,16 +0,0 @@ | |||
| #!/bin/bash | ||||
| DATE=$(date +%y.%m.%d) | ||||
| FILE=${TARGET_DIR}/usr/lib/os-release | ||||
| 
 | ||||
| echo OPENIPC_VERSION=${DATE:0:1}.${DATE:1} >> ${FILE} | ||||
| date +GITHUB_VERSION="\"${GIT_BRANCH-local}+${GIT_HASH-build}, %Y-%m-%d"\" >> ${FILE} | ||||
| echo BUILD_OPTION=${OPENIPC_VARIANT} >> ${FILE} | ||||
| date +TIME_STAMP=%s >> ${FILE} | ||||
| 
 | ||||
| cd ${BINARIES_DIR} | ||||
| ext4_pos="$(fdisk  -l sysimage-sdcard.img | grep sysimage-sdcard.img2 | cut -d ' ' -f2)" | ||||
| dd if=rootfs.ext4  of=sysimage-sdcard.img seek=${ext4_pos} conv=notrunc | ||||
| gzip -k -f sysimage-sdcard.img | ||||
| chmod a+r sysimage-sdcard.img.gz | ||||
| cd - | ||||
| echo -e "k230 image is \033[31m ${BINARIES_DIR}/sysimage-sdcard.img.gz \033[0m" | ||||
		Loading…
	
		Reference in New Issue