0
DBB

Rebuild kernel with source changes

Recommended Posts

Hi I have added some drivers in the kernel source code in the cache folder and I am not sure how to rebuild the kernel with the new changes. I am trying to rebuild the mainline kernel. Using compile.sh overwrites the changes with default files.  I have changed the following configurations in my config file.

 

KERNEL_ONLY="no"                # leave empty to select each time, set to "yes" or "no" to skip dialog prompt
  3 KERNEL_CONFIGURE="no"           # leave empty to select each time, set to "yes" or "no" to skip dialog prompt
  4 CLEAN_LEVEL=""  # comma-separated list of clean targets: "make" = make clean for selec
  5                     # "debs" = delete packages in "./output/debs" for current branch and family,
  6                     # "alldebs" = delete all packages in "./output/debs", "images" = delete "./output/imag
  7                     # "cache" = delete "./output/cache", "sources" = delete "./sources"
  8                     # "oldcache" = remove old cached rootfs except for the newest 8 files
  9 
 10 DEST_LANG="en_US.UTF-8"         # sl_SI.UTF-8, en_US.UTF-8
 11 
 12 # advanced
 13 KERNEL_KEEP_CONFIG="yes"            # do not overwrite kernel config before compilation
 14 EXTERNAL="yes"              # build and install extra applications and drivers
 15 EXTERNAL_NEW="prebuilt"         # compile and install or install prebuilt additional packages
 16 CREATE_PATCHES="no"         # wait that you make changes to uboot and kernel source and creates patches
 17 BUILD_ALL="no"              # cycle through available boards and make images or kernel/u-boot packages.
 18                     # set KERNEL_ONLY to "yes" or "no" to build all packages/all images
 19 
 20 BSPFREEZE=""                # freeze armbian packages (u-boot, kernel, dtb)
 21 INSTALL_HEADERS=""          # install kernel headers package
 22 LIB_TAG="master"            # change to "branchname" to use any branch currently available.
 23 CARD_DEVICE=""              # device name /dev/sdx of your SD card to burn directly to the card when done

I have removed clean so as to make it an incremental build. I am trying to build these changes in tree to test some quick changes.

Share this post


Link to post
Share on other sites

HI Igor

18 hours ago, Igor said:


... and add changes to the source code when asked. This way a patch is created and you can use it later when building.

Hi Igor 

 

Thank you for the reply. I tried enabling CREATE_PATCHES in the config file. Still the compilation goes all the way through. I have attached the output printed by the script

 

[ o.k. ] Downloading sources 
[ o.k. ] Checking git sources [ u-boot v2018.05 ]
[ .... ] Up to date 
[ o.k. ] Checking git sources [ linux-mainline linux-4.14.y ]
[ .... ] Up to date 
[ o.k. ] Checking git sources [ sunxi-tools master ]
[ .... ] Up to date 
[ o.k. ] Checking git sources [ rkbin-tools master ]
[ .... ] Up to date 
[ o.k. ] Checking git sources [ marvell-tools A3700_utils-armada-17.10 ]
[ .... ] Up to date 
[ o.k. ] Checking git sources [ odroidc2-blobs master ]
[ .... ] Up to date 
[ o.k. ] Checking git sources [ testing-reports master ]
[ .... ] Fetching updates 
remote: Counting objects: 4, done.
remote: Compressing objects: 100% (4/4), done.
remote: Total 4 (delta 1), reused 2 (delta 0), pack-reused 0
Unpacking objects: 100% (4/4), done.
From https://github.com/armbian/testings
 * branch            master     -> FETCH_HEAD
 + 21ed836...cb03e73 master     -> origin/master  (forced update)
[ .... ] Checking out 
[ o.k. ] Starting rootfs and image building process for [ orangepizero xenial ]
[ o.k. ] Extracting xenial-ng-armhf.113...912.tar.lz4 [ 2 days old ]
xenial-ng-armhf.113...912.tar.lz4:  297MiB [24.6MiB/s] [=============================================================================================================================================>] 100%
[ o.k. ] Applying distribution specific tweaks for [ xenial ]
[ o.k. ] Applying common tweaks 
[ .... ] Installing [ linux-image-next-sunxi_5.59_armhf.deb ]
[ .... ] Installing [ linux-u-boot-next-orangepizero_5.59_armhf.deb ]
[ .... ] Installing [ linux-dtb-next-sunxi_5.59_armhf.deb ]
[ .... ] Installing [ linux-xenial-root-next-orangepizero_5.59_armhf.deb ]
[ o.k. ] Installing extra applications and drivers 
Reading package lists...
Building dependency tree...
Reading state information...
expect is already the newest version (5.45-7).
iperf3 is already the newest version (3.0.11-1).
The following additional packages will be installed:
  libassuan0 libksba8 libnpth0
