Guest Posted August 11, 2020 Share Posted August 11, 2020 I'm trying to build a kernel driver for 5.7.14 for my custom image but couldn't find a linux-source package for the kernel version at https://mirrors.netix.net/armbian/apt/pool/main/l/ I tried to use armbian-config but it didn't show it, either (5.4.44 was listed instead). Where can I get 5.7.14 source code? I checked out Armbian Build v20.05( https://github.com/armbian/build/releases/tag/v20.05 )and created an image with the following options: BOARD=tinkerboard RELEASE=buster BRANCH=current BUILD_DESKTOP=no KERNEL_ONLY=no KERNEL_CONFIGURE=no INSTALL_HEADERS=yes BUILD_MINIMAL=yes The system information is as follows (on Tinker Board): root@tinkerboard:~# cat /etc/armbian-release # PLEASE DO NOT EDIT THIS FILE BOARD=tinkerboard BOARD_NAME="Tinkerboard" BOARDFAMILY=rockchip BUILD_REPOSITORY_URL=https://github.com/armbian/build BUILD_REPOSITORY_COMMIT=04ae9e4f DISTRIBUTION_CODENAME=buster DISTRIBUTION_STATUS=supported VERSION=20.08.0-trunk LINUXFAMILY=rockchip BRANCH=current ARCH=arm IMAGE_TYPE=user-built BOARD_TYPE=conf INITRD_ARCH=arm KERNEL_IMAGE_TYPE=Image root@tinkerboard:~# cat /etc/os-release PRETTY_NAME="Armbian 20.08.0-trunk Buster" NAME="Debian GNU/Linux" VERSION_ID="10" VERSION="10 (buster)" VERSION_CODENAME=buster ID=debian HOME_URL="https://www.debian.org/" SUPPORT_URL="https://www.debian.org/support" BUG_REPORT_URL="https://bugs.debian.org/" root@tinkerboard:~# uname -r 5.7.14-rockchip I also found weird stuff in install.log. I checked out v20.05 but the log said the build.sh was installing v20.08. I'm missing something. What is it? # output/debug/install.log --- dpkg-deb: building package 'armbian-firmware' in 'armbian-firmware_20.08.0-trunk_all.deb'. dpkg-deb: building package 'armbian-firmware-full' in 'armbian-firmware-full_20.08.0-trunk_all.deb'. dpkg-deb: building package 'linux-buster-root-current-tinkerboard' in '/home/vagrant/armbian/.tmp/buster/linux-buster-root-current-tinkerboard_20.08.0-trunk_armhf.deb'. (snip) Any suggestions are appreciated. Thanks. Link to comment Share on other sites More sharing options...
Werner Posted August 11, 2020 Share Posted August 11, 2020 If the sources are missing and you may want to build your own image anyways I'd do this: BOARD=tinkerboard BRANCH=current KERNEL_ONLY=yes KERNEL_CONFIGURE=no To get a complete set of packages including kernel image, kernel source, kernel headers, dtbs and U-Boot. Link to comment Share on other sites More sharing options...
Igor Posted August 11, 2020 Share Posted August 11, 2020 2 hours ago, daisuke said: I checked out v20.05 You need to create a file .ignore_changes in the build directory. Not sure if this is a bug ... but this way it will remain on a checked bnanch. But anyway - sources will not be in the repository since we don't build and host sources for each upstream version. If you need the exact version, build image (upgrade deb pack) with BUILD_KSRC="yes" I think default is to build it. https://docs.armbian.com/Developer-Guide_Build-Options/ https://github.com/armbian/build/blob/master/lib/compilation.sh#L324-L335 Link to comment Share on other sites More sharing options...
Werner Posted August 11, 2020 Share Posted August 11, 2020 2 minutes ago, Igor said: . If you need them, build image with BUILD_KSRC="yes" But wont be pre-installed on the image. Just to mention... Link to comment Share on other sites More sharing options...
Igor Posted August 11, 2020 Share Posted August 11, 2020 INSTALL_KSRC="yes" and they should be: https://github.com/armbian/build/blob/master/lib/distributions.sh#L321-L323 Link to comment Share on other sites More sharing options...
Werner Posted August 11, 2020 Share Posted August 11, 2020 Just now, Igor said: INSTALL_KSRC="yes" Well that flag isn't documented. I'll fix that. 1 Link to comment Share on other sites More sharing options...
Guest Posted August 11, 2020 Share Posted August 11, 2020 Quote You need to create a file .ignore_changes in the build directory. Not sure if this is a bug ... but this way it will remain on a checked bnanch. I found it in the document after posting this and now I've being trying it, thanks. Quote INSTALL_KSRC="yes" I will try this option as well later on. Link to comment Share on other sites More sharing options...
Guest Posted August 12, 2020 Share Posted August 12, 2020 Putting the .ignore_changes did work fine. The original title was a little bit wrong. What I wanted to do is to build a v20.05 image and to get its kernel source code (the actual version is 5.4.57 rather than 5.7.14). The correct way to do it is Clone the master (https://github.com/armbian/build.git) Run vagrant if necessary (cd ./config/templates; vagrant up; vagrant ssh; cd armbian) Run sudo git checkout origin/v20.05 Run sudo touch .ignore_changes Run ./compile.sh BOARD=tinkerboard RELEASE=buster BRANCH=current BUILD_DESKTOP=no KERNEL_ONLY=no KERNEL_CONFIGURE=no INSTALL_HEADERS=yes BUILD_MINIMAL=yes INSTALL_KSRC=yes And the following file was created under output/images. Armbian_20.05.7_Tinkerboard_buster_current_5.4.57_minimal.img The image file includes a src archive file on /usr/src. root@tinkerboard:~# ls /usr/src/ linux-headers-5.4.57-rockchip linux-rockchip-current_5.4.57_20.05.7_config.xz linux-source-5.4.57-rockchip.tar.xz Thanks guys. Link to comment Share on other sites More sharing options...
Recommended Posts