From eb8dc40360f0cfef56fb6947cc817a547d6d9bc6 Mon Sep 17 00:00:00 2001 From: Dave Cobbley Date: Tue, 14 Aug 2018 10:05:37 -0700 Subject: [Subtree] Removing import-layers directory As part of the move to subtrees, need to bring all the import layers content to the top level. Change-Id: I4a163d10898cbc6e11c27f776f60e1a470049d8f Signed-off-by: Dave Cobbley Signed-off-by: Brad Bishop --- poky/meta-yocto-bsp/README.hardware | 407 +++++++++++++++++++++ poky/meta-yocto-bsp/conf/layer.conf | 12 + .../conf/machine/beaglebone-yocto.conf | 40 ++ poky/meta-yocto-bsp/conf/machine/edgerouter.conf | 26 ++ .../meta-yocto-bsp/conf/machine/genericx86-64.conf | 10 + poky/meta-yocto-bsp/conf/machine/genericx86.conf | 10 + .../conf/machine/include/genericx86-common.inc | 25 ++ poky/meta-yocto-bsp/conf/machine/mpc8315e-rdb.conf | 35 ++ .../lib/oeqa/controllers/__init__.py | 0 .../lib/oeqa/controllers/beaglebonetarget.py | 98 +++++ .../lib/oeqa/controllers/edgeroutertarget.py | 90 +++++ .../lib/oeqa/controllers/grubtarget.py | 71 ++++ .../lib/oeqa/selftest/cases/systemd_boot.py | 98 +++++ .../formfactor/beaglebone-yocto/machconfig | 3 + .../formfactor/formfactor/genericx86-64/machconfig | 6 + .../formfactor/formfactor/genericx86/machconfig | 6 + .../recipes-bsp/formfactor/formfactor_0.0.bbappend | 1 + .../gma500-gfx-check/gma500-gfx-check.conf | 2 + .../gma500-gfx-check/gma500-gfx-check.sh | 15 + .../gma500-gfx-check/gma500-gfx-check_1.0.bb | 18 + .../xserver-xf86-config/beaglebone-yocto/xorg.conf | 20 + .../xserver-xf86-config/genericx86-64/xorg.conf | 0 .../xserver-xf86-config/genericx86/xorg.conf | 0 .../xorg-xserver/xserver-xf86-config_0.1.bbappend | 1 + .../recipes-kernel/linux/linux-yocto_4.12.bbappend | 28 ++ .../recipes-kernel/linux/linux-yocto_4.14.bbappend | 27 ++ .../recipes-kernel/linux/linux-yocto_4.15.bbappend | 27 ++ poky/meta-yocto-bsp/wic/beaglebone-yocto.wks | 6 + poky/meta-yocto-bsp/wic/edgerouter.wks | 4 + poky/meta-yocto-bsp/wic/genericx86.wks | 7 + poky/meta-yocto-bsp/wic/mpc8315e-rdb.wks | 4 + 31 files changed, 1097 insertions(+) create mode 100644 poky/meta-yocto-bsp/README.hardware create mode 100644 poky/meta-yocto-bsp/conf/layer.conf create mode 100644 poky/meta-yocto-bsp/conf/machine/beaglebone-yocto.conf create mode 100644 poky/meta-yocto-bsp/conf/machine/edgerouter.conf create mode 100644 poky/meta-yocto-bsp/conf/machine/genericx86-64.conf create mode 100644 poky/meta-yocto-bsp/conf/machine/genericx86.conf create mode 100644 poky/meta-yocto-bsp/conf/machine/include/genericx86-common.inc create mode 100644 poky/meta-yocto-bsp/conf/machine/mpc8315e-rdb.conf create mode 100644 poky/meta-yocto-bsp/lib/oeqa/controllers/__init__.py create mode 100644 poky/meta-yocto-bsp/lib/oeqa/controllers/beaglebonetarget.py create mode 100644 poky/meta-yocto-bsp/lib/oeqa/controllers/edgeroutertarget.py create mode 100644 poky/meta-yocto-bsp/lib/oeqa/controllers/grubtarget.py create mode 100644 poky/meta-yocto-bsp/lib/oeqa/selftest/cases/systemd_boot.py create mode 100644 poky/meta-yocto-bsp/recipes-bsp/formfactor/formfactor/beaglebone-yocto/machconfig create mode 100644 poky/meta-yocto-bsp/recipes-bsp/formfactor/formfactor/genericx86-64/machconfig create mode 100644 poky/meta-yocto-bsp/recipes-bsp/formfactor/formfactor/genericx86/machconfig create mode 100644 poky/meta-yocto-bsp/recipes-bsp/formfactor/formfactor_0.0.bbappend create mode 100644 poky/meta-yocto-bsp/recipes-bsp/gma500-gfx-check/gma500-gfx-check/gma500-gfx-check.conf create mode 100644 poky/meta-yocto-bsp/recipes-bsp/gma500-gfx-check/gma500-gfx-check/gma500-gfx-check.sh create mode 100644 poky/meta-yocto-bsp/recipes-bsp/gma500-gfx-check/gma500-gfx-check_1.0.bb create mode 100644 poky/meta-yocto-bsp/recipes-graphics/xorg-xserver/xserver-xf86-config/beaglebone-yocto/xorg.conf create mode 100644 poky/meta-yocto-bsp/recipes-graphics/xorg-xserver/xserver-xf86-config/genericx86-64/xorg.conf create mode 100644 poky/meta-yocto-bsp/recipes-graphics/xorg-xserver/xserver-xf86-config/genericx86/xorg.conf create mode 100644 poky/meta-yocto-bsp/recipes-graphics/xorg-xserver/xserver-xf86-config_0.1.bbappend create mode 100644 poky/meta-yocto-bsp/recipes-kernel/linux/linux-yocto_4.12.bbappend create mode 100644 poky/meta-yocto-bsp/recipes-kernel/linux/linux-yocto_4.14.bbappend create mode 100644 poky/meta-yocto-bsp/recipes-kernel/linux/linux-yocto_4.15.bbappend create mode 100644 poky/meta-yocto-bsp/wic/beaglebone-yocto.wks create mode 100644 poky/meta-yocto-bsp/wic/edgerouter.wks create mode 100644 poky/meta-yocto-bsp/wic/genericx86.wks create mode 100644 poky/meta-yocto-bsp/wic/mpc8315e-rdb.wks (limited to 'poky/meta-yocto-bsp') diff --git a/poky/meta-yocto-bsp/README.hardware b/poky/meta-yocto-bsp/README.hardware new file mode 100644 index 000000000..d8d2a0cac --- /dev/null +++ b/poky/meta-yocto-bsp/README.hardware @@ -0,0 +1,407 @@ + Yocto Project Hardware Reference BSPs README + ============================================ + +This file gives details about using the Yocto Project hardware reference BSPs. +The machines supported can be seen in the conf/machine/ directory and are listed +below. There is one per supported hardware architecture and these are primarily +used to validate that the Yocto Project works on the hardware arctectures of +those machines. + +If you are in doubt about using Poky/OpenEmbedded/Yocto Project with your hardware, +consult the documentation for your board/device. + +Support for additional devices is normally added by adding BSP layers to your +configuration. For more information please see the Yocto Board Support Package +(BSP) Developer's Guide - documentation source is in documentation/bspguide or +download the PDF from: + + http://yoctoproject.org/documentation + +Note that these reference BSPs use the linux-yocto kernel and in general don't +pull in binary module support for the platforms. This means some device functionality +may be limited compared to a 'full' BSP which may be available. + + +Hardware Reference Boards +========================= + +The following boards are supported by the meta-yocto-bsp layer: + + * Texas Instruments Beaglebone (beaglebone-yocto) + * Freescale MPC8315E-RDB (mpc8315e-rdb) + * Ubiquiti Networks EdgeRouter Lite (edgerouter) + * General IA platforms (genericx86 and genericx86-64) + +For more information see the board's section below. The appropriate MACHINE +variable value corresponding to the board is given in brackets. + +Reference Board Maintenance +=========================== + +Send pull requests, patches, comments or questions about meta-yocto-bsps to poky@yoctoproject.org + +Maintainers: Kevin Hao + Bruce Ashfield + +Consumer Devices +================ + +The following consumer devices are supported by the meta-yocto-bsp layer: + + * Intel x86 based PCs and devices (genericx86) + * Ubiquiti Networks EdgeRouter Lite (edgerouter) + +For more information see the device's section below. The appropriate MACHINE +variable value corresponding to the device is given in brackets. + + + + Specific Hardware Documentation + =============================== + + +Intel x86 based PCs and devices (genericx86*) +============================================= + +The genericx86 and genericx86-64 MACHINE are tested on the following platforms: + +Intel Xeon/Core i-Series: + + Intel NUC5 Series - ix-52xx Series SOC (Broadwell) + + Intel NUC6 Series - ix-62xx Series SOC (Skylake) + + Intel Shumway Xeon Server + +Intel Atom platforms: + + MinnowBoard MAX - E3825 SOC (Bay Trail) + + MinnowBoard MAX - Turbot (ADI Engineering) - E3826 SOC (Bay Trail) + - These boards can be either 32bot or 64bit modes depending on firmware + - See minnowboard.org for details + + Intel Braswell SOC + +and is likely to work on many unlisted Atom/Core/Xeon based devices. The MACHINE +type supports ethernet, wifi, sound, and Intel/vesa graphics by default in +addition to common PC input devices, busses, and so on. + +Depending on the device, it can boot from a traditional hard-disk, a USB device, +or over the network. Writing generated images to physical media is +straightforward with a caveat for USB devices. The following examples assume the +target boot device is /dev/sdb, be sure to verify this and use the correct +device as the following commands are run as root and are not reversable. + +USB Device: + 1. Build a live image. This image type consists of a simple filesystem + without a partition table, which is suitable for USB keys, and with the + default setup for the genericx86 machine, this image type is built + automatically for any image you build. For example: + + $ bitbake core-image-minimal + + 2. Use the "dd" utility to write the image to the raw block device. For + example: + + # dd if=core-image-minimal-genericx86.hddimg of=/dev/sdb + + If the device fails to boot with "Boot error" displayed, or apparently + stops just after the SYSLINUX version banner, it is likely the BIOS cannot + understand the physical layout of the disk (or rather it expects a + particular layout and cannot handle anything else). There are two possible + solutions to this problem: + + 1. Change the BIOS USB Device setting to HDD mode. The label will vary by + device, but the idea is to force BIOS to read the Cylinder/Head/Sector + geometry from the device. + + 2. Use a ".wic" image with an EFI partition + + a) With a default grub-efi bootloader: + # dd if=core-image-minimal-genericx86-64.wic of=/dev/sdb + + b) Use systemd-boot instead + - Build an image with EFI_PROVIDER="systemd-boot" then use the above + dd command to write the image to a USB stick. + + +Texas Instruments Beaglebone (beaglebone-yocto) +========================================= + +The Beaglebone is an ARM Cortex-A8 development board with USB, Ethernet, 2D/3D +accelerated graphics, audio, serial, JTAG, and SD/MMC. The Black adds a faster +CPU, more RAM, eMMC flash and a micro HDMI port. The beaglebone MACHINE is +tested on the following platforms: + + o Beaglebone Black A6 + o Beaglebone A6 (the original "White" model) + +The Beaglebone Black has eMMC, while the White does not. Pressing the USER/BOOT +button when powering on will temporarily change the boot order. But for the sake +of simplicity, these instructions assume you have erased the eMMC on the Black, +so its boot behavior matches that of the White and boots off of SD card. To do +this, issue the following commands from the u-boot prompt: + + # mmc dev 1 + # mmc erase 0 512 + +To further tailor these instructions for your board, please refer to the +documentation at http://www.beagleboard.org/bone and http://www.beagleboard.org/black + +From a Linux system with access to the image files perform the following steps: + + 1. Build an image. For example: + + $ bitbake core-image-minimal + + 2. Use the "dd" utility to write the image to the SD card. For example: + + # dd core-image-minimal-beaglebone-yocto.wic of=/dev/sdb + + 3. Insert the SD card into the Beaglebone and boot the board. + +Freescale MPC8315E-RDB (mpc8315e-rdb) +===================================== + +The MPC8315 PowerPC reference platform (MPC8315E-RDB) is aimed at hardware and +software development of network attached storage (NAS) and digital media server +applications. The MPC8315E-RDB features the PowerQUICC II Pro processor, which +includes a built-in security accelerator. + +(Note: you may find it easier to order MPC8315E-RDBA; this appears to be the +same board in an enclosure with accessories. In any case it is fully +compatible with the instructions given here.) + +Setup instructions +------------------ + +You will need the following: +* NFS root setup on your workstation +* TFTP server installed on your workstation +* Straight-thru 9-conductor serial cable (DB9, M/F) connected from your + PC to UART1 +* Ethernet connected to the first ethernet port on the board + +--- Preparation --- + +Note: if you have altered your board's ethernet MAC address(es) from the +defaults, or you need to do so because you want multiple boards on the same +network, then you will need to change the values in the dts file (patch +linux/arch/powerpc/boot/dts/mpc8315erdb.dts within the kernel source). If +you have left them at the factory default then you shouldn't need to do +anything here. + +Note: To boot from USB disk you need u-boot that supports 'ext2load usb' +command. You need to setup TFTP server, load u-boot from there and +flash it to NOR flash. + +Beware! Flashing bootloader is potentially dangerous operation that can +brick your device if done incorrectly. Please, make sure you understand +what below commands mean before executing them. + +Load the new u-boot.bin from TFTP server to memory address 200000 +=> tftp 200000 u-boot.bin + +Disable flash protection +=> protect off all + +Erase the old u-boot from fe000000 to fe06ffff in NOR flash. +The size is 0x70000 (458752 bytes) +=> erase fe000000 fe06ffff + +Copy the new u-boot from address 200000 to fe000000 +the size is 0x70000. It has to be greater or equal to u-boot.bin size +=> cp.b 200000 fe000000 70000 + +Enable flash protection again +=> protect on all + +Reset the board +=> reset + +--- Booting from USB disk --- + + 1. Flash partitioned image to the USB disk + + # dd if=core-image-minimal-mpc8315e-rdb.wic of=/dev/sdb + + 2. Plug USB disk into the MPC8315 board + + 3. Connect the board's first serial port to your workstation and then start up + your favourite serial terminal so that you will be able to interact with + the serial console. If you don't have a favourite, picocom is suggested: + + $ picocom /dev/ttyUSB0 -b 115200 + + 4. Power up or reset the board and press a key on the terminal when prompted + to get to the U-Boot command line + + 5. Optional. Load the u-boot.bin from the USB disk: + + => usb start + => ext2load usb 0:1 200000 u-boot.bin + + and flash it to NOR flash as described above. + + 6. Load the kernel and dtb from the first partition of the USB disk: + + => usb start + => ext2load usb 0:1 1000000 uImage + => ext2load usb 0:1 2000000 dtb + + 7. Set bootargs and boot up the device + + => setenv bootargs root=/dev/sdb2 rw rootwait console=ttyS0,115200 + => bootm 1000000 - 2000000 + + +--- Booting from NFS root --- + +Load the kernel and dtb (device tree blob), and boot the system as follows: + + 1. Get the kernel (uImage-mpc8315e-rdb.bin) and dtb (uImage-mpc8315e-rdb.dtb) + files from the tmp/deploy directory, and make them available on your TFTP + server. + + 2. Connect the board's first serial port to your workstation and then start up + your favourite serial terminal so that you will be able to interact with + the serial console. If you don't have a favourite, picocom is suggested: + + $ picocom /dev/ttyUSB0 -b 115200 + + 3. Power up or reset the board and press a key on the terminal when prompted + to get to the U-Boot command line + + 4. Set up the environment in U-Boot: + + => setenv ipaddr + => setenv serverip + => setenv bootargs root=/dev/nfs rw nfsroot=: ip=:::255.255.255.0:mpc8315e:eth0:off console=ttyS0,115200 + + 5. Download the kernel and dtb, and boot: + + => tftp 1000000 uImage-mpc8315e-rdb.bin + => tftp 2000000 uImage-mpc8315e-rdb.dtb + => bootm 1000000 - 2000000 + +--- Booting from JFFS2 root --- + + 1. First boot the board with NFS root. + + 2. Erase the MTD partition which will be used as root: + + $ flash_eraseall /dev/mtd3 + + 3. Copy the JFFS2 image to the MTD partition: + + $ flashcp core-image-minimal-mpc8315e-rdb.jffs2 /dev/mtd3 + + 4. Then reboot the board and set up the environment in U-Boot: + + => setenv bootargs root=/dev/mtdblock3 rootfstype=jffs2 console=ttyS0,115200 + + +Ubiquiti Networks EdgeRouter Lite (edgerouter) +============================================== + +The EdgeRouter Lite is part of the EdgeMax series. It is a MIPS64 router +(based on the Cavium Octeon processor) with 512MB of RAM, which uses an +internal USB pendrive for storage. + +Setup instructions +------------------ + +You will need the following: +* RJ45 -> serial ("rollover") cable connected from your PC to the CONSOLE + port on the device +* Ethernet connected to the first ethernet port on the board + +If using NFS as part of the setup process, you will also need: +* NFS root setup on your workstation +* TFTP server installed on your workstation (if fetching the kernel from + TFTP, see below). + +--- Preparation --- + +Build an image (e.g. core-image-minimal) using "edgerouter" as the MACHINE. +In the following instruction it is based on core-image-minimal. Another target +may be similiar with it. + +--- Booting from NFS root / kernel via TFTP --- + +Load the kernel, and boot the system as follows: + + 1. Get the kernel (vmlinux) file from the tmp/deploy/images/edgerouter + directory, and make them available on your TFTP server. + + 2. Connect the board's first serial port to your workstation and then start up + your favourite serial terminal so that you will be able to interact with + the serial console. If you don't have a favourite, picocom is suggested: + + $ picocom /dev/ttyS0 -b 115200 + + 3. Power up or reset the board and press a key on the terminal when prompted + to get to the U-Boot command line + + 4. Set up the environment in U-Boot: + + => setenv ipaddr + => setenv serverip + + 5. Download the kernel and boot: + + => tftp tftp $loadaddr vmlinux + => bootoctlinux $loadaddr coremask=0x3 root=/dev/nfs rw nfsroot=: ip=::::edgerouter:eth0:off mtdparts=phys_mapped_flash:512k(boot0),512k(boot1),64k@3072k(eeprom) + +--- Booting from USB disk --- + +To boot from the USB disk, you either need to remove it from the edgerouter +box and populate it from another computer, or use a previously booted NFS +image and populate from the edgerouter itself. + +Type 1: Use partitioned image +----------------------------- + +Steps: + + 1. Remove the USB disk from the edgerouter and insert it into a computer + that has access to your build artifacts. + + 2. Flash the image. + + # dd if=core-image-minimal-edgerouter.wic of=/dev/sdb + + 3. Insert USB disk into the edgerouter and boot it. + +Type 2: NFS +----------- + +Note: If you place the kernel on the ext3 partition, you must re-create the + ext3 filesystem, since the factory u-boot can only handle 128 byte inodes and + cannot read the partition otherwise. + + These boot instructions assume that you have recreated the ext3 filesystem with + 128 byte inodes, you have an updated uboot or you are running and image capable + of making the filesystem on the board itself. + + + 1. Boot from NFS root + + 2. Mount the USB disk partition 2 and then extract the contents of + tmp/deploy/core-image-XXXX.tar.bz2 into it. + + Before starting, copy core-image-minimal-xxx.tar.bz2 and vmlinux into + rootfs path on your workstation. + + and then, + + # mount /dev/sda2 /media/sda2 + # tar -xvjpf core-image-minimal-XXX.tar.bz2 -C /media/sda2 + # cp vmlinux /media/sda2/boot/vmlinux + # umount /media/sda2 + # reboot + + 3. Reboot the board and press a key on the terminal when prompted to get to the U-Boot + command line: + + # reboot + + 4. Load the kernel and boot: + + => ext2load usb 0:2 $loadaddr boot/vmlinux + => bootoctlinux $loadaddr coremask=0x3 root=/dev/sda2 rw rootwait mtdparts=phys_mapped_flash:512k(boot0),512k(boot1),64k@3072k(eeprom) diff --git a/poky/meta-yocto-bsp/conf/layer.conf b/poky/meta-yocto-bsp/conf/layer.conf new file mode 100644 index 000000000..6472238e6 --- /dev/null +++ b/poky/meta-yocto-bsp/conf/layer.conf @@ -0,0 +1,12 @@ +# We have a conf and classes directory, add to BBPATH +BBPATH .= ":${LAYERDIR}" + +# We have recipes-* directories, add to BBFILES +BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \ + ${LAYERDIR}/recipes-*/*/*.bbappend" + +BBFILE_COLLECTIONS += "yoctobsp" +BBFILE_PATTERN_yoctobsp = "^${LAYERDIR}/" +BBFILE_PRIORITY_yoctobsp = "5" +LAYERVERSION_yoctobsp = "4" +LAYERSERIES_COMPAT_yoctobsp = "sumo" diff --git a/poky/meta-yocto-bsp/conf/machine/beaglebone-yocto.conf b/poky/meta-yocto-bsp/conf/machine/beaglebone-yocto.conf new file mode 100644 index 000000000..ae682a47d --- /dev/null +++ b/poky/meta-yocto-bsp/conf/machine/beaglebone-yocto.conf @@ -0,0 +1,40 @@ +#@TYPE: Machine +#@NAME: Beaglebone-yocto machine +#@DESCRIPTION: Reference machine configuration for http://beagleboard.org/bone and http://beagleboard.org/black boards + +PREFERRED_PROVIDER_virtual/xserver ?= "xserver-xorg" +XSERVER ?= "xserver-xorg \ + xf86-video-modesetting \ + " + +MACHINE_EXTRA_RRECOMMENDS = "kernel-modules kernel-devicetree" + +EXTRA_IMAGEDEPENDS += "u-boot" + +DEFAULTTUNE ?= "cortexa8hf-neon" +include conf/machine/include/tune-cortexa8.inc + +IMAGE_FSTYPES += "tar.bz2 jffs2 wic wic.bmap" +EXTRA_IMAGECMD_jffs2 = "-lnp " +WKS_FILE ?= "beaglebone-yocto.wks" +IMAGE_INSTALL_append = " kernel-devicetree kernel-image-zimage" +do_image_wic[depends] += "mtools-native:do_populate_sysroot dosfstools-native:do_populate_sysroot" + +SERIAL_CONSOLE = "115200 ttyO0" + +PREFERRED_PROVIDER_virtual/kernel ?= "linux-yocto" +PREFERRED_VERSION_linux-yocto ?= "4.15%" + +KERNEL_IMAGETYPE = "zImage" +KERNEL_DEVICETREE = "am335x-bone.dtb am335x-boneblack.dtb am335x-bonegreen.dtb" +KERNEL_EXTRA_ARGS += "LOADADDR=${UBOOT_ENTRYPOINT}" + +SPL_BINARY = "MLO" +UBOOT_SUFFIX = "img" +UBOOT_MACHINE = "am335x_boneblack_config" +UBOOT_ENTRYPOINT = "0x80008000" +UBOOT_LOADADDRESS = "0x80008000" + +MACHINE_FEATURES = "usbgadget usbhost vfat alsa" + +IMAGE_BOOT_FILES ?= "u-boot.${UBOOT_SUFFIX} MLO" diff --git a/poky/meta-yocto-bsp/conf/machine/edgerouter.conf b/poky/meta-yocto-bsp/conf/machine/edgerouter.conf new file mode 100644 index 000000000..61f2145fd --- /dev/null +++ b/poky/meta-yocto-bsp/conf/machine/edgerouter.conf @@ -0,0 +1,26 @@ +#@TYPE: Machine +#@NAME: Edgerouter +#@DESCRIPTION: Edgerouter + +require conf/machine/include/tune-mips64.inc + +MACHINE_FEATURES = "pci ext2 ext3 serial" + +KERNEL_IMAGETYPE = "vmlinux" +KERNEL_ALT_IMAGETYPE = "vmlinux.bin" +KERNEL_IMAGE_STRIP_EXTRA_SECTIONS = ".comment" + +PREFERRED_PROVIDER_virtual/kernel ?= "linux-yocto" +PREFERRED_VERSION_linux-yocto ?= "4.15%" + +SERIAL_CONSOLE = "115200 ttyS0" +USE_VT ?= "0" + +MACHINE_EXTRA_RRECOMMENDS = "kernel-modules" + +IMAGE_FSTYPES ?= "jffs2 tar.bz2 wic wic.bmap" +JFFS2_ERASEBLOCK = "0x10000" + +WKS_FILE ?= "edgerouter.wks" +IMAGE_BOOT_FILES ?= "vmlinux;vmlinux.64" +do_image_wic[depends] += "mtools-native:do_populate_sysroot dosfstools-native:do_populate_sysroot" diff --git a/poky/meta-yocto-bsp/conf/machine/genericx86-64.conf b/poky/meta-yocto-bsp/conf/machine/genericx86-64.conf new file mode 100644 index 000000000..12f7c0d20 --- /dev/null +++ b/poky/meta-yocto-bsp/conf/machine/genericx86-64.conf @@ -0,0 +1,10 @@ +#@TYPE: Machine +#@NAME: Generic X86_64. + +#@DESCRIPTION: Machine configuration for generic X86_64 (64-bit) PCs and servers. Supports a moderately wide range of drivers that should boot and be usable on "typical" hardware. + +DEFAULTTUNE ?= "core2-64" +require conf/machine/include/tune-core2.inc +require conf/machine/include/genericx86-common.inc + +SERIAL_CONSOLES_CHECK = "ttyS0" diff --git a/poky/meta-yocto-bsp/conf/machine/genericx86.conf b/poky/meta-yocto-bsp/conf/machine/genericx86.conf new file mode 100644 index 000000000..798b62ec2 --- /dev/null +++ b/poky/meta-yocto-bsp/conf/machine/genericx86.conf @@ -0,0 +1,10 @@ +#@TYPE: Machine +#@NAME: Generic X86. + +#@DESCRIPTION: Machine configuration for generic X86 (32-bit) PCs. Supports a moderately wide range of drivers that should boot and be usable on "typical" hardware. + +DEFAULTTUNE ?= "core2-32" +require conf/machine/include/tune-core2.inc +require conf/machine/include/genericx86-common.inc + +MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS += "gma500-gfx-check" diff --git a/poky/meta-yocto-bsp/conf/machine/include/genericx86-common.inc b/poky/meta-yocto-bsp/conf/machine/include/genericx86-common.inc new file mode 100644 index 000000000..e35685cb2 --- /dev/null +++ b/poky/meta-yocto-bsp/conf/machine/include/genericx86-common.inc @@ -0,0 +1,25 @@ +include conf/machine/include/x86-base.inc +require conf/machine/include/qemuboot-x86.inc +MACHINE_FEATURES += "wifi efi pcbios" + +PREFERRED_PROVIDER_virtual/kernel ?= "linux-yocto" +PREFERRED_PROVIDER_virtual/xserver ?= "xserver-xorg" +XSERVER ?= "${XSERVER_X86_BASE} \ + ${XSERVER_X86_EXT} \ + ${XSERVER_X86_I915} \ + ${XSERVER_X86_I965} \ + ${XSERVER_X86_FBDEV} \ + ${XSERVER_X86_VESA} \ + ${XSERVER_X86_MODESETTING} \ + " + +MACHINE_EXTRA_RRECOMMENDS += "linux-firmware eee-acpi-scripts" + +GLIBC_ADDONS = "nptl" + +EXTRA_OECONF_append_pn-matchbox-panel-2 = " --with-battery=acpi" + +IMAGE_FSTYPES += "wic wic.bmap" +WKS_FILE ?= "genericx86.wks" +do_image_wic[depends] += "gptfdisk-native:do_populate_sysroot" +do_image_wic[recrdeptask] += "do_bootimg" diff --git a/poky/meta-yocto-bsp/conf/machine/mpc8315e-rdb.conf b/poky/meta-yocto-bsp/conf/machine/mpc8315e-rdb.conf new file mode 100644 index 000000000..34f12303a --- /dev/null +++ b/poky/meta-yocto-bsp/conf/machine/mpc8315e-rdb.conf @@ -0,0 +1,35 @@ +#@TYPE: Machine +#@DESCRIPTION: Machine configuration for running + +TARGET_FPU = "" + +require conf/machine/include/tune-ppce300c3.inc + +KERNEL_IMAGETYPE = "uImage" + +EXTRA_IMAGEDEPENDS += "u-boot" +UBOOT_MACHINE = "MPC8315ERDB_config" + +SERIAL_CONSOLE = "115200 ttyS0" + +MACHINE_FEATURES = "keyboard pci ext2 ext3 serial" + +PREFERRED_VERSION_linux-yocto ?= "4.15%" +PREFERRED_PROVIDER_virtual/kernel = "linux-yocto" + +PREFERRED_PROVIDER_virtual/xserver ?= "xserver-xorg" +XSERVER ?= "xserver-xorg \ + xf86-video-fbdev" + +UBOOT_ENTRYPOINT = "0x00000000" + +KERNEL_DEVICETREE = "mpc8315erdb.dtb" + +MACHINE_EXTRA_RRECOMMENDS = "kernel-modules" + +IMAGE_FSTYPES ?= "jffs2 tar.bz2" +JFFS2_ERASEBLOCK = "0x4000" + +IMAGE_FSTYPES += "wic wic.bmap" +WKS_FILE ?= 'mpc8315e-rdb.wks' +IMAGE_BOOT_FILES ?= "u-boot.bin uImage uImage-mpc8315erdb.dtb;dtb" diff --git a/poky/meta-yocto-bsp/lib/oeqa/controllers/__init__.py b/poky/meta-yocto-bsp/lib/oeqa/controllers/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/poky/meta-yocto-bsp/lib/oeqa/controllers/beaglebonetarget.py b/poky/meta-yocto-bsp/lib/oeqa/controllers/beaglebonetarget.py new file mode 100644 index 000000000..0f1aeb398 --- /dev/null +++ b/poky/meta-yocto-bsp/lib/oeqa/controllers/beaglebonetarget.py @@ -0,0 +1,98 @@ +# Copyright (C) 2014 Intel Corporation +# +# Released under the MIT license (see COPYING.MIT) + +# This module adds support to testimage.bbclass to deploy images and run +# tests on a BeagleBone (original "white" or Black models). The device must +# be set up as per README.hardware and the master image should be deployed +# onto the card so that it boots into it by default. For booting into the +# image under test we interact with u-boot over serial, so for the +# BeagleBone Black you will need an additional TTL serial cable since a +# serial interface isn't automatically provided over the USB connection as +# it is on the original BeagleBone ("white") version. The separate ext3 +# partition that will contain the image to be tested must be labelled +# "testrootfs" so that the deployment code below can find it. +# +# NOTE: for the BeagleBone "white" (original version) you may need to use +# a script which handles the serial device disappearing on power down, such +# as scripts/contrib/serdevtry in OE-Core. + +import os +import bb +import time +import subprocess +import sys +import pexpect + +import oeqa.utils.sshcontrol as sshcontrol +from oeqa.controllers.masterimage import MasterImageHardwareTarget + + +class BeagleBoneTarget(MasterImageHardwareTarget): + + dtbs = {'uImage-am335x-bone.dtb': 'am335x-bone.dtb', 'uImage-am335x-boneblack.dtb': 'am335x-boneblack.dtb'} + + @classmethod + def get_extra_files(self): + return list(self.dtbs.keys()) + + def __init__(self, d): + super(BeagleBoneTarget, self).__init__(d) + + self.image_fstype = self.get_image_fstype(d) + self.deploy_cmds = [ + 'mkdir -p /mnt/testrootfs', + 'mount -L testrootfs /mnt/testrootfs', + 'rm -rf /mnt/testrootfs/*', + 'tar xvf ~/test-rootfs.%s -C /mnt/testrootfs' % self.image_fstype, + '[ -e /mnt/testrootfs/boot/uImage ] || [ -L /mnt/testrootfs/boot/uImage ] || cp ~/test-kernel /mnt/testrootfs/boot/uImage', + ] + + for _, dtbfn in self.dtbs.iteritems(): + # Kernel and dtb files may not be in the image, so copy them if not + self.deploy_cmds.append('[ -e /mnt/testrootfs/boot/{0} ] || cp ~/{0} /mnt/testrootfs/boot/'.format(dtbfn)) + + if not self.serialcontrol_cmd: + bb.fatal("This TEST_TARGET needs a TEST_SERIALCONTROL_CMD defined in local.conf.") + + + def _deploy(self): + self.master.run("umount /boot; umount /mnt/testrootfs;") + self.master.ignore_status = False + # Kernel and dtb files may not be in the image, so copy them just in case + self.master.copy_to(self.kernel, "~/test-kernel") + kernelpath = os.path.dirname(self.kernel) + for dtborig, dtbfn in self.dtbs.iteritems(): + dtbfile = os.path.join(kernelpath, dtborig) + if os.path.exists(dtbfile): + self.master.copy_to(dtbfile, "~/%s" % dtbfn) + self.master.copy_to(self.rootfs, "~/test-rootfs.%s" % self.image_fstype) + for cmd in self.deploy_cmds: + self.master.run(cmd) + + def _start(self, params=None): + self.power_cycle(self.master) + try: + serialconn = pexpect.spawn(self.serialcontrol_cmd, env=self.origenv, logfile=sys.stdout) + # We'd wait for "U-Boot" here but sometimes we connect too late on BeagleBone white to see it + serialconn.expect("NAND:") + serialconn.expect("MMC:") + serialconn.sendline("a") + serialconn.expect("U-Boot#") + serialconn.sendline("setenv bootpart 0:3") + serialconn.expect("U-Boot#") + serialconn.sendline("setenv mmcroot /dev/mmcblk0p3 ro") + serialconn.expect("U-Boot#") + serialconn.sendline("boot") + serialconn.expect("login:", timeout=120) + serialconn.close() + except pexpect.ExceptionPexpect as e: + bb.fatal('Serial interaction failed: %s' % str(e)) + + def _wait_until_booted(self): + try: + serialconn = pexpect.spawn(self.serialcontrol_cmd, env=self.origenv, logfile=sys.stdout) + serialconn.expect("login:", timeout=120) + serialconn.close() + except pexpect.ExceptionPexpect as e: + bb.fatal('Serial interaction failed: %s' % str(e)) diff --git a/poky/meta-yocto-bsp/lib/oeqa/controllers/edgeroutertarget.py b/poky/meta-yocto-bsp/lib/oeqa/controllers/edgeroutertarget.py new file mode 100644 index 000000000..9c47b5b04 --- /dev/null +++ b/poky/meta-yocto-bsp/lib/oeqa/controllers/edgeroutertarget.py @@ -0,0 +1,90 @@ +# Copyright (C) 2014 Intel Corporation +# +# Released under the MIT license (see COPYING.MIT) + +# This module adds support to testimage.bbclass to deploy images and run +# tests on a Ubiquiti Networks EdgeRouter Lite. The device must be set up +# to boot into the master image already - the easiest way to do that is as +# follows: +# +# 1. Take out the internal USB drive and plug it into your PC +# 2. Repartition the USB drive so that you have three partitions in this +# order: +# 1: vfat, labelled "boot" (it will need to be formatted with mkfs.vfat +# for this to be possible, since FAT partitions formatted under +# DOS/Windows will only support uppercase labels) +# 2: ext3 (for master image) labelled "testmaster" +# 3: ext3 (for image under test) labelled "testrootfs" +# 3. Copy the kernel to be used by the master image to the FAT partition +# (it should be named "vmlinux.64" with the factory u-boot configuration) +# 4. Install the master image onto the "testmaster" ext3 partition. If +# you do this by just extracting the contents of an image onto the +# partition, you will also likely need to create the master image marker +# file /etc/masterimage within this partition so that we can tell when +# we're booted into it that it is the master image. +# 5. Put the USB drive back into the device, and ensure the console port +# and first ethernet port are connected before powering on +# +# TEST_SERIALCONTROL_CMD will need to be set in local.conf so that we can +# interact with u-boot over the serial console port. + +import os +import bb +import time +import subprocess +import sys +import pexpect + +import oeqa.utils.sshcontrol as sshcontrol +from oeqa.controllers.masterimage import MasterImageHardwareTarget + + +class EdgeRouterTarget(MasterImageHardwareTarget): + + def __init__(self, d): + super(EdgeRouterTarget, self).__init__(d) + + self.image_fstype = self.get_image_fstype(d) + self.deploy_cmds = [ + 'mount -L boot /boot', + 'mkdir -p /mnt/testrootfs', + 'mount -L testrootfs /mnt/testrootfs', + 'cp ~/test-kernel /boot', + 'rm -rf /mnt/testrootfs/*', + 'tar xvf ~/test-rootfs.%s -C /mnt/testrootfs' % self.image_fstype + ] + if not self.serialcontrol_cmd: + bb.fatal("This TEST_TARGET needs a TEST_SERIALCONTROL_CMD defined in local.conf.") + + + def _deploy(self): + self.master.run("umount /mnt/testrootfs;") + self.master.ignore_status = False + self.master.copy_to(self.kernel, "~/test-kernel") + self.master.copy_to(self.rootfs, "~/test-rootfs.%s" % self.image_fstype) + for cmd in self.deploy_cmds: + self.master.run(cmd) + + def _start(self, params=None): + self.power_cycle(self.master) + try: + serialconn = pexpect.spawn(self.serialcontrol_cmd, env=self.origenv, logfile=sys.stdout) + serialconn.expect("U-Boot") + serialconn.sendline("a") + serialconn.expect("Octeon ubnt_e100#") + serialconn.sendline("fatload usb 0:1 $loadaddr test-kernel") + serialconn.expect(" bytes read") + serialconn.expect("Octeon ubnt_e100#") + serialconn.sendline("bootoctlinux $loadaddr coremask=0x3 root=/dev/sda3 rw rootwait mtdparts=phys_mapped_flash:512k(boot0),512k(boot1),64k@3072k(eeprom)") + serialconn.expect("login:", timeout=120) + serialconn.close() + except pexpect.ExceptionPexpect as e: + bb.fatal('Serial interaction failed: %s' % str(e)) + + def _wait_until_booted(self): + try: + serialconn = pexpect.spawn(self.serialcontrol_cmd, env=self.origenv, logfile=sys.stdout) + serialconn.expect("login:", timeout=120) + serialconn.close() + except pexpect.ExceptionPexpect as e: + bb.fatal('Serial interaction failed: %s' % str(e)) diff --git a/poky/meta-yocto-bsp/lib/oeqa/controllers/grubtarget.py b/poky/meta-yocto-bsp/lib/oeqa/controllers/grubtarget.py new file mode 100644 index 000000000..7bc807d2b --- /dev/null +++ b/poky/meta-yocto-bsp/lib/oeqa/controllers/grubtarget.py @@ -0,0 +1,71 @@ +# Copyright (C) 2014 Intel Corporation +# +# Released under the MIT license (see COPYING.MIT) + +# This module adds support to testimage.bbclass to deploy images and run +# tests on a Generic PC that boots using grub bootloader. The device must +# be set up as per README.hardware and the master image should be deployed +# onto the harddisk so that it boots into it by default.For booting into the +# image under test we interact with grub over serial, so for the +# Generic PC you will need an additional serial cable and device under test +# needs to have a serial interface. The separate ext3 +# partition that will contain the image to be tested must be labelled +# "testrootfs" so that the deployment code below can find it. + +import os +import bb +import time +import subprocess +import sys +import pexpect + +import oeqa.utils.sshcontrol as sshcontrol +from oeqa.controllers.masterimage import MasterImageHardwareTarget + +class GrubTarget(MasterImageHardwareTarget): + + def __init__(self, d): + super(GrubTarget, self).__init__(d) + self.deploy_cmds = [ + 'mount -L boot /boot', + 'mkdir -p /mnt/testrootfs', + 'mount -L testrootfs /mnt/testrootfs', + 'cp ~/test-kernel /boot', + 'rm -rf /mnt/testrootfs/*', + 'tar xvf ~/test-rootfs.%s -C /mnt/testrootfs' % self.image_fstype, + ] + + if not self.serialcontrol_cmd: + bb.fatal("This TEST_TARGET needs a TEST_SERIALCONTROL_CMD defined in local.conf.") + + + def _deploy(self): + # make sure these aren't mounted + self.master.run("umount /boot; umount /mnt/testrootfs;") + self.master.ignore_status = False + # Kernel files may not be in the image, so copy them just in case + self.master.copy_to(self.rootfs, "~/test-rootfs." + self.image_fstype) + self.master.copy_to(self.kernel, "~/test-kernel") + for cmd in self.deploy_cmds: + self.master.run(cmd) + + def _start(self, params=None): + self.power_cycle(self.master) + try: + serialconn = pexpect.spawn(self.serialcontrol_cmd, env=self.origenv, logfile=sys.stdout) + serialconn.expect("GNU GRUB version 2.00") + serialconn.expect("Linux") + serialconn.sendline("x") + serialconn.expect("login:", timeout=120) + serialconn.close() + except pexpect.ExceptionPexpect as e: + bb.fatal('Serial interaction failed: %s' % str(e)) + + def _wait_until_booted(self): + try: + serialconn = pexpect.spawn(self.serialcontrol_cmd, env=self.origenv, logfile=sys.stdout) + serialconn.expect("login:", timeout=120) + serialconn.close() + except pexpect.ExceptionPexpect as e: + bb.fatal('Serial interaction failed: %s' % str(e)) + diff --git a/poky/meta-yocto-bsp/lib/oeqa/selftest/cases/systemd_boot.py b/poky/meta-yocto-bsp/lib/oeqa/selftest/cases/systemd_boot.py new file mode 100644 index 000000000..dd5eeec16 --- /dev/null +++ b/poky/meta-yocto-bsp/lib/oeqa/selftest/cases/systemd_boot.py @@ -0,0 +1,98 @@ +import os + +from oeqa.selftest.case import OESelftestTestCase +from oeqa.core.decorator.oeid import OETestID +from oeqa.core.decorator.depends import OETestDepends +from oeqa.utils.commands import runCmd, bitbake, get_bb_var, runqemu + +class Systemdboot(OESelftestTestCase): + def _common_setup(self): + """ + Common setup for test cases: 1445, 1528 + """ + + # Set EFI_PROVIDER = "systemdboot" and MACHINE = "genericx86-64" in conf/local.conf + features = 'EFI_PROVIDER = "systemd-boot"\n' + features += 'MACHINE = "genericx86-64"' + self.append_config(features) + + def _common_build(self): + """ + Common build for test cases: 1445 , 1528 + """ + + # Build a genericx86-64/efi systemdboot image + bitbake('mtools-native core-image-minimal') + + + @OETestID(1445) + def test_efi_systemdboot_images_can_be_built(self): + """ + Summary: Check if systemd-boot images can be built correctly + Expected: 1. File systemd-boot.efi should be available in $poky/build/tmp/deploy/images/genericx86-64 + 2. 'systemd-boot" can be built correctly + Product: oe-core + Author: Jose Perez Carranza + AutomatedBy: Jose Perez Carranza + """ + + # We'd use DEPLOY_DIR_IMAGE here, except that we need its value for + # MACHINE="genericx86-64 which is probably not the one configured + systemdbootfile = os.path.join(get_bb_var('DEPLOY_DIR'), 'images', 'genericx86-64', 'systemd-bootx64.efi') + + self._common_setup() + + # Ensure we're actually testing that this gets built and not that + # it was around from an earlier build + bitbake('-c cleansstate systemd-boot') + runCmd('rm -f %s' % systemdbootfile) + + self._common_build() + + found = os.path.isfile(systemdbootfile) + self.assertTrue(found, 'Systemd-Boot file %s not found' % systemdbootfile) + + @OETestID(1528) + @OETestDepends(['systemd_boot.Systemdboot.test_efi_systemdboot_images_can_be_built']) + def test_image_efi_file(self): + + """ + Summary: Check if EFI bootloader for systemd is correctly build + Dependencies: Image was built correctly on testcase 1445 + Steps: 1. Copy bootx64.efi file form the hddimg created + under build/tmp/deploy/images/genericx86-64 + 2. Check bootx64.efi was copied form hddimg + 3. Verify the checksums from the copied and previously + created file are equal. + Expected : Systemd-bootx64.efi and bootx64.efi should be the same + hence checksums should be equal. + Product: oe-core + Author: Jose Perez Carranza + AutomatedBy: Jose Perez Carranza + """ + + systemdbootfile = os.path.join(get_bb_var('DEPLOY_DIR'), 'images', 'genericx86-64', + 'systemd-bootx64.efi') + systemdbootimage = os.path.join(get_bb_var('DEPLOY_DIR'), 'images', 'genericx86-64', + 'core-image-minimal-genericx86-64.hddimg') + imagebootfile = os.path.join(get_bb_var('DEPLOY_DIR'), 'images', 'genericx86-64', + 'bootx64.efi') + mcopynative = os.path.join(get_bb_var('STAGING_BINDIR_NATIVE'), 'mcopy') + + #Clean environment before start the test + if os.path.isfile(imagebootfile): + runCmd('rm -f %s' % imagebootfile) + + #Step 1 + runCmd('%s -i %s ::EFI/BOOT/bootx64.efi %s' % (mcopynative ,systemdbootimage, + imagebootfile)) + + #Step 2 + found = os.path.isfile(imagebootfile) + self.assertTrue(found, 'bootx64.efi file %s was not copied from image' + % imagebootfile) + + #Step 3 + result = runCmd('md5sum %s %s' % (systemdbootfile, imagebootfile)) + self.assertEqual(result.output.split()[0], result.output.split()[2], + '%s was not correclty generated' % imagebootfile) diff --git a/poky/meta-yocto-bsp/recipes-bsp/formfactor/formfactor/beaglebone-yocto/machconfig b/poky/meta-yocto-bsp/recipes-bsp/formfactor/formfactor/beaglebone-yocto/machconfig new file mode 100644 index 000000000..ffce01227 --- /dev/null +++ b/poky/meta-yocto-bsp/recipes-bsp/formfactor/formfactor/beaglebone-yocto/machconfig @@ -0,0 +1,3 @@ +# Assume a USB mouse and keyboard are connected +HAVE_TOUCHSCREEN=0 +HAVE_KEYBOARD=1 diff --git a/poky/meta-yocto-bsp/recipes-bsp/formfactor/formfactor/genericx86-64/machconfig b/poky/meta-yocto-bsp/recipes-bsp/formfactor/formfactor/genericx86-64/machconfig new file mode 100644 index 000000000..a81a23bf5 --- /dev/null +++ b/poky/meta-yocto-bsp/recipes-bsp/formfactor/formfactor/genericx86-64/machconfig @@ -0,0 +1,6 @@ +HAVE_TOUCHSCREEN=0 +HAVE_KEYBOARD=1 + +DISPLAY_CAN_ROTATE=0 +DISPLAY_ORIENTATION=0 +DISPLAY_DPI=133 diff --git a/poky/meta-yocto-bsp/recipes-bsp/formfactor/formfactor/genericx86/machconfig b/poky/meta-yocto-bsp/recipes-bsp/formfactor/formfactor/genericx86/machconfig new file mode 100644 index 000000000..a81a23bf5 --- /dev/null +++ b/poky/meta-yocto-bsp/recipes-bsp/formfactor/formfactor/genericx86/machconfig @@ -0,0 +1,6 @@ +HAVE_TOUCHSCREEN=0 +HAVE_KEYBOARD=1 + +DISPLAY_CAN_ROTATE=0 +DISPLAY_ORIENTATION=0 +DISPLAY_DPI=133 diff --git a/poky/meta-yocto-bsp/recipes-bsp/formfactor/formfactor_0.0.bbappend b/poky/meta-yocto-bsp/recipes-bsp/formfactor/formfactor_0.0.bbappend new file mode 100644 index 000000000..72d991c7e --- /dev/null +++ b/poky/meta-yocto-bsp/recipes-bsp/formfactor/formfactor_0.0.bbappend @@ -0,0 +1 @@ +FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" diff --git a/poky/meta-yocto-bsp/recipes-bsp/gma500-gfx-check/gma500-gfx-check/gma500-gfx-check.conf b/poky/meta-yocto-bsp/recipes-bsp/gma500-gfx-check/gma500-gfx-check/gma500-gfx-check.conf new file mode 100644 index 000000000..74d33c871 --- /dev/null +++ b/poky/meta-yocto-bsp/recipes-bsp/gma500-gfx-check/gma500-gfx-check/gma500-gfx-check.conf @@ -0,0 +1,2 @@ +# Mimic modprobe's install funcitonality with busybox's modprobe +install gma500_gfx dmesg | grep gma500_gfx_checked || { /etc/modprobe.d/gma500-gfx-check.sh || modprobe gma500_gfx; } diff --git a/poky/meta-yocto-bsp/recipes-bsp/gma500-gfx-check/gma500-gfx-check/gma500-gfx-check.sh b/poky/meta-yocto-bsp/recipes-bsp/gma500-gfx-check/gma500-gfx-check/gma500-gfx-check.sh new file mode 100644 index 000000000..75cda99f5 --- /dev/null +++ b/poky/meta-yocto-bsp/recipes-bsp/gma500-gfx-check/gma500-gfx-check/gma500-gfx-check.sh @@ -0,0 +1,15 @@ +#!/bin/sh + +# Check for devices we wish to avoid gma500_gfx for +DEVICES="0x8119 0x4108" + +# Checked flag to avoid infinite modprobe +echo "gma500_gfx_checked" >> /dev/kmsg; + +for DEVICE in $DEVICES; do + if udevadm trigger --subsystem-match=pci --verbose --attr-match=device=$DEVICE | grep "pci" >> /dev/null ; then + echo "Found $DEVICE, avoiding gma500_gfx module" >> /dev/kmsg; + exit 0 + fi +done +exit 1 diff --git a/poky/meta-yocto-bsp/recipes-bsp/gma500-gfx-check/gma500-gfx-check_1.0.bb b/poky/meta-yocto-bsp/recipes-bsp/gma500-gfx-check/gma500-gfx-check_1.0.bb new file mode 100644 index 000000000..00680de89 --- /dev/null +++ b/poky/meta-yocto-bsp/recipes-bsp/gma500-gfx-check/gma500-gfx-check_1.0.bb @@ -0,0 +1,18 @@ +SUMMARY = "Intel gma500_gfx fix for certain hardware" +DESCRIPTION = "Avoid inserting gma500_gfx module for certain hardware devices." +LICENSE="GPLv2" +LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/GPL-2.0;md5=801f80980d171dd6425610833a22dbe6" + +SRC_URI = "file://gma500-gfx-check.conf \ + file://gma500-gfx-check.sh " + +do_install(){ + install -d ${D}${sysconfdir}/modprobe.d/ + install -m 755 ${WORKDIR}/gma500-gfx-check.sh ${D}${sysconfdir}/modprobe.d/gma500-gfx-check.sh + install -m 644 ${WORKDIR}/gma500-gfx-check.conf ${D}${sysconfdir}/modprobe.d/gma500-gfx-check.conf +} + +FILES_${PN}="${sysconfdir}/modprobe.d/gma500-gfx-check.conf \ + ${sysconfdir}/modprobe.d/gma500-gfx-check.sh" + +COMPATIBLE_MACHINE = "genericx86" diff --git a/poky/meta-yocto-bsp/recipes-graphics/xorg-xserver/xserver-xf86-config/beaglebone-yocto/xorg.conf b/poky/meta-yocto-bsp/recipes-graphics/xorg-xserver/xserver-xf86-config/beaglebone-yocto/xorg.conf new file mode 100644 index 000000000..2f40dae15 --- /dev/null +++ b/poky/meta-yocto-bsp/recipes-graphics/xorg-xserver/xserver-xf86-config/beaglebone-yocto/xorg.conf @@ -0,0 +1,20 @@ +Section "Monitor" + Identifier "Builtin Default Monitor" +EndSection + +Section "Device" + Identifier "Builtin Default fbdev Device 0" + Driver "modesetting" +EndSection + +Section "Screen" + Identifier "Builtin Default fbdev Screen 0" + DefaultDepth 16 + Device "Builtin Default fbdev Device 0" + Monitor "Builtin Default Monitor" +EndSection + +Section "ServerLayout" + Identifier "Builtin Default Layout" + Screen "Builtin Default fbdev Screen 0" +EndSection diff --git a/poky/meta-yocto-bsp/recipes-graphics/xorg-xserver/xserver-xf86-config/genericx86-64/xorg.conf b/poky/meta-yocto-bsp/recipes-graphics/xorg-xserver/xserver-xf86-config/genericx86-64/xorg.conf new file mode 100644 index 000000000..e69de29bb diff --git a/poky/meta-yocto-bsp/recipes-graphics/xorg-xserver/xserver-xf86-config/genericx86/xorg.conf b/poky/meta-yocto-bsp/recipes-graphics/xorg-xserver/xserver-xf86-config/genericx86/xorg.conf new file mode 100644 index 000000000..e69de29bb diff --git a/poky/meta-yocto-bsp/recipes-graphics/xorg-xserver/xserver-xf86-config_0.1.bbappend b/poky/meta-yocto-bsp/recipes-graphics/xorg-xserver/xserver-xf86-config_0.1.bbappend new file mode 100644 index 000000000..72d991c7e --- /dev/null +++ b/poky/meta-yocto-bsp/recipes-graphics/xorg-xserver/xserver-xf86-config_0.1.bbappend @@ -0,0 +1 @@ +FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" diff --git a/poky/meta-yocto-bsp/recipes-kernel/linux/linux-yocto_4.12.bbappend b/poky/meta-yocto-bsp/recipes-kernel/linux/linux-yocto_4.12.bbappend new file mode 100644 index 000000000..e28360b69 --- /dev/null +++ b/poky/meta-yocto-bsp/recipes-kernel/linux/linux-yocto_4.12.bbappend @@ -0,0 +1,28 @@ +KBRANCH_genericx86 = "standard/base" +KBRANCH_genericx86-64 = "standard/base" + +KMACHINE_genericx86 ?= "common-pc" +KMACHINE_genericx86-64 ?= "common-pc-64" +KBRANCH_edgerouter = "standard/edgerouter" +KBRANCH_beaglebone-yocto = "standard/beaglebone" +KMACHINE_beaglebone-yocto = "beaglebone" +KBRANCH_mpc8315e-rdb = "standard/fsl-mpc8315e-rdb" + +SRCREV_machine_genericx86 ?= "97e710ef0545c19d3c10bd81a61bdca9fe543b81" +SRCREV_machine_genericx86-64 ?= "97e710ef0545c19d3c10bd81a61bdca9fe543b81" +SRCREV_machine_edgerouter ?= "97e710ef0545c19d3c10bd81a61bdca9fe543b81" +SRCREV_machine_beaglebone-yocto ?= "97e710ef0545c19d3c10bd81a61bdca9fe543b81" +SRCREV_machine_mpc8315e-rdb ?= "55fcfbee2560f57a490c5724ac5b5cb49bacb01c" + + +COMPATIBLE_MACHINE_genericx86 = "genericx86" +COMPATIBLE_MACHINE_genericx86-64 = "genericx86-64" +COMPATIBLE_MACHINE_edgerouter = "edgerouter" +COMPATIBLE_MACHINE_beaglebone-yocto = "beaglebone-yocto" +COMPATIBLE_MACHINE_mpc8315e-rdb = "mpc8315e-rdb" + +LINUX_VERSION_genericx86 = "4.12.21" +LINUX_VERSION_genericx86-64 = "4.12.21" +LINUX_VERSION_edgerouter = "4.12.21" +LINUX_VERSION_beaglebone-yocto = "4.12.21" +LINUX_VERSION_mpc8315e-rdb = "4.12.21" diff --git a/poky/meta-yocto-bsp/recipes-kernel/linux/linux-yocto_4.14.bbappend b/poky/meta-yocto-bsp/recipes-kernel/linux/linux-yocto_4.14.bbappend new file mode 100644 index 000000000..5130707dd --- /dev/null +++ b/poky/meta-yocto-bsp/recipes-kernel/linux/linux-yocto_4.14.bbappend @@ -0,0 +1,27 @@ +KBRANCH_genericx86 = "v4.14/standard/base" +KBRANCH_genericx86-64 = "v4.14/standard/base" +KBRANCH_edgerouter = "v4.14/standard/edgerouter" +KBRANCH_beaglebone-yocto = "v4.14/standard/beaglebone" +KBRANCH_mpc8315e-rdb = "v4.14/standard/fsl-mpc8315e-rdb" + +KMACHINE_genericx86 ?= "common-pc" +KMACHINE_genericx86-64 ?= "common-pc-64" +KMACHINE_beaglebone-yocto ?= "beaglebone" + +SRCREV_machine_genericx86 ?= "1d50ce210b0536eb9a66d1e56ae215f92176444a" +SRCREV_machine_genericx86-64 ?= "1d50ce210b0536eb9a66d1e56ae215f92176444a" +SRCREV_machine_edgerouter ?= "f2dc94f77d19ab65a832bad6f42662c509d2ef9e" +SRCREV_machine_beaglebone-yocto ?= "6c1a02d4a9c227eca356911715a52cf92457ec16" +SRCREV_machine_mpc8315e-rdb ?= "7e9a0b017be7b685e094638f4bdaa33a7df8f7c0" + +COMPATIBLE_MACHINE_genericx86 = "genericx86" +COMPATIBLE_MACHINE_genericx86-64 = "genericx86-64" +COMPATIBLE_MACHINE_edgerouter = "edgerouter" +COMPATIBLE_MACHINE_beaglebone-yocto = "beaglebone-yocto" +COMPATIBLE_MACHINE_mpc8315e-rdb = "mpc8315e-rdb" + +LINUX_VERSION_genericx86 = "4.14.30" +LINUX_VERSION_genericx86-64 = "4.14.30" +LINUX_VERSION_edgerouter = "4.14.30" +LINUX_VERSION_beaglebone-yocto = "4.14.30" +LINUX_VERSION_mpc8315e-rdb = "4.14.30" diff --git a/poky/meta-yocto-bsp/recipes-kernel/linux/linux-yocto_4.15.bbappend b/poky/meta-yocto-bsp/recipes-kernel/linux/linux-yocto_4.15.bbappend new file mode 100644 index 000000000..c0c6ad92d --- /dev/null +++ b/poky/meta-yocto-bsp/recipes-kernel/linux/linux-yocto_4.15.bbappend @@ -0,0 +1,27 @@ +KBRANCH_genericx86 = "v4.15/standard/base" +KBRANCH_genericx86-64 = "v4.15/standard/base" +KBRANCH_edgerouter = "v4.15/standard/edgerouter" +KBRANCH_beaglebone-yocto = "v4.15/standard/beaglebone" +KBRANCH_mpc8315e-rdb = "v4.15/standard/fsl-mpc8315e-rdb" + +KMACHINE_genericx86 ?= "common-pc" +KMACHINE_genericx86-64 ?= "common-pc-64" +KMACHINE_beaglebone-yocto ?= "beaglebone" + +SRCREV_machine_genericx86 ?= "f73fd8783a3e7529902366ba75aafb81c19ec3c9" +SRCREV_machine_genericx86-64 ?= "f73fd8783a3e7529902366ba75aafb81c19ec3c9" +SRCREV_machine_edgerouter ?= "f73fd8783a3e7529902366ba75aafb81c19ec3c9" +SRCREV_machine_beaglebone-yocto ?= "f73fd8783a3e7529902366ba75aafb81c19ec3c9" +SRCREV_machine_mpc8315e-rdb ?= "cc2711c4f3b83b5cd78358e7c949fdbb6076e25b" + +COMPATIBLE_MACHINE_genericx86 = "genericx86" +COMPATIBLE_MACHINE_genericx86-64 = "genericx86-64" +COMPATIBLE_MACHINE_edgerouter = "edgerouter" +COMPATIBLE_MACHINE_beaglebone-yocto = "beaglebone-yocto" +COMPATIBLE_MACHINE_mpc8315e-rdb = "mpc8315e-rdb" + +LINUX_VERSION_genericx86 = "4.15.13" +LINUX_VERSION_genericx86-64 = "4.15.13" +LINUX_VERSION_edgerouter = "4.15.13" +LINUX_VERSION_beaglebone-yocto = "4.15.13" +LINUX_VERSION_mpc8315e-rdb = "4.15.13" diff --git a/poky/meta-yocto-bsp/wic/beaglebone-yocto.wks b/poky/meta-yocto-bsp/wic/beaglebone-yocto.wks new file mode 100644 index 000000000..967cad78b --- /dev/null +++ b/poky/meta-yocto-bsp/wic/beaglebone-yocto.wks @@ -0,0 +1,6 @@ +# short-description: Create SD card image for Beaglebone +# long-description: Creates a partitioned SD card image for Beaglebone. +# Boot files are located in the first vfat partition. + +part /boot --source bootimg-partition --ondisk mmcblk0 --fstype=vfat --label boot --active --align 4 --size 16 +part / --source rootfs --ondisk mmcblk --fstype=ext4 --label root --align 4 diff --git a/poky/meta-yocto-bsp/wic/edgerouter.wks b/poky/meta-yocto-bsp/wic/edgerouter.wks new file mode 100644 index 000000000..7176fe436 --- /dev/null +++ b/poky/meta-yocto-bsp/wic/edgerouter.wks @@ -0,0 +1,4 @@ +# short-description: Create SD card image for Edgerouter +# long-description: Create a partitioned SD card image for MIPS64 Edgerouter reference hardware. +part /boot --source bootimg-partition --ondisk sda --fstype=vfat --label boot --active --align 4 --size 16 +part / --source rootfs --ondisk sda --fstype=ext4 --label root --align 4 diff --git a/poky/meta-yocto-bsp/wic/genericx86.wks b/poky/meta-yocto-bsp/wic/genericx86.wks new file mode 100644 index 000000000..dab719c58 --- /dev/null +++ b/poky/meta-yocto-bsp/wic/genericx86.wks @@ -0,0 +1,7 @@ +# short-description: Create an EFI disk image for genericx86* +# long-description: Creates a partitioned EFI disk image for genericx86* machines +part /boot --source bootimg-efi --sourceparams="loader=grub-efi" --ondisk sda --label msdos --active --align 1024 +part / --source rootfs --ondisk sda --fstype=ext4 --label platform --align 1024 --use-uuid +part swap --ondisk sda --size 44 --label swap1 --fstype=swap + +bootloader --ptable gpt --timeout=5 --append="rootfstype=ext4 console=ttyS0,115200 console=tty0" diff --git a/poky/meta-yocto-bsp/wic/mpc8315e-rdb.wks b/poky/meta-yocto-bsp/wic/mpc8315e-rdb.wks new file mode 100644 index 000000000..d0cb607ff --- /dev/null +++ b/poky/meta-yocto-bsp/wic/mpc8315e-rdb.wks @@ -0,0 +1,4 @@ +# short-description: Create SD card image for MPC8315E-RDB +# long-description: Create a partitioned SD card image for Freescale MPC8315E-RDB reference hardware. +part /boot --source bootimg-partition --ondisk sdb --fstype=ext3 --label boot +part / --source rootfs --ondisk sdb --fstype=ext3 --label root -- cgit v1.2.3