Commit 204b09363ffaef687370346b933e2153be350e05

Authored by Silvan Calarco
1 parent 0568f1bf0b
Exists in master

rootfs: new target ported from openmamba target

Showing 6 changed files with 253 additions and 0 deletions Side-by-side Diff

platforms/rootfs/Makefile
  1 +$(MAKEDIST_TARGET)-$(PLATFORM)-kde4: \
  2 + kppp4 desktop-base-kde4 \
  3 + ksnapshot okular desktop-base-kde4 kmix4 \
  4 + kopete4 kdebluetooth4 smb4k juk4 lisa4 kwalletmanager4 \
  5 + libqt4-sqlite kate ark4 kcalc4 kdf4 kfloppy4 kgpg4 \
  6 + kaffeine kamoso
  7 +
  8 +$(MAKEDIST_TARGET)-$(PLATFORM)-arm: \
  9 + kernel-iconia kernel-iconia-modules kernel-hannspad kernel-hannspad-modules \
  10 + kernel-mamba-arm kernel-mamba-arm-sound kernel-mamba-arm-wireless \
  11 + kernel-mamba-arm-firmware brcm_patchram
  12 +
  13 +$(MAKEDIST_TARGET)-$(PLATFORM)-i586: \
  14 + kernel-mamba kernel-mamba-sound kernel-mamba-wireless \
  15 + kernel-mamba-64GB kernel-mamba-64GB-sound kernel-mamba-64GB-wireless
  16 +
  17 +$(MAKEDIST_TARGET)-$(PLATFORM): \
  18 + $(MAKEDIST_TARGET)-$(PLATFORM)-kde4 openssh-server usbutils wireless_tools i2c-tools \
  19 + parted iputils file rootfiles ppp minicom xinetd chrony locales mc \
  20 + man-db curl zip unzip iptables iproute wpa_supplicant mtd-utils nfs-utils \
  21 + openssh-clients binutils telnet ftp debianutils diffutils bluez traceroute \
  22 + openmamba-devel timezone sudo syslog-ng sysvinit kmod \
  23 + liblame expect prelink NetworkManager ModemManager procps \
  24 + xorg-server x11vnc xkeyboard-config screen \
  25 + xorg-drv-input-tslib xcursor-transparent-theme rpm smart xdg-utils \
  26 + dhcp-server rfkill plymouth livecd-tools chromium rdesktop mingetty \
  27 + postplug-xorg postplug-sound gparted tar net-tools chrony mambatray kvkbd
  28 +
  29 +# startactive
  30 +# tightvnc-server lxde network-manager-applet matchbox-keyboard midori Mesa-tools alsa-utils
  31 +# embedded-devel embedded-debug \
  32 +#mkfontscale vsftpd
  33 +#webmin
  34 +# FIXME: expext is a webmin prereq
  35 +# libACE: customer request
  36 +# NetworkManager strace gpsd
  37 +
  38 +# Localization targets
  39 +$(MAKEDIST_TARGET)-$(PLATFORM)-en: \
  40 + kde-l10n-en_GB
  41 +$(MAKEDIST_TARGET)-$(PLATFORM)-es: \
  42 + kde-l10n-es
  43 +$(MAKEDIST_TARGET)-$(PLATFORM)-it: \
  44 + kde-l10n-it
