From ce63bf4082bb5753f5d101dd08d3257197a239a6 Mon Sep 17 00:00:00 2001 From: Fabio Erculiani Date: Tue, 31 Jan 2012 20:44:47 +0100 Subject: [PATCH] [molecules/beagleboard-xm] add molecules for the BeagleBoard xM --- boot/arm/beagleboard-xm/README | 70 +++++++++++++++++++ molecules/beagleboard-xm.common | 20 +++++- molecules/sabayon-arm-beagleboard-xm-16G.spec | 24 ------- molecules/sabayon-arm-beagleboard-xm-4G.spec | 2 +- molecules/sabayon-arm-beagleboard-xm-8G.spec | 4 +- .../mkloopcard_beagleboard_xm_chroot_hook.sh | 65 ++++++++++++++--- 6 files changed, 147 insertions(+), 38 deletions(-) create mode 100644 boot/arm/beagleboard-xm/README delete mode 100644 molecules/sabayon-arm-beagleboard-xm-16G.spec diff --git a/boot/arm/beagleboard-xm/README b/boot/arm/beagleboard-xm/README new file mode 100644 index 0000000..3290be0 --- /dev/null +++ b/boot/arm/beagleboard-xm/README @@ -0,0 +1,70 @@ +Hi, welcome to Sabayon for the BeagleBoard xM. + +First of all, you may want to install the image into a new SDHC card. +Make sure to have enough space for it, for example, if you downloaded +the 4GB version, make sure you're using a 4GB SDHC stick. + +Other requirements: +------------------- + + - a Linux distro to copy the image to the SDHC + - a SDHC reader + - a root shell on the Linux distro + + +How to burn the image: +---------------------- + +Insert the SDHC memory into your reader (make sure that the LOCK +switch is turned off). After a few seconds, type: + + # dmesg | tail -n 10 + +In the last kernel message lines you will be able to read the +actual device name, might be something like "sdc" or in general +"sdX" where X is just a letter. +Make sure to see the same device name inside /dev directory. + +Once you got the name, just dump the image into that, in this +example, we assume that the device is /dev/sdc and the image +name is "Sabayon_Linux_8_armv7a_BeagleBoard_xM_4GB.img". +Do this as root! + + # xzcat Sabayon_Linux_8_armv7a_BeagleBoard_xM_4GB.img > /dev/sdd + +Once it is done, check for any error using: + + # dmesg | tail -n 10 + +And if it's all good, type: + + # sync; sync; sync + +To make sure everything has been flushed to the device. + +At this point, extract your SDHC and place it into the BeagleBoard xM. +You're set! + + +How to change keyboard mapping: +------------------------------- + +Our images come with "keyboard-setup", a shell too that lets you easily +do this, just type: + + # keyboard-setup "" all + +Then reboot! + + +How to change language: +----------------------- + +Open /etc/locale.gen and add your locale (you can find a full list +at: /usr/share/i18n/SUPPORTED). +Make sure to add UTF-8 locales, this is what we support. +Once you've added your line, just type: + + # language-setup "" system + +Then reboot! diff --git a/molecules/beagleboard-xm.common b/molecules/beagleboard-xm.common index 6f56d40..13adb19 100644 --- a/molecules/beagleboard-xm.common +++ b/molecules/beagleboard-xm.common @@ -1,9 +1,27 @@ # List of packages to add on the BeagleBoard xM packages_to_add: + @lxde, + app-misc/sabayonlive-tools, + app-misc/sabayon-skel, + app-admin/syslog-ng, lxde-base/lxdm, + gnome-extra/nm-applet-gtk2, + net-fs/nfs-utils, + net-misc/networkmanager, + net-misc/ntp, + sys-apps/keyboard-configuration-helpers, + sys-apps/language-configuration-helpers, sys-kernel/linux-beagle, x11-base/xorg-server, - x11-drivers/xf86-video-omapfb + x11-drivers/xf86-input-evdev, + x11-drivers/xf86-video-omapfb, + x11-terms/xterm, + x11-terms/eterm, + x11-themes/equinox-themes, + x11-themes/gtk-engines:2, + x11-themes/sabayon-artwork-core, + x11-wm/fluxbox, + www-client/midori # List of packages to remove from the BeagleBoard xM image packages_to_remove: diff --git a/molecules/sabayon-arm-beagleboard-xm-16G.spec b/molecules/sabayon-arm-beagleboard-xm-16G.spec deleted file mode 100644 index fdb6672..0000000 --- a/molecules/sabayon-arm-beagleboard-xm-16G.spec +++ /dev/null @@ -1,24 +0,0 @@ -%import /sabayon/molecules/arm-base.common -%import /sabayon/molecules/beagleboard-xm.common - -# Release desc (the actual release description) -release_desc: armv7a BeagleBoard xM - -# Release Version (used to generate release_file) -release_version: 8 - -# Specify image file name (image file name will be automatically -# produced otherwise) -image_name: Sabayon_Linux_8_armv7a_BeagleBoard_xM_16GB.img - -# Specify the image file size in Megabytes. This is mandatory. -# To avoid runtime failure, make sure the image is large enough to fit your -# chroot data. -image_mb: 16000 - -# Path to boot partition data (MLO, u-boot.img etc) -source_boot_directory: /sabayon/boot/arm/beagleboard-xm - -# External script that will generate the image file. -# The same can be copied onto a MMC by using dd -image_generator_script: /sabayon/scripts/beagleboard_xm_image_generator_script.sh diff --git a/molecules/sabayon-arm-beagleboard-xm-4G.spec b/molecules/sabayon-arm-beagleboard-xm-4G.spec index d180640..ed94100 100644 --- a/molecules/sabayon-arm-beagleboard-xm-4G.spec +++ b/molecules/sabayon-arm-beagleboard-xm-4G.spec @@ -14,7 +14,7 @@ image_name: Sabayon_Linux_8_armv7a_BeagleBoard_xM_4GB.img # Specify the image file size in Megabytes. This is mandatory. # To avoid runtime failure, make sure the image is large enough to fit your # chroot data. -image_mb: 3800 +image_mb: 3900 # Path to boot partition data (MLO, u-boot.img etc) source_boot_directory: /sabayon/boot/arm/beagleboard-xm diff --git a/molecules/sabayon-arm-beagleboard-xm-8G.spec b/molecules/sabayon-arm-beagleboard-xm-8G.spec index 8d70a37..f1e1716 100644 --- a/molecules/sabayon-arm-beagleboard-xm-8G.spec +++ b/molecules/sabayon-arm-beagleboard-xm-8G.spec @@ -9,12 +9,12 @@ release_version: 8 # Specify image file name (image file name will be automatically # produced otherwise) -image_name: Sabayon_Linux_8_armv7a_BeagleBoard_xM_4GB.img +image_name: Sabayon_Linux_8_armv7a_BeagleBoard_xM_8GB.img # Specify the image file size in Megabytes. This is mandatory. # To avoid runtime failure, make sure the image is large enough to fit your # chroot data. -image_mb: 7800 +image_mb: 7900 # Path to boot partition data (MLO, u-boot.img etc) source_boot_directory: /sabayon/boot/arm/beagleboard-xm diff --git a/scripts/mkloopcard_beagleboard_xm_chroot_hook.sh b/scripts/mkloopcard_beagleboard_xm_chroot_hook.sh index b9bc388..e890804 100755 --- a/scripts/mkloopcard_beagleboard_xm_chroot_hook.sh +++ b/scripts/mkloopcard_beagleboard_xm_chroot_hook.sh @@ -6,19 +6,64 @@ env-update . /etc/profile -# enable sshd by default -rc-update add sshd default +setup_displaymanager() { + # determine what is the login manager + if [ -n "$(equo match --installed gnome-base/gdm -qv)" ]; then + sed -i 's/DISPLAYMANAGER=".*"/DISPLAYMANAGER="gdm"/g' /etc/conf.d/xdm + elif [ -n "$(equo match --installed lxde-base/lxdm -qv)" ]; then + sed -i 's/DISPLAYMANAGER=".*"/DISPLAYMANAGER="lxdm"/g' /etc/conf.d/xdm + elif [ -n "$(equo match --installed kde-base/kdm -qv)" ]; then + sed -i 's/DISPLAYMANAGER=".*"/DISPLAYMANAGER="kdm"/g' /etc/conf.d/xdm + else + sed -i 's/DISPLAYMANAGER=".*"/DISPLAYMANAGER="xdm"/g' /etc/conf.d/xdm + fi +} -# select the first available kernel -eselect uimage set 1 +setup_boot() { + # enable sshd by default + rc-update add sshd default + # enable logger by default + rc-update add syslog-ng boot + # enable dbus, of course, and also NetworkManager + rc-update add dbus boot + rc-update add NetworkManager default + rc-update del net.eth0 default -# setup root password to... root! -echo root:root | chpasswd -# cleaning up deps -rc-update --update + # start X.Org by default + rc-update add xdm default -# setup serial login -echo "s0:12345:respawn:/sbin/agetty 115200 ttyO2 vt100" >> /etc/inittab + # select the first available kernel + eselect uimage set 1 + + # cleaning up deps + rc-update --update +} + +setup_users() { + # setup root password to... root! + echo root:root | chpasswd + # setup normal user "sabayon" + ( + if [ ! -x "/sbin/sabayon-functions.sh" ]; then + echo "no /sbin/sabayon-functions.sh found" + exit 1 + fi + . /sbin/sabayon-functions.sh + sabayon_setup_live_user "sabayon" || exit 1 + # setup "sabayon" password to... sabayon! + echo "sabayon:sabayon" | chpasswd + ) +} + +setup_serial() { + # setup serial login + echo "s0:12345:respawn:/sbin/agetty 115200 ttyO2 vt100" >> /etc/inittab +} + +setup_displaymanager +setup_users +setup_boot +setup_serial exit 0