ºìÁªLinuxÃÅ»§
Linux°ïÖú

UbuntuǶÈëʽ¿ª·¢ÈëÃŽ̳ÌÖ®Ò» ¡¶±àÒëÄںˡ·

·¢²¼Ê±¼ä:2016-11-04 12:04:07À´Ô´:ºìÁª×÷Õß:ţͷ¸ç
ºÜ¶àÅóÓÑÏ£ÍûÔÚÄõ½Firelfy·¢²¼µÄUbuntu¾µÏñºó£¬»áÏë×Ô¼º¼ÓÇý¶¯»ò×Ô¼º±àÒëµÄÄں˵ȵȣ¬µ«×öµÄ¹ý³ÌÖÐÄÑÃâ³öÏÖ¸÷ÖÖ¸÷ÑùµÄÎÊÌâ¡£ÍøÉϸ÷Ö̶ֽ̳¼²»ÄÇôÇÐÌ⣬½²½â¶¼²»ÊÇÄÇôϸÖ£¬ÈÃÈ˸е½ÃÔ㣬ÓÖ»òÐíÊÇÎÞÖú¡£FireflyÍŶÓŬÁ¦µØÔÚ°ïÖú¿ª·¢Õß´òÆÆ´ËÀ§¾Ö£¬ÍƳöϵÁн̳̣¬Èÿª·¢Õß¿ÉÒÔͨ¹ýFirefly¿ªÔ´Æ½Ì¨¿ÉÒÔ¿ìËÙÉÏÊÖ¿ª·¢£¬²¢¿ìËÙ´òÔì³ö³ÉÊì²úÆ·¡£
    ÄÇôÇë¸ú×ÅÎҵĽŲ½ÉÏ·°É£¡

    Ò»¡¢LinuxÖ÷»ú°²×°Äں˿ª·¢°ü
    LinuxÄں˱àÒëÐèÒªÖ÷»ú°²×°Ò»Ð©¿ª·¢°ü£¬¾ßÌåµÄ¿ª·¢¹¤¾ßÓÐÄÇЩ¿ÉÒÔͨ¹ý°üÃû×ÔÐв¹ÄÔ¡£°²×°¹ý³ÌÖÐÐèÒªÁôÒ⿪·¢°üÊÇ·ñ¶¼Óа²×°³É¹¦£¬ÈôÓпª·¢°ü°²×°Ê§°Ü¿ÉÒÔµ¥¶ÀÔÙÖØа²×°¡£[code]sudo apt-get install build-essential lzop libncurses5-dev libssl-dev[/code]Èç¹ûʹÓõÄÊÇ 64 λµÄ Ubuntu£¬»¹ÐèÒª°²×°£º[code]sudo apt-get install libc6:i386[/code]¶þ¡¢°²×°½»²æ±àÒ빤¾ßÁ´
    ´¿Linux¿ª·¢µÄÅóÓÑ¿ÉÒÔͨ¹ýGithubµ¥¶ÀÏÂÔؽ»²æ±àÒ빤¾ßÁ´£¬Äں˱àÒëÓõ½arm-eabi-4.6½»²æ±àÒ빤¾ßÁ´£¬ÏÂÔØÁ´½ÓΪ£º
http://pan.baidu.com/s/1sl7v1EX
    ÏÂÔغ÷ŵ½Ö¸¶¨Ä¿Â¼~/UbuntuDev/toolchainºó½âѹ£º[code]mkdir ~/UbuntuDev/toolchain
cd ~/UbuntuDev/toolchain
tar -xvf arm-eabi-4.6.tar.gz [/code]Èç¹ûÊÇandroid¿ª·¢Õߣ¬¿ÉÒÔÖ±½Ó°´android SDK±àÒëµÄ·½·¨±àÒëSDKÀïµÄÄںˣ¬android SDKÀï×Ô´ø½»²æ±àÒ빤¾ßÁ´µÈ¡£

    Èý¡¢ÏÂÔØFirefly LinuxÄÚºËÔ´´úÂë
    ´ÓFirefly github²Ö¿âÏÂÔØkernelÔ´´úÂ룺[code]cd ~/UbuntuDev
