Skip to content
View in the app

A better way to browse. Learn more.

Armbian Community Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Armbian 5.11 fails to build kernel

Featured Replies

Hi to All,

 

I have just tried to compile Armbian after a few days pause and get error in:

│ LD [M] drivers/usb/serial/usbserial.o │
│ LD drivers/usb/built-in.o │
│ LD drivers/built-in.o 

[ error ] ERROR in function compile_kernel [ common.sh:188 ]
[ error ] Kernel was not built [ @host ]

I test different ways including previous kernel branch (4.5.4).

Even starting from scratch was with no success.

 

Where could be a problem?

 

Best regards

Chris

 

  • Author

Hi Igor,

 

You have some weird user settings?

 

- I made complete rebuild yesterday

- I just compile 4.5.5

 

Host: Xenial with 4.4.0-22-generic

 

No, I have made a small change adding a patch to enable OneWire in Lime2 dts following http://linux-sunxi.org/1-Wire.

Try to compile 4.5.4 fails in the same way.

  • Author

Hi Igor,

 

After a new try to build image a big amount of changes were added and new error is printed:

[ o.k. ] Preparing [ host ]
findmnt: unknown column: AVAIL
/data/armbian-cust/lib/general.sh: line 406: / 1024 / 1024 / 1024 : syntax error: operand expected (error token is "/ 1024 / 1024 / 1024 ")

The process is continued but stops again on the same place while compiling the kernel.

 

Could you point me a way to go back to the repository branch where Armbian build is possible?

 

Best regards

Chris

[ o.k. ] Preparing [ host ]
findmnt: unknown column: AVAIL
/data/armbian-cust/lib/general.sh: line 406: / 1024 / 1024 / 1024 : syntax error: operand expected (error token is "/ 1024 / 1024 / 1024 ")

This shouldn't affect anything - this is free space checking that works on Xenial, I'll add error silencing in case this is running on Trusty later.

 

If you are experiencing errors with building kernel, then your patch is probably causing this. Wiki info may be outdated. You can add "PROGRESS_LOG_TO_FILE=yes" to compile.sh and then find exact error message in compilation log.

  • Author

Thanks Zador,

 

You are right - disabling the patch makes kernel build possible.

 

It is strange because the patch is very simple and adds a few lines to arch/arm/boot/dts/sun7i-a20-olinuxino-lime2.dts.

Probably the problem comes from interference with other changes made by other patches to the same file.

I have added last changes into the file already patched by other patches and run 'git diff file > file.patch'.

After that I split the content to different files to be able to enable and disable changes separately.

 

Is there some rules or good practice how to split changes in one file into different patches?

 

Best regards

Chris

Normally patch is smart enough to apply patches to changed source files.

 

If you want to split patch, you can duplicate file and remove unneeded hunks from different files while keeping common header.

 

Please post your 1-wire activation patch here (in code block), especially if it doesn't look like this.

 

Edit: changed link to diff format description

  • Author

Thanks Zador,

 

I find an error in the first patch I have used so make a series of tests because it really interference with other changes.

 

The final patch I have used is:

diff --git a/arch/arm/boot/dts/sun7i-a20-olinuxino-lime2.dts b/arch/arm/boot/dts/sun7i-a20-olinuxino-lime2.dts
index d5c796c..93f3f62 100644
--- a/arch/arm/boot/dts/sun7i-a20-olinuxino-lime2.dts
+++ b/arch/arm/boot/dts/sun7i-a20-olinuxino-lime2.dts
@@ -235,6 +235,20 @@
                allwinner,drive = <SUN4I_PINCTRL_10_MA>;
                allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
        };
+
+       w1_pin: w1_pin@0 {
+               allwinner,pins = "PC21";
+               allwinner,function = "gpio_in";
+               allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+               allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
+       };
+};
+
+&onewire_device {
+       compatible = "w1-gpio";
+       gpios = <&pio 2 21 GPIO_ACTIVE_HIGH>; /* PC21 */
+       pinctrl-names = "default";
+       pinctrl-0 = <&w1_pin>;
 };
 
 &reg_ahci_5v {

It is applied as a first patch to the fresh file from the repository but it is rejected.

 

Best regards

Chris

Guest
This topic is now closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.