platforms/rootfs/Makefile.defs
  1 +# Fake requirement as no arm bootloader is present
  2 +#bootloader = bash
  3 +# xorg
  4 +#xorglibGL = libGL-Mesa-dri
  5 +# libGL-fglrx-X11 libGL-nvidia-X11 libGL-nvidia_71xx-X11 libGL-nvidia_96xx-X11 libGL-nvidia_173xx-X11
  6 +#xorglibglx = xorg-ext-libglx
  7 +# xorg-ext-libglx-nvidia xorg-ext-libglx-nvidia_71xx xorg-ext-libglx-nvidia_96xx xorg-ext-libglx-nvidia_173xx
  8 +#libGLcore.so.1 = xorg-drv-video-nvidia xorg-drv-video-nvidia_71xx xorg-drv-video-nvidia_96xx xorg-drv-video-nvidia_173xx
  9 +#libnvidia-tls.so.1 = xorg-drv-video-nvidia xorg-drv-video-nvidia_71xx xorg-drv-video-nvidia_96xx xorg-drv-video-nvidia_173xx
  10 +#ifeq ($(ARCH),arm)
  11 +#xorgdrvvideo = xorg-drv-video-fbdev xorg-drv-video-tegra
  12 +#endif
  13 +
  14 +## ffmpeg / libav
  15 +#libpostproc.so.51 = libpostproc-ffmpeg
  16 +#libpostproc.so.51[LIBPOSTPROC_51] = libpostproc-ffmpeg
  17 +#ffmpegpresets := ffmpeg-presets
  18 +
  19 +## kde
  20 +#sopranobackend = soprano-backend-virtuoso
  21 +#libphonon.so.4 = libphonon
  22 +#phonon_backend = phonon-backend-gstreamer
  23 +#
  24 +#networkmanagergui = plasma-applet-networkmanagement
