Commit 7d4f0166559458c326945734ccebaa3f1ef52662

Authored by Silvan Calarco
1 parent 0a0ad781cd
Exists in master

rootfs-light: new platform backported from openmamba target

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

platforms/rootfs-light/Makefile
  1 +$(MAKEDIST_TARGET)-$(PLATFORM)-arm: \
  2 + kernel-iconia kernel-iconia-modules kernel-hannspad kernel-hannspad-modules \
  3 + kernel-mamba-arm kernel-mamba-arm-sound kernel-mamba-arm-wireless \
  4 + kernel-mamba-arm-firmware brcm_patchram midori
  5 +
  6 +$(MAKEDIST_TARGET)-$(PLATFORM)-i586: \
  7 + kernel-mamba kernel-mamba-sound kernel-mamba-wireless chromium \
  8 + kernel-mamba-64GB kernel-mamba-64GB-sound kernel-mamba-64GB-wireless
  9 +
  10 +$(MAKEDIST_TARGET)-$(PLATFORM): \
  11 + lxde openssh-server usbutils wireless_tools screen \
  12 + parted iputils file rootfiles ppp minicom xinetd chrony locales mc \
  13 + man-db curl zip unzip iptables iproute wpa_supplicant mtd-utils nfs-utils \
  14 + openssh-clients binutils telnet ftp debianutils diffutils bluez traceroute \
  15 + openmamba-devel timezone sudo syslog-ng sysvinit kmod \
  16 + liblame expect prelink NetworkManager ModemManager procps \
  17 + xorg-server x11vnc xkeyboard-config \
  18 + xorg-drv-input-tslib xcursor-transparent-theme rpm smart xdg-utils \
  19 + dhcp-server rfkill plymouth livecd-tools rdesktop mingetty \
  20 + postplug-xorg postplug-sound gparted tar net-tools chrony mambatray
  21 +# i2c-tools florence
  22 +
  23 +# startactive
  24 +# tightvnc-server lxde network-manager-applet matchbox-keyboard midori Mesa-tools alsa-utils
  25 +# embedded-devel embedded-debug \
  26 +#mkfontscale vsftpd
  27 +#webmin
  28 +# FIXME: expect is a webmin prereq
  29 +# libACE: customer request
  30 +# NetworkManager strace gpsd
  31 +
  32 +# Localization targets
  33 +$(MAKEDIST_TARGET)-$(PLATFORM)-en:
  34 +
  35 +$(MAKEDIST_TARGET)-$(PLATFORM)-es:
  36 +
  37 +$(MAKEDIST_TARGET)-$(PLATFORM)-it:
platforms/rootfs-light/Makefile.defs
  1 +packagekitgui = gnome-packagekit
  2 +firewallgui = gui-ufw
platforms/rootfs-light/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 +
  71 +# change inittab so it opens tty root shells instead of asking for login
  72 +#
  73 +echo "Forcing \`inittab' to open tty root shells with no login..."
  74 +# configure for serial console login
  75 +#echo "s0:2345:respawn:/sbin/agetty -L -f /etc/issue 115200 tcc-uart0 vt100" >> $MOUNTDIR/etc/inittab
  76 +sed -i 's,^1:.*,1:234:respawn:/sbin/mingetty --autologin root --loginpause --noclear tty1,' $MOUNTDIR/etc/inittab
  77 +sed -i 's,^\([2-3]\):.*,\1:2345:respawn:/sbin/mingetty --autologin root --loginpause --noclear tty\1,' $MOUNTDIR/etc/inittab
  78 +sed -i 's,^4:.*,4:2345:respawn:/sbin/agetty ttyS0 115200,' $MOUNTDIR/etc/inittab
  79 +sed -i 's,^5:.*,5:2345:respawn:/sbin/agetty ttyGS0 115200,' $MOUNTDIR/etc/inittab
  80 +sed -i 's,^6:.*,6:2345:respawn:/sbin/agetty ttyAMA0 115200,' $MOUNTDIR/etc/inittab
  81 +#sed -i '/^[5-6]:.*/d' $MOUNTDIR/etc/inittab
  82 +
  83 +# configure for runlevel 5 boot
  84 +sed -i "s|id:3\(:initdefault.*\)|id:5\1|" $MOUNTDIR/etc/inittab
  85 +
  86 +# configure LXDM for autologin
  87 +#
  88 +sed -i "s|# autologin.*|autologin=liveuser|" $MOUNTDIR/etc/lxdm/lxdm.conf
  89 +
  90 +# set timezone according to LANGUAGE (default is UTC)
  91 +#
  92 +case $LANGUAGE in
  93 + it) timezone=Europe/Rome ;;
  94 + es) timezone=Europe/Madrid ;;
  95 + *) timezone=UTC ;;
  96 +esac
  97 +echo $timezone > $MOUNTDIR/etc/timezone
  98 +cp $MOUNTDIR/usr/share/zoneinfo/$timezone $MOUNTDIR/etc/localtime
  99 +
  100 +# remove some documentation to save space
  101 +for f in ChangeLog Changelog CHANGES TODO NEWS README README.txt; do
  102 + find $MOUNTDIR/usr/share/doc -name $f -exec rm -f {} \;
  103 +done
  104 +
  105 +# disable filesystem autocheck due to a kernel bug in hannspad (blkid generated kernel crash)
  106 +if [ "$ARCH" = "arm" ]; then
  107 + sed -i "s|FS_PARTS_UPDATE=yes|FS_PARTS_UPDATE=no|" $MOUNTDIR/etc/sysconfig/postplug
  108 + sed -i "s|FS_SWAP_UPDATE=yes|FS_SWAP_UPDATE=no|" $MOUNTDIR/etc/sysconfig/postplug
  109 +fi
  110 +
  111 +# FIXME: this should be done by postplug only when touchscreen is detected
  112 +mkdir -p $MOUNTDIR/home/liveuser/.icons/default
  113 +cat > $MOUNTDIR/home/liveuser/.icons/default/index.theme << _EOF
  114 +[Icon Theme]
  115 +Inherits=xcursor-transparent
  116 +_EOF
  117 +
  118 +# configure default liveuser password
  119 +echo "openmamba" | chroot $MOUNTDIR passwd liveuser --stdin
  120 +
  121 +prelink
platforms/rootfs-light/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-light/root/etc/sysconfig/dhcpd
  1 +# Command line options here
  2 +DHCPDIFS="usb0"
  3 +DHCPDARGS=
platforms/rootfs-light/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 +elif [ "$ARCH" = "x86_64" ]; then
  12 + KERNEL_EXTRAVER=mamba-x86_64
  13 + KERNEL_PLATFORM=""
  14 + #KERNEL_ADDITIONAL="extramodules sound"
  15 + KERNEL_MORE_EXTRAVER=
  16 +fi
  17 +APPLICATION_TARGET=""
  18 +MEDIA=archive_xz
  19 +#ARCH=arm
  20 +#INSTALL_PACKAGES="bash"
  21 +BUILD_MISSING=true
  22 +TARGET_HOSTNAME=openmamba-rootfs-light
  23 +#rpmextraargs="--noscripts"
  24 +#DEBUG=1
  25 +#DEVEL=1
  26 +KEEP_RPM=1
  27 +#RPM=rpm