Jump to content

Recommended Posts

Posted

Here I'll try to accumulate all the useful information I find on topic.

 

# System config and build

## Build

  • OS for building Armbian disto: Ubuntu 20.04.1, 4 x core i7, 2GB RAM;
  • HDD usage so far: 29GB so I guess 32GB disk is bare minimum;
  • My build script mkBoardImg.sh for Armbian:
Spoiler

#!/bin/bash

./compile.sh CLEAN_LEVEL="images,debs,make,oldcache" \
        BOARD="wandboard-srv" BRANCH="dev" \
        KERNEL_ONLY="no" KERNEL_CONFIGURE="yes" \
        BUILD_DESKTOP="no" BUILD_MINIMAL="yes" RELEASE="focal" \

  • Kernel configs are stored in /srv/kern/v1.0.conf, it's easier to save/load from that location. Configs are versioned.

 

## Board file relations scheme

b0a655c10c6acc71cc448857a4659aa8.jpg

 

# Links

## Armbian

 

## iMX6 and Wandboard

 

Original post hidden under spoiler:

Spoiler

Greetings!

I'm trying to fit armbian to wandboard dl and I would greatly appreciate opinion on how to make everything right.

 

For now I have

Hardware:

  • Wandboard DL with IMX6 onboard, 2 Cores, 1GB RAM (linked);
  • SanDisk Ultra 16GB Class 10 SDHC I as manual teaches us :)
  • 5V 3A Power supply, so there is no power shortage.

Software:

  • Debian Jessie - Pretty much only distribution that works out of the box from vendor site fro my board. Good distro but too old.
  • Cubox-I - boots up to bootloader, shows pretty "Armbian" bootlogo and then fails to find mmc0 (possible because I tried flashing it oldschool way with dd and then resize partition to full SD size);
  • Udoo - does NOT show pretty bootlogo, but boots up to root prompt. Ethernet do not work, when plugged strange pattern of LED flash occurs, I guess there's a driver issue. Also according to dmesg AC97 fails to load. And no WiFi adapter is present. I wonder if it will ever work on this board :) This one I flashed with etcher.

 

My question is: What would be correct and efficient way to configure Armbian for this wandboard? Do I need Enxyos drivers enabled (*) in kernel for IMX6 system?

 

Thank you in advance.

 

 

Posted
39 minutes ago, p0rc0_r0ss0 said:

What would be correct and efficient way to configure Armbian

 

It's not a problem of Armbian but not existing expensive support for this hardware within. This is how bringing up support looks like:
https://github.com/armbian/build/commit/0797faab9ffa64f680fe8e9b1469a3fd7c7b2c27#diff-51d192b5ca13c943240ea8bdc56fb88ad8a54d13780278577ed4d23520f28aeb If you know how and can afford to go this path, go. Armbian has no interest to be available for this hardware and non-profit project can't sponsor you more than already do. Armbian is a build system and we maintain few boards on a side. As a demonstration and hobby which already costs us over the limits.

 

Moving to general section - this section is reserved for "supported" boards only.  Also check https://forum.armbian.com/forum/22-board-bring-up/ and https://forum.armbian.com/forum/38-feature-requests/ where is a long line of unreal wishes for help ...

 

Your best chance is to find someone from this community that wants to get this board up as a hobby and you do it together ... Or just continue to use demo distro. This is a common fate.

Posted

Thank you for heads up,

 

I've made board, bootenv, bootscript, kernel, etc. configured kernel and made imx6-dev branch to be separate config for my custom kernel config.

My complication is with two things:

1. It refuses to pack built kernel and I fail to understand where to specify version. I decided not to alter build scripts because all other "stock" kernels (udoo, cubox-i) build and pack just fine. It's my new one fails for some reason.

Quote

        == deb packages: image, headers, firmware, dtb ==

