1 1
op1tjaap

Compiling a custom kernel. linux-dtb-dev...... is missing

Recommended Posts

I tried to compile a new kernel. It compiles finaly, but I miss the file:

 

linux-dtb-dev-sun8i_**********

 

Instead I see a file:

 

linux-libc-dev_5.27_armhf.deb

 

Anyone has an idea hat goes wrong and how I produce this file?

 

See compilation logs:

 

https://pastebin.com/98en8B4n

dpkg-deb: building package 'linux-firmware-image-4.12.0-next-20170529-sun8i' in '../linux-firmware-image-4.12.0-next-20170529-sun8i_5.27_armhf.deb'.
dpkg-deb: building package 'linux-headers-4.12.0-next-20170529-sun8i' in '../linux-headers-4.12.0-next-20170529-sun8i_5.27_armhf.deb'.
dpkg-deb: building package 'linux-libc-dev' in '../linux-libc-dev_5.27_armhf.deb'.
dpkg-deb: building package 'linux-image-4.12.0-next-20170529-sun8i' in '../linux-image-4.12.0-next-20170529-sun8i_5.27_armhf.deb'.
dpkg-genchanges: binary-only upload (no source code included)
dpkg-deb: error: failed to read archive '/mnt/DEVELOP/output/debs/linux-image-dev-sun8i_5.27_armhf.deb': No such file or directory
[ o.k. ] Kernel build done [ @host ]
[ o.k. ] Target directory [ /mnt/DEVELOP/output/debs/ ]
[ o.k. ] File name [ linux-image-dev-sun8i_5.27_armhf.deb ]
[ o.k. ] Runtime [ 48 min ]
root@2b17249afe2d:/mnt/DEVELOP# ls -al /mnt/DEVELOP/output/debs/
total 25728
drwxr-xr-x 3 root root     4096 Jun 10 18:13 .
drwxr-xr-x 5 root root     4096 Jun 10 17:21 ..
drwxr-xr-x 2 root root     4096 Jun 10 17:21 extra
-rw-r--r-- 1 root root    55908 Jun 10 18:12 linux-firmware-image-4.12.0-next-20170529-sun8i_5.27_armhf.deb
-rw-r--r-- 1 root root 10701224 Jun 10 18:13 linux-headers-4.12.0-next-20170529-sun8i_5.27_armhf.deb
-rw-r--r-- 1 root root 14480464 Jun 10 18:13 linux-image-4.12.0-next-20170529-sun8i_5.27_armhf.deb
-rw-r--r-- 1 root root   924734 Jun 10 18:13 linux-libc-dev_5.27_armhf.deb
-rw-r--r-- 1 root root   162538 Jun 10 17:27 linux-u-boot-dev-orangepione_5.27_armhf.deb

 

Share this post


Link to post
Share on other sites

I tried not to stress and go for an install of linux-image-4.12.0-next-20170529-sun8i_5.27_armhf.deb only. This contains the vmlinuz (zImage) file and all the modules. Should be enough. But NO GO....

I boots beyond u-boot and see nothing more like .....booting the kernel

Starting kernel ... booting the kernel.

I saw that with the installation zImage is not replaced by a new symlink to the new vmlinuz file, so I did it by hand. Not sure if this is OK because maybe some magic is happening by the pre and post install scripts of the deb package. 

Looked at why this maybe happend  and I see the packaging patch going wrong:

[ warn ] ... [l][c] packaging-4.x-DEV-with-postinstall-scripts.patch [ failed ]

This means that things maybe go wrong because of this.....

Share this post


Link to post
Share on other sites
21 minutes ago, op1tjaap said:

This means that things maybe go wrong because of this.....

 

Exactly. This is a patch which adjust / fix Debian packaging process. Debug starts here ... and also it might be related to CONFIG_LOCALVERSION_AUTO kernel config.

Share this post


Link to post
Share on other sites

thought I was clever and changed the .deb package. I copied the postinst and made a new:

linux-image-4.12.0-next-20170529-sun8i_5.27_armhf.deb

This is what I tought it should be.....

 

 

#!/bin/sh
set -e
# Pass maintainer script parameters to hook scripts
export DEB_MAINT_PARAMS="$*"
# Tell initramfs builder whether it's wanted
export INITRD=Yes
test -d /etc/kernel/postinst.d && run-parts --arg="4.12.0-next-20170529-sun8i" --arg="/boot/vmlinuz-4.12.0-next-20170529-sun8i" /etc/kernel/postinst.d
exit 0
if [ "$(grep nand /proc/partitions)" != "" ] && [ "$(grep mmc /proc/partitions)" = "" ]; then
mkimage -A arm -O linux -T kernel -C none -a "0x40008000" -e "0x40008000" -n "Linux kernel" -d /boot/vmlinuz-vmlinuz-4.12.0-next-20170529-sun8i /boot/uImage  > /dev/null 2>&1
cp /boot/uImage /tmp/uImage
sync
mountpoint -q /boot || mount /boot
cp /tmp/uImage /boot/uImage
rm -f /boot/vmlinuz-vmlinuz-4.12.0-next-20170529-sun8i
else
ln -sf vmlinuz-vmlinuz-4.12.0-next-20170529-sun8i /boot/zImage > /dev/null 2>&1 || mv /boot/vmlinuz-vmlinuz-4.12.0-next-20170529-sun8i /boot/zImage
fi
touch /boot/.next
exit 0

But agian no changes so the 

 

if [ "$(grep nand /proc/partitions)" != "" ] && [ "$(grep mmc /proc/partitions)" = "" ]; then

is not executed.

 

Editted again and removed that part and only kept:

 

#!/bin/sh
set -e
# Pass maintainer script parameters to hook scripts
export DEB_MAINT_PARAMS="$*"
# Tell initramfs builder whether it's wanted
export INITRD=Yes
test -d /etc/kernel/postinst.d && run-parts --arg="4.12.0-next-20170529-sun8i" --arg="/boot/vmlinuz-4.12.0-next-20170529-sun8i" /etc/kernel/postinst.d

ln -sf vmlinuz-vmlinuz-4.12.0-next-20170529-sun8i /boot/zImage > /dev/null 2>&1 || mv /boot/vmlinuz-vmlinuz-4.12.0-next-20170529-sun8i /boot/zImage
touch /boot/.next
exit 0

 

 

created a new Debian package

 

root@orangepione:~/debs-montjoie-v6/work# dpkg-deb --build CREATE
dpkg-deb: building package 'linux-image-4.12.0-next-20170529-sun8i' in 'CREATE.deb'.

 

 

And installed.

Now the zImage symlink is made. But agian...not booting.

No debug information too....

So...it is getting troublesome.....

 

Would like to solve this because it would give me the freedom to compile a development kernel of my choise.

 

For daredevils... This is my edited install file:

 

http://cdn.macip.net/CREATE.deb

 

And this the unmodified compiled one:

 

http://cdn.macip.net/linux-image-4.12.0-next-20170529-sun8i_5.27_armhf.deb

 

 

Share this post


Link to post
Share on other sites
13 minutes ago, op1tjaap said:

Would like to solve this because it would give me the freedom to compile a development kernel of my choise.


If you are using our build scrpit - you already can do that - just use the packaging adjustements we made. And those you did, they look o.k. to me. Well, the kernel branch you are using, might not be bootable? Try first with some stable branch, "known to work kernel". 4.12 and sun8i doesn't look close to fully stable branch.

Share this post


Link to post
Share on other sites

You are right. I guess the kernel is not booting. It tries to boot but before it can send output it stops. 

I tried montjoie/Linux dwmac v5 and that works. Probably trying version v6 is out of my league. 

Share this post


Link to post
Share on other sites

@Igor

Followed your advise and compiled a well know kernel, 4.11. It worked fine. Then compiled montjoie/linux branch dwmac-sun8i-v6

https://github.com/montjoie/linux/tree/dwmac-sun8i-v6 It compiled fine and gave me the following packages:

 


linux-image-4.12.0-next-20170529-sun8i_5.27_armhf.deb
linux-firmware-image-4.12.0-next-20170529-sun8i_5.27_armhf.deb 
linux-libc-dev_5.27_armhf.deb
linux-headers-4.12.0-next-20170529-sun8i_5.27_armhf.deb         
linux-u-boot-dev-orangepione_5.27_armhf.deb

 

First I installed version dwmac-sun8i-v5 ( my current MacIPpi project kernel). Works fine.

Then I installed all the packages of v6

 

dpkg -i *.deb

Then in /boot removed zImage and did a:

ln -sf vmlinuz-4.12.0-next-20170529-sun8i zImage

Rebooted and YES! Works! 

  ___                               ____  _    ___
 / _ \ _ __ __ _ _ __   __ _  ___  |  _ \(_)  / _ \ _ __   ___
| | | | '__/ _` | '_ \ / _` |/ _ \ | |_) | | | | | | '_ \ / _ \
| |_| | | | (_| | | | | (_| |  __/ |  __/| | | |_| | | | |  __/
 \___/|_|  \__,_|_| |_|\__, |\___| |_|   |_|  \___/|_| |_|\___|
                       |___/

Welcome to ARMBIAN 5.27.170611 nightly Ubuntu 16.04.2 LTS 4.12.0-next-20170529-sun8i
System load:   0.14 0.11 0.04   Up time:       1 min
Memory usage:  5 % of 495MB     IP:            192.168.178.54
Usage of /:    11% of 15G

[ 0 security updates available, 12 updates total: apt upgrade ]
Last check: 2017-06-11 20:38

[ General system configuration: armbian-config ]
Last login: Sun Jun 11 19:49:12 2017 from 192.168.178.14

root@orangepione:~# uname -a
Linux orangepione 4.12.0-next-20170529-sun8i #1 SMP Sat Jun 10 18:06:42 UTC 2017 armv7l armv7l armv7l GNU/Linux


root@orangepione:~# armbianmonitor -u
/var/log/armhwinfo.log has been uploaded to http://sprunge.us/HCLR
Please post the URL in the Armbian forum where you've been asked for.



root@orangepione:~# dmesg|grep dwmac
[    3.583934] dwmac-sun8i 1c30000.ethernet: PTP uses main clock
[    3.583967] dwmac-sun8i 1c30000.ethernet: No regulator found
[    3.584001] dwmac-sun8i 1c30000.ethernet: Will use internal PHY
[    3.584066] dwmac-sun8i 1c30000.ethernet: Current syscon value is not the default 148000 (expect 58000)
[    3.584079] dwmac-sun8i 1c30000.ethernet: Chain mode enabled
[    3.584084] dwmac-sun8i 1c30000.ethernet: No HW DMA feature register supported
[    3.584089] dwmac-sun8i 1c30000.ethernet: Normal descriptors
[    3.584094] dwmac-sun8i 1c30000.ethernet: RX Checksum Offload Engine supported
[    3.584100] dwmac-sun8i 1c30000.ethernet: COE Type 2
[    3.584104] dwmac-sun8i 1c30000.ethernet: TX Checksum insertion supported
[    8.680761] dwmac-sun8i 1c30000.ethernet eth0: No MAC Management Counters available
[    8.680773] dwmac-sun8i 1c30000.ethernet eth0: PTP not supported by HW
[   10.799145] dwmac-sun8i 1c30000.ethernet eth0: Link is Up - 100Mbps/Full - flow control rx/tx

 

 

Thanks again for your help and guidiance on this forum!

For logs in detail ...look at:  http://sprunge.us/HCLR

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...
1 1