CubieBoard7 development board (S700 based on chip) Android firmware-based compiler

Before using the code compiler CubieBoard7 development board provided encountered some problems when the system firmware based on Android, briefly describe the solution.
CubieBoard7 Development Board Download:!

Into CubieBoard7 / Cubietech_Release / Source / Android / Android-SDK-V2.1 ( the latest version at the time) folder and find android5.1_sdk_s700_v2.1.tar.gz android5.1_sdk_s700_v2.1.tar.gz.md5, copied to linux preparatory work before the system began to be compiled:
1. first, switch to an administrator user:
do related work compiled in the administrator user to prevent insufficient privileges occurs during compilation;

2. Source md5 checksum:
According to the source code and documentation md5 provided at the same level source directory, enter:

  1. Enter: the Find android5.1_sdk_s700_v2.1.tar.gz | xargs md5sum> android5.1_sdk_s700_v2.1_1.md5
    generate md5 files;

  2. Input: the diff android5.1_sdk_s700_v2.1_1.md5 android5.1_sdk_s700_v2.1.tar.gz.md5
    If no documentation MD5 value is not destroyed may be used (MD5 values are the same);

3. Create a folder to save the source code:
Enter: mkdir android5.1_sdk_s700
create android5.1_sdk_s700 folder;

4. Save the folder to extract the source:
Input: the tar -zxpf android5.1_sdk_s700_v2.1.tar.gz -C android5.1_sdk_s700
source android5.1_sdk_s700 to extract the folder;

5. Enter the source folder:
Input: CD android5.1_sdk_s700 / android5.1_sdk_s700_v2.1 /
into the source folder;

5. From the escrow detecting git source code:
the code is not visible from the current folder, the source code needs to be detected:

  1. Enter: cp .repo / sync.sh ./
  2. Input: ./sync.sh
    wait for the completion of the detection source;

6. Set the shell:

  1. Input: RM -rf / bin / SH
    If you are prompted " RM: CAN not the Remove '-rf': No SUCH File or Directory " directly on the line ignored;
  2. Input: LN -s / bin / bash / bin / SH
  3. Input: LS the -l / bin / SH
    If you are prompted: " lrwxrwxrwx 1 root root 11 Yue 9 20:55 26 / bin / SH -> / bin / bash ", represents a soft link success;

7.linux environment to build:
If you have already built a good OpenJdk and compiler-dependent files directly reference the compilation step below!
If you have not set up the environment, please refer to " Linux environment to build a reference ," continue to look down,
in particular:

  1. jdk download OpenJdk within the range 1.7.0-1.8.0;
  2. gcc g ++ and need not downgrade (4.8.0 or later use);

8. Check the code branches:
Special Note: This source belongs to the current (I downloaded the time) the latest release branch, just to ensure code integrity;

  1. Input: repo Status
    If the prompt "at The Program 'repo' IS Rate this page Currently not Installed by You CAN install IT by Typing:.
    Sudo install phablet APT-GET-Tools", you need to install tools;
    display under normal circumstances:
project android/                                branch s700-release
project kernel/                                 branch s700-release
project owl/s700/                               branch s700-release
project owl/scripts/                            branch s700-release
project owl/tools/adb_drv/                      branch s700-release
project owl/tools/burn_tool/                    branch s700-release
project owl/tools/fw_maker/                     branch s700-release
project owl/tools/utils/                        branch s700-release
project toolchain/aarch64-linux-gnu/            branch s700-release
project toolchain/arm-linux-gnueabihf/          branch s700-release
project u-boot/                                 branch s700-release

  1. Installation tools (machine can display normal branch information without having to install):
    Input: APT-GET-install phablet Tools

Here, the compiler do the preparatory work before, now began to compile the firmware:

1. Specify compilation type:
Input: ./autobuild.sh config
outputs the following information:

Select board type:
     1. s700_aio
     2. s700_cb7
     3. s700_miniPC

