Skip to content
This repository has been archived by the owner on Apr 25, 2019. It is now read-only.

Commit

Permalink
Update README.md for LineageOS, kernel modules
Browse files Browse the repository at this point in the history
Signed-off-by: James Christopher Adduono <[email protected]>
  • Loading branch information
jcadduono committed Mar 1, 2019
1 parent 8bddf3b commit e3e2ea7
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ You can find that here: https://github.com/offensive-security/kali-nethunter/tre
All devices are contained in devices.cfg. If you want to add your own device you would add something like:

```sh
# Full device name for CyanogenMod (or some other ROM)
# Full device name for LineageOS (or some other ROM)
[codename]
author = "Your Name"
version = "1.0"
Expand All @@ -21,8 +21,8 @@ ramdisk = gzip
block = /dev/block/WHATEVER/by-name/boot
devicenames = codename codename2_if_it_has_one
```
Some devices have more then one codename like the OnePlus One, or variants like the Nexus 7 2012/2013. You should add multiple codenames to devicenames.
Getting the block location isn't too difficult, you can look at other kernels to see where they are installing their boot.img or you can also look at CyanogenMod device repo in the BoardConfig.mk file.
Some devices have more than one codename like the OnePlus One, or variants like the Nexus 7 2012/2013. You should add multiple codenames to devicenames.
Getting the block location isn't too difficult, you can look at other kernels to see where they are installing their boot.img or you can also look at LineageOS device repo in the BoardConfig.mk file.

All fields are optional except the [codename] entry. It's recommended that you leave out any defaults from your device entry to keep it short.
Here are the device entry option defaults:
Expand All @@ -45,7 +45,7 @@ As a last resort, you can also include:
`getprop ro.product.name`
Keep in mind that each name is space delimited, and you can't quote them, so don't use values with spaces in them!

If porting for CyanogenMod rather than stock, it's recommended to append cm to the codename in [], ex. `[codenamecm]`
If porting for LineageOS rather than stock, it's recommended to append -los to the codename in [], ex. `[codename-los]`

Once you have a device added to devices.cfg, you need to add a prebuilt kernel to the device's folder.
It should be formatted as:
Expand All @@ -54,6 +54,12 @@ It should be formatted as:

Some devices may require a separate dtb file. You can place a `dtb.img` file in the same location as the kernel image, and it will be automatically added to the installer.

If you choose to build kernel modules for your device instead of including them in the kernel image, they can be placed at the location:
`[androidversion]/[codename]/modules/*.ko` or `[androidversion]/[codename]/modules/[kernelversion]/...`
Please use the latter when possible by preparing your kernel modules for install (modprobe support) with the command:
`make INSTALL_MOD_PATH="." INSTALL_MOD_STRIP=1 modules_install`
Alternatively, use the build scripts mentioned below which do this already!

So really all you need is a kernel image and sometimes a dtb.img to build for a new device.

Don't forget to add your newly supported device's kernel sources to the kernels.txt file!
Expand All @@ -68,4 +74,4 @@ The binary output from the build will be self-contained in a `build` folder, wit
Using these scripts in your source tree will make it easier for others to make modifications and update your device in the future. It will also increase the likelihood your device will be accepted into the nethunter-devices repository as an officially supported device!


Thu Feb 28 20:43:37 EST 2019
Thu Feb 28 21:05:22 EST 2019

0 comments on commit e3e2ea7

Please sign in to comment.