platforms/rootfs/post.inc.sh
  1 +# add fstab entries
  2 +#cat >> $MOUNTDIR/etc/fstab << _EOF
  3 +#/dev/mmcblk0p1 /mnt/sd0 auto defaults,noauto 0 0
  4 +#_EOF
  5 +#mkdir $MOUNTDIR/mnt/{ndda1,ndda2,sd0,sda1,sda2}
  6 +
  7 +# disable nfs
  8 +#chroot $MOUNTDIR chkconfig --del nfslock
  9 +#chroot $MOUNTDIR chkconfig --del portmap
  10 +#chroot $MOUNTDIR chkconfig --del ts-calibrate
  11 +
  12 +## disable random
  13 +#chroot $MOUNTDIR chkconfig --del random
  14 +
  15 +## enable ftp server
  16 +#sed -i "s|\(.*disable[[:space:]]*= \)yes|\1no|" $MOUNTDIR/etc/xinetd.d/vsftpd
  17 +#sed -i "s|#local_enable|local_enable|" $NOUNTDIR/etc/vsftpd.conf
  18 +#sed -i "s|#write_enable|write_enable|" $NOUNTDIR/etc/vsftpd.conf
  19 +#sed -i "/root/d" $MOUNTDIR/etc/vsftpd/user_list
  20 +#sed -i "/root/d" $MOUNTDIR/etc/vsftpd/chroot-list
  21 +
  22 +## remove alsa configuration for now
  23 +#rm $MOUNTDIR/etc/asound.conf
  24 +
  25 +# remove some services
  26 +#rm -f $MOUNTDIR/etc/rc?.d/???{iptables,acpid}
  27 +
  28 +## generate RPM scripts first time execution
  29 +#make_rpm_first_time_script "\
  30 +#chkconfig --del acpid
  31 +#chkconfig --del alsa
  32 +#chkconfig --del iptables
  33 +#chkconfig --del nfslock
  34 +#chkconfig --del portmap
  35 +#"
  36 +
  37 +## use system default language
  38 +#> $MOUNTDIR/etc/sysconfig/i18n
  39 +
  40 +# set localtime (default to Europe/Berlin)
  41 +case $LANGUAGE in
  42 + it) timezone=Europe/Rome ;;
  43 + es) timezone=Europe/Madrid ;;
  44 + *) timezone=Europe/Berlin ;;
  45 +esac
  46 +echo $timezone > $MOUNTDIR/etc/timezone
  47 +cp /usr/share/zoneinfo/$timezone $MOUNTDIR/etc/localtime
  48 +
  49 +if [ ! "$KERNEL_IGNORE" ]; then
  50 + # run depmod
  51 + chroot $MOUNTDIR depmod -a ${KERNEL_MAJVER}-${KERNEL_EXTRAVER}
  52 +fi
  53 +
  54 +# disable automatic depmod and ldconfig execution on boot (also due to clock error)
  55 +cat >> $MOUNTDIR/etc/sysconfig/rc << _EOF
  56 +no_auto_depmod=1
  57 +no_auto_ldconfig=1
  58 +_EOF
  59 +
  60 +# configure touchscreen
  61 +cat > $MOUNTDIR/etc/ts-calibrate.conf << _EOF
  62 +TSLIB_CONFFILE=/etc/ts.conf
  63 +TSLIB_CONSOLEDEVICE=none
  64 +TSLIB_FBDEVICE=/dev/fb0
  65 +TSLIB_TSDEVICE=/dev/input/event0
  66 +TSLIB_CALIBFILE=/etc/pointercal
  67 +HOME=/root
  68 +_EOF
  69 +
  70 +# change inittab so it opens tty root shells instead of asking for login
  71 +#
  72 +echo "Forcing \`inittab' to open tty root shells with no login..."
  73 +sed -i 's,^1:.*,1:234:respawn:/sbin/mingetty --autologin root --loginpause --noclear tty1,' $MOUNTDIR/etc/inittab
  74 +sed -i 's,^\([2-3]\):.*,\1:2345:respawn:/sbin/mingetty --autologin root --loginpause --noclear tty\1,' $MOUNTDIR/etc/inittab
  75 +sed -i 's,^4:.*,4:2345:respawn:/sbin/agetty ttyS0 115200,' $MOUNTDIR/etc/inittab
  76 +sed -i 's,^5:.*,5:2345:respawn:/sbin/agetty ttyGS0 115200,' $MOUNTDIR/etc/inittab
  77 +sed -i 's,^6:.*,6:2345:respawn:/sbin/agetty ttyAMA0 115200,' $MOUNTDIR/etc/inittab
  78 +#sed -i '/^[5-6]:.*/d' $MOUNTDIR/etc/inittab
  79 +
  80 +# configure for runlevel 5 boot
  81 +sed -i "s|id:3\(:initdefault.*\)|id:5\1|" $MOUNTDIR/etc/inittab
  82 +
  83 +# configure KDM for autologin
  84 +#
  85 +if [ -e $MOUNTDIR/opt/kde/share/config/kdm/kdmrc ]; then
  86 + sed -i 's|[#]*AutoLoginEnable=.*|AutoLoginEnable=true|' \
  87 + $MOUNTDIR/opt/kde/share/config/kdm/kdmrc
  88 + sed -i 's|[#]*AutoReLogin=.*|AutoReLogin=true|' \
  89 + $MOUNTDIR/opt/kde/share/config/kdm/kdmrc
  90 + sed -i 's|[#]*AutoLoginUser=.*|AutoLoginUser=liveuser|' \
  91 + $MOUNTDIR/opt/kde/share/config/kdm/kdmrc
  92 +fi
  93 +
  94 +# set timezone according to LANGUAGE (default is UTC)
  95 +#
  96 +case $LANGUAGE in
  97 + it) timezone=Europe/Rome ;;
  98 + es) timezone=Europe/Madrid ;;
  99 + *) timezone=UTC ;;
  100 +esac
  101 +echo $timezone > $MOUNTDIR/etc/timezone
  102 +cp $MOUNTDIR/usr/share/zoneinfo/$timezone $MOUNTDIR/etc/localtime
  103 +
  104 +# configure favorites in kde menu
  105 +for f in /usr/share/applications/chromium-devel.desktop /opt/kde/share/applications/kaffeine.desktop; do
  106 + chroot $MOUNTDIR /opt/kde/bin/kickoffcfg --add-favorite $f
  107 +done
  108 +
  109 +# remove some documentation to save space
  110 +for f in ChangeLog Changelog CHANGES TODO NEWS README README.txt; do
  111 + find $MOUNTDIR/usr/share/doc -name $f -exec rm -f {} \;
  112 +done
  113 +
  114 +# disable filesystem autocheck due to a kernel bug in hannspad (blkid generated kernel crash)
  115 +if [ "$ARCH" = "arm" ]; then
  116 + sed -i "s|FS_PARTS_UPDATE=yes|FS_PARTS_UPDATE=no|" $MOUNTDIR/etc/sysconfig/postplug
  117 + sed -i "s|FS_SWAP_UPDATE=yes|FS_SWAP_UPDATE=no|" $MOUNTDIR/etc/sysconfig/postplug
  118 +fi
  119 +
  120 +# FIXME: this should be done by postplug only when touchscreen is detected
  121 +mkdir -p $MOUNTDIR/home/liveuser/.icons/default
  122 +cat > $MOUNTDIR/home/liveuser/.icons/default/index.theme << _EOF
  123 +[Icon Theme]
  124 +Inherits=xcursor-transparent
  125 +_EOF
  126 +
  127 +# configure default liveuser password
  128 +echo "openmamba" | chroot $MOUNTDIR passwd liveuser --stdin
  129 +
  130 +prelink
