Jump to content

How to build my own image or kernel?


Recommended Posts

Thank You for your help, but

8 minutes ago, zador.blood.stained said:

No. You need to reassign values to KERNELBRANCH and possibly KERNELSOURCE (if you want to change the repository) in userpatches/lib.config

I will give up - that beats me :blink:

 

Again, thank you for your whole work

Link to comment
Share on other sites

Hi Igor

 

Great job. Could you help me: I try to made a personaliced kernel image to activate the rotate of screen from the kernel, i found in sunxi a tutorial, but have many errors in the way.

You have a more explained tutorial or web from i can get the steps.

I'm new on linux, but i need this for job.

 

Thansk so much.

PD: exuce by my so bad english...

Link to comment
Share on other sites

12 minutes ago, pablo said:

but have many errors in the way.


Please provide exact steps which you made + attach a (build)log of errors. Than we will be able to help you.

 

In the mean time check documentation regarding building. This: https://docs.armbian.com/Developer-Guide_Build-Preparation/ is all what we have right now and we need to add and change some stuff when possible.

Link to comment
Share on other sites

Hi Igor

I can build an image of armbian correctly, thanks. But I don't alter /sys/class/graphic/fbcon/rotate & rotate_all. I understand that after of build the kernel I need to modify this files to activate the screen rotation. I need activate the rotation from the kernel.

 

