en:bpi-r2:kernel
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
en:bpi-r2:kernel [2018/09/26 18:16] – [compiled 4.14.x] frank | en:bpi-r2:kernel [2023/06/08 17:06] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== Kernel ====== | ||
+ | ===== Overview ===== | ||
+ | using which Kernel? | ||
+ | Kernel-features-overview on [[https:// | ||
+ | ===== compile official kernel ===== | ||
+ | 4.4.70 on [[https:// | ||
+ | |||
+ | sudo apt-get install git make gcc-arm-linux-gnueabihf u-boot-tools | ||
+ | git clone https:// | ||
+ | cd bpi-r2 | ||
+ | ./ | ||
+ | |||
+ | see also [[https:// | ||
+ | |||
+ | * Option 4 kernel-config (menuconfig), | ||
+ | * 1 to compile all, | ||
+ | * 3 compile only Kernel, after that option 6, to copy compiled data to SD-folder | ||
+ | |||
+ | if successful finished, Kernel is in folder SD/BPI-BOOT modules in SD/BPI-ROOT | ||
+ | |||
+ | kernel can be copied to Boot-Partition (path, previous Backup!) | ||
+ | the modules must be copied as Root | ||
+ | |||
+ | cp SD/ | ||
+ | sudo cp -r SD/ | ||
+ | |||
+ | ===== compile my 4.4 Kernel ===== | ||
+ | i have forked the official kernel-repo and updated to actual kernel-version, | ||
+ | |||
+ | 4.4.x on [[https:// | ||
+ | |||
+ | steps to build/ | ||
+ | |||
+ | sudo apt-get install git make gcc-arm-linux-gnueabihf u-boot-tools | ||
+ | git clone https:// | ||
+ | cd bpi-r2 | ||
+ | ./build.sh | ||
+ | |||
+ | ==== compiled kernel 4.4.x ==== | ||
+ | |||
+ | v1.2.1 (Nov 23, 2017), | ||
+ | |||
+ | Bootloader (u-boot): https:// | ||
+ | |||
+ | https:// | ||
+ | |||
+ | |||
+ | the 4.4-archive (Kernelversion-BPI-R2-Kernel_boot+root.tgz) contains 2 folders, which contents have to be copied to the partiton of SD/MMC with the same name. | ||
+ | |||
+ | * BPI-BOOT => boot-Partition uImage=Kernel-file, | ||
+ | * BPI-ROOT => partition with root-fs, here are the kernel-modules (/ | ||
+ | ===== using own (newer) Kernel ===== | ||
+ | http:// | ||
+ | |||
+ | ==== using my github-repo ==== | ||
+ | https:// | ||
+ | |||
+ | ==== manual way using kernel.org ==== | ||
+ | |||
+ | < | ||
+ | <code bash> | ||
+ | sudo apt-get install git make gcc-arm-linux-gnueabihf u-boot-tools | ||
+ | git clone https:// | ||
+ | cd bpi-r2 | ||
+ | |||
+ | export CROSS_COMPILE=arm-linux-gnueabihf- | ||
+ | export ARCH=arm | ||
+ | export INSTALL_MOD_PATH=$(pwd)/ | ||
+ | mkdir $INSTALL_MOD_PATH | ||
+ | |||
+ | #git reset --hard v4.14 | ||
+ | cp pfad/ | ||
+ | make mt7623n_evb_bpi_defconfig | ||
+ | make | ||
+ | |||
+ | ... | ||
+ | |||
+ | #cat arch/ | ||
+ | cat arch/ | ||
+ | #mkimage -A arm -O linux -C none -T kernel -a 0x80008000 -e 0x80008000 -d zImage_dtb uImage | ||
+ | mkimage -A arm -O linux -T kernel -C none -a 80008000 -e 80008000 -n "Linux Kernel 4.14" -d arch/ | ||
+ | | ||
+ | rm -r $INSTALL_MOD_PATH/ | ||
+ | make modules_install | ||
+ | | ||
+ | cp uImage / | ||
+ | sudo cp -r $INSTALL_MOD_PATH/ | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | {{ : | ||
+ | {{ : | ||
+ | |||
+ | {{ : | ||
+ | |||
+ | {{ : | ||
+ | {{ : | ||
+ | |||
+ | |||
+ | above 4.14.14 only pcie-patch may be needed.. | ||
+ | |||
+ | with kernel 4.4.70 mmc0=sd-card and mmc1=emmc, so i have done this also for kernel 4.14 (else you have to change u-boots uenv.txt and Mount-Points in system) | ||
+ | |||
+ | to do this set mmc1-section above mmc0-section arch/ | ||
+ | |||
+ | ==== how to use the build.sh ==== | ||
+ | |||
+ | with my [[https:// | ||
+ | |||
+ | sudo apt-get install git make gcc-arm-linux-gnueabihf | ||
+ | git clone https:// | ||
+ | cd bpi-r2-4.14 | ||
+ | ./build.sh importconfig | ||
+ | ./build.sh config #if you want to change the kernel-config | ||
+ | ./build.sh | ||
+ | |||
+ | ==== compiled 4.14.x ==== | ||
+ | |||
+ | https:// | ||
+ | |||
+ | the 4.14-archive (bpi-r2_kernelversion_gitbranch.tar.gz) contains 2 folders, which contents have to be copied to the partiton of SD/MMC with the same name. | ||
+ | |||
+ | * BPI-BOOT => boot-Partition, | ||
+ | * BPI-ROOT => partition with root-fs, here are the kernel-modules (/ | ||
+ | |||
+ | there are also binary-packages on github-releases (made by travis-ci) with same file-structure: | ||
+ | |||
+ | you can use this {{ : | ||
+ | ===== install kernel ===== | ||
+ | |||
+ | The linux-kernel has 2 parts...the " | ||
+ | |||
+ | The kernel-image is loaded by uboot from BPI-BOOT-Partition folder bananapi/ | ||
+ | By default the file " | ||
+ | |||
+ | the modules have to be put to BPI-ROOT-partition (/ | ||
+ | |||
+ | ===== change DTS (device tree) ===== | ||
+ | |||
+ | using dts(i)-nodes (arch/ | ||
+ | |||
+ | * [[https:// | ||
+ | * [[https:// | ||
+ | |||
+ | ===== issues ===== | ||
+ | |||
+ | * evbug will be loaded and displays messages on terminal if local keyboard is connected | ||
+ | * you can disable via " |
en/bpi-r2/kernel.txt · Last modified: 2023/06/08 17:06 by 127.0.0.1