The following NEW packages will be installed:
  debconf-utils dirmngr html2text libassuan0 libksba8 libnpth0
0 upgraded, 6 newly installed, 0 to remove and 0 not upgraded.
Need to get 450 kB of archives.
After this operation, 1,049 kB of additional disk space will be used.
Err:1 http://ports.ubuntu.com xenial/universe armhf debconf-utils all 1.5.58ubuntu1
  Could not resolve 'ports.ubuntu.com'
Err:2 http://ports.ubuntu.com xenial/main armhf libassuan0 armhf 2.4.2-2
  Could not resolve 'ports.ubuntu.com'
Ign:3 http://ports.ubuntu.com xenial-updates/main armhf libksba8 armhf 1.3.3-1ubuntu0.16.04.1
Err:4 http://ports.ubuntu.com xenial/main armhf libnpth0 armhf 1.2-3
  Could not resolve 'ports.ubuntu.com'
Ign:5 http://ports.ubuntu.com xenial-updates/main armhf dirmngr armhf 2.1.11-6ubuntu2.1
Err:6 http://ports.ubuntu.com xenial/universe armhf html2text armhf 1.3.2a-18
  Could not resolve 'ports.ubuntu.com'
Err:3 http://ports.ubuntu.com xenial-updates/main armhf libksba8 armhf 1.3.3-1ubuntu0.16.04.1
  Could not resolve 'ports.ubuntu.com'
Err:5 http://ports.ubuntu.com xenial-updates/main armhf dirmngr armhf 2.1.11-6ubuntu2.1
  Could not resolve 'ports.ubuntu.com'
E: Failed to fetch http://ports.ubuntu.com/pool/universe/d/debconf/debconf-utils_1.5.58ubuntu1_all.deb  Could not resolve 'ports.ubuntu.com'

E: Failed to fetch http://ports.ubuntu.com/pool/main/liba/libassuan/libassuan0_2.4.2-2_armhf.deb  Could not resolve 'ports.ubuntu.com'

E: Failed to fetch http://ports.ubuntu.com/pool/main/libk/libksba/libksba8_1.3.3-1ubuntu0.16.04.1_armhf.deb  Could not resolve 'ports.ubuntu.com'

E: Failed to fetch http://ports.ubuntu.com/pool/main/n/npth/libnpth0_1.2-3_armhf.deb  Could not resolve 'ports.ubuntu.com'

E: Failed to fetch http://ports.ubuntu.com/pool/main/g/gnupg2/dirmngr_2.1.11-6ubuntu2.1_armhf.deb  Could not resolve 'ports.ubuntu.com'

E: Failed to fetch http://ports.ubuntu.com/pool/universe/h/html2text/html2text_1.3.2a-18_armhf.deb  Could not resolve 'ports.ubuntu.com'

E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
[ .... ] Installing [ armbian-config_5.59_all.deb ]
[ .... ] Installing [ armbian-firmware_5.59_all.deb ]
[ .... ] Installing [ armbian-tools-xenial_5.59_armhf.deb ]
[ .... ] Installing additional packages [ EXTERNAL_NEW ]
Hit:1 http://ports.ubuntu.com xenial InRelease
Get:2 http://ports.ubuntu.com xenial-security InRelease [107 kB]
Hit:3 http://apt.armbian.com xenial InRelease
Get:4 http://ports.ubuntu.com xenial-updates InRelease [109 kB]
Get:5 http://ports.ubuntu.com xenial-backports InRelease [107 kB]
Get:6 http://ports.ubuntu.com xenial-security/main armhf Packages [532 kB]
Get:7 http://ports.ubuntu.com xenial-security/universe armhf Packages [389 kB]
Get:8 http://ports.ubuntu.com xenial-updates/main armhf Packages [895 kB]
Get:9 http://ports.ubuntu.com xenial-updates/universe armhf Packages [769 kB]
Fetched 2,908 kB in 52s (55.2 kB/s)
Reading package lists...
Reading package lists...
Building dependency tree...
Reading state information...
hostapd is already the newest version (2:2.6-4~armbian5.38+1).
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
 armbian-config : Depends: debconf-utils but it is not going to be installed
                  Depends: html2text but it is not going to be installed
                  Depends: html2text but it is not going to be installed
                  Depends: dirmngr but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
[ o.k. ] Calling image customization script [ customize-image.sh ]
[ o.k. ] Preparing image file for rootfs [ orangepizero xenial ]
[ o.k. ] Current rootfs size [ 674 MiB ]
[ o.k. ] Creating blank image for rootfs [ 816 MiB ]
 816MiB [43.8MiB/s] [================================================================================================================================================================================>] 100%
[ o.k. ] Creating partitions [ root: ext4 ]
[ .... ] Creating rootfs [ ext4 on /dev/loop13p1 ]
[ .... ] Updating initramfs... [ update-initramfs -uv -k 4.14.67-sunxi ]
[ o.k. ] Updated initramfs. [ for details see: /home/dhaval/build/output/debug/install.log ]
[ .... ] Copying files to root directory 
        610.98M  99%   27.67MB/s    0:00:21 (xfr#27264, to-chk=0/34645)   

sent 613.08M bytes  received 548.89K bytes  28.54M bytes/sec
total size is 615.80M  speedup is 1.00
[ .... ] Copying files to /boot directory 
         26.33M  99%   68.53MB/s    0:00:00 (xfr#206, to-chk=0/213)  

sent 26.35M bytes  received 3.96K bytes  52.71M bytes/sec
total size is 26.33M  speedup is 1.00
[ o.k. ] Free space: [ SD card ]
Filesystem               Size  Used Avail Use% Mounted on
udev                     5.3G     0  5.3G   0% /dev
tmpfs                    1.1G  1.4M  1.1G   1% /run
/dev/sda1                157G   32G  117G  22% /
tmpfs                    5.3G     0  5.3G   0% /dev/shm
tmpfs                    5.0M  4.0K  5.0M   1% /run/lock
tmpfs                    5.3G     0  5.3G   0% /sys/fs/cgroup
/dev/loop0                15M   15M     0 100% /snap/gnome-logs/37
/dev/loop5                35M   35M     0 100% /snap/gtk-common-themes/319
/dev/loop1               3.8M  3.8M     0 100% /snap/gnome-system-monitor/51
/dev/loop4               2.4M  2.4M     0 100% /snap/gnome-calculator/180
/dev/loop2                88M   88M     0 100% /snap/core/5328
/dev/loop3                87M   87M     0 100% /snap/core/4917
/dev/loop7               141M  141M     0 100% /snap/gnome-3-26-1604/70
/dev/loop6                13M   13M     0 100% /snap/gnome-characters/103
/dev/loop9                15M   15M     0 100% /snap/gnome-logs/40
/dev/loop8                87M   87M     0 100% /snap/core/5145
/dev/loop10              3.8M  3.8M     0 100% /snap/gnome-system-monitor/54
/dev/loop11               13M   13M     0 100% /snap/gnome-characters/117
/dev/loop12              2.4M  2.4M     0 100% /snap/gnome-calculator/199
Ubuntu_18_Shared_Folder  477G  178G  299G  38% /media/sf_Ubuntu_18_Shared_Folder
tmpfs                    1.1G   24K  1.1G   1% /run/user/1000
/dev/sr0                  56M   56M     0 100% /media/dhaval/VBox_GAs_5.2.12
tmpfs                    7.1G  674M  6.4G  10% /home/dhaval/build/.tmp/rootfs-next-orangepizero-xenial-no
/dev/loop13p1            784M  687M   65M  92% /home/dhaval/build/.tmp/mount-next-orangepizero-xenial-no
[ o.k. ] Writing U-boot bootloader [ /dev/loop13 ]
[ o.k. ] Done building [ /home/dhaval/build/output/images/Armbian_5.59_Orangepizero_Ubuntu_xenial_next_4.14.67.img ]
[ o.k. ] Runtime [ 16 min ]

 

Share this post


Link to post
Share on other sites
5 hours ago, DBB said:

Still the compilation goes all the way through.


Because kernel was already compiled - it is cached and you obviously don't clean the cache (default is on). It also looks like your fs cache is corrupted due to network problems ... remove cache/rootfs or add ",cache" to the line below:

You are missing this:

CLEAN_LEVEL="make,debs,oldcache" 

 

Please take some time and study the manual. 

Share this post


Link to post
Share on other sites
On 9/6/2018 at 11:25 PM, Igor said:


Because kernel was already compiled - it is cached and you obviously don't clean the cache (default is on). It also looks like your fs cache is corrupted due to network problems ... remove cache/rootfs or add ",cache" to the line below:

You are missing this:

CLEAN_LEVEL="make,debs,oldcache" 

 

Please take some time and study the manual. <== What manual?

 

This one?

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

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
0