11#OpenBMC kernel development
22
33The OpenBMC project maintains a kernel tree for use by the project. The tree's
4- general development policy is that code must be upstream first. This isa strong
5- requirement, not a hard requirement, and exceptionswill be made on a
4+ general development policy is that code must be upstream first. This isstrongly
5+ desirable but not a hard requirement, and exceptionsmay be made on a
66case-by-case basis. If in doubt, start a discussion on the mailing list.
77
88The OpenBMC kernel tree is hosted at< https://github.com/openbmc/linux > and
@@ -22,17 +22,17 @@ desirable:
2222If you require a patch added to the tree, follow these steps:
2323
24241 . Submit your patch upstream. It doesn't need to be upstream, but it should be
25- on it's way
25+ on it's way, and not have any unresolved design concerns
26262 . Use
27- ` git format-patch --subject-prefix="PATCH linuxdev-4.7 " --to=openbmc@lists.ozlabs.org --to=joel@jms.id.au `
27+ ` git format-patch --subject-prefix="PATCH linux${BRANCH} " --to=openbmc@lists.ozlabs.org --to=joel@jms.id.au --to=andrew@codeconstruct.com .au `
2828 to create a formatted patch
2929
3030##Developing a new driver
3131
3232When developing a new driver, your goal is to have the code accepted upstream.
3333The first step should be to check that there is no existing driver for the
34- hardware you wish to support. Check the OpenBMC` - dev` tree , check upstream, and
35- if you do not find support there ask on the mailing list.
34+ hardware you wish to support. Check the OpenBMC` dev- ` branches , check upstream,
35+ and if you do not find support there ask on the mailing list.
3636
3737Once you are sure a driver needs to be written, you should develop and test the
3838driver, before sending it upstream to the relevant maintainers. You should feel
@@ -55,8 +55,8 @@ decide how best to include your code in the OpenBMC tree.
5555There are cases where waiting for upstream acceptance will delay the bring-up of
5656a new system. This should be avoided through careful planning and early
5757development of the features upstream, but where this has not happened we can
58- chose to carry the patches in the OpenBMC tree whilethe upstream development is
59- ongoing .
58+ choose to carry the patches in the OpenBMC tree while upstream development
59+ continues .
6060
6161Another exception to the upstream first rule is where patches are modifying
6262files that are not upstream. This currently includes the aspeed board file
@@ -69,22 +69,8 @@ email to the OpenBMC list to get the opinion of the kernel developers. Patches
6969to` aspeed.c ` will be treated with some prejudice as the file will be removed
7070once we have drivers for all of the Aspeed peripherals.
7171
72- ##Getting existing code in the tree
73-
74- The OpenBMC kernel is currently based on the 4.7 series. If there is upstream
75- code you would like backported, send it to the list. Be sure to include the
76- upstream commit SHA in the commit message.
77-
7872##Testing
7973
80- When modifying the tree we currently test on the following platforms:
81-
82- - Palmetto, an OpenPower Power8 box containing an ast2400 with NCSI networking
83- - ast2500-evb, the Aspeed dev board with two PHYs
84- - Witherspoon, an OpenPower Power9 box containing an ast2500 with NCSI
85- networking
86- - qemu-plametto and qemu-romulus
87-
8874Before submitting patches it is recommended you boot test on at least the Qemu
8975platforms, and whatever hardware you have available.
9076
@@ -101,18 +87,19 @@ You can build a kernel out of the yocto environment, by using the initramfs
10187make ARCH=arm \
10288 O=obj \
10389 CROSS_COMPILE=arm-linux-gnueabihf- \
104- CONFIG_INITRAMFS_SOURCE=/path/tp /obmc-phosphor-image-palmetto.cpio.gz
90+ CONFIG_INITRAMFS_SOURCE=... /obmc-phosphor-image-palmetto.cpio.gz
10591```
10692
10793(adjust` O ` and` CROSS_COMPILE ` parameters as appropriate).
10894
109- You'll need to use` aspeed_g4_defconfig ` or ` aspeed_g5_defconfig ` as your base
110- kernel configuration.
95+ You'll need to usea relevant BMC defconfig (e.g. ` aspeed_g4_defconfig ` or
96+ ` aspeed_g5_defconfig ` ) as your base kernel configuration.
11197
112- The cpio can be found in the following yocto output directory:
98+ The cpio can be found under the relevant machine directory in the following
99+ yocto output directory:
113100
114101``` sh
115- build/tmp/deploy/images/palmetto/
102+ build/tmp/deploy/images/
116103```
117104
118105###Building a uImage