git clone https://github.com/T-Firefly/firefly-3.14-kernel[/code]ÖÁ´ËÖ÷»ú°²×°ÁË¿ª·¢°ü£¬Í¬Ê±ÄÚºËÔ´ÂëºÍ½»²æ±àÒ빤¾ßÁ´¶¼×¼±¸Íê±Ï¡£¿ÉνÊÇÍòʾ߱¸£¬Ö»Ç·±àÒ룡GO£¡

    ËÄ¡¢±àÒëÄÚºË
    ½øÈëÄÚºËÔ´ÂëĿ¼£º[code]cd ~/UbuntuDev/firefly-3.14-kernel/[/code]ÉèÖÃARCH»·¾³±äÁ¿£¬¸æËß±àÒëÆ÷Ä¿±êƽ̨µÄ¼Ü¹¹£º[code]export ARCH=arm[/code]ÉèÖý»²æ±àÒëÆ÷£º[code]export CROSS_COMPILE=./../toolchain/arm-eabi-4.6/bin/arm-eabi-[/code]ÔØÈëFirefly RK3288¿ª·¢°åÄÚºËÅäÖãº[code]make firefly-rk3288_defconfig[/code]±àÒëzImage£¬zImageÊÇ¿ÉÒÔ¼ÓÔØÖ´ÐеĶþ½øÖÆ´úÂ룺[code]make -j4 zImage[/code]Õý³£±àÒë½áÊøºó£¬»áÔÚarch/arm/boot/Ŀ¼Éú³ÉzImageÎļþ¡£

    ±àÒëDTBÎļþ¡£dtbÊÇ.dts±»DTC±àÒëºóµÄ¶þ½øÖƸñʽµÄDevice TreeÃèÊö£¬¿ÉÓÉLinuxÄں˽âÎö¡£Í¨³£ÔÚÎÒÃÇΪµç·°åÖÆ×÷NAND¡¢SDÆô¶¯imageʱ£¬»áΪ.dtbÎļþµ¥¶ÀÁôÏÂÒ»¸öºÜСµÄÇøÓòÒÔ´æ·ÅÖ®£¬Ö®ºóbootloaderÔÚÒýµ¼kernelµÄ¹ý³ÌÖУ¬»áÏȶÁÈ¡¸Ã.dtbµ½ÄÚ´æ¡£[code]make firefly-rk3288.dtb[/code]Éú³Ékernel.imgÎļþ[code]cat arch/arm/boot/zImage arch/arm/boot/dts/firefly-rk3288.dtb > zImage-dtb
mkkrnlimg -a zImage-dtb kernel.img[/code]µ±È»ÄãÒ²¿ÉÒÔÕâÑùÈ¥±àÒë:[code]make -j8 firefly-rk3288.img[/code]±àÒë³öÀ´µÄfirefly-rk3288.imgÎļþºÍÉÏÊö²½Öè±àÒë³öÀ´µÄÊÇÒ»ÑùµÄ¡£

    ±àÒë²¢°²×°Ä£¿é£¬ÏÈÔÚkernelĿ¼´´½¨modules_installĿ¼£¬ÓÃÓÚ´æ·Å±àÒëºÃµÄÄÚºËÄ£¿é¡£[code]mkdir modules_install
make INSTALL_MOD_PATH=./modules_install modules_install[/code]ÏÖÔÚµÄkernelºÍmodules¶¼ÒѾ­±àÒëÍê³É£¬µ«»¹²»ÄÜÖ±½ÓÉÕ¼µ½¿ª·¢°åÔËÐУ¬ÏÂһƪÔÙ½²ÈçºÎÈñàÒë³öÀ´µÄÄÚºËÔÚ¿ª·¢°åÉÏÔËÐÐÆðÀ´¡£
ÎÄÕÂÆÀÂÛ

¹²ÓÐ 1 ÌõÆÀÂÛ

  1. dfilesa ÓÚ 2016-11-05 12:03:40·¢±í:

    ѧϰÁË