Category Archives: Kernel

Source Code

Cisco 8811 chip : Broadcom Cygnus Soc

Mailing list: https://lore.kernel.org/lkml/1410897497-27527-1-git-send-email-jonathar@broadcom.com/

Linux/Kernel -> Android-> Qualcomm -> LineageOS

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/

https://android.googlesource.com/

https://source.codeaurora.org/quic/la/

https://github.com/LineageOS/android

Some:

https://github.com/aosp-mirror/platform_build/blob/android-p-preview-5/envsetup.sh 

https://source.codeaurora.org/quic/la/platform/build/tree/envsetup.sh?h=LA.UM.6.4.r4

https://source.codeaurora.org/quic/la/platform/build/tree/envsetup.sh?h=ks-aosp.lnx.1.0.r4-rel&id=b7f1eff7eb6d94b32936f791936b3d7821cf26df

https://github.com/LineageOS/android_device_xiaomi_msm8953-common/blob/lineage-15.1/extract-files.sh

https://github.com/LineageOS/android_vendor_lineage/blob/lineage-15.1/build/tools/extract_utils.sh

https://wiki.codeaurora.org/xwiki/bin/QAEP

Review:

https://android-review.googlesource.com/q/status:open

Openwrt:

https://git.openwrt.org/?p=openwrt/openwrt.git;a=summary

 

Linux Firmware

Many devices require a firmware to operate. Historically, firmware were built-into the device’s ROM or Flash memory, but more and more often, the firmware has to be loaded into the device by the driver during the device initialization. From: Debian Wiki

Azurewave AW-CM389MA 芯片是Marvell 88W8897 From: Techship, 接口是SDIO, 驱动是mwifiex

FreeBSD lacks SDIO support and is not able to talk to the peripheral devices behind SDIO.

Github问题

小米5s Plus (Natrium) Lineageos 提示的20180606更新log文件看到了很多更新细节.

回来看代码库commits发现如下图之细节,很是不解: 为何13天以前提交的更新会在6月4日显示为Commits. 随后打开页面察看细节.

通过几天的思考和寻找,终于在Gerrit找到了答案,bgcngm在6月4日提交了Jaegeuk Kim在很久之前更改的代码。至于如何作这种提交操作,还不是很清楚。

通过了解页面上的关键字 FROMLISTCherry-picked, 了解到此次变更一定是从另一个库调用过来的.

在Torvalds Linux主库上没有找到此变更,随后通过搜索f2fs: early updates queued for v4.18-rc1 在googlesource上找到了此变更.

主代码库应该是https://kernel.googlesource.com/pub/scm/linux/kernel/git/jaegeuk/f2fs-stable/+/linux-3.18.y

 

Android kernel Goldfish

The Android emulator runs a virtual CPU that Google calls Goldfish.
Goldfish executes ARM926T instructions and has hooks for input and
output — such as reading key presses from or displaying video output
in the emulator. These interfaces are implemented in files specific to
the Goldfish emulator and will not be compiled into a kernel that runs
on real devices.

From: Google Group

Kernel

What is Linux?

Linux is a clone of the operating system Unix, written from scratch by Linus Torvalds with assistance from a loosely-knit team of hackers across the Net. It aims towards POSIX and Single UNIX Specification compliance.

It has all the features you would expect in a modern fully-fledged Unix, including true multitasking, virtual memory, shared libraries, demand loading, shared copy-on-write executables, proper memory management, and multistack networking including IPv4 and IPv6.

It is distributed under the GNU General Public License v2 – see the accompanying COPYING file for more details.

On what hardware does it run?

Although originally developed first for 32-bit x86-based PCs (386 or higher), today Linux also runs on (at least) the Compaq Alpha AXP, Sun SPARC and UltraSPARC, Motorola 68000, PowerPC, PowerPC64, ARM, Hitachi SuperH, Cell, IBM S/390, MIPS, HP PA-RISC, Intel IA-64, DEC VAX, AMD x86-64 Xtensa, and ARC architectures.

Linux is easily portable to most general-purpose 32- or 64-bit architectures as long as they have a paged memory management unit (PMMU) and a port of the GNU C compiler (gcc) (part of The GNU Compiler Collection, GCC). Linux has also been ported to a number of architectures without a PMMU, although functionality is then obviously somewhat limited. Linux has also been ported to itself. You can now run the kernel as a userspace application – this is called UserMode Linux (UML).


Kernel

The Linux kernel is an extremely important part of the software on nearly every Android device. This section describes Linux kernel development and release models (below), stable and long-term supported (LTS) kernels(including why all Android devices should use stable releases instead of cherry picking patches), kernelconfiguration and hardening, requirements for interfaces and the modular kernels (introduced in Android O), kernel debugging and network testing, and SquashFS.

Linux kernel development

The Linux kernel is the largest collaborative software project ever. In 2016, over 4,000 different developers from over 450 different companies contributed to the project and there were 6 releases, each containing between 12,000 and 16,000 different changes. At the end of 2016 the size of the Linux kernel was just over 56 thousand files, consisting of 22 million lines of code, build scripts, and documentation (kernel release 4.9). (For full Linux development statistics, refer to https://kernelnewbies.org/DevelopmentStatistics.)

While the Linux kernel contains code for all the different chip architectures and hardware drivers it supports, an individual system runs only a fraction of the codebase. An average laptop uses around 2 million lines of kernel code from 5 thousand files to function properly, while the Pixel phone uses 3.2 million lines of kernel code from 6 thousand files (due to the increased complexity of an SoC).

Linux kernel releases

The Linux kernel uses a release model that differs substantially from standard AOSP releases. With the release of the 2.6 kernel in December of 2003, the kernel developer community switched from the previous model of having a separate development and stable kernel branch, and moved to a stable only branch model. In this model, a new release occurred every 2 to 3 months, and that release was declared stable and recommended for all users to run. This change in development model was due to the very long release cycle prior to the 2.6 kernel (almost 3 years), and the struggle to maintain two different branches of the codebase at the same time.

The numbering of the kernel releases began at 2.6.x, where x was an incrementing number that changed on every release (the value of the number has no meaning, other than it is newer than the previous kernel release). The kernel version since then has now moved to 4.x accounting for 2 major version changes. These version numbers are chosen by the maintainer(s) only to avoid confusion among users caused by higher minor release numbers.

Android Kernel version

Kernel version requirements:

  • All SoCs productized in 2017 must launch with kernel 4.4 or newer.
  • All other SoCs launching new Android devices running Android 8.0 must use kernel 3.18 or newer.
  • Regardless of launch date, all SoCs with device launches on Android 8.0 remain subject to kernel changes required to enable Treble.
  • Older Android devices released prior to Android 8.0 but that will be upgraded to Android 8.0 can continue to use their original base kernel version if desired.

Source: AOSP