0
shaddow501

Build specific Kernel on BPI-M64

Recommended Posts

Hello

 

If I would like to build a specific Kernel (5.1.15-sunxi64)  that I have already made before and just want to add some patches to the kernel, what is the right command?

 

./compile.sh  BOARD=bananapim64 BRANCH=5.1.15y RELEASE=bionic BUILD_MINIMAL=no BUILD_DESKTOP=no KERNEL_ONLY=no KERNEL_CONFIGURE=no INSTALL_HEADERS=yes

Share this post


Link to post
Share on other sites
17 minutes ago, shaddow501 said:

BRANCH=5.1.15y

You can not specify kernel number like that ...

This variable is to specify branches like "BRANCH=current" or "BRANCH=dev".

And in both cases, patches are maintained accordingly where current=5.4.y and dev=5.5.y, so no ways to get back in the past for 5.1.15 since we switched from 5.1.y to 5.2.y back in July ...

https://github.com/armbian/build/commit/dbb265135a0010efa286285fc87a04e2bd9e6fc8

Share this post


Link to post
Share on other sites

So there is no way to create version 5.1.15 even though it was created before in my Ubuntu machine and have all the files cashed there?

Share this post


Link to post
Share on other sites
55 minutes ago, shaddow501 said:

So there is no way to create version 5.1.15 even though it was created before in my Ubuntu machine and have all the files cashed there?

Perhaps manually, if you left your machine in that state ...

Share this post


Link to post
Share on other sites
2 minutes ago, shaddow501 said:

Do you might have any guide?

Go inside your 5.1.15 tree, check the beginning of the Makefile to verify the version, you should have :

VERSION = 5
PATCHLEVEL = 1
SUBLEVEL = 15

Then you can rebuild it using those commands :

make -j4 ARCH=arm64 CROSS_COMPILE="ccache aarch64-linux-gnu-" oldconfig
make -j4 ARCH=arm64 CROSS_COMPILE="ccache aarch64-linux-gnu-" Image modules
make -j4 ARCH=arm64 CROSS_COMPILE="ccache aarch64-linux-gnu-" INSTALL_PATH=$PWD/output  install
make -j4 ARCH=arm64 CROSS_COMPILE="ccache aarch64-linux-gnu-" INSTALL_MOD_PATH=$PWD/output modules_install
make -j4 ARCH=arm64 CROSS_COMPILE="ccache aarch64-linux-gnu-" INSTALL_HDR_PATH=$PWD/output headers_install
make -j4 ARCH=arm64 CROSS_COMPILE="ccache aarch64-linux-gnu-" INSTALL_DTBS_PATH=$PWD/output/dtb dtbs

Kernel files will be produced in "output" folder.

Share this post


Link to post
Share on other sites

Hello martinayotte

 

I have succeeded to perform the commands that you have given me and recompile to the output directory.

 

But now can you instruct me how to create the debs for installation?

1 . linux-u-boot*.deb

2. linux-headers-*.deb

3. linux-dtb*.deb

4. linux-image*.deb

 

5. full Linux image?

 

So I can install those in the target?

 

Share this post


Link to post
Share on other sites
58 minutes ago, shaddow501 said:

But now can you instruct me how to create the debs for installation?

1 . linux-u-boot*.deb

2. linux-headers-*.deb

3. linux-dtb*.deb

4. linux-image*.deb

 

5. full Linux image?

Unfortunately, this would be too complex ... You have to copies manually from files in $PWD/output to your existing installation using SSH.

Share this post


Link to post
Share on other sites
40 minutes ago, martinayotte said:

Unfortunately, this would be too complex ... You have to copies manually from files in $PWD/output to your existing installation using SSH.

So I do really do not understand.

I was able to compile a new kernel but cannot install it?? so what is the point?

What do I copy?

 

why isnt it possible to modify the script to not download a new kernel but to use the one in the cache folder?

The files already stored there, it shouldnt download anything new just to use the existing?

Why is it so complex??

 

Share this post


Link to post
Share on other sites
44 minutes ago, shaddow501 said:

What do I copy?

Like I've said the content of $PWD/output, so zImage, kernel modules, dtb.

45 minutes ago, shaddow501 said:

Why is it so complex??

Because you will have to learn much more about all tools "dpkg-buildpackage" and others ...

Share this post


Link to post
Share on other sites
5 hours ago, martinayotte said:

Like I've said the content of $PWD/output, so zImage, kernel modules, dtb.

Because you will have to learn much more about all tools "dpkg-buildpackage" and others ...

 

That is why I ask for help from Linux experts, not all of us have a lot of knowledge like you do.

how do I do the zimage thing ?

how do I create the deb file?

 

can you give me an example?

 

I have  added:

KERNELBRANCH='tag:v5.1.21' to build/userpatches/lib.config

 

but I get:

 

o.k. ] Checking git sources [ linux-mainline 5.1.21 ] [ .... ]

Creating local copy [ .... ]

Fetching updates fatal: Couldn't find remote ref tags/5.1.21 [ .... ]

Checking out error: pathspec 'FETCH_HEAD' did not match any file(s) known to git.

 

Where do I find the available working tags??

where does it look for the source from?

why cant I build an older kernel?'

Why it isnt possible to use the downloaded kernel source from here https://mirrors.edge.kernel.org/pub/linux/kernel/ 

and use the script to compile a kernel based on it.

 

I have searched in the internet for about 3 days for a how to.

There is nothing!

 

 

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
0