Mstar 6A628 ubuntu 14.04 server Android 开发环境搭建

linux 环境编程 专栏收录该内容
12 篇文章 0 订阅

1.获取Key
1.ssh-keygen -t rsa

2.保存id-rsa id-ras.pub

2.更改软件源
1.sudo software-properties-gtk

2.更改源为163.com 提升带宽

3.安装 vim
sudo apt-get install vim

NOTE: 14.04
no talloc stackframe at ../source3/param/loadparm.c:4864, leaking memory

    fix:
        sudo pam-auth-update 

┌──────────────────────────────────────────────────────────────────────────────────┤ PAM configuration ├───────────────────────────────────────────────────────────────────────────────────┐
│ Pluggable Authentication Modules (PAM) determine how authentication, authorization, and password changing are handled on the system, as well as allowing configuration of additional │
│ actions to take when starting user sessions. │
│ │
│ Some PAM module packages provide profiles that can be used to automatically adjust the behavior of all PAM-using applications on the system. Please indicate which of these behaviors │
│ you wish to enable. │
│ │
│ PAM profiles to enable: │
│ │
│ [*] Unix authentication │
│ [*] Register user sessions in the systemd control group hierarchy │
│ [ ] SMB password synchronization //取消samba 的选项 │
│ [*] Inheritable Capabilities Management │
│ │
│ │
│ │
│ │
└──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘

从 ubuntu 6.10 开始,ubuntu 就将先前默认的bash shell 更换成了dash shell;
其表现为 /bin/sh 链接倒了/bin/dash而不是传统的/bin/bash。
ubuntu edgy是第一个将dash作为默认shell来发行的版本,这似乎是受了debian的影响。
wiki 里面有官方的解释,https://wiki.ubuntu.com/DashAsBinSh,主要原因是dash更小,运行更快,还与POSIX兼容。
但目前存在的问题是,由于shell的更换,致使很多脚本出错,毕竟现在的很多脚本不是100%POSIX兼容。
在wiki里面也说到,如何将默认的shell改回bash,方法就是
在终端执行:
sudo dpkg-reconfigure dash 然后选择 no

                    ┌─────────────────────────────────────────────────────────────┤ 正在设定 dash ├──────────────────────────────────────────────────────────────┐                         
                    │                                                                                                                                            │                         
                    │ The system shell is the default command interpreter for shell scripts.                                                                     │                         
                    │                                                                                                                                            │                         
                    │ Using dash as the system shell will improve the system's overall performance. It does not alter the shell presented to interactive users.  │                         
                    │                                                                                                                                            │                         
                    │ Use dash as the default system shell (/bin/sh)?                                                                                            │                         
                    │                                                                                                                                            │                         
                    │                                          <Yes>                                             <No>                                            │                         
                    │                                                                                                                                            │                         
                    └────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘                         

make menuconfig
scripts/kconfig/lxdialog/menubox.o: In function do_scroll':
menubox.c:(.text+0x36): undefined reference to
wrefresh’
scripts/kconfig/lxdialog/menubox.o: In function do_print_item':
menubox.c:(.text+0x184): undefined reference to
wrefresh’
scripts/kconfig/lxdialog/menubox.o: In function print_buttons':
menubox.c:(.text+0x274): undefined reference to
wrefresh’
scripts/kconfig/lxdialog/menubox.o: In function print_arrows.constprop.0':
menubox.c:(.text+0x383): undefined reference to
wrefresh’
collect2: error: ld returned 1 exit status
make[1]: * [scripts/kconfig/mconf] Error 1
make: * [menuconfig] Error 2

Fix:
sudo apt-get install build-essential
sudo apt-get install libncurses5
sudo apt-get install libncurses5-dev

Supernova:
Start to prepare config image …
make[2]: execvp: dos2unix: Permission denied
make[2]: * [prepareConfig] Error 127
make[2]: Leaving directory /home/kevin/6A628/Supernova/target'
make[1]: *** [tvos_an_image] Error 2
make[1]: Leaving directory
/home/kevin/6A628/Supernova/target’
make: * [image_all] Error 2
nuttx_config.bin not exist!
Fix:

sudo apt-get install dos2unix

4.安装JDK
1.Java 6: for Gingerbread and newer

    $ sudo add-apt-repository "deb http://archive.canonical.com/ lucid partner"
    $ sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu hardy main multiverse"
    $ sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu hardy-updates main multiverse"
    $ sudo apt-get update

$ sudo apt-get install sun-java6-jdk

5.安装
1.安装必备工具链等
Installing required packages (Ubuntu 12.04)

sudo apt-get install lib32z1 lib32ncurses5 lib32bz2-1.0

$ sudo apt-get install git-core gnupg flex bison gperf build-essential \
  zip curl libc6-dev libncurses5-dev:i386 x11proto-core-dev \
  libx11-dev:i386 libreadline6-dev:i386 libgl1-mesa-glx:i386 \
  libgl1-mesa-dev g++-multilib mingw32 openjdk-6-jdk tofrodos \
  python-markdown libxml2-utils xsltproc zlib1g-dev:i386
