0
Alexey

Passing configuration to docker build

Recommended Posts

Hi guys,
Is this syntax still valid? 

Config file is placed in userpatches/config-<conf_name>.conf

./compile.sh docker <conf_name>

 It still displays the configuration menu for me.

Thanks in advance.

Share this post


Link to post
Share on other sites
14 minutes ago, Igor said:

@Alexey Manually update Docker file and docker config - copy from config/template ... and it will work.

It didn't work. Should I restart docker?

Share this post


Link to post
Share on other sites
./compile.sh docker single         
[ o.k. ] This script will try to update
Already up to date.
Already on 'master'
Your branch is up to date with 'origin/master'.
[ o.k. ] Using config file [ /home/igorp/Dokumenti/build/userpatches/config-docker.conf ]
[ .... ] Using existed a armbian Docker container 
[ o.k. ] Running the container 
[ o.k. ] Using config file [ /root/armbian/userpatches/config-single.conf ]
[ o.k. ] Preparing [ host ]
[ o.k. ] Build host OS release [ bionic ]
[ o.k. ] Running in container [ docker ]

It works for me - latest sources, using Debian Buster as a host.

 

4 minutes ago, Alexey said:

Should I restart docker?


Yes - I would propose to delete the container / image.

Share this post


Link to post
Share on other sites

No luck. Killed all the containers, removed all images.
 

In the output before the menu pops up I have no such line:
Using config file [ /root/armbian/userpatches/config-single.conf ]


Docker: version 19.03.6

Share this post


Link to post
Share on other sites
2 hours ago, Alexey said:

No luck. Killed all the containers, removed all images.


Last try is to try clean git clone build script and start from scratch? 

Share this post


Link to post
Share on other sites
12 hours ago, Igor said:


Last try is to try clean git clone build script and start from scratch? 


Did not work, sorry.
Actually, passing params in command line as 

./compile.sh docker BOARD=lime2 BRANCH=current RELEASE=bionic BUILD_MINIMAL=no BUILD_DESKTOP=no KERNEL_ONLY=no KERNEL_CONFIGURE=no

works just fine, but I have another issue. Network is not working for image built this way.

Official image downloaded yesterday has version 20.02_Lime2_bionic_current_5.4.20 and it works, 
this image has version Armbian_20.05.0-trunk_Lime2_bionic_current_5.4.20 and it does not work. Checked with serial console, network is dead, dhclient is started, bit there is no IP  set. Tried to set up IP manually, but it still does not work though eth0 is up.   Looks like a problem with u-boot (probably some networking chip patches are missing), but in both cases u-boot has same major version  19.10.
 
Is there any way to get identical build (same u-boot and kernel) as official one?
 

Share this post


Link to post
Share on other sites
1 hour ago, Igor said:


I can check this fastest in 1-2 weeks.

Ok, original issue is fixed. I had BOARD_NAME instead of BOARD in my userpatches config. Now ./compile docker myconfig works.

Thanks a lot, but with the network issue I think I can find a workaround with some little hint from you.

Actually, what I'm trying to achieve is customizing image. I copied config/boards/lime2.conf  to config/boards/myboard.conf,  renamed the BOARD_NAME="MyBoard" to change the default hostname. BOARDFAMILY and BOOTCONFIG are the same as for Lime2,  it is the nearest compatible board, original Lime2 build works fine.  The desired image should include some pre-installed stuff (Node.js 10x, my app,  dependencies),  I did it with customize-image.sh.  Now setting BOARD=myboard creates the image I need, with the changed hostname and preinstalled software, but the network does not work.  Obviously, some patches are BOARD  -depended, not the board family. Workaround is leaving BOARD as is, and renaming the host in customize-image.sh script.  And here I need a hint - hostnamectl does not work in build time, what is the better approach? 

  

Share this post


Link to post
Share on other sites
1 hour ago, Alexey said:

One more question - how to update the ssh login prompt with new hostname after it is changed?

No more questions :) Just fixed BOARD_NAME in /etc/armbian-release, motd now displays correct name.

PS. great job guys, userpatches concept is just great. Working firmware for the new board in 2 days - that took me 6 months before with Buildroot.

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