DeployingANewMachine
Jump to navigation
Jump to search
Creating a new Machine from an existing Machine definition[edit | edit source]
In this example, we are copying the machine definition vr-om37-asdfridge and making one for vr-om37-asdfridge-gen3
All these steps are on embedded-dev.
Machine file[edit | edit source]
- start in this directory: /home/yocto-danny/poky/meta-venture/conf/machine on embedded-dev
- cp vr-om37-asdfridge.conf vr-om37-asdfridge-gen3.conf
- most of the configuration is done in the recipes instead of this file though.
Kernel recipe[edit | edit source]
- next directory: /home/yocto-danny/poky/meta-venture/recipes-kernel/linux
- edit linux-omap3-venture_2.6.37.bb
- add the new machine to COMPATIBLE_MACHINE (todo: autodetect vr*am35 or vr*om37 in machine name)
- add the new machine as a DEFAULT_PREFERENCE (DEFAULT_PREFERENCE_vr-om37-asdfridge-gen3 = "1") (todo: PREFERRED_PROVIDER in machine.conf?)
- add extra patches in the SRC_URI definition for that machine (todo: use git per-machine branches for this)
- adding all TODOs would eliminate the need to edit this file for new machines...
- copy kernel defconfig file from old device
mkdir /home/yocto-danny/poky/meta-venture/recipes-kernel/linux/linux-omap3-venture/vr-om37-asdfridge-gen3 cp /home/yocto-danny/poky/meta-venture/recipes-kernel/linux/linux-omap3-venture/vr-om37-asdfridge/defconfig /home/yocto-danny/poky/meta-venture/recipes-kernel/linux/linux-omap3-venture/vr-om37-asdfridge-gen3/defconfig
Adding kernel patches[edit | edit source]
- Probably best for an example... in this case, for the new LCD (in linux kernel git dir):
venture@embedded-dev:~/git/linux-omap3-venture$ git checkout -b new-lcd-1024-600 Switched to a new branch 'new-lcd-1024-600' venture@embedded-dev:~/git/linux-omap3-venture$ vi drivers/video/omap2/displays/panel-venture.c venture@embedded-dev:~/git/linux-omap3-venture$ git commit -am "Timings for HannStar HSD100IFW4-A @ 54 MHz pixclock" [new-lcd-1024-600 88857c2] Timings for HannStar HSD100IFW4-A @ 54 MHz pixclock 1 file changed, 8 insertions(+), 9 deletions(-) venture@embedded-dev:~/git/linux-omap3-venture$ git format-patch HEAD~1 0001-Timings-for-HannStar-HSD100IFW4-A-54-MHz-pixclock.patch
- copy any kernel patches into `/home/yocto-danny/poky/meta-venture/recipes-kernel/linux/linux-omap3-venture/(MACHINE)/
venture@embedded-dev:~/git/linux-omap3-venture$ cp 0001-Timings-for-HannStar-HSD100IFW4-A-54-MHz-pixclock.patch /home/yocto-danny/poky/meta-venture/recipes-kernel/linux/linux-omap3-venture/vr-om37-asdfridge-gen3/
- (switch to yocto build env) add line for SRC_URI:
[YOCTO-DANNY] /home/yocto-danny/poky/build $ vi ../meta-venture/recipes-kernel/linux/linux-omap3-venture_2.6.37.bb ... SRC_URI_append_vr-om37-asdfridge-gen3 += "file://0001-Timings-for-HannStar-HSD100IFW4-A-54-MHz-pixclock.patch" ...
u-boot[edit | edit source]
- edit [YOCTO-DANNY] /home/yocto-danny/poky/build $ vi ../meta-venture/recipes-kernel/u-boot/u-boot_git.bb
- clone old device entry, change machine name to match
- if branch or pegged commit needs to change, do that here as well (and in git, if course, remember to git push)
vr-setup-gpio[edit | edit source]
- in svn dir, add entry for new machine
kevinb@embedded-dev:~/svn/vr/linux/src/vrreader-board-utils$ svn cp vr-setup-gpio-vr-om37-asdfridge vr-setup-gpio-vr-om37-asdfridge-gen3 A vr-setup-gpio-vr-om37-asdfridge-gen3 kevinb@embedded-dev:~/svn/vr/linux/src/vrreader-board-utils$ svn ci -m "adding vr-setup-gpio file for vr-om37-asdfridge-gen3 MACHINE" Adding vrreader-board-utils/vr-setup-gpio-vr-om37-asdfridge-gen3 Committed revision 630.
- then edit the vr-setup-gpio.bb file and bump SRCREV:
venture@embedded-dev:/home/yocto-danny/poky/build$ vi ../meta-venture/recipes-venture/vrreader-board-utils/vr-setup-gpio.bb
... SRCREV="630" ...
splash image[edit | edit source]
is machine-specific.
/home/yocto-danny/poky/meta-venture/recipes-core/psplash $ vi psplash_git.bbappend
x server[edit | edit source]
is machine specific.
/home/yocto-danny/poky/meta-venture/recipes-graphics/xorg-xserver/xserver-xf86-config $ cp -r vr-om37-asdfridge/ vr-om37-asdfridge-gen3
do the build![edit | edit source]
- in yocto build env:
[YOCTO-DANNY] /home/yocto-danny/poky/build $ MACHINE=vr-om37-asdfridge-gen3 bitbake venture-image-asdfridge