2.生成链接文件

$ sudo ln -s /usr/lib/i386-linux-gnu/mesa/libGL.so.1 /usr/lib/i386-linux-gnu/libGL.so

6.git 克隆代码:
kevin@livall-kevin:~/kevin/source_core$
git clone git@192.168.1.9:NS115.git

    Cloning into 'NS115'...
    The authenticity of host '192.168.1.9 (192.168.1.9)' can't be established.
    RSA key fingerprint is 93:fa:c6:69:a4:7a:ee:8c:15:67:5a:c2:9b:16:42:39.
    Are you sure you want to continue connecting (yes/no)? yes
    Warning: Permanently added '192.168.1.9' (RSA) to the list of known hosts.
    remote: Counting objects: 239704, done.
    remote: Compressing objects: 100% (167925/167925), done.
    Receiving objects: 100% (239704/239704), 1.71 GiB | 11.13 MiB/s, done.
    remote: Total 239704 (delta 64831), reused 234004 (delta 60260)
    Resolving deltas: 100% (64831/64831), done.

7.下载工具链
scp kevin@192.168.1.8:/home/kevin… ./


8.git 使用
关联组织
git checkout –track origin/N751
git pull
git branch -D origin/N751


9.修改.bashrc
增加 82 alias make=’make -j4’


linux QQ下载

http://www.linuxidc.com/Linux/2012-05/59564.htm

