Jump to content

[DOCUMETATION] Building doc is somewhat unclear !


Mother

Recommended Posts

 

 

Hello,

 

 

I am new to armbian and it building environment. I had to start from ground and

stumbled across some unclear / wrong point in the documentation.

[EDIT: I already managed to build an running image. This Thread is about the documentation]

So i just want to point them out, not to harm anybody, just to tell what happened to me.

Perhaps all of it is just because i didn't followed the documentation correctly.  If that's the case i like to apologize for disturbing.

 

1.

https://docs.armbian.com/Developer-Guide_Using-Vagrant/#virtualbox-version

suggestst to do:

> vagrant plugin install vagrant-disksize

 

The problem is, that nothing is done with it, so i ran into building errors because of to little disksize inside vagrant.

I managed to cincumvent this by adding

     config.disksize.size = '50GB'

into the Vagrantfile , just the line before the line

> END

 

Question: I am not sure if this is way to much. My HDD runs out of space pretty fast, so it would be nice to get some proper suggestions for this value.

 

 

2.

https://docs.armbian.com/Developer-Guide_Using-Vagrant/#armbian-directory-structure  says:

 

> When you read the Vagrantfile you’ll see that Vagrant will mount local output and userpatches directories.

 

This is untrue ! There is nothing like this in the Vagrantfile by just following the above steps.

 

3.

https://docs.armbian.com/Developer-Guide_Using-Vagrant/#creating-the-vagrant-guest-box-used-to-build says:

 

> # We have to be in the same directory as the Vagrant file.

> cd build

>

> # And now we simply let vagrant create our box and bring it up.

> vagrant up

 

This does not work. I had to put an

> vagrant init ubuntu/bionic64

 

in between this two lines to work properly. The Vagrantfile can't be in the "build"-folder following the docuemtation.

 

4.

https://docs.armbian.com/Developer-Guide_Using-Vagrant/#vagrant-guest-steps says:

 

> # Let's get building!

> cd armbian

> sudo ./compile.sh

 

Unfortunately there is not "armbian"-folder.

I could do an

 

$ cd /vagrant

 sudo ./compile.sh

to get into the host based "build"-folder.

But i wasn't sure if that was what was intended, so i ended up  doing a fresh "git clone" of the armbian build system and just

copying the "output/images" folder to "/vagrant" to get the desired files back to the host.

 

Question: I am not sure what was suggested to do here?

 

Question: Is the documentation kinda out of date , or is just the line

> vagrant box add ubuntu/bionic64

from

https://docs.armbian.com/Developer-Guide_Using-Vagrant/#virtualbox-version

pointing to the wrong box ? What just ended up in all this trouble ?

 

Greetings

 

Michael

Link to comment
Share on other sites

46 minutes ago, Mother said:

I am new to armbian and it building environment.


Native build process is most used and it 100% works. We use it every day. I am using Docker way as well but I never used Vagrant which means I have no idea whether you are doing something wrong or manuals are off. Possible. If you find documentation mistakes, you are welcome to correct them. This is almost the only way.

Link to comment
Share on other sites

Hello Igor,

 

thank you for the quick reply.

 

I had to use vagrant to build an "encrypted root"-image.    It didn't worked in docker or native build environment.

 

Quote

I never used Vagrant which means I have no idea .....

Same to me, i never used it before ,  neither do i have any clue how this virtualization stuff works :huh:

 

Quote

If you find documentation mistakes, you are welcome to correct them. This is almost the only way.

I'd love to help out with that. But i got two "but" :D

 

1.  I am not sure if my English is good enough for this task.

 

2. : It is not clear to me if the intended way to use the vagrant/virtualbox method was:

     a) to git clone everything into it and build entirely inside OR

     b) to use the build-system which got "mirrored" from the outside into the /vagrant folder.

 

        I suppose version a) is the right one.

       Could somebody point me to the right direction ?

 

Greetings,

Michael

 

Link to comment
Share on other sites

@Igor This is OT but here is my point to your answer:

 

3 hours ago, Igor said:

Because its broken at the moment

Not really.

Building for stretch (I didn't tested bionic) still works.

CRYPTROOT_ENABLE Developer zhiverbox stated https://docs.armbian.com/Developer-Guide_Build-Options/

Quote

... Stretch and Bionic targets only, some kernels might lack dependencies. Building under the Docker not supported yet.

 

So, buster didn't worked from the beginning i guess.

this Thread : https://github.com/armbian/build/issues/1584  is about getting buster to work.

 

 

 

To my "I have to use vagrant" problem:

 

Building "crypted-root"-images is not supported in docker. (see Quote above).

 

And here is a (quiet old) statement from zhiverbox not to build natively.

https://github.com/zhiverbox/armbian-build/tree/development#how-to-build-my-own-image-or-kernel

 

Quote

How to build my own image or kernel?

[...]

Ubuntu... running natively ..not recommended unless you build kernel only, for full OS images always use virtualization as outlined above),

 

