After setup cross-compiler toolchain path to env
A.Kernel Part
Kernel source code Path : osdrv/opensource/kernel/linux-3.18.y.tgz
After decompress it. copy default kernel config
cp arch/arm/configs/hi3516cv300_full_defconfig .config
menuconfig :
make ARCH=arm CROSS_COMPILE=arm-hisiv600-linux-gnueabi- menuconfig
make kernel :
make -j4 ARCH=arm CROSS_COMPILE=arm-hisiv600-linux-gnueabi- uImage
Compiler kernel succeed^_^
B.BootLoader Part
uboot source code Path : osdrv/opensource/uboot/u-boot-2010.06.tgz
After decompress u-boot.tgz file, Enter u-boot root folder. Type below commands.
make ARCH=arm CROSS_COMPILE=arm-hisiv600-linux-gnueabi- hi3516cv300_config
make ARCH=arm CROSS_COMPILE=arm-hisiv600-linux-gnueabi-
After comiler, many errors.... I think Hisi-uboot document wrote not good. And Makefile also has problem. Ok, Let's find how to solve this problem.
u-boot Compiler Error Solution :
Enter to Toolchain Folder. Enter bin Folder and Find these compiler tool gcc, objdump, ar, objcopy, ld, ranlib, nm .
ln -sf arm-hisiv600-linux-gnueabi-gcc arm-hisiv600-linux-gcc
ln -sf arm-hisiv600-linux-gnueabi-objdump arm-hisiv600-linux-objdump
ln -sf arm-hisiv600-linux-gnueabi-ar arm-hisiv600-linux-ar
ln -sf arm-hisiv600-linux-gnueabi-objcopy arm-hisiv600-linux-objcopy
ln -sf arm-hisiv600-linux-gnueabi-ld arm-hisiv600-linux-ld
ln -sf arm-hisiv600-linux-gnueabi-ranlib arm-hisiv600-linux-ranlib
ln -sf arm-hisiv600-linux-gnueabi-nm arm-hisiv600-linux-nm
Enter u-boot root folder. And enter below commands
make ARCH=arm CROSS_COMPILE=arm-hisiv600-linux- hi3516cv300_config
make ARCH=arm CROSS_COMPILE=arm-hisiv600-linux-
Finally, compiler succeed.
But this u-boot cann't be burn to NorFlash.
It need to add ddr-reg binary to u-boot.bin
Find the pc tool, Enter folder osdrv/tools/pc/uboot_tools
Open Hi3516CV300-DEMB-uboot-DDR3_1066M-16bit-256MB-ARM9_800M-BUS_266M.xls
Edit tab mddrc_dmc and mddrc_phy for your DDR. Go to tab main and click Generage reg bin file.
Generate a binary file.
Combine cfg.bin and u-boot.bin
Enter below command:
./mkboot.sh cfg.bin u-boot-ok.bin
End
沒有留言:
張貼留言