Remove grub2 to oe-core and make BSPs use it [v2]
PATCH 1/4 meta-intel/common: remove grub-1.98
In reply to [email protected]From: Tom Zanussi <[email protected]>
This has been moved into oe-core, so remove it from meta-intel.
--- common/recipes-bsp/grub/grub-1.98/40_custom | 9 --- .../grub/grub-1.98/gentrigtables-compile-fix.patch | 52 -------------------- .../grub/grub-1.98/grub-install.in.patch | 13 ----- .../grub/grub-1.98/uninit-shdr-fix.patch | 31 ------------ common/recipes-bsp/grub/grub_1.98.bb | 46 ----------------- 5 files changed, 0 insertions(+), 151 deletions(-) delete mode 100755 common/recipes-bsp/grub/grub-1.98/40_custom delete mode 100644 common/recipes-bsp/grub/grub-1.98/gentrigtables-compile-fix.patch delete mode 100644 common/recipes-bsp/grub/grub-1.98/grub-install.in.patch delete mode 100644 common/recipes-bsp/grub/grub-1.98/uninit-shdr-fix.patch delete mode 100644 common/recipes-bsp/grub/grub_1.98.bb
common/recipes-bsp/grub/grub-1.98/40_custom deleted +0 -9
@@ -1,9 +0,0 @@ -#!/bin/sh -exec tail -n +3 $0 -# This file provides an easy way to add custom menu entries. Simply type the -# menu entries you want to add after this comment. Be careful not to change -# the 'exec tail' line above. -menuentry "Yocto Linux" { - set root=(hd0,1) - linux /boot/vmlinuz root=__ROOTFS__ rw __VIDEO_MODE__ __VGA_MODE__ quiet -}
common/recipes-bsp/grub/grub-1.98/gentrigtables-compile-fix.patch deleted +0 -52
52 lines not on this page · raw message
common/recipes-bsp/grub/grub-1.98/grub-install.in.patch deleted +0 -13
@@ -1,13 +0,0 @@ -Index: grub-1.98/util/grub-install.in -=================================================================== ---- grub-1.98.orig/util/grub-install.in 2011-01-25 23:47:05.587521825 -0600 -+++ grub-1.98/util/grub-install.in 2011-01-25 23:47:23.867521822 -0600 -@@ -306,7 +306,7 @@ - - if [ "x${devabstraction_module}" = "x" ] ; then - if [ x"${install_device}" != x ]; then -- if echo "${install_device}" | grep -qx "(.*)" ; then -+ if echo "${install_device}" | grep -q "(.*)" ; then - install_drive="${install_device}" - else - install_drive="`$grub_probe --target=drive --device ${install_device}`"
common/recipes-bsp/grub/grub-1.98/uninit-shdr-fix.patch deleted +0 -31
@@ -1,31 +0,0 @@ -Index: grub-1.98/loader/i386/bsdXX.c -=================================================================== ---- grub-1.98.orig/loader/i386/bsdXX.c 2011-01-25 00:12:14.967535179 -0600 -+++ grub-1.98/loader/i386/bsdXX.c 2011-01-25 00:13:16.387535169 -0600 -@@ -80,7 +80,7 @@ - { - Elf_Ehdr e; - Elf_Shdr *s; -- char *shdr; -+ char *shdr = NULL; - grub_addr_t curload, module; - grub_err_t err; - -@@ -148,7 +148,7 @@ - { - Elf_Ehdr e; - Elf_Shdr *s; -- char *shdr; -+ char *shdr = NULL; - grub_addr_t curload, module; - grub_err_t err; - -@@ -223,7 +223,7 @@ - grub_err_t err; - Elf_Ehdr e; - Elf_Shdr *s; -- char *shdr; -+ char *shdr = NULL; - unsigned symoff, stroff, symsize, strsize; - grub_addr_t curload; - grub_freebsd_addr_t symstart, symend, symentsize, dynamic;
common/recipes-bsp/grub/grub_1.98.bb deleted +0 -46
46 lines not on this page · raw message
Signature · 1 line
1.7.0.4
PATCH 3/4 meta-intel: update BSPs to use grub2
From: Tom Zanussi <[email protected]>
grub2 is now the default, so explicit preferred entries are unnecessary. It also needs to be installed in the rootfs, so we need to add it as a dependency.
--- meta-crownbay/conf/machine/crownbay-noemgd.conf | 2 ++ meta-crownbay/conf/machine/crownbay.conf | 2 ++ meta-emenlow/conf/machine/emenlow.conf | 3 +++ meta-fishriver/conf/machine/fishriver.conf | 3 +++ meta-fri2/conf/machine/fri2-noemgd.conf | 2 ++ meta-fri2/conf/machine/fri2.conf | 3 +++ meta-jasperforest/conf/machine/jasperforest.conf | 1 - meta-n450/conf/machine/n450.conf | 3 +++ meta-sugarbay/conf/machine/sugarbay.conf | 2 -- 9 files changed, 18 insertions(+), 3 deletions(-)
meta-crownbay/conf/machine/crownbay-noemgd.conf +2 -0
@@ -34,3 +34,5 @@ IMAGE_FSTYPES ?= "ext3 cpio.gz live" GLIBC_ADDONS = "nptl" GLIBC_EXTRA_OECONF = "--with-tls" + +MACHINE_ESSENTIAL_EXTRA_RDEPENDS = "grub"
meta-crownbay/conf/machine/crownbay.conf +2 -0
@@ -38,3 +38,5 @@ IMAGE_FSTYPES ?= "ext3 cpio.gz live" GLIBC_ADDONS = "nptl" GLIBC_EXTRA_OECONF = "--with-tls" + +MACHINE_ESSENTIAL_EXTRA_RDEPENDS = "grub"
meta-emenlow/conf/machine/emenlow.conf +3 -0
@@ -34,3 +34,6 @@ IMAGE_FSTYPES ?= "ext3 cpio.gz live" GLIBC_ADDONS = "nptl" GLIBC_EXTRA_OECONF = "--with-tls" + +MACHINE_ESSENTIAL_EXTRA_RDEPENDS = "grub" +
meta-fishriver/conf/machine/fishriver.conf +3 -0
@@ -34,3 +34,6 @@ IMAGE_FSTYPES ?= "ext3 cpio.gz live" GLIBC_ADDONS = "nptl" GLIBC_EXTRA_OECONF = "--with-tls" + +MACHINE_ESSENTIAL_EXTRA_RDEPENDS = "grub" +
meta-fri2/conf/machine/fri2-noemgd.conf +2 -0
@@ -34,3 +34,5 @@ IMAGE_FSTYPES ?= "ext3 cpio.gz live" GLIBC_ADDONS = "nptl" GLIBC_EXTRA_OECONF = "--with-tls" + +MACHINE_ESSENTIAL_EXTRA_RDEPENDS = "grub"
meta-fri2/conf/machine/fri2.conf +3 -0
@@ -37,3 +37,6 @@ IMAGE_FSTYPES ?= "ext3 cpio.gz live" GLIBC_ADDONS = "nptl" GLIBC_EXTRA_OECONF = "--with-tls" + +MACHINE_ESSENTIAL_EXTRA_RDEPENDS = "grub" +
meta-jasperforest/conf/machine/jasperforest.conf +0 -1
@@ -36,5 +36,4 @@ GLIBC_ADDONS = "nptl" GLIBC_EXTRA_OECONF = "--with-tls" MACHINE_ESSENTIAL_EXTRA_RDEPENDS = "grub" -PREFERRED_VERSION_grub ?= "1.98"
meta-n450/conf/machine/n450.conf +3 -0
@@ -37,3 +37,6 @@ GLIBC_ADDONS = "nptl" GLIBC_EXTRA_OECONF = "--with-tls" ROOTLESS_X = "1" + +MACHINE_ESSENTIAL_EXTRA_RDEPENDS = "grub" +
meta-sugarbay/conf/machine/sugarbay.conf +0 -2
@@ -38,5 +38,3 @@ GLIBC_ADDONS = "nptl" GLIBC_EXTRA_OECONF = "--with-tls" MACHINE_ESSENTIAL_EXTRA_RDEPENDS = "grub" - -PREFERRED_VERSION_grub ?= "1.98"
Signature · 1 line
1.7.0.4
PATCH 4/4 meta-intel/common: remove initramfs-live-install .bbappend
In reply to [email protected]From: Tom Zanussi <[email protected]>
This has been moved into oe-core, so remove it and init-install.sh from meta-intel.
--- .../initramfs-live-install/init-install.sh | 188 -------------------- .../initramfs-live-install_1.0.bbappend | 2 - 2 files changed, 0 insertions(+), 190 deletions(-) delete mode 100644 common/recipes-core/initrdscripts/initramfs-live-install/init-install.sh delete mode 100644 common/recipes-core/initrdscripts/initramfs-live-install_1.0.bbappend
common/recipes-core/initrdscripts/initramfs-live-install/init-install.sh deleted +0 -188
@@ -1,188 +0,0 @@ -#!/bin/sh -e -# -# Copyright (C) 2008 Intel -# -# install.sh [device_name] [rootfs_name] [video_mode] [vga_mode] -# - -# We need 20 Mb for the boot partition -boot_size=20 - -# 5% for the swap -swap_ratio=5 - -found="no" - -echo "Searching for a hard drive..." -for device in 'hda' 'hdb' 'sda' 'sdb' - do - if [ -e /sys/block/${device}/removable ]; then - if [ "$(cat /sys/block/${device}/removable)" = "0" ]; then - found="yes" - - while true; do - echo "Found drive at /dev/${device}. Do you want to install poky there ? [y/n]" - read answer - if [ "$answer" = "y" ] ; then - break - fi - - if [ "$answer" = "n" ] ; then - found=no - break - fi - - echo "Please answer by y or n" - done - fi - fi - - if [ "$found" = "yes" ]; then - break; - fi - -done - -if [ "$found" = "no" ]; then - exit 1 -fi - -echo "Installing image on /dev/${device}" - -# -# The udev automounter can cause pain here, kill it -# -rm -f /etc/udev/scripts/mount* - -# -# Unmount anything the automounter had mounted -# -umount /dev/${device} 2> /dev/null || /bin/true -umount /dev/${device}1 2> /dev/null || /bin/true -umount /dev/${device}2 2> /dev/null || /bin/true -umount /dev/${device}3 2> /dev/null || /bin/true -umount /dev/${device}4 2> /dev/null || /bin/true -umount /dev/${device}5 2> /dev/null || /bin/true -umount /dev/${device}6 2> /dev/null || /bin/true - -if [ ! -b /dev/sda ] ; then - mknod /dev/sda b 8 0 -fi - -if [ ! -b /dev/sdb ] ; then - mknod /dev/sdb b 8 16 -fi - -if [ ! -b /dev/loop0 ] ; then - mknod /dev/loop0 b 7 0 -fi - -mkdir -p /tmp -cat /proc/mounts > /etc/mtab - -disk_size=$(parted /dev/${device} unit mb print | grep Disk | cut -d" " -f 3 | sed -e "s/MB//") - -swap_size=$((disk_size*5/100)) -rootfs_size=$((disk_size-boot_size-swap_size)) - -rootfs_start=$((boot_size + 1)) -rootfs_end=$((rootfs_start+rootfs_size)) -swap_start=$((rootfs_end+1)) - -bootfs=/dev/${device}1 -rootfs=/dev/${device}2 -swap=/dev/${device}3 - -echo "*****************" -echo "Boot partition size: $boot_size MB (/dev/${device}1)" -echo "Rootfs partition size: $rootfs_size MB (/dev/${device}2)" -echo "Swap partition size: $swap_size MB (/dev/${device}3)" -echo "*****************" -echo "Deleting partition table on /dev/${device} ..." -dd if=/dev/zero of=/dev/${device} bs=512 count=2 - -echo "Creating new partition table on /dev/${device} ..." -parted /dev/${device} mklabel msdos - -echo "Creating boot partition on /dev/${device}1" -parted /dev/${device} mkpart primary 0 $boot_size - -echo "Creating rootfs partition on /dev/${device}2" -parted /dev/${device} mkpart primary $rootfs_start $rootfs_end - -echo "Creating swap partition on /dev/${device}3" -parted /dev/${device} mkpart primary $swap_start $disk_size - -parted /dev/${device} print - -echo "Formatting /dev/${device}1 to ext2..." -mkfs.ext3 $bootfs - -echo "Formatting /dev/${device}2 to ext3..." -mkfs.ext3 $rootfs - -echo "Formatting swap partition...(/dev/${device}3)" -mkswap $swap - -mkdir /ssd -mkdir /rootmnt -mkdir /bootmnt - -mount $rootfs /ssd -mount -o rw,loop,noatime,nodiratime /media/$1/$2 /rootmnt - -echo "Copying rootfs files..." -cp -a /rootmnt/* /ssd - -if [ -d /ssd/etc/ ] ; then - echo "$swap swap swap defaults 0 0" >> /ssd/etc/fstab - - # We dont want udev to mount our root device while we're booting... - if [ -d /ssd/etc/udev/ ] ; then - echo "/dev/${device}" >> /ssd/etc/udev/mount.blacklist - fi -fi - -if [ -f /ssd/etc/grub.d/40_custom ] ; then - sed -i "s@__ROOTFS__@$rootfs@g" /ssd/etc/grub.d/40_custom - sed -i "s/__VIDEO_MODE__/$3/g" /ssd/etc/grub.d/40_custom - sed -i "s/__VGA_MODE__/$4/g" /ssd/etc/grub.d/40_custom - mount $bootfs /bootmnt - cp /ssd/etc/grub.d/40_custom /bootmnt/40_custom - umount /bootmnt - force="--force" -fi - -umount /ssd -umount /rootmnt - -echo "Preparing boot partition..." -mount $bootfs /ssd -grub-install $force --root-directory=/ssd /dev/${device} - -echo "(hd0) /dev/${device}" > /ssd/boot/grub/device.map - -if [ -f /ssd/40_custom ] ; then - mv /ssd/40_custom /ssd/boot/grub/grub.cfg - sed -i "/#/d" /ssd/boot/grub/grub.cfg - sed -i "/exec tail/d" /ssd/boot/grub/grub.cfg - chmod 0444 /ssd/boot/grub/grub.cfg -else - echo "default 0" > /ssd/boot/grub/menu.lst - echo "timeout 30" >> /ssd/boot/grub/menu.lst - echo "title Poky-Netbook" >> /ssd/boot/grub/menu.lst - echo "root (hd0,1)" >> /ssd/boot/grub/menu.lst - echo "kernel /boot/vmlinuz root=$rootfs rw $3 $4 quiet" >> /ssd/boot/grub/menu.lst -fi - -cp /media/$1/vmlinuz /ssd/boot/ - -umount /ssd -sync - -echo "Remove your installation media, and press ENTER" - -read enter - -echo "Rebooting..." -reboot -f
common/recipes-core/initrdscripts/initramfs-live-install_1.0.bbappend deleted +0 -2
@@ -1,2 +0,0 @@ -THISDIR := "${@os.path.dirname(bb.data.getVar('FILE', d, True))}" -FILESPATH =. "${@base_set_filespath(["${THISDIR}/${PN}"], d)}:"
Signature · 1 line
1.7.0.4
cover Remove grub2 to oe-core and make BSPs use it [v2]
From: Tom Zanussi <[email protected]>
This patchset removes grub2 from meta-intel, since it's been moved by another patchset to oe-core. It also moves all the meta-intel BSPs to grub2 (1.99).
A future patch will factor out the common parts being added to the machine configs - this initial patchset essentially just fixes what's necessary for YOCTO bug #1428 in order to get things working again.
Changes since v2:
Forgot to remove initramfs-live-install in v1, and remove explicit preferred versions.
The following changes since commit 3b5a3cb7393d0e9a56ff38a0b41c61751afab2b5:
Tom Zanussi (1):
grub2: update license version
are available in the git repository at:
git://git.yoctoproject.org/meta-intel.git tzanussi/move-grub2v2
http://git.yoctoproject.org/cgit/cgit.cgi/meta-intel/log/?h=tzanussi/move-grub2v2
Tom Zanussi (4):
meta-intel/common: remove grub-1.98 meta-intel/MAINTAINERS: remove grub
meta-intel: update BSPs to use grub2 meta-intel/common: remove initramfs-live-install .bbappend
MAINTAINERS | 1 - common/recipes-bsp/grub/grub-1.98/40_custom | 9 - .../grub/grub-1.98/gentrigtables-compile-fix.patch | 52 ------ .../grub/grub-1.98/grub-install.in.patch | 13 -- .../grub/grub-1.98/uninit-shdr-fix.patch | 31 ---- common/recipes-bsp/grub/grub_1.98.bb | 46 ----- .../initramfs-live-install/init-install.sh | 188 -------------------- .../initramfs-live-install_1.0.bbappend | 2 - meta-crownbay/conf/machine/crownbay-noemgd.conf | 2 + meta-crownbay/conf/machine/crownbay.conf | 2 + meta-emenlow/conf/machine/emenlow.conf | 3 + meta-fishriver/conf/machine/fishriver.conf | 3 + meta-fri2/conf/machine/fri2-noemgd.conf | 2 + meta-fri2/conf/machine/fri2.conf | 3 + meta-jasperforest/conf/machine/jasperforest.conf | 1 - meta-n450/conf/machine/n450.conf | 3 + meta-sugarbay/conf/machine/sugarbay.conf | 2 - 17 files changed, 18 insertions(+), 345 deletions(-) delete mode 100755 common/recipes-bsp/grub/grub-1.98/40_custom delete mode 100644 common/recipes-bsp/grub/grub-1.98/gentrigtables-compile-fix.patch delete mode 100644 common/recipes-bsp/grub/grub-1.98/grub-install.in.patch delete mode 100644 common/recipes-bsp/grub/grub-1.98/uninit-shdr-fix.patch delete mode 100644 common/recipes-bsp/grub/grub_1.98.bb delete mode 100644 common/recipes-core/initrdscripts/initramfs-live-install/init-install.sh delete mode 100644 common/recipes-core/initrdscripts/initramfs-live-install_1.0.bbappend
PATCH 2/4 meta-intel/MAINTAINERS: remove grub
In reply to [email protected]From: Tom Zanussi <[email protected]>
Remove the entry for grub, since it is no longer a part of meta-intel.
--- MAINTAINERS | 1 - 1 files changed, 0 insertions(+), 1 deletions(-)
MAINTAINERS +0 -1
@@ -35,7 +35,6 @@ Maintainers List (try to look for most precise areas first) COMMON M: Tom Zanussi <[email protected]> -F: common/recipes-bsp/grub/ F: common/recipes-core/ CROWNBAY
Signature · 1 line
1.7.0.4