0
and

Customization of .deb packages of u-boot & linux-image

Recommended Posts

(edited)

Hi,

 

   I am adding support of my board to armbian framework and I have several questions:

 

1. I added my u-boot & kernel but when I build package for kernel, it creates linux-image-4.14.98-sabre_5.94_armhf.deb instead of linux-image-sabre_5.94_armhf.deb so I have to remove version from from file name in compilation.sh or image creation process would fail. Is it possible to define name of .deb package? I guess I just missed something in my kernel config file.

 

2. u-boot & linux-image packages are installed successful but I have to add default links to kernel & device tree files by hands or update u-boot scripts by hand. Is it possible to add/update some  post-install configuration script to .deb so it would create/update required links during installation of .deb? The same is with u-boot deb. It updates u-bot file in filesystem but do not update it at boot area of my mmc card.

 

3. Is it possible to add some additional pre-compiled device tree files to linux-image .deb

Edited by and
Added another question

Share this post


Link to post
Share on other sites

Ok. For my first and third questions I found that I have to update scripts/package/builddeb in Kernel folder.

Is there any similar script file for u-boot?

Share this post


Link to post
Share on other sites

Few quick tips:
 

1. you need to make use of existing packaging patch (note: it can/is different for each kernel version). if your board does not have its own family, you need to add that first

2. you don't need to add anything. packaging pack and u-boot variable will do the magic ... 

3. no. if you want some special device tree, add it with a kernel patch. as source.

 

Don't rush with (wrong) implementation.

 

Check - Read! the following threads:

 

Example of adding new board to existing family: https://github.com/armbian/build/pull/1480/files

Share this post


Link to post
Share on other sites

It is a board based on iMX7D MCU.

I used patches for cupboard-default as an example for patching scripts/package/builddeb in Kernel folder.

 

Now I can build u-boot, kernel and images without any issue with unmodified armbian framework. I can share my work if someone would be interested.

 

List of new files/folders:

 

    config/boards/imx7sabre.conf
    config/bootenv/sabre-default.txt
    config/kernel/linux-sabre-default.config
    config/sources/sabre.conf
    patch/kernel/sabre-default/
    patch/u-boot/u-boot-sabre/

 

I did not add any special customization for the board, just used u-boot/kernel from official NXP repositories and adapted it for armbian framework.

 

By the way, aria2c on Ubuntu 16.04.6 LTS does not accept --download-result=hide so I had to change it to --download-result=default in lib/general.sh on Ubuntu 16.04

Ubuntu 18.04 has new version of aria2c so armbian framework works fine.

 

~$ aria2c --version
aria2 version 1.19.0
Copyright (C) 2006, 2015 Tatsuhiro Tsujikawa

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

** Configuration **
Enabled Features: Async DNS, BitTorrent, Firefox3 Cookie, GZip, HTTPS, Message Digest, Metalink, XML-RPC, SFTP
Hash Algorithms: sha-1, sha-224, sha-256, sha-384, sha-512, md5, adler32
Libraries: zlib/1.2.8 libxml2/2.9.3 sqlite3/3.10.2 GnuTLS/3.4.9 nettle GMP/6.1.0 c-ares/1.10.0 libssh2/1.5.0
Compiler: gcc 5.3.1 20160216
  built by   x86_64-pc-linux-gnu
  on         Feb 17 2016 22:40:25
System: Linux 4.15.0-58-generic #64~16.04.1-Ubuntu SMP Wed Aug 7 14:10:35 UTC 2019 x86_64

Report bugs to https://github.com/tatsuhiro-t/aria2/issues
Visit http://aria2.sourceforge.net/

~$ aria2c --download-result=hide
Exception: [AbstractOptionHandler.cc:69] errorCode=28 We encountered a problem while processing the option '--download-result'.
  -> [OptionHandlerImpl.cc:444] errorCode=1 download-result must be one of the following:'default' 'full' 
Usage:
 --download-result=OPT        This option changes the way "Download Results"
                              is formatted. If OPT is 'default', print GID,
                              status, average download speed and path/URI. If
                              multiple files are involved, path/URI of first
                              requested file is printed and remaining ones are
                              omitted.
                              If OPT is 'full', print GID, status, average
                              download speed, percentage of progress and
                              path/URI. The percentage of progress and
                              path/URI are printed for each requested file in
                              each row.

                              Possible Values: default, full
                              Default: default
                              Tags: #advanced

 

Share this post


Link to post
Share on other sites
3 hours ago, and said:

It is a board based on iMX7D MCU.


This is new kernel family. Not so simple way of adding things - but both examples I pointed you towards are at this level.

 

3 hours ago, and said:

Now I can build u-boot, kernel and images without any issue with unmodified armbian framework. I can share my work if someone would be interested.


Make a pull request and proceed working on. If/once things gets matured enough, we can merge and in the mean time folks that have such hardware can test.

 

3 hours ago, and said:

By the way, aria2c on Ubuntu 16.04.6 LTS does not accept


Also on 18.04 it makes us grey hair. I already thought to use our own build ... 16.04.x is not supported host for some time so this is actually not relevant.

 

Keep up!

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