According to need to select the relevant type, I chose "2. s700_cb7";

2. Start compiling firmware:
Input: ./autobuild.sh

3. After compilation, the firmware storage location:
firmware storage location and the type of compiler, the approximate location of paths: android5.1_sdk_s700_v2.1 /
OWL / OUT / s700_android_ (s700_cb7 (this is designated compile-time type))
/ ImagesRF Royalty Free / s700_android_s700_ (s700_cb7 ) _ (generation time) *. fw

Here, the firmware is compiled, said the following problem that may occur during compilation:

1./bin/sh: 1: source: not found
: Complete the following error:

cp /home/linux/Documents/andriod_kernel/ats/android5.1_sdk_s700_v2.1/owl/out/s700_android_s700_aio/misc/modules/g_android.ko /home/linux/Documents/andriod_kernel/ats/android5.1_sdk_s700_v2.1/owl/../android/device/actions/s700_aio/recovery/
cp /home/linux/Documents/andriod_kernel/ats/android5.1_sdk_s700_v2.1/owl/out/s700_android_s700_aio/misc/modules/u_serial.ko /home/linux/Documents/andriod_kernel/ats/android5.1_sdk_s700_v2.1/owl/../android/device/actions/s700_aio/recovery/
cd /home/linux/Documents/andriod_kernel/ats/android5.1_sdk_s700_v2.1/owl/../android && source build/envsetup.sh && lunch s700_aio-userdebug && make -j$((3+1))
/bin/sh: 1: source: not found
make: *** [system] Error 127

The problem with this situation belongs to, and no changes caused by the shell, please refer to "6. Set the shell:"; Android source code and compiled in a separate linux kernel found no shell to bash, the kernel does not compile successfully;

2.make [3]: * [arch
/ x86 / platform / efi / efi.o] Error 1: Full error is as follows:

arch/x86/platform/efi/efi.c: In function ‘efi_init’:
arch/x86/platform/efi/efi.c:643:5: error: ‘struct efi’ has no member named ‘config_table’
  efi.config_table = (unsigned long)efi.systab->tables;
     ^
arch/x86/platform/efi/efi.c:644:5: error: ‘struct efi’ has no member named ‘fw_vendor’
  efi.fw_vendor  = (unsigned long)efi.systab->fw_vendor;
     ^
arch/x86/platform/efi/efi.c:645:5: error: ‘struct efi’ has no member named ‘runtime’
  efi.runtime  = (unsigned long)efi.systab->runtime;
     ^
make[3]: *** [arch/x86/platform/efi/efi.o] Error 1
make[2]: *** [arch/x86/platform/efi] Error 2
make[1]: *** [arch/x86/platform] Error 2
make: *** [arch/x86] Error 2 (kernel)

Open kernel / arch / x86 / platform / efi / efi.c, according to the specified line positions of these three lines of code commented tips;

3.make [2]: * [fs
/ pstore / ram.o] Error 1: Full error is as follows:

fs/pstore/ram.c:46:37: error: ‘SZ_256K’ undeclared here (not in a function)
 static ulong ramoops_console_size = SZ_256K;
                                     ^
fs/pstore/ram.c:59:23: error: ‘SZ_512K’ undeclared here (not in a function)
 static ulong mem_size=SZ_512K;
                       ^
make[2]: *** [fs/pstore/ram.o] Error 1
make[1]: *** [fs/pstore] Error 2
make: *** [fs] Error 2

Open fs / pstore / ram.c, increases at MIN_MEM_SIZE 4096UL #define:
#define SZ_1K 1024
#define SZ_256K (256 * SZ_1K)
#define SZ_512K (512 * SZ_1K)

The film ended the article here, if the compiler encountered other problems, you can leave a message at the bottom of the article -

发布了87 篇原创文章 · 获赞 195 · 访问量 17万+

Guess you like

Origin blog.csdn.net/a29562268/article/details/84560520