I learnt the hard way that building natively or in docker still does not work ;)

 

 

But anyway. Back to the topic: I'd love to hear form someone what would be the right approach to build inside vagrant/virtualbox.

 

Link to comment
Share on other sites

33 minutes ago, Mother said:

Building "crypted-root"-images is not supported in docker.


Aha, my bad. Completely forget about that. :unsure:

 

34 minutes ago, Mother said:

I'd love to hear form somebody what would be the right approach to build inside vagrant/virtualbox.


If Vagrant magic doesn't work, perhaps just manual way by installing Ubuntu 18.04 into the VirtualBox? And then compile native inside that.

Link to comment
Share on other sites

Hi Igor,

 

It seems that i didn't pointed out clearly what I am heading for. Sorry about that

 

in the first Post i added:    I already managed to build an running image. This Thread is about the Documentation.

 

So I am willing to update the unclear points in the docs if my English is not too bad.

 

I just need a tipp from someone who knows how vagrant/virtualbox building was intended to work, because i have no clue how this virtualisation stuff work in detail and what could mess up what !

 

4 hours ago, Mother said:

2. : It is not clear to me if the intended way to use the vagrant/virtualbox method was:

     a) to git clone everything into it and build entirely inside OR

     b) to use the build-system which got "mirrored" from the outside into the /vagrant folder.

 

        I suppose version a) is the right one.

 

for me version a) just worked find and i got a good running root-encrypted image.

I just wonder if there are some cons to a) and some good pros for b)

 

Link to comment
Share on other sites

@Igor, @mother,   I normally build with Vagrant, and things were working fine three weeks ago.  I realize that the changes that were made two weeks ago  moved some files that used to be in the "build" directory to have been moved to the "build/config/templates" directory.  That is , for example,  where the Vagrantfile is now.  I just tried going to that directory and entering

 

Vagrant up

Vagrant ssh

cd armbian  

./compile.sh   

and the build has definitely started  

 

I am not sure whether this was the intent,  that is,  to have people build from the build/config/templates  directory.    Butdoing this right now  this might solve Mother's initial issues.   It looks to me like a lot of the changes made were actually for Docker,  and I haven't yet had time to figure out whether the whole userpatches move has anything to do with Vagrant.     

 

Link to comment
Share on other sites

2 hours ago, Mother said:

1.  I am not sure if my English is good enough for this task.

I'll guarantee that it will be sufficient.. We even let US citizens write our documentation.. :lol:

 

Honestly.. A bunch of people (including me) are not native native english speaker (and writer) so we'll never have 'the perfect' documentation.. But it's not the marketings department here writing some fancy stuff for the next hot shit.. It's that others understand how to do it. So as long as others can follow the instruction after your writing everybody will be fine with it. And if it's understandable or not can be tested by letting someone build under vagrant who didn't build before.

 

14 minutes ago, Mother said:

How to build my own image or kernel?

[...]

Ubuntu... running natively ..not recommended unless you build kernel only, for full OS images always use virtualization as outlined above),

that's just the old text we had there as well.. (but there are rumors that even some devs here sometimes build on native hosts - shh.. it's still not recommended. ;) )

 

https://github.com/armbian/build/commit/da028f1ca3b4fa073e866e6d1461832f85f0254c#diff-04c6e90faac2675aa89e2176d2eec7d8L13

we just don't have that branch anymore (dev branch of buildscript).

 

 

 

 

 

Link to comment
Share on other sites

On further investigation,  it looks like changes to ./compile.sh from a couple of weeks ago will look for a vagrant installation if vagrant is specified as the first parameters to compile.sh in the build directory  and try to install it (and virtualbox) if it is not installed.   Since it IS already installed on my machine,  vagrant was brought up and the compilation proceded successfully (I build PineH64 with Dev kernel, desktop, buster) and then end by telling one to hit enter to halt the vagrant box, but would allow no further communication with the vagrant box.  (I.e.,  I didn't want to halt it,  I wanted to use it again) 

 

The way the build worked before,  once the virtual  box was up and one ssh'ed into it,  one could do multiple compilations, logout and ssh back in, etc. I cannot figure out how to do that now.  I would be  happy to submit documentation changes if I could  understand how this is all supposed to work, now.   I know I ran into other changes on the parameters for building a few weeks earlier too.  

 

Id also be happy to test proposed build changes and match them to the documentation if that would help...

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines