Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
oldconfig defconfig olddefconfig arm orange pi win+
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gentoo on ARM
View previous topic :: View next topic  
Author Message
Gentoopc
Guru
Guru


Joined: 25 Dec 2017
Posts: 364

PostPosted: Tue May 29, 2018 4:38 pm    Post subject: oldconfig defconfig olddefconfig arm orange pi win+ Reply with quote

Hello
What do I do wrong?
download kernel 4.16.12 on kernel.org extract it into usr / src, install bison, flex, bc and other libraries. I have a goal to build a kernel on olddefconfig so that the kernel has already started up to 100%.
I do
Code:
 zcat /proc/config.xz> .config

and do make olddefconfig
the kernel is going, I go to
Code:
 arch / arm64 / boot
and take from there the compiled kernel.
I compile the kernel directly on the device arm orange pi win
further to not touch all the links and device trees I'm doing cd / boot-it's boot orange pi of the working system, I take its working core Image-3.10.107-pine64 and transfer everything from the compiled kernel
Code:
cat Image-4.16.12.xz> Image-3.10.107-pine64


that is, I did not break a single link, I simply transferred the newly assembled kernel to the old shell, which already has all the links and stuff
what's wrong?
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54638
Location: 56N 3W

PostPosted: Tue May 29, 2018 5:30 pm    Post subject: Reply with quote

Gentoopc,

You also need to run
Code:
make modules_install
as a part of the kernel install.
You will need the 4.16.12 kernel dtb file too.

I have never got a compressed kernel, as implied by your Image-4.16.12.xz to boot on arm64.
I use the plain Image file.

If you use an initrd/intramfs file, you need one that matches your new kernel.

Just with the kernel and dtb, you should be able to get a far as a kernel panic.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Gentoopc
Guru
Guru


Joined: 25 Dec 2017
Posts: 364

PostPosted: Tue May 29, 2018 5:48 pm    Post subject: Reply with quote

good, but why dtb? because it already exists? Image-3.10.107-pine is the old core. there are references to it and the dtb device tree also refers to it. I just take it and in Image-3.10.107-pine I put in a new kernel which I collected
cat new-kernel> Image-3.10.107-pine64

I just want to start the kernel for the sake of the experiment, even if it is not quite working

thanks for giving advice this is very important
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54638
Location: 56N 3W

PostPosted: Tue May 29, 2018 7:08 pm    Post subject: Reply with quote

Gentoopc,

It may or may not work with the old dtb file.

The dtb file describes the hardware to the kernel. Different kernels use different naming and that matters.
You will have a program called dtc, for Device Tree Compiler.
The kernel uses it to take a dts (source) and turm it into a dtb (binary)
You can use it to go the other way too. Try
Code:
dtc -h
and see if you can get a dts file from your 3.10.107 dtb file.

The device tree is a discription of what hardware is at what address, how to access it and the kernel module required.
If the hardware, kernel and dtb don't all match, things won't work as they should.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Gentoopc
Guru
Guru


Joined: 25 Dec 2017
Posts: 364

PostPosted: Tue May 29, 2018 8:49 pm    Post subject: Reply with quote

the kernel compiled, the modules compiled. modules installed, the kernel installed.
tell me please what now should I do when I go to the / arch / arm64 / boot / dtc directory?
I installed the Device Tree Compiler.
what should be my future actions?
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54638
Location: 56N 3W

PostPosted: Tue May 29, 2018 9:53 pm    Post subject: Reply with quote

Gentoopc,

In arch/arm64/boot/ you should use the Image file.

Somewhere in arch/arm64/boot/dts/... the kernel build process should have left a dtb.
Code:
ls -R arch/arm64/boot/dts/ | grep dtb
bcm2710-rpi-3-b.dtb
bcm2710-rpi-3-b-plus.dtb
bcm2837-rpi-3-b.dtb
I get three.

The bcm2710-rpi-3-b.dtb bcm2710-rpi-3-b-plus.dtb are for two different variants of of the Raspberry Pi 3 from the Pi Foundation kernel.
The bcm2837-rpi-3-b.dtb is the upstream kernels idea of the Pi 3 in arm64 mode.

Code:
$ ls -Rl arch/arm64/boot/dts/ | grep dtb
-rw-r--r-- 1 root root 24256 Apr 15 17:42 bcm2710-rpi-3-b.dtb
-rw-r--r-- 1 root root 24519 Apr 15 17:42 bcm2710-rpi-3-b-plus.dtb
-rw-r--r-- 1 root root 17314 Apr 15 17:42 bcm2837-rpi-3-b.dtb

Notice that upstream kernel dts is far smaller because it does not yet support the Pi 3 in arm64 mode.

Find your dtb and use it. Compare its size to the one you already have.
If its much smaller, lots of things won't work.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Gentoopc
Guru
Guru


Joined: 25 Dec 2017
Posts: 364

PostPosted: Wed May 30, 2018 10:41 am    Post subject: Reply with quote

thank you so much
will try
Back to top
View user's profile Send private message
Gentoopc
Guru
Guru


Joined: 25 Dec 2017
Posts: 364

PostPosted: Wed May 30, 2018 4:50 pm    Post subject: Reply with quote

NeddySeagoon wrote:
Gentoopc,

In arch/arm64/boot/ you should use the Image file.

Somewhere in arch/arm64/boot/dts/... the kernel build process should have left a dtb.
Code:
ls -R arch/arm64/boot/dts/ | grep dtb
bcm2710-rpi-3-b.dtb
bcm2710-rpi-3-b-plus.dtb
bcm2837-rpi-3-b.dtb
I get three.

The bcm2710-rpi-3-b.dtb bcm2710-rpi-3-b-plus.dtb are for two different variants of of the Raspberry Pi 3 from the Pi Foundation kernel.
The bcm2837-rpi-3-b.dtb is the upstream kernels idea of the Pi 3 in arm64 mode.

Code:
$ ls -Rl arch/arm64/boot/dts/ | grep dtb
-rw-r--r-- 1 root root 24256 Apr 15 17:42 bcm2710-rpi-3-b.dtb
-rw-r--r-- 1 root root 24519 Apr 15 17:42 bcm2710-rpi-3-b-plus.dtb
-rw-r--r-- 1 root root 17314 Apr 15 17:42 bcm2837-rpi-3-b.dtb

Notice that upstream kernel dts is far smaller because it does not yet support the Pi 3 in arm64 mode.

Find your dtb and use it. Compare its size to the one you already have.
If its much smaller, lots of things won't work.















give me some more advice please what version of the source I download from kernel.org so you can try to compile under orange pi win +?
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54638
Location: 56N 3W

PostPosted: Wed May 30, 2018 5:02 pm    Post subject: Reply with quote

Gentoopc,

Pastebin your orange pi kernel .config file please.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Gentoopc
Guru
Guru


Joined: 25 Dec 2017
Posts: 364

PostPosted: Wed May 30, 2018 8:02 pm    Post subject: Reply with quote

NeddySeagoon wrote:
Gentoopc,

Pastebin your orange pi kernel .config file please.


https://pastebin.com/4aiG1d0t



I tried to do everything right I do not know whether it turned out
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54638
Location: 56N 3W

PostPosted: Wed May 30, 2018 8:33 pm    Post subject: Reply with quote

Gentoopc,

That's fine.The header is
Code:
#
# Automatically generated file; DO NOT EDIT.
# Linux/arm64 3.10.107 Kernel Configuration
#
So thats your original vendor kernel .config file.

Do you have the sources for this kernel?
A good test is can you build th original kernel for yourself?
That proves your kernel build process.

The config shows
Code:
# Platform selection
#
# CONFIG_ARCH_VEXPRESS is not set
# CONFIG_ARCH_XGENE is not set
CONFIG_ARCH_SUNXI=y
CONFIG_ARCH_SUN50I=y
CONFIG_ARCH_SUN50IW1P1=y

That tells that your system is based on one of those processors.

Running ls /usr/src/linux/arch/arm64/boot/dts/*/su* shows a few orangepi dts files.
You should also have some dtb files there.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Gentoopc
Guru
Guru


Joined: 25 Dec 2017
Posts: 364

PostPosted: Wed May 30, 2018 9:35 pm    Post subject: Reply with quote

NeddySeagoon wrote:
Gentoopc,

That's fine.The header is
Code:
#
# Automatically generated file; DO NOT EDIT.
# Linux/arm64 3.10.107 Kernel Configuration
#
So thats your original vendor kernel .config file.

Do you have the sources for this kernel?
A good test is can you build th original kernel for yourself?
That proves your kernel build process.

The config shows
Code:
# Platform selection
#
# CONFIG_ARCH_VEXPRESS is not set
# CONFIG_ARCH_XGENE is not set
CONFIG_ARCH_SUNXI=y
CONFIG_ARCH_SUN50I=y
CONFIG_ARCH_SUN50IW1P1=y

That tells that your system is based on one of those processors.

Running ls /usr/src/linux/arch/arm64/boot/dts/*/su* shows a few orangepi dts files.
You should also have some dtb files there.



I want to download sojource from kernel.org and build from it.
I thought I was doing something wrong when building the kernel and therefore did it

Code:
 zcat /proc/config.xz > .config

Code:
make olddefconfig

Code:
make -j4

Code:
make modules_install

Code:
make install



but not in the directory dtb file.

I tried to compile it myself
Code:
 apt install device-tree-compiler

Code:
/usr/src/arc/arm64/dts/

Code:
dtc -o dtb -o  file.dtb  sdafd.dts


tell me which kernel version to download on kernel.org so that from it I could compile the kernel for orange pi win +

4.17-rc7 4.16.13

4.14.47 4.9.105 4.4.135 4.1.52 3.18.112 [EOL]

3.16.56 3.2.101
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54638
Location: 56N 3W

PostPosted: Thu May 31, 2018 7:05 pm    Post subject: Reply with quote

Gentoopc,

Support for arm CPUs in the mainline kernel is patchy at best.
That's not quite true. The arm and arm64 CPUs are well supported. Problems arise with peripheral devices that require kernel support.
There may be no open source drivers and if there are, for various reasons, they are not included in mainline kernels.
You will have to first find out what these drivers are, then find them on the web. Then you need to find a kernel that they will work with.

It gets worse. Some hardware only has binary kernel modules available. You choice is to use the binary module and the kernel version it is built for or not use that hardware item.

The probability of finding a kernel on kernel.org that will fully support your orange pi is very small but doubtless its being worked on.

The jump from 3.10 to 4.17 is huge. Its unlikely that
Code:
make oldconfig
does the right thing.
There is a single defconfig for arm64 in the mainline kernel. Its at /usr/src/linux/arch/arm64/configs/defconfig if you want to look at it.
Code:
make defconfig
will use it. It looks very short.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Gentoopc
Guru
Guru


Joined: 25 Dec 2017
Posts: 364

PostPosted: Thu May 31, 2018 8:18 pm    Post subject: Reply with quote

NeddySeagoon wrote:
Gentoopc,

Support for arm CPUs in the mainline kernel is patchy at best.
That's not quite true. The arm and arm64 CPUs are well supported. Problems arise with peripheral devices that require kernel support.
There may be no open source drivers and if there are, for various reasons, they are not included in mainline kernels.
You will have to first find out what these drivers are, then find them on the web. Then you need to find a kernel that they will work with.

It gets worse. Some hardware only has binary kernel modules available. You choice is to use the binary module and the kernel version it is built for or not use that hardware item.

The probability of finding a kernel on kernel.org that will fully support your orange pi is very small but doubtless its being worked on.

The jump from 3.10 to 4.17 is huge. Its unlikely that
Code:
make oldconfig
does the right thing.
There is a single defconfig for arm64 in the mainline kernel. Its at /usr/src/linux/arch/arm64/configs/defconfig if you want to look at it.
Code:
make defconfig
will use it. It looks very short.
Back to top
View user's profile Send private message
Gentoopc
Guru
Guru


Joined: 25 Dec 2017
Posts: 364

PostPosted: Thu May 31, 2018 8:19 pm    Post subject: Reply with quote

I did olddefconfig
okay, the essence seems to be clear)
thank you very much for your help
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo on ARM All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum