ethDreamer

Members
  • Content Count

    5
  • Joined

  • Last visited

  1. I've been working on a project to boot a custom kernel on my NanoPC-T4. I haven't gotten too far though because as soon as I make the smallest change to the source, everything goes to hell (see below). I've built 3 images following EXACTLY the same process. All I did was change the KERNELBRANCH variable in userpatches/lib.config to point to different branches in the same repository. For completeness, here's my lib.config (which simply points to my fork of ayufan-rock64/linux-mainline-kernel): KERNELSOURCE='https://github.com/ethDreamer/linux-mainline-kernel' KERNELBRANCH='branch:BRANCHNAME' Here's the script I wrote to ensure everything was built exactly the same way: #!/bin/bash for branch in master vanillacopy tinychange ; do # restart the box vagrant halt && sleep 5 && vagrant up # cleanup old build vagrant ssh -c 'cd armbian && sudo rm -r ./cache/sources/linux-rockchip64 ./output/images/Armbian*.img*' # edit lib.config sed -i ./userpatches/lib.config -e "s/branch:.*/branch:${branch}\'/" # build the image vagrant ssh -c 'cd armbian && sudo ./compile.sh BOARD=nanopct4 BRANCH=dev RELEASE=buster\ BUILD_MINIMAL=yes BUILD_DESKTOP=no KERNEL_ONLY=no KERNEL_CONFIGURE=no' # move the image mkdir -p ../outimages/${branch} && mv output/images/*img ../outimages/${branch}/ && \ cp ./userpatches/lib.config ../outimages/${branch}/ done You can see from github that my fork is identical to ayufan's upstream fork; I've made NO CHANGES. Then I created 2 extra branches off of master: vanillacopy and tinychange. The first branch (vanillacopy) like the name implies, is simply a copy of master with no changes. The second branch tinychange contains one tiny change (click to see diff). All I wanted to do was change the kernel's release string that's output by uname -r so that I could be sure I had booted my kernel. RESULTS: the kernels built with master and vanillacopy boot just fine. When booting the image with the kernel built from the tinychange branch: HDMI output stops working networking stops working board takes FOREVER to boot I wouldn't even know it booted without the serial console which stops displaying output after booting the kernel (any kernel) and only resumes output once the system has fully boot on the bright side, the uname string did change: I can't see how this could possibly break everything like this.. what the hell am I missing?
  2. Okay so if I understand you right (and for anyone who might read this in the future) I just need to create the file userpatches/lib.config containing: KERNELSOURCE=[github url of kernel source] KERNELBRANCH=[existing branch] LINUXCONFIG=[existing config file] assuming that repository hosts a bootable kernel on that branch that can be successfully compiled with that config - then this is all I need to do to have the build system continue as usual and create the image for me? Thanks for your help I'll try this when I get home.
  3. I was actually able to successfully do the opposite (merge commits from ayufan-rock64/linux-mainline-kernel into anthraxx/linux-hardened). I thought this might be easier since there wasn't a whole lot of commits to aufan's branch after forking from torvalds/linux. Either way I can't test either kernel until I know how to integrate a new kernel source into the Armbian build system.
  4. I hope you can understand my question just from the title but here's more information in case you need it. BACKGROUND ON MY END GOAL IN CASE YOU HAVE ADVICE: I'm attempting to create a hardened linux image for running on my nanoPC-t4. I gotta give you guys props because Armbian appears to be wayyyyy ahead of the alternative distributions I checked out (gentoo/arch/lubuntu) in terms of support/customizability/documentation for ARM development. As a first step, I'm trying to build & boot a hardened Linux kernel. After some googling, I settled on this repo as my best option for free & open-source hardened kernel sources (unless anyone has a better suggestion). ON MY ORIGINAL QUESTION: I've already booted a manually built image using the Armbian Build Tools. Now I'm trying to create an image with custom linux sources but I'm not very familiar yet with the build scripts and the development guide doesn't detail the process of adding new kernel sources into the tool. I tried the naive option of simply editing the sources configuration file to point to a different repo: - KERNELSOURCE='https://github.com/ayufan-rock64/linux-mainline-kernel' - KERNELBRANCH='tag:5.2.0-1116-ayufan' - KERNELDIR='linux-rockchip64' + KERNELSOURCE='https://github.com/anthraxx/linux-hardened' + KERNELBRANCH='tag:5.2.a' + KERNELDIR='linux-hardened' And this worked up to a point - obviously all the patches failed to apply but the tool continued anyway. `make oldconfig` had me update the config with the missing options and I was eventually dropped into menuconfig. That went fine but eventually the build failed and the script stopped (sorry I don't have the exact error right now because I'm at work). But most importantly I noticed the script DIDN'T FAIL because of a kernel compilation error. So something else went wrong/is needed to get this source integrated into the build system. I'm just wondering what the process is for doing that.