I follow your link (https://docs.armbian.com/Developer-Guide_Build-Preparation/) and alter "compile.sh" for activate the personalization menu, then select rotation, but doesn't work.

 

I explained well?

PD: I attached the log.

output.log

Link to comment
Share on other sites

This means your system is able to compile stock kernel.
 

Now add CREATE_PATCHES="yes" and when you are prompted to apply KERNEL changes (first is for U-BOOT), edit whatever in kernel source and press ENTER when done. This way you can alter source and a patch of your changes will be generated ... 

Link to comment
Share on other sites

Hi Igor

 

As I was saying, I'm new to Linux. I made the changes you mentioned (CREATE_PATCHES = "yes") but I received an error stating that it was not possible to compile, I probably altered something that was not due. When the system is compiled one accesses to "/sys/class/graphic/fbcon/", in that directory are the "rotate" and "rotate_all" files, which are not editable (I tried changing permissions) either replaceable. To be able to change the value of these files (or another one that activates the rotation) Which file should I edit?

 

Thanks again.

Link to comment
Share on other sites

Basic procedure:

 

1. you copy compile.sh out

2. Edit here

https://github.com/armbian/build/blob/master/compile.sh#L30, set to yes 

3. ./compile

4. When you get prompt at u-boot press enter

5. When you get prompt at kernel, open new terminal, become root and edit desired files in a source which is a subject of compilation

6. When you are done, go back to terminal 1 and press ENTER

7. Do it again.

 

Inside kernel source you are on your own, we can't help you - its a work of hundreds of people ...

Link to comment
Share on other sites

To do this, you might start with a Linux vendor image for you board, write it to µSD card, keep the kernel image and the kernel modules, delete the rest of the root filesystem and copy the contents of an appropriate Armbian rootfs (preferably server edition) to your µSD card. Which board do you have in mind?

Link to comment
Share on other sites

9 hours ago, umiddelb said:

To do this, you might start with a Linux vendor image for you board, write it to µSD card, keep the kernel image and the kernel modules, delete the rest of the root filesystem and copy the contents of an appropriate Armbian rootfs (preferably server edition) to your µSD card. Which board do you have in mind?

Thanks.

 

I do some embedded system design stuff so mostly my own boards or re-purposed boards I pull out of things.  Mainly, I think a new board guide would be really useful for understanding how everything goes together in the armbiam build system.   

Link to comment
Share on other sites

The Armbian build system is well documented, but it builds everything from source. If you don't have access to the source and/or don't know which source to take, it might be easier to start with an existing firmware and/or kernel. You should have serial console access to the board and know how deal with the firmware (u-boot). If have have access to the sources you can just re-cycle the slot of an existing board (unfortunately Armbian doesn't offer "spare" or "intentionally left blank" slots). 

 

Link to comment
Share on other sites

15 hours ago, umiddelb said:

unfortunately Armbian doesn't offer "spare" or "intentionally left blank" slots). 


We are in the process of RFCing the whole build script and such things can be implement better ... https://github.com/armbian/build/issues/633

 

16 hours ago, Jason Rogers said:

Mainly, I think a new board guide would be really useful for understanding how everything goes together in the armbiam build system.   

 

In any case bringing new board into the system can be a complex operation, unless board is a part of already introduced family and you only need new board config, u-boot parameters ... Currently adding new board is not user configurable - you have to implement to main build script and push changes to main branch - if you like. We are liberal with accepting configurations if they don't break anything - they become "community supported targets" unless we decide and have opportunities to join the party. You need to edit/add board config, family (sources) config, kernel config, ...

Link to comment
Share on other sites

17 hours ago, Igor said:

 

In any case bringing new board into the system can be a complex operation, unless board is a part of already introduced family and you only need new board config, u-boot parameters ... Currently adding new board is not user configurable - you have to implement to main build script and push changes to main branch - if you like. We are liberal with accepting configurations if they don't break anything - they become "community supported targets" unless we decide and have opportunities to join the party. You need to edit/add board config, family (sources) config, kernel config, ...

Maybe not what I was hoping to hear but it does answers the question.  Thanks.

Link to comment
Share on other sites

12 hours ago, Igor said:


May I ask which board you had in mind?

Right now I have two FPGA boards with SOC chips (dual arm cores) I am playing with.  But again, this is more an exercise in understanding the build system and if you know it well enough to bring up a completely new board then that makes everything else attainable.  (I'm actually mainly targeting the orange pi zero h5 for a project and the armbian support is still pretty fresh there).

Link to comment
Share on other sites

On 7/7/2017 at 2:06 PM, dolphs said:

For people using Linux Mint, please temporarily update your " /etc/lsb-release " to DISTRIB_CODENAME=xenial and things should roll

 

I understand that building outside of Xenial is not supported, but can we not require things like editing files in /etc to permit someone to do it anyway. 

 

I have been using debian stretch for some time. 

For a while I had to run xenial in an lxc container with several personal patches if I wanted to make an sdcard image. 

But those issues got resolved months ago and I was suddenly able to successfully build directly from Stretch without containers. 

Now to do that I have to play games. 

 

 

 

 

 

Link to comment
Share on other sites

8 hours ago, dhlii said:

but can we not require things like editing files in /etc to permit someone to do it anyway. 


It's difficult to support a system that is not used by a core developer team and in most cases, people come forward with vague descriptions like: "Building breaks in Mint 25.2" . Our default answer is: "Ubuntu Xenial is the way to go". I know that those dependencies could be fixed (perhaps they already are and once they might be), but at some major distro upgrade, they might fail. This way we limit down support questions. And we have to do that since the team is small and our primary focus elsewhere.


We should perhaps add that if you want to build within anything else, fix dependencies and submit a patch - including override switch. This way it will at least work. If Mint/Stretch/* maintainer/user decides to stick around than it might become officially supported.

Link to comment
Share on other sites

10 hours ago, dhlii said:

But those issues got resolved months ago and I was suddenly able to successfully build directly from Stretch without containers. 

Now to do that I have to play games. 

If you are running a modern Linux distribution I would recommend using Docker for building - currently it's transparently automated. Until we drop all requirements for host toolchains and switch entirely to external Linaro ones we won't relax or remove the host OS check in prepare_host() so you'll have to disable it manually. And to be clear - you were able to build a specific u-boot and kernel sources without issues, it doesn't mean that you would be able to compile any available target without additional patches.

Link to comment
Share on other sites

hi, i have a problem when i try to compile with ./compile.sh

Installing build dependencies 
Hit:1 http://repo.aptly.info squeeze InRelease
Hit:2 http://us.archive.ubuntu.com/ubuntu xenial InRelease
Hit:3 http://us.archive.ubuntu.com/ubuntu xenial-updates InRelease
Hit:4 http://us.archive.ubuntu.com/ubuntu xenial-backports InRelease
Hit:5 http://security.ubuntu.com/ubuntu xenial-security InRelease
Reading package lists...
Building dependency tree...
Reading state information...
226 packages can be upgraded. Run 'apt list --upgradable' to see them.

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

Reading package lists...
Building dependency tree...
Reading state information...
Package libc6-i386 is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
However the following packages replace it:
  libc6

E: Unable to locate package lib32stdc++6
E: Couldn't find any package by regex 'lib32stdc++6'
E: Package 'libc6-i386' has no installation candidate
E: Unable to locate package lib32ncurses5
E: Unable to locate package lib32tinfo5
/home/danilo/lib/lib/general.sh: line 548: update-ccache-symlinks: command not found
/home/danilo/lib/lib/general.sh: line 559: update-binfmts: command not found
/home/danilo/lib/lib/general.sh: line 560: update-binfmts: command not found
/home/danilo/lib/lib/main.sh: line 103: dialog: command not found
[ error ] ERROR in function source [ main.sh:105 ]
[ error ] No option selected 
[ o.k. ] Process terminated 

how can i solve it?

Edited by kisspachyousee
Link to comment
Share on other sites

5 hours ago, kisspachyousee said:

how can i solve it?


What is your host system? Did you follow this closely?

 

Quote

Supported build environments:

Ubuntu Xenial 16.04 x64 guest inside a VirtualBox or other virtualization software

 

 

Link to comment
Share on other sites

2 hours ago, kisspachyousee said:

But I can also insert the drivers and software that I prefer when I compile? such kodi or other dvb driver?


We provide build environment with possibilities to add kernel and u-boot patches. You can change the configuration or post-install 3rd party applications to the image, etc. If all this will be successful is entirely your problem. If you do it right - solve all dependencies it will work otherwise not.  Build tools are just a base tool. They save you a lot of time preparing the ground for whatever you plan to do.

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

Link to comment
Share on other sites

[ o.k. ] Starting rootfs and image building process for [ orangepipcplus xenial ]
[ o.k. ] Creating new rootfs for [ xenial ]
[ o.k. ] Installing base system [ Stage 1/2 ]
I: Retrieving InRelease 
I: Failed to retrieve InRelease
I: Retrieving Release 
E: Failed getting release file http://localhost:3142/ports.ubuntu.com/dists/xenial/Release
[ error ] ERROR in function create_rootfs_cache [ debootstrap-ng.sh:126 ]
[ error ] Debootstrap base system first stage failed 
[ o.k. ] Process terminated 
[ error ] ERROR in function unmount_on_exit [ image-helpers.sh:59 ]
[ error ] debootstrap-ng was interrupted 
[ o.k. ] Process terminated 

now I have this problem, I tried to remove cache/rootfs , but the result is te same..

 

Link to comment
Share on other sites

7 hours ago, jojapoppa said:

What is the default password for the mini.iso VM downloaded for stand-alone usage on VirtualBox?  tx


Tha is Ubuntu install disk, no default password. You create one.

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

Important Information

Terms of Use - Privacy Policy - Guidelines