ESC[1mdpkg-buildpackage: ESC[0mESC[1;33mwarningESC[0m:     debian/changelog(l1): badly formatted heading line
LINE: linux-5.10.40:7.5-wandboard.dl-q~noipv6.nofc.nokdebug-imx6 (21.02.0-trunk) focal; urgency=low
ESC[1mdpkg-buildpackage: ESC[0mESC[1;33mwarningESC[0m:     debian/changelog(l2): found blank line where expected first heading
ESC[1mdpkg-buildpackage: ESC[0mESC[1;33mwarningESC[0m:     debian/changelog(l3): found change data where expected first heading
LINE:   * Custom built Linux kernel.
ESC[1mdpkg-buildpackage: ESC[0mESC[1;33mwarningESC[0m: unknown information field '' in input data in parsed version of changelog
ESC[1mdpkg-buildpackage: ESC[0mESC[1;33mwarningESC[0m: using a gain-root-command while being root
ESC[1mdpkg-buildpackage: ESC[0mESC[1;31merrorESC[0m: version number does not start with digit
make[1]: *** [scripts/Makefile.package:83: bindeb-pkg] Error 2
make: *** [Makefile:1533: bindeb-pkg] Error 2

2. Is there a way to "continue" configuration? I do admire work you done on whole armbian build system, but see very time kernel sources get patched, recompressed and compiled is a bit time consuming. Is there a shortcut to rerun just "compress to debian packages" stage?

Thank you.

 

 

 

Posted
13 hours ago, p0rc0_r0ss0 said:

Thank you for heads up,

 

I've made board, bootenv, bootscript, kernel, etc. configured kernel and made imx6-dev branch to be separate config for my custom kernel config.

My complication is with two things:

1. It refuses to pack built kernel and I fail to understand where to specify version. I decided not to alter build scripts because all other "stock" kernels (udoo, cubox-i) build and pack just fine. It's my new one fails for some reason.

2. Is there a way to "continue" configuration? I do admire work you done on whole armbian build system, but see very time kernel sources get patched, recompressed and compiled is a bit time consuming. Is there a shortcut to rerun just "compress to debian packages" stage?

Thank you.

 

p.s. I would be kind of you to remove "message per day" limit for me, I do promise that I'll not spam :)

 

Made following scheme (might be incomplete, but for now I use this):

 

Check out the CLEAN_LEVEL options for compile.sh

 

Is your code in a forked repo where we can see a diff. If so please link

 

Forum Account should be at standard level now.

Posted
15 hours ago, p0rc0_r0ss0 said:

I've made board, bootenv, bootscript, kernel, etc. configured kernel and made imx6-dev branch to be separate config for my custom kernel config.


Make a PR with your changes. We might spot the problem faster ... make sure https://github.com/armbian/build/blob/master/config/kernel/linux-imx6-current.config#L23-L24 looks the same.

 

1 hour ago, lanefu said:

2. Is there a way to "continue" configuration? I do admire work you done on whole armbian build system, but see very time kernel sources get patched, recompressed and compiled is a bit time consuming. Is there a shortcut to rerun just "compress to debian packages" stage?

 

There are lots of possibilities for compilation. Basic is CLEAN_LEVEL but you can also run sections separate if you want ... https://docs.armbian.com/Developer-Guide_Build-Preparation/#executing-any-bash-statement

Posted
3 hours ago, lanefu said:

Is your code in a forked repo where we can see a diff. If so please link

Thank you for swift reply. I figured out source of complication. It was data accidentally copied to sources/families/imx6.conf once I got rid of it everything went with flying colors.

I managed to boot system (!) with kernel v5 (!!) and Armbian loading screen (!!!) all of it is awesome :)
Right now I'm trying to build kernel for wandboard dl/q with no extra "fat" in it. For now I somehow trimmed USB keyboard support :D, I guess those TI OMAP platform files were not that useless after all. Strangely armbian-hardware-monitor.log shows all USB drivers load fine.

 

[    1.692772] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    1.692797] ehci-pci: EHCI PCI platform driver
[    1.692863] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[    1.692949] usbcore: registered new interface driver usb-storage
[    1.693037] usbcore: registered new interface driver usbserial_generic
[    1.693071] usbserial: USB Serial support registered for generic
[    1.693292] mousedev: PS/2 mouse device common for all mice
[    1.693534] i2c /dev entries driver
[    1.697027] device-mapper: uevent: version 1.0.3
[    1.697419] device-mapper: ioctl: 4.43.0-ioctl (2020-10-01) initialised: dm-devel@redhat.com
[    1.698358] ledtrig-cpu: registered to indicate activity on CPUs
[    1.698927] hid: raw HID events driver (C) Jiri Kosina
[    1.699086] usbcore: registered new interface driver usbhid
[    1.699092] usbhid: USB HID core driver


As soon I figure out that kernel is working I'll upload all files to github.

 

  

57 minutes ago, Igor said:

Make a PR with your changes. We might spot the problem faster


Thank you for your help, I'll try not to waste your time unless I'm absolutely sure I can't resolve issue myself.

Posted

Ok, topic update.

Good news, I found a good NXP manual on Kernel configuration for iMX6 chips, link will be attached in section below.

Not so good news, despite all my efforts (Found that I was lacking CONFIG_USB_CHIPIDEA module) kernel doesn't see neither USB hub, nor BCM4339 chip, which is slowly becoming legendary headache. Funny enough, kernel 4.0.3 which wandboard.org provides with Debian Jessie distribution detects USB fine and there is no sane extra drivers loaded. Right now I'm using wandboard.dtb for hardware rev.A.

 

Bottom line so far: Board is usable as server over net, but that's pretty much it.

Strange thing with: cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies

only 396000 792000 are available, despite 1GHz chip speed in specs.

 

ToDo

  1. Fix USB HUB;
  2. Figure out what's wrong with cpu frequency if anything;
  3. Fix terminal screen powersave feature.
  4. See if there's a chance to get rid of "arm/mm: Found insecure W+X mapping at address" for CPU and "CPU: 0 PID: 147 at sound/core/init.c:207 snd_card_new". Which is unlikely, unless wandboard guys make some debug job done.
  5. Stress test system, so far kernel v5 looks pretty solid.

 

LINKS

 Links moved to first post for convenience.

Posted

I had cleaned

  • patch/kernel
  • patch/misc

leaving only things I need on WB. (I think :) )

How do I get rid of

[ o.k. ] Adding [ Wireless drivers for Realtek 8189FS chipsets branch:rtl8189fs ]
[ o.k. ] Checking git sources [ rtl8189fs rtl8189fs ]
[ .... ]  Cleaning ....  [ 1 files ]
[ o.k. ] Adding [ Wireless drivers for Realtek 8192EU chipsets branch:realtek-4.4.x ]
[ o.k. ] Checking git sources [ rtl8192eu realtek-4.4.x ]
[ .... ] Up to date
[ o.k. ] Adding [ Wireless drivers for Realtek 8811, 8812, 8814 and 8821 chipsets branch:v5.6.4.2 ]
[ o.k. ] Checking git sources [ rtl8812au v5.6.4.2 ]
[ .... ] Up to date
[ o.k. ] Adding [ Wireless drivers for Realtek RTL8811CU and RTL8821C chipsets commit:2bebdb9a35c1d9b6e6a928e371fa39d5fcec8a62 ]
[ o.k. ] Checking git sources [ rtl8811cu 2bebdb9a35c1d9b6e6a928e371fa39d5fcec8a62 ]
[ .... ]  Cleaning ....  [ 1 files ]
[ o.k. ] Adding [ Wireless drivers for Realtek 88x2bu chipsets branch:5.6.1_30362.20181109_COEX20180928-6a6a ]
[ o.k. ] Checking git sources [ rtl88x2bu 5.6.1_30362.20181109_COEX20180928-6a6a ]
[ .... ]  Cleaning ....  [ 1 files ]
[ o.k. ] Adding [ Wireless drivers for Realtek 8723DS chipsets branch:master ]
[ o.k. ] Checking git sources [ rtl8723ds master ]
[ .... ]  Cleaning ....  [ 1 files ]
[ o.k. ] Adding [ Wireless drivers for Realtek 8723DU chipsets branch:master ]
[ o.k. ] Checking git sources [ rtl8723du master ]
[ .... ] Up to date

 

It adds it, it builds it and crashes with error about it, and I don't even have such hardware.

 

Posted

I don't get it.

I disable IPv6 and Radeon DRI drivers I load config to "kernel config" it compiles ipv6 which works and bunch of GPU drivers that are off in current config. Is there a way to verify that my config is used and not default from kernel/linux-imx6.config?

Spoiler

  CC      net/ipv6/ip6_fib.o
  CC [M]  drivers/net/ethernet/neterion/vxge/vxge-traffic.o
  CC [M]  drivers/gpu/drm/nouveau/nvkm/subdev/therm/gk104.o
  CC      net/ipv6/ipv6_sockglue.o
  CC [M]  drivers/net/ethernet/neterion/vxge/vxge-ethtool.o
  CC      net/ipv6/ndisc.o
  CC [M]  drivers/gpu/drm/nouveau/nvkm/subdev/therm/gm107.o
  CC [M]  drivers/net/ethernet/neterion/vxge/vxge-main.o
  CC [M]  drivers/gpu/drm/nouveau/nvkm/subdev/therm/gm200.o
  CC      net/ipv6/udp.o
  LD [M]  drivers/net/ethernet/neterion/vxge/vxge.o
  CC [M]  drivers/gpu/drm/nouveau/nvkm/subdev/therm/gp100.o
  CC      net/ipv6/udplite.o
  AR      drivers/net/ethernet/neterion/built-in.a
  CC [M]  drivers/net/ethernet/neterion/s2io.o
  CC [M]  drivers/gpu/drm/nouveau/nvkm/subdev/timer/base.o
  CC      net/ipv6/raw.o
  CC      net/ipv6/icmp.o
  CC [M]  drivers/gpu/drm/nouveau/nvkm/subdev/timer/nv04.o
  CC      net/ipv6/mcast.o
  CC [M]  drivers/net/ethernet/netronome/nfp/nfpcore/nfp6000_pcie.o
  CC [M]  drivers/gpu/drm/nouveau/nvkm/subdev/timer/nv40.o
  CC      net/ipv6/reassembly.o
  CC [M]  drivers/net/ethernet/netronome/nfp/nfpcore/nfp_cppcore.o
  CC [M]  drivers/gpu/drm/nouveau/nvkm/subdev/timer/nv41.o
  CC      net/ipv6/tcp_ipv6.o
  CC [M]  drivers/net/ethernet/netronome/nfp/nfpcore/nfp_cpplib.o
  CC [M]  drivers/gpu/drm/nouveau/nvkm/subdev/timer/gk20a.o
  CC      net/ipv6/ping.o
  CC [M]  drivers/net/ethernet/netronome/nfp/nfpcore/nfp_hwinfo.o
  CC [M]  drivers/gpu/drm/nouveau/nvkm/subdev/top/base.o

 

I wonder if you be so kind to provide a couple of examples how to use it?

https://docs.armbian.com/Developer-Guide_Build-Preparation/#executing-any-bash-statement

As I get, we specify action we want to rerun as first argument and list of variables that otherwise provided by compile.sh as latter arguments.

There is a list of functions in the beginning of each script in lib/ folder.

But executing ./compile.sh 'compile_kernel' gives me pretty much same menu as ./compile.sh

Posted
56 minutes ago, p0rc0_r0ss0 said:

Is there a way to verify that my config is used and not default from kernel/linux-imx6.config?


It tells you before compilation starts - perhaps your naming is not correct? linux-imx6-current.config in userpatches/ ?
https://github.com/armbian/build/blob/master/lib/compilation.sh#L353

 

57 minutes ago, p0rc0_r0ss0 said:

But executing ./compile.sh 'compile_kernel' gives me pretty much same menu as ./compile.sh

 

That's correct. It just stops earlier. Don't bother with everything at once ... 

Posted
1 minute ago, Igor said:

It tells you before compilation starts - perhaps your naming is not correct? linux-imx6-current.config in userpatches/ ?
https://github.com/armbian/build/blob/master/lib/compilation.sh#L353

You mean, that when I run  KERNEL_CONFIGURE="yes", configure kernel and say "Yes" to save kernel it doesn't use it automatically?

I guess best way would be "save" to $buildroot/userpatches/imx6-current.config and then exit kernel configurator?

 

4 minutes ago, Igor said:

That's correct. It just stops earlier. Don't bother with everything at once ... 

Is there a way to skip patching and source compression stage? My sources are pretty much the same, only thing that changes is kernel configuration but I have to wait for patching_and_packing every time, which seems a bit excessive.

Thank you.

Posted
3 minutes ago, p0rc0_r0ss0 said:

You mean, that when I run  KERNEL_CONFIGURE="yes", configure kernel and say "Yes" to save kernel it doesn't use it automatically?

If you made adjustments within menuconfig the config will be written to output/. If you let the script continue the process this config will be used to build the kernel.

For any further build processes you need to copy this config into userpatches to use apply automatically.

Posted
24 minutes ago, Werner said:

If you made adjustments within menuconfig the config will be written to output/. If you let the script continue the process this config will be used to build the kernel.

Well after couple of days failing to compile USB support for wandboard I decided to try imx6-current with maintainers kernel config. It compiled and booted well. Then I decided to customize this config to get rid of extra code.

My customization happens like this:

  1. ./compile.sh KERNEL_CONFIGURE="yes"  BOARD="wandboard-srv" BRANCH="current" CLEAN_LEVEL="images,debs,make,oldcache" KERNEL_ONLY="no"  BUILD_DESKTOP="no" BUILD_MINIMAL="yes" RELEASE="focal" EXTRAWIFI="no"
  2. Make menu config.
  3. if /srv/kern/v0.1.conf exists: Load /srv/kern/v0.1.conf
  4. Make adjustments.
  5. Save result as /srv/kern/v0.2.conf
  6. Save & exit menuconfig
  7. build
  8. etcher output/images/Armbian_21.02.0-trunk_Wandboard-srv_focal_current_5.10.4_minimal.img -d /dev/sdd
  9. test run

Unless desired functionality achieved repeat with +0.1 to version number.

Problem is that while customizing maintainers kernel I noticed that while my board is running, it some how has ipv6 support while:

root@soc-server:/usr/src/build# grep -i ipv6 /srv/kern/v1.0.conf
# CONFIG_IPV6 is not set

by which I came to conclusion that my config might not be utilized during build.

 

---- UPD ----

On top of that I now replaced config/kernel/linux-imx6-dev.config with v.1.0.conf (my old version, not maintainers one), compiled and now I have USB support with keyboard working.

 

Posted
22 minutes ago, p0rc0_r0ss0 said:

You mean, that when I run  KERNEL_CONFIGURE="yes", configure kernel and say "Yes" to save kernel it doesn't use it automatically?


Ofc it uses it. But the problem here is initial config - is it ours from config/kernel or yours?

 

24 minutes ago, p0rc0_r0ss0 said:

I guess best way would be "save" to $buildroot/userpatches/imx6-current.config and then exit kernel configurator?


Its saved to the output/config/ and its not used next time unless you copy it to userpatches/ or make new default, copy to config/kernel and make a pull request. Perhaps not most intuitive way, but once you know how this works, it should be easy. And that's why we have documentation ;)

 

27 minutes ago, p0rc0_r0ss0 said:

Is there a way to skip patching and source compression stage?


By defining new patch location KERNELPATCHDIR= in respective sources or in general override file: userpatches/lib.config

 

29 minutes ago, p0rc0_r0ss0 said:

and source compression stage?

 

BUILD_KSRC="no"

 

https://docs.armbian.com/Developer-Guide_Build-Options/

Posted

Ok, got wandboard up and running. Pretty much everything except for the fact that Caps Lock LED doesn't work and as always WiFi/Bluetooth adapter, which I frankly don't need.

Now it's Ansible time.

 

How should I commit changes to main repo? All I changed was in $buildroot/config and something tells me core contributors won't be fine with me committing to master directly. 

 

p.s. almost forgot important thing: Armbian is AWESOME project. Thanks to all people who participate.

Posted
On 1/5/2021 at 3:12 PM, p0rc0_r0ss0 said:

How should I commit changes to main repo? All I changed was in $buildroot/config and something tells me core contributors won't be fine with me committing to master directly. 


Just make a PR to the master and try not to create special things for this board such as dedicated kernel config or similar. Kernel is shared, u-boot can be per board.

 

If it's done the way that it can't break anything, we accept it. config/board/thisboard configuration must have .CSC suffix that its clear we don't maintain it.

 

On 1/5/2021 at 3:12 PM, p0rc0_r0ss0 said:

Armbian is AWESOME project. Thanks to all people who participate.


Thank you! :P Welcome to join. It's a lot to do and we are always short on people.

Posted
On 1/6/2021 at 9:44 PM, Igor said:

try not to create special things for this board such as dedicated kernel config

Whole my point of building Armbian was to create dedicated wandboard kernel with no extras but with layerfs support (hello Docker) and modern ubuntu release. If I get rid of kernel, there will be much less use.

 

CSC stands for Contributor Submitted Config? :)

Posted
1 hour ago, p0rc0_r0ss0 said:

Whole my point of building Armbian was to create dedicated wandboard kernel with no extras but with layerfs support


Kernel config is one for all. In our world one per kernel family. With default config https://github.com/armbian/build/blob/master/config/kernel/linux-imx6-current.config it should work fine, right? But it's a bit too much for your use case ... I understand that. That diff you keep for yourself. We don't want to shrink down our default config.

We should also probably use layerfs ... but I just noticed AUFS is back in action https://github.com/sfjro/aufs5-linux/commits?author=sfjro

Posted
11 hours ago, Igor said:

but I just noticed AUFS is back in action 

That is great news. Though IIRC there was only one person missing this feature since we disabled the implementation...so...not sure if it is worth re-enabling?

Posted

hi,

 

Found this thread as I wanted to port an existing Orange-Pi-Zero armbian setup over to some wandboard-duals I have, without reinventing the wheel too much.
 

p0rc0_r0ss0, are you still using your config(s) and/or would you like some help updating them perhaps?

 

Best regards,

veremit/Michael.

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...
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines