21

Вопрос по kernel, macos, linux – сборка ядра Linux на Mac OS X

Error: User Rate Limit Exceeded

Error: User Rate Limit Exceededelf.h was not found.

Error: User Rate Limit ExceededNO ELF

Error: User Rate Limit Exceeded/usr/includeError: User Rate Limit Exceeded"u8" not declared

Каков стандартный способ разработки ядра на Mac? У меня есть виртуальная машина под управлением Linux на том же Mac, и она будет использоваться для тестирования модифицированного ядра. Однако я не очень хочу собирать на нем ядро, так как оно довольно медленное.

  • Согласен. Я сдался ... Я думал, что люди могут понять это и придумать удобный способ ... И оказывается, что это неправильно.

    от Alfred Zhong
  • Error: User Rate Limit ExceededNO ELFError: User Rate Limit ExceededmakeError: User Rate Limit Exceededmake V=1Error: User Rate Limit Exceeded

    от mpontillo
  • Error: User Rate Limit Exceededcode.google.com/p/android/issues/detail?id=2755

    от nmagerko
  • Error: User Rate Limit ExceededNO ELFError: User Rate Limit Exceeded

    от mpontillo
  • Error: User Rate Limit Exceeded

    от Alfred Zhong
  • Error: User Rate Limit Exceeded

    от kolosy
5 ответов
  • 2

    Error: User Rate Limit Exceeded

    make -j8 ARCH=arm CROSS_COMPILE=arm-eabi- HOSTCFLAGS="-I ../external/elfutils/libelf"

  • 3

    Error: User Rate Limit Exceeded

    Compile Kernel using AOSP's prebuilts

    Missing Linux headers: gcc/linux-x86/host/x86_64-linux-glibc2.11-4.8 Cross compiler: gcc/darwin-x86/arm/arm-eabi-4.8/

    <SOME-PATH>/prebuilts/
    <SOME-PATH>/prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.11-4.8/
    <SOME-PATH>/prebuilts/gcc/darwin-x86/arm/arm-eabi-4.8/
    

    Install the missing headers

    /usr/local/includechmod +x

    install_headers.sh:
    #!/bin/sh
    
    PREBUILTS_DIR="<SOME-PATH>/prebuilts" # fill in the path here!
    
    PREBUILT_GCC=$PREBUILTS_DIR"/gcc/linux-x86/host/x86_64-linux-glibc2.11-4.8"
    KERNEL_HEADERS=$PREBUILT_GCC"/sysroot/usr/include"
    HOST_HEADERS="/usr/local/include"
    
    function install_header() {
        header=$1
        ln -s $KERNEL_HEADERS/$header $HOST_HEADERS/$header
    }
    
    # create symlinks for the missing headers
    install_header elf.h
    install_header features.h
    # the following are folders (that contain headers)
    install_header bits
    install_header gnu
    install_header linux
    install_header asm
    install_header asm-generic
    
    Build the kernel
    export PATH=<SOME-PATH>/prebuilts/gcc/darwin-x86/arm/arm-eabi-4.8/bin:$PATH
    export ARCH=arm
    export SUBARCH=arm
    export CROSS_COMPILE=arm-eabi-
    # in this example it builds for N6
    make shamu_defconfig
    make -j8
    
    Voila:

    Kernel: arch/arm/boot/zImage-dtb is ready

    My configuration macOS Sierra 10.12.3 XCode: using MacOSX10.11.sdk, which allows building AOSP on mac Target device: N6/shamu AOSP branch: Marshmallow (updated mac_version.mk in build to allow using 10.12.3 sdk)

  • 3

    Error: User Rate Limit Exceeded

    usr/local/opt/libelf/include/libelf/gelf.h

    brew install libelf
    

    usr/local/include<kernel_source>/arch/arm/include/asm/elf.h

    cat <<EOT >> /usr/local/include/elf.h
    #include "../opt/libelf/include/libelf/gelf.h"
    #define R_386_NONE 0
    #define R_386_32 1
    #define R_386_PC32 2
    #define R_ARM_NONE 0
    #define R_ARM_PC24 1
    #define R_ARM_ABS32 2
    #define R_MIPS_NONE 0
    #define R_MIPS_16 1
    #define R_MIPS_32 2
    #define R_MIPS_REL32 3
    #define R_MIPS_26 4
    #define R_MIPS_HI16 5
    #define R_MIPS_LO16 6
    #define R_IA64_IMM64 0x23 /* symbol + addend, mov imm64 */
    #define R_PPC_ADDR32 1 /* 32bit absolute address */
    #define R_PPC64_ADDR64 38 /* doubleword64 S + A */
    #define R_SH_DIR32 1
    #define R_SPARC_64 32 /* Direct 64 bit */
    #define R_X86_64_64 1 /* Direct 64 bit */
    #define R_390_32 4 /* Direct 32 bit. */
    #define R_390_64 22 /* Direct 64 bit. */
    #define R_MIPS_64 18
    EOT
    

  • 20

    Error: User Rate Limit Exceeded

    really

    .

    /usr/include):

    /usr/include/elf.h
    /usr/include/features.h
    /usr/include/bits/predefs.h
    /usr/include/bits/wordsize.h
    /usr/include/gnu/stubs.h
    /usr/include/gnu/stubs-64.h
    

    malloc.h

    sudo ln -s /usr/include/malloc/malloc.h /usr/include/malloc.h
    

    gcc

    EDITsed

    $ sudo port install libelf
    $ sudo port install gsed
    

  • 4

    Error: User Rate Limit Exceeded