Jump to content

NanoPC-T4 has boot/hardware issues if I make trivially small change to kernel source


Recommended Posts

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):


Here's the script I wrote to ensure everything was built exactly the same way:


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\
    # move the image
    mkdir -p ../outimages/${branch} && mv output/images/*img ../outimages/${branch}/ && \
    cp ./userpatches/lib.config ../outimages/${branch}/   

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 mastervanillacopy 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.


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:


root@nanopct4:~# uname -a
Linux nanopct4 5.3.0-rc4-rk3399_eth #5.96 SMP PREEMPT Sun Sep 8 20:20:43 UTC 2019 aarch64 GNU/Linux

  I can't see how this could possibly break everything like this.. what the hell am I missing?

Link to comment
Share on other sites

Check forum guidelines to use maximum potential!

This topic is now closed to further replies.

  • Create New...