platforms/rootfs/root/etc/dhcpd.conf
  1 +#ddns-update-style ad-hoc;
  2 +ignore client-updates;
  3 +
  4 +subnet 10.99.99.0 netmask 255.255.255.0 {
  5 +# --- default gateway
  6 +# option routers 192.168.0.254;
  7 +# option subnet-mask 255.255.255.0;
  8 +#
  9 +# option nis-domain "domain.it";
  10 +# option domain-name "domain.it";
  11 +# option domain-name-servers 192.168.0.254;
  12 +#
  13 +# option time-offset -18000; # Eastern Standard Time
  14 +# option ntp-servers 192.168.0.1;
  15 +# option netbios-name-servers 192.168.0.1;
  16 +# --- Selects point-to-point node (default is hybrid). Don't change this unless
  17 +# -- you understand Netbios very well
  18 +# option netbios-node-type 2;
  19 +#
  20 + range dynamic-bootp 10.99.99.100 10.99.99.199;
  21 + default-lease-time 21600;
  22 + max-lease-time 43200;
  23 +#
  24 +# # we want the nameserver to appear at a fixed address
  25 +# host ns {
  26 +# next-server dns.domain.it;
  27 +# hardware ethernet 01:23:45:67:89:AB;
  28 +# fixed-address 1.2.3.4;
  29 +# }
  30 +}
platforms/rootfs/root/etc/sysconfig/dhcpd
  1 +# Command line options here
  2 +DHCPDIFS="usb0"
  3 +DHCPDARGS=
platforms/rootfs/settings.inc
  1 +if [ "$ARCH" = "arm" ]; then
  2 + KERNEL_EXTRAVER=
  3 + #KERNEL_PLATFORM=""
  4 + KERNEL_ADDITIONAL=""
  5 + KERNEL_IGNORE=true
  6 +elif [ "$ARCH" = "i586" ]; then
  7 + KERNEL_EXTRAVER=mamba
  8 + KERNEL_PLATFORM=""
  9 + #KERNEL_ADDITIONAL="extramodules sound"
  10 + KERNEL_MORE_EXTRAVER=mamba-64GB
  11 +fi
  12 +APPLICATION_TARGET=""
  13 +MEDIA=archive_xz
  14 +#ARCH=arm
  15 +#INSTALL_PACKAGES="bash"
  16 +BUILD_MISSING=true
  17 +TARGET_HOSTNAME=openmamba-rootfs
  18 +#rpmextraargs="--noscripts"
  19 +#DEBUG=1
  20 +#DEVEL=1
  21 +KEEP_RPM=1
  22 +#RPM=rpm