This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

SK-AM64B: Buildroot error while building

Part Number: SK-AM64B

Tool/software:

Hello team

I am following FAQ to build the uboot and kernel for AM64x using build root.

https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1226815/faq-buildroot-support-for-sitara-am62x-am62ax-am62px-am64x-devices

While executing make command, I am facing following error in downloading certain packages:

Can you please help

Thanks

Amey

  • Hi Amey,
    did you perform the below command that is part of the current FAQ...

    $ git checkout -b am6x-dev 9b25246e9b

    ...or did you use some other commit?

    Regards, Andreas

  • Hello Andreas

    I had used same commit. But just to be sure. I started again with clean chekout and followed all steps from FAQ.

    But even then I am getting following error


    GIT_DIR=/home/ap/ti-buildroot/buildroot/dl/linux/git/.git git init . 
    hint: Using 'master' as the name for the initial branch. This default branch name
    hint: is subject to change. To configure the initial branch name to use in all
    hint: of your new repositories, which will suppress this warning, call:
    hint: 
    hint: 	git config --global init.defaultBranch <name>
    hint: 
    hint: Names commonly chosen instead of 'master' are 'main', 'trunk' and
    hint: 'development'. The just-created branch can be renamed via this command:
    hint: 
    hint: 	git branch -m <name>
    Initialized empty Git repository in /home/ap/ti-buildroot/buildroot/dl/linux/git/.git/
    GIT_DIR=/home/ap/ti-buildroot/buildroot/dl/linux/git/.git git remote add origin 'https://git.ti.com/git/ti-linux-kernel/ti-linux-kernel.git' 
    GIT_DIR=/home/ap/ti-buildroot/buildroot/dl/linux/git/.git git remote set-url origin 'https://git.ti.com/git/ti-linux-kernel/ti-linux-kernel.git' 
    Fetching all references
    GIT_DIR=/home/ap/ti-buildroot/buildroot/dl/linux/git/.git git fetch origin 
    remote: Enumerating objects: 11953509, done.
    remote: Counting objects: 100% (11953509/11953509), done.
    remote: Compressing objects: 100% (1750889/1750889), done.
    error: RPC failed; curl 56 Recv failure: Connection reset by peer      
    error: 26462 bytes of body are still expected
    fetch-pack: unexpected disconnect while reading sideband packet
    fatal: early EOF
    fatal: fetch-pack: invalid index-pack output
    Detected a corrupted git cache.
    Removing it and starting afresh.
    GIT_DIR=/home/ap/ti-buildroot/buildroot/dl/linux/git/.git git init . 
    hint: Using 'master' as the name for the initial branch. This default branch name
    hint: is subject to change. To configure the initial branch name to use in all
    hint: of your new repositories, which will suppress this warning, call:
    hint: 
    hint: 	git config --global init.defaultBranch <name>
    hint: 
    hint: Names commonly chosen instead of 'master' are 'main', 'trunk' and
    hint: 'development'. The just-created branch can be renamed via this command:
    hint: 
    hint: 	git branch -m <name>
    Initialized empty Git repository in /home/ap/ti-buildroot/buildroot/dl/linux/git/.git/
    GIT_DIR=/home/ap/ti-buildroot/buildroot/dl/linux/git/.git git remote add origin 'https://git.ti.com/git/ti-linux-kernel/ti-linux-kernel.git' 
    GIT_DIR=/home/ap/ti-buildroot/buildroot/dl/linux/git/.git git remote set-url origin 'https://git.ti.com/git/ti-linux-kernel/ti-linux-kernel.git' 
    Fetching all references
    GIT_DIR=/home/ap/ti-buildroot/buildroot/dl/linux/git/.git git fetch origin 
    fatal: unable to access 'https://git.ti.com/git/ti-linux-kernel/ti-linux-kernel.git/': Could not resolve host: git.ti.com
    Detected a corrupted git cache.
    This is the second time in a row; bailing out
    wget --passive-ftp -nd -t 3 -O '/home/ap/ti-buildroot/buildroot/output/build/.linux-09.02.00.009-br1.tar.gz.JSPJr7/output' 'https://sources.buildroot.net/linux/linux-09.02.00.009-br1.tar.gz' 
    --2024-07-10 11:11:53--  https://sources.buildroot.net/linux/linux-09.02.00.009-br1.tar.gz
    Resolving sources.buildroot.net (sources.buildroot.net)... failed: Temporary failure in name resolution.
    wget: unable to resolve host address ‘sources.buildroot.net’
    wget --passive-ftp -nd -t 3 -O '/home/ap/ti-buildroot/buildroot/output/build/.linux-09.02.00.009-br1.tar.gz.fFmfUM/output' 'https://sources.buildroot.net/linux-09.02.00.009-br1.tar.gz' 
    --2024-07-10 11:11:53--  https://sources.buildroot.net/linux-09.02.00.009-br1.tar.gz
    Resolving sources.buildroot.net (sources.buildroot.net)... failed: Temporary failure in name resolution.
    wget: unable to resolve host address ‘sources.buildroot.net’
    make[1]: *** [package/pkg-generic.mk:179: /home/ap/ti-buildroot/buildroot/output/build/linux-headers-09.02.00.009/.stamp_downloaded] Error 1
    make: *** [Makefile:82: _all] Error 2
    

    Thanks

    Amey

  • Amey,

    to me this looks like you have a generic network issue. There are failures early on when cloning the repos. Do you need a proxy config maybe? Can you discuss the failures with your IT team?

    Without successful clone of the repo the following steps in build will not work I assume.

    Regards, Frank

  • Hello Frank

    The repo was successfully cloned. And the make command ran for around 20-25mins (building various modules) before reaching this error. In between during the build it also downloads many packages successfully

    Thanks

    Amey

  • Hi Amey,

    let me try this build today on my end and report back.

    Regards, Andreas

  • Hi Amey,

    so I just tried out the build as per https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1226815/faq-buildroot-support-for-sitara-am62x-am62ax-am62px-am64x-devices with the following conditions...

    1. Completely fresh clone of the Buildroot repo into a new folder
    2. Checked out Buildroot commit 9b25246e9b to be used as a base (as per above E2E FAQ)
    3. Applied the 0001-configs-ti_am6-2-4-x_sk_tisdk-Add-TI-SDK-v9.2-equiva-7-May-2024.patch patch from the E2E FAQ to go for "TI SDK equivalent", because that seems like what you were trying to do
    4. Build using ti_am64x_sk_tisdk_defconfig (for use on SK-AM64B)
    5. Build on Ubuntu 22.04 (x86_64)

    The build went through successfully on the first try. After that the directory hierarchy looks as follows....  You can see 8.5GB of source was downloaded. 

    a0797059@dasso:~/tmp/buildroot (am6x-dev)
    $ du -h -d1
    20G     ./output
    764K    ./boot
    260K    ./fs
    708K    ./toolchain
    8.0K    ./.github
    140K    ./arch
    61M     ./package
    1.2M    ./configs
    5.9M    ./board
    440K    ./utils
    8.5G    ./dl
    5.4M    ./support
    2.5M    ./docs
    152K    ./system
    138M    ./.git
    92K     ./linux
    29G  

    As for your errors we need to get to at least some kind of working build. Can you please try the following:

    1. Start over with a completely fresh clone/folder
    2. Try on a different machine (preferably one that's directly connected to the Internet, for example your "home PC")

    Regards, Andreas

  • Hello Andreas

    Thanks for trying it out on your machine. I am running Ubuntu 23.10 on VMWare

    Here is the screenshot of disk usage

    The total size of your folder is around 29G. All this is downloaded & built during the build process?

    As suggested, I will try it natively installing on the machine

    Regards

    Amey

  • I am running Ubuntu 23.10

    Buildroot is usually pretty good being quite "tolerant" as to the build environment (unlike Yocto, I found). Still, you may also want to try Ubuntu 22.04 if your issues persist.

    The total size of your folder is around 29G. All this is downloaded & built during the build process?

    As for the total size of the folder after you build it yourself it will probably be larger than 29G because I used the BR2_CCACHE=y option to build locally, not all intermediate files were generated. On a related note I'd highly recommend using this option for your builds, as it will dramatically speed up newly setup builds. Same for the keeping a copy of the download folder and re-using it / sharing it between your different build environments.

    Regards, Andreas

  • Thanks Andreas. 

    I had used the option BR2_CCACHE=y before running make. I believe that option is "Use Compiler Cache", that is correct?

    Thanks for letting me know that copy of download folder can be reused

    Regards

    Amey

  • Hi Amey,

    I had used the option BR2_CCACHE=y before running make. I believe that option is "Use Compiler Cache", that is correct?

    yes that is correct.

    Regards, Andreas

  • Hello Andreas

    I installed Ubuntu 22.04.4 on VMware and started a clean build. I was able to successfully build the entire source code.

    The total size of folder after build is 29G same as your screenshot above. 

    Thanks

    Amey