编译出错解决
===—————————————————————————===
1.解决包未安装—>http://www.linuxidc.com/Linux/2011-11/47411.htm
2.解决编译器版本高等编译出错问题—>http://www.byywee.com/page/M0/S661/661060.html
3. http://eping.sinaapp.com/index.php/2011/09/15/5.html
4. http://blog.csdn.net/lmhgen/article/details/7326083
5. http://eping.sinaapp.com/index.php/2011/09/15/5.html
6 .http://blog.csdn.net/zchill/article/details/7411873
===—————————————————————————===
—————————————————
1安装javasdk6

        (1)从jdk官方网站http://www.oracle.com/technetwork/java/javase/downloads/jdk-6u29-download-513648.html下载jdk-6u29-linux-i586.bin文件。

        (2)履行jdk安装文件

        view plaincopy to clipboardprint?

            ¥chmod a+x jdk-6u29-linux-i586.bin
            ¥jdk-6u29-linux-i586.bin

        ¥chmod a+x jdk-6u29-linux-i586.bin ¥jdk-6u29-linux-i586.bin

        (3)设备jdk景象变量

        view plaincopy to clipboardprint?

            ¥sudo vim /etc/profile

        ¥sudo vim /etc/profile

        view plaincopy to clipboardprint?

            #JAVAEVIRENMENT
            exportJAVA_HOME=/usr/lib/java/jdk1.6.0_29
            exportJRE_HOME=¥JAVA_HOME/jre
            exportCLASSPATH=¥JAVA_HOME/lib:¥JRE_HOME/lib:¥CLASSPATH
            exportPATH=¥JAVA_HOME/bin:¥JRE_HOME/bin:¥PATH

        #JAVAEVIRENMENT exportJAVA_HOME=/usr/lib/java/jdk1.6.0_29 exportJRE_HOME=¥JAVA_HOME/jre exportCLASSPATH=¥JAVA_HOME/lib:¥JRE_HOME/lib:¥CLASSPATH exportPATH=¥JAVA_HOME/bin:¥JRE_HOME/bin:¥PATH

        保存撤退猬缩出编辑,并重启体系。
        2安装依附包

        view plaincopy to clipboardprint?

            ¥sudo apt-get install git-core gnupg flex bison gperf build-essential\
            zipcurlzlib1g-devlibc6-devlib32ncurses5-devia32-libs\
            x11proto-core-devlibx11-devlib32readline5-devlib32z-dev\
            libgl1-mesa-devg++-multilibmingw32tofrodospython-markdown\
            libxml2-utils

        ¥sudo apt-get install git-core gnupg flex bison gperf build-essential\ zipcurlzlib1g-devlibc6-devlib32ncurses5-devia32-libs\ x11proto-core-devlibx11-devlib32readline5-devlib32z-dev\ libgl1-mesa-devg++-multilibmingw32tofrodospython-markdown\ libxml2-utils
        3用repo对象下载源码

        (1)初始化repo

        view plaincopy to clipboardprint?

            ¥cd ~
            ¥mkdir bin
            ¥curlhttps://dl-ssl.google.com/dl/googlesource/git-repo/repo>~/bin/repo
            ¥chmod a+x ~/bin/repo
            ¥exportPATH=¥PATH:~/bin(导出景象变量)

        ¥cd ~ ¥mkdir bin ¥curlhttps://dl-ssl.google.com/dl/googlesource/git-repo/repo>~/bin/repo ¥chmod a+x ~/bin/repo ¥exportPATH=¥PATH:~/bin(导出景象变量)

        (2)下载android最新源码

        view plaincopy to clipboardprint?

            ¥mkdir android
            ¥cd android
            ¥ repo init -u https://android.googlesource.com/platform/manifest -bandroid-4.0.1_r1
            ...(输入用户名和邮箱名)
            ¥repo sync -j5
            ...(此处用5个线程开端下载源码,下载过程及其漫长,须要耐烦守候)

        ¥mkdir android ¥cd android ¥ repo init -u https://android.googlesource.com/platform/manifest -bandroid-4.0.1_r1 ...(输入用户名和邮箱名) ¥repo sync -j5 ...(此处用5个线程开端下载源码,下载过程及其漫长,须要耐烦守候)
        二 编译源码
        1开端编译

        view plaincopy to clipboardprint?

            ¥source build/envsetup.sh
            includingdevice/samsung/maguro/vendorsetup.sh
            includingdevice/samsung/tuna/vendorsetup.sh
            includingdevice/ti/panda/vendorsetup.sh
            includingsdk/bash_completion/adb.bash
            ¥make-j4(此处用4个线程编译)

        ¥source build/envsetup.sh includingdevice/samsung/maguro/vendorsetup.sh includingdevice/samsung/tuna/vendorsetup.sh includingdevice/ti/panda/vendorsetup.sh includingsdk/bash_completion/adb.bash ¥make-j4(此处用4个线程编译)

        编译完成后,会看到类似的输出:

        view plaincopy to clipboardprint?

            Targetramdisk:out/target/product/generic/ramdisk.img
            Targetuserdatafsimage:out/target/product/generic/userdata.img
            Installedfilelist:out/target/product/generic/installed-files.txt

        Targetramdisk:out/target/product/generic/ramdisk.img Targetuserdatafsimage:out/target/product/generic/userdata.img Installedfilelist:out/target/product/generic/installed-files.txt
        2编译碰到的题目

        编译错误:

        view plaincopy to clipboardprint?

            <号令行>:0:0:错误:“_FORTIFY_SOURCE”重定义[-Werror]
            <built-in>:0:0:附注: 这是先前定义的地位
            cc1plus:所有的警告都被算作是错误
            make:*** [out/host/linux-x86/obj/EXECUTABLES/obbtool_intermediates/Main.o]错误 1

        <号令行>:0:0:错误:“_FORTIFY_SOURCE”重定义[-Werror] <built-in>:0:0:附注: 这是先前定义的地位 cc1plus:所有的警告都被算作是错误 make:*** [out/host/linux-x86/obj/EXECUTABLES/obbtool_intermediates/Main.o]错误 1

        原因:

        因机械上的gcc版本过高,需调换成4.4.6从头进行编译。

        解决办法:

        1)安装4.4版本的gcc和g++

        view plaincopy to clipboardprint?

            ¥ sudo apt-get install gcc-4.4
            ¥ sudo apt-get install g++-4.4

        ¥ sudo apt-get install gcc-4.4 ¥ sudo apt-get install g++-4.4

        2)设置gcc版本,使gcc链接到gcc-4.4

        view plaincopy to clipboardprint?

            ¥ ls -l /usr/bin/gcc*
            lrwxrwxrwx 1 root root 7 2011-11-01 23:56 /usr/bin/gcc -> gcc-4.6
            -rwxr-xr-x 1 root root 224544 2011-10-06 05:47 /usr/bin/gcc-4.4
            -rwxr-xr-x 1 root root 302104 2011-09-17 05:43 /usr/bin/gcc-4.6
            ¥ cd /usr/bin
            ¥ sudo mv gcc gcc.bak
            ¥ sudo ln -s gcc-4.4 gcc

        ¥ ls -l /usr/bin/gcc* lrwxrwxrwx 1 root root 7 2011-11-01 23:56 /usr/bin/gcc -> gcc-4.6 -rwxr-xr-x 1 root root 224544 2011-10-06 05:47 /usr/bin/gcc-4.4 -rwxr-xr-x 1 root root 302104 2011-09-17 05:43 /usr/bin/gcc-4.6 ¥ cd /usr/bin ¥ sudo mv gcc gcc.bak ¥ sudo ln -s gcc-4.4 gcc

        3)设置g++版本,使g++链接到g++-4.4

        view plaincopy to clipboardprint?

            ¥ sudo mv g++ g++.bak
            ¥ sudo ln -s g++-4.4 g++

        ¥ sudo mv g++ g++.bak ¥ sudo ln -s g++-4.4 g++

        4)设置完毕后,从头进行编译即可

——————————————–

  • 0
    点赞
  • 0
    评论
  • 1
    收藏
  • 打赏
    打赏
  • 扫一扫,分享海报

©️2022 CSDN 皮肤主题:大白 设计师:CSDN官方博客 返回首页

打赏作者

小K仔

你的鼓励将是我创作的最大动力

¥2 ¥4 ¥6 ¥10 ¥20
输入1-500的整数
余额支付 (余额:-- )
扫码支付
扫码支付:¥2
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、C币套餐、付费专栏及课程。

余额充值