1、编译kernel
1.1 cd kernel/linux-3.10.y
1.2 cp arch/arm/configs/hi3536_full_defconfig.config
1.3 make ARCH=armCROSS_COMPILE=arm-hisiv300-linux- menuconfig
1.4 make ARCH=armCROSS_COMPILE=arm-hisiv300-linux- uImage
1.4.1 弹出选择板子型号:39(hi3635)
1.4.2 PCIE:yes 否则报错1.5.2
1.4.3 I2C:yes 否则报错1.5.1
1.5报错:
1.5.1
drivers/i2c/busses/i2c-hisilicon.c: Infunction ‘hi_i2c_hw_init’:
drivers/i2c/busses/i2c-hisilicon.c:158:12:error: ‘CONFIG_HI_I2C_RX_FIFO’ undeclared (first use in thisfunction)
rx_fifo = CONFIG_HI_I2C_RX_FIFO;
^
drivers/i2c/busses/i2c-hisilicon.c:158:12:note: each undeclared identifier is reported only once for each function itappears in
drivers/i2c/busses/i2c-hisilicon.c:159:12:error: ‘CONFIG_HI_I2C_TX_FIFO’ undeclared (first use in thisfunction)
tx_fifo = CONFIG_HI_I2C_TX_FIFO;
^
drivers/i2c/busses/i2c-hisilicon.c: Infunction ‘hi_i2c_probe’:
drivers/i2c/busses/i2c-hisilicon.c:759:18:error: ‘CONFIG_HI_I2C_RETRIES’ undeclared (first use in thisfunction)
adap->retries = CONFIG_HI_I2C_RETRIES;
^
make[3]: *** [drivers/i2c/busses/i2c-hisilicon.o]错误 1
make[2]: *** [drivers/i2c/busses] 错误 2
make[1]: *** [drivers/i2c] 错误 2
make: ***[drivers] 错误
1.5.2
In file included fromdrivers/pci/hipcie/pcie.c:128:0:
drivers/pci/hipcie/pcie_hi3536.c: Infunction ‘__arch_pcie_info_setup’:
drivers/pci/hipcie/pcie_hi3536.c:109:26:error: ‘CONFIG_PCIE0_DEVICES_MEM_SIZE’ undeclared (first use in thisfunction)
unsigned int mem_size = CONFIG_PCIE0_DEVICES_MEM_SIZE;
^
drivers/pci/hipcie/pcie_hi3536.c:109:26:note: each undeclared identifier is reported only once for each function itappears in
drivers/pci/hipcie/pcie_hi3536.c:110:26:error: ‘CONFIG_PCIE0_DEVICES_CONFIG_SIZE’ undeclared (first use in thisfunction)
unsigned int cfg_size = CONFIG_PCIE0_DEVICES_CONFIG_SIZE;
^
make[3]: *** [drivers/pci/hipcie/pcie.o] 错误 1
make[2]: *** [drivers/pci/hipcie] 错误 2
make[1]: *** [drivers/pci] 错误 2
make: ***[drivers] 错误 2
1.6 编译完成
OBJCOPY arch/arm/boot/zImage
Kernel: arch/arm/boot/zImage is ready
UIMAGE arch/arm/boot/uImage
Image Name: Linux-3.10.0_hi3536
Created: Tue Mar 21 11:33:19 2017
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 3963384 Bytes = 3870.49 kB = 3.78 MB
Load Address: 40008000
Entry Point: 40008000
Imagearch/arm/boot/uImage is ready
2、mpp_single 编译
2.1报错
root@ubuntu:/home/lisa/nvr/Hi3536_SDK_V2.0.4.0/mpp_single/sample#make
ls: 无法访问/hiwork/osdrvhi3536.C02: 没有那个文件或目录
make[1]: 正在进入目录 `/home/lisa/nvr/Hi3536_SDK_V2.0.4.0/mpp_single/sample/hifb'
arm-hisiv400-linux-gcc -Wall -g-I/home/lisa/nvr/Hi3536_SDK_V2.0.4.0/mpp_single/include-I/home/lisa/nvr/Hi3536_SDK_V2.0.4.0/mpp_single/sample/hifb/../common -I/home/lisa/nvr/Hi3536_SDK_V2.0.4.0/mpp_single/extdrv/tlv320aic31-Dhi3536 -DHICHIP=0x35360100 -DHI_RELEASE -DHI_XXXX -lpthread -lm -ldl-DHI_ACODEC_TYPE_INNER -DHI_ACODEC_TYPE_HDMI -c -o sample_hifb.o sample_hifb.c
make[1]: arm-hisiv400-linux-gcc:命令未找到
make[1]: *** [sample_hifb.o] 错误 127
make[1]:正在离开目录 `/home/lisa/nvr/Hi3536_SDK_V2.0.4.0/mpp_single/sample/hifb'
make: *** [rel] 错误 2
解决方法:修改Hi3536_SDK_V2.0.4.0/mpp_single/Makefile.param
# Define the default OS linkdirectory.
export HIWORK_PATH?=/hiwork
export ARCH=arm
export MPP_BUILD=n
# use HIARCH indicate chip, use libc tochoose cross compiler.
export HIARCH?=hi3536
#export LIBC?=glibc
export LIBC?=uclibc
# Whether support the debug information.HI_DEBUG or HI_RELEASE
export HIDBG?=HI_RELEASE
# cpu type single/master/slave
ifeq ($(HIARCH),hi3536)
export CPU_TYPE?=single
else
export CPU_TYPE?=single
endif
export ENV?=umap6
# Whether open -g
export HIGDB?=n
# FPGA board or not
exportFPGA?=n