Score:0

how to build ubuntu for arm64? (how to give ARCH and CROSS_COMPILE variable to `debian/rules` command)

za flag

I downloaded ubuntu source by git clone git://kernel.ubuntu.com/ubuntu/ubuntu-focal.git.
and according to https://wiki.ubuntu.com/Kernel/BuildYourOwnKernel and the included build process for arm, I did this:

LANG=C fakeroot debian/rules clean  
LANG=C fakeroot debian/rules binary-headers binary-generic binary-perarch  

I had exported ARCH=arm64 CROSS_COMPILE=aarch64-none-elf or
ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- before the commands, or with the command but it ended with errors at the end. One of the error message was You are building kernel with non-retpoline compiler, please update your compiler and I saw I can fix it by changing configuration(building kernel with non-retpoline compiler). So I tried

LANG=C fakeroot debian/rules editconfigs

But it asks me Do you want to edit config: amd64/config.flavour.generic? when I'm doing it for arm64 architecture. I tried giving ARCH and CROSS_COMPILE option but it always asks me if I want to change amd64 configuration. How can I give it the ARCH and CROSS_COMPILE option for this fakeroot debian/rules build method?

p.s. my toolchain info.

aarch64-linux-gnu-gcc (Linaro GCC 7.5-2019.12) 7.5.0
Copyright (C) 2017 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 

or

aarch64-none-elf-gcc (GNU Toolchain for the A-profile Architecture 9.2-2019.12 (arm-9.10)) 9.2.1 20191025
Copyright (C) 2019 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
JoKeR avatar
mm flag
May be good to ask here https://unix.stackexchange.com/
za flag
@JoKeR thanks it seems so. I asked it there and when I get answer, I'll cross link so that people can get answer anyway. (https://unix.stackexchange.com/questions/656263/how-to-build-ubuntu-for-arm64-how-to-give-arch-and-cross-compile-variable-to)
za flag
The answer is here : https://unix.stackexchange.com/questions/656263/how-to-build-ubuntu-for-arm64-how-to-give-arch-and-cross-compile-variable-to
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.