Commit bbe5785f authored by Silvan Calarco's avatar Silvan Calarco

Initial commit

openmamba-devel: openmamba-milestone1-devel
openmamba-milestone1-devel: rpm gcc gcc-c++ gcc-cpp make
openmamba-debug: openmamba-milestone1-debug
openmamba-milestone1-debug: strace valgrind gdb minicom openssh-server dhcp-client rpm iputils openssh-clients \
diffutils Mesa-tools kbd mc bootchart apt openmamba-release
openmamba-base: openmamba-milestone1-base
openmamba-milestone1-base: filesystem gzip texinfo ldconfig bash libreadline glibc \
libncurses initscripts setup coreutils rootfiles chkconfig splashutils \
udev suspend ttf-freefont libpython libgpm debianutils
openmamba-commontools: openmamba-milestone1-commontools
openmamba-milestone1-commontools: sysvinit util-linux-ng module-init-tools \
procps sed grep net-tools ncurses tar bzip2 unzip zip pciutils \
libcrack libcrack-dicts pam shadow-common pwdutils acpid mingetty \
net-tools syslinux prelink mc dhcp-client timezone nfs-utils \
wireless_tools wpa_supplicant apt openmamba-release grub2 openssh-clients \
dosfstools man mbr iptables cups vim iputils sudo postplug xinetd less \
reiserfsprogs ppp ipw2100-firmware ipw2200-firmware zd1211-firmware \
rt2501-firmware b43-fwcutter mdadm eciadsl \
rp-pppoe-gui ndiswrapper slmodem usbutils ftp telnet eject \
tcpdump pcmcia-utils xdg-utils iproute
openmamba-advanced: openmamba-milestone1-advanced
openmamba-milestone1-advanced: hdparm hibernate
include $(TARGETSDIR)/$(TARGET)/platforms/$(PLATFORM)/Makefile
# def file for the embedded target = libGL-Mesa-dri = libGL-Mesa-dri
perl[bytes] = perl
#xorglibGL = libGL-Mesa-dri
xorgdrvvideo = xorg-drv-video-base xorg-drv-video-amd xorg-drv-video-nsc
xorgdrvinput = xorg-drv-input-base xorg-drv-input-synaptics
splashtheme = splash-theme-openmamba
bootloader = syslinux
alsaplayer_output = alsaplayer-output-jack alsaplayer-output-alsa = xorg-server = libgcj4 = libgcj4
kernelsound = kernel-mamba-sound-backport
#kernelwireless = kernel-mamba-wireless
kernelwireless = kernel-mamba-wireless-backport
include $(TARGETSDIR)/$(TARGET)/platforms/$(PLATFORM)/Makefile.defs
# execute platform specific script
[ -e $TARGETDIR/platforms/$PLATFORM/ ] && . $TARGETDIR/platforms/$PLATFORM/
[ "$PRODUCT_NAME" ] && \
#if [ "$FORCE" = "1" -o ! -e "$LOCALSTATEDIR/$MEDIA_NAME" ]; then
[ $MEDIA = "raw" ] && create_raw_filesystem $LOCALSTATEDIR/$MEDIA_NAME $MEDIA_SIZE 1024k $ROOTFS
create_fstab "$ROOTDEV" "$ROOTFS"
install_rpms "filesystem gzip texinfo ldconfig bash libreadline glibc libncurses initscripts setup coreutils" "--nodeps --noorder --noscripts"
# Workaround: avoid a circular dependency with bash
#install_rpms_by_target \
# "Installing kernel..." mtd-base \
# "$NOARCHDIR/filesystem*"
install_rpms_by_target "Installing base packages for ${MAKEDIST_TARGET} target" ${MAKEDIST_TARGET}-base "${RPMEXTRAARGS}"
# disable the service command
mv $MOUNTDIR/sbin/service $MOUNTDIR/sbin/service.preinst
ln -sf /bin/true $MOUNTDIR/sbin/service
# change the uname command
mv $MOUNTDIR/bin/uname $MOUNTDIR/bin/uname.preinst
CURRKERNEL=`uname -r`
cat > $MOUNTDIR/bin/uname << _EOF
/bin/uname.preinst \$@ | sed "s|${CURRKERNEL}|${KERNEL_MAJVER}${KERNEL_EXTRAVER}|"
chmod +x $MOUNTDIR/bin/uname
# set system hostname and domain
[[ "$TARGET_DOMAIN" ]] || TARGET_DOMAIN="localdomain"
sed -i "s|HOSTNAME=.*|HOSTNAME=$TARGET_HOSTNAME|" $MOUNTDIR/etc/sysconfig/network
sed -i "s|\(127\.0\.0\.1\W*\)\(.*\)|\1 $TARGET_HOSTNAME.$TARGET_DOMAIN $TARGET_HOSTNAME \2|" \
#install_rpms_by_target "Installing tools packages for ${MAKEDIST_TARGET} target" ${MAKEDIST_TARGET}-tools ""
install_rpms_by_target "Installing ${PLATFORM} platform packages" ${MAKEDIST_TARGET}-${PLATFORM} "${RPMEXTRAARGS}"
[ "$LANGUAGE" ] && install_rpms_by_target "Installing ${PLATFORM} platform localization packages ($LANGUAGE)" ${MAKEDIST_TARGET}-${PLATFORM}-${LANGUAGE} "${RPMEXTRAARGS}"
update_modules_dependencies ${KERNEL_VER}${KERNEL_EXTRAVER}
if [ "$APPLICATION_TARGET" ]; then
install_rpms_by_target "Installing application packages." "$APPLICATION_TARGET" "${RPMEXTRAARGS}"
# erase_rpm_database
if [ ${DEBUG:-0} -gt 0 ]; then
install_rpms_by_target "Installing debugging packages." ${MAKEDIST_TARGET}-debug "${RPMEXTRAARGS}"
cat > $MOUNTDIR/etc/sysconfig/network-devices/ifconfig.eth0 << _EOF
[ "$LANGUAGE" ] && {
[ "$LANGUAGE" = "en" ] && KEYMAP=us || KEYMAP="$LANGUAGE"
# configure localization
cat > $MOUNTDIR/etc/sysconfig/keyboard << _EOF
[ "$COUNTRY" ] && {
cat > $MOUNTDIR/etc/sysconfig/i18n << _EOF
echo "Deleting unuseful files..."
# delete unused localizations
find $MOUNTDIR/usr/share/locale \
-maxdepth 1 -mindepth 1 -type d \
! -name it* ! -name en* ! -name C ! -name l10n -exec rm -rf {} \;
#$CHROOTCMD chkconfig --add acpid ||
# { echo "$mkcd_me: fatal error, aborting installation" >&2
# { (exit 1); exit 1; }; }
# configure extlinux boot loader
#cat > $MOUNTDIR/boot/extlinux.conf << _EOF
#APPEND video=vesafb:1280x1024-32 root=$ROOTDEV console=tty1
if [ "$U_BOOT" ]; then
echo "Copying u-boot Image for Kernel"
#mkimage -A ppc -O linux -T kernel -C gzip -a 0x8000 -e 0x8000 \
# -n "$DISTRONAME 2.6" -d $MOUNTDIR/boot/vmlinuz-2.6.12 $DISTRONAME-$MAKEDIST_TARGET-uImage.bin
# disable parport
#sed -i "/parport_pc/d" $MOUNTDIR/etc/modprobe.conf
# disable multithreaded init ?
if [ ${MULTITHREAD:-0} -gt 0 ]; then
sed -i "s|multithread=1|multithread=0|" $MOUNTDIR/etc/sysconfig/rc
# blacklist buggy ehci_hcd
#echo "blacklist ehci_hcd" > $MOUNTDIR/etc/modprobe.conf.d/ehci_hcd
# set rootdev on extlinux
[ -e $MOUNTDIR/boot/extlinux.conf ] && sed -i "s|\([^::alpha]root=\)[^ ]*|\1$ROOTDEV|" $MOUNTDIR/boot/extlinux.conf
# execute platform specific script
[ -e $TARGETDIR/platforms/$PLATFORM/ ] && . $TARGETDIR/platforms/$PLATFORM/
# restore the service command
rm -f $MOUNTDIR/sbin/service
mv $MOUNTDIR/sbin/service.preinst $MOUNTDIR/sbin/service
# restore the uname command
rm -f $MOUNTDIR/bin/uname
mv $MOUNTDIR/bin/uname.preinst $MOUNTDIR/bin/uname
# copy static files for target
[ -e $TARGETDIR/root ] &&
cp -a $TARGETDIR/root/* $MOUNTDIR/
# copy static files for specific platform
[ -e $TARGETDIR/platforms/$PLATFORM/root ] &&
cp -a $TARGETDIR/platforms/$PLATFORM/root/* $MOUNTDIR/
# copy localized static files for specific platform
[ "$LANGUAGE" -a -e $TARGETDIR/platforms/$PLATFORM/root-$LANGUAGE ] &&
# Localized targets
xorglibGL = libGL-Mesa-dri libGL-nvidia-X11 libGL-fglrx-X11
kernelnvidia = kernel-mamba-nongpl-nvidia
xorglibglx = xorg-ext-libglx xorg-ext-libglx-nvidia
#xorg-ext-libglx-nvidia = xorg-drv-video-nvidia = xorg-drv-video-nvidia
xorgdrvvideo = xorg-drv-video-base xorg-drv-video-amd xorg-drv-video-nsc xorg-drv-video-fglrx xorg-drv-video-nvidia
# bootcd post script
# creates a fake installation aimed at producing a kernel image and initrd
# for booting flash and disk partitions
# make initramfs
cat >> $MOUNTDIR/etc/modprobe.conf << _EOF
alias scsi_hostadapter ehci-hcd
alias scsi_hostadapter uhci-hcd
alias scsi_hostadapter ohci-hcd
alias scsi_hostadapter usb-storage
alias scsi_hostadapter sata_via
alias scsi_hostadapter ata_piix
alias scsi_hostadapter reiserfs
[ -e $MOUNTDIR2/boot/isolinux ] || mkdir -p $MOUNTDIR2/boot/isolinux
chroot $MOUNTDIR mkinitramfs \
/boot/initramfs-${KERNEL_VER}${KERNEL_EXTRAVER}.img.gz \
# Note: isolinux requires 8.3 filenames
cp $MOUNTDIR/boot/initramfs-${KERNEL_VER}${KERNEL_EXTRAVER}.img.gz \
# configure isolinux boot loader
cat > $MOUNTDIR2/boot/isolinux/isolinux.cfg << _EOF
timeout 100
prompt 1
display menu.txt
F1 help.txt
F2 helpit.txt
default 1
label 1
kernel /boot/vmlinuz
append video=vesafb:1024x768-32,ywrap,mtrr root=/dev/sda1 console=tty1 initrd=/boot/initrmfs.gz splash=silent quiet
label 2
kernel /boot/vmlinuz
append video=vesafb:1024x768-32,ywrap,mtrr root=/dev/sda2 console=tty1 initrd=/boot/initrmfs.gz splash=silent quiet
label 3
kernel /boot/vmlinuz
append video=vesafb:1024x768-32,ywrap,mtrr root=/dev/sda console=tty1 initrd=/boot/initrmfs.gz splash=silent quiet
label 4
kernel /boot/vmlinuz
append video=vesafb:1024x768-32,ywrap,mtrr root=/dev/hda1 console=tty1 initrd=/boot/initrmfs.gz splash=silent quiet
label 8
kernel /boot/vmlinuz
append video=vesafb:1024x768-32,ywrap,mtrr root=/dev/sda1 console=tty1 initrd=/boot/initrmfs.gz debug=1 splash=verbose
label 9
kernel memtest
# install isolinux binary
[ -e /usr/lib/syslinux/isolinux.bin ] && cp /usr/lib/syslinux/isolinux.bin $MOUNTDIR2/boot/isolinux/isolinux.bin ||
{ echo "Error: /boot/memtest.bin not found. Please install the memtest86 package.";
exit 1; }
# install memtest
[ -e /boot/memtest.bin ] && cp /boot/memtest.bin $MOUNTDIR2/boot/isolinux/memtest ||
{ echo "Error: /boot/memtest.bin not found. Please install the memtest86 package.";
exit 1; }
# copy static files for specific platform
[ -e $TARGETDIR/platforms/$PLATFORM/root ] &&
cp -a $TARGETDIR/platforms/$PLATFORM/root/* $MOUNTDIR2/
MOUNTDIR=$MOUNTDIR2 produce_media
exit 0
# produce bootcd ISO image
for i in $LIVECD_TARGETS; do
. $TARGETDIR/platforms/$i/
[ "$FORCE" = "1" -o ! -e "$LOCALSTATEDIR/$CURR_MEDIA_NAME" ] && {
echo "Creating bootable livecd..."
[ "$MOUNTDIR" ] && rm -rf $MOUNTDIR/*
[ "$MOUNTDIR2" ] && rm -rf $MOUNTDIR2/*
#[ "$EXTRA_PACKAGES" ] && {
# echo "- installing repository with extra packages"
# add_packages_to_repository $MOUNTDIR/repositories/extras "$EXTRA_PACKAGES"
for i in ${MEDIA_NAMES[*]}; do
echo "- installing $i"
openmamba bootcd menu
1) mount rootfs from first USB storage (sda1)
2) mount rootfs from second USB storage (sda2)
3) mount rootfs from unpartitioned USB storage (sda)
4) mount rootfs from first IDE (hda)
8) mount rootfs from first USB storage (sda1) in debug mode
9) Start a system memory benchmark
Please, enter 1 or wait 10 seconds to boot automatically.
You can also pass some extra parameters to the kernel. For example:
boot: 1 root=/dev/sdb1
If you have trouble during boot stage please use debug=1 and vga=normal
options in order to see system startup messages.
NOTE: In most cases the kernel will detect your hardware, and parameters are
not needed. If you don't need to enter any parameters, hit ENTER to boot
the default kernel.
Menu' di avvio di openmamba
1) monta il rootfs dal primo storage USB (sda1)
2) monta il rootfs dal secondo storage USB (sda2)
3) monta il rootfs da uno storage USB non partizionato (sda)
4) monta il rootfs dal primo disco IDE (hda)
8) monta il rootfs dal primo storage USB (sda1) in modalita' di debug
9) Esegue un test della memoria di sistema
Digitare 1 o attendere 10 secondi per l'avvio automatico.
E' possibile passare parametri extra al kernel. Ad esempio:
boot: 1 root=/dev/sdb1
In caso di problemi all'avvio utilizzare le opzioni debug=1 e vga=normal
per visualizzare su schermo i messaggi di avvio di sistema.
NOTA: nella maggior parte dei casi il kernel riconoscera' automaticamente
l'hardware senza bisogno di inserire alcun parametro. Premere INVIO per
avviare il kernel in modalita' predefinita.
openmamba bootcd menu
F1) Help
F2) Aiuto
Please, make sure your storage device is connected then press ENTER or
wait 10 seconds to boot with default options.
Assicurarsi che il dispositivo di storage sia connesso e premere INVIO o
attendere 10 secondi per l'avvio in modalita' predefinita.
openmamba bootcd
* removed installation of unused kernel-nongpl packages
* add reiserfs, ata_piix and sta_via support
* first release
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users. This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
the GNU Library General Public License instead.) You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have. You must make sure that they, too, receive or can get the
source code. And you must show them these terms so they know their
We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.
Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software. If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.
Finally, any free program is threatened constantly by software
patents. We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary. To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and
modification follow.
0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License. The "Program", below,
refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language. (Hereinafter, translation is included without limitation in
the term "modification".) Each licensee is addressed as "you".
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.
1. You may copy and distribute verbatim copies of the Program's
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.
You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a fee.
2. You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) You must cause the modified files to carry prominent notices
stating that you changed the files and the date of any change.
b) You must cause any work that you distribute or publish, that in
whole or in part contains or is derived from the Program or any
part thereof, to be licensed as a whole at no charge to all third
parties under the terms of this License.
c) If the modified program normally reads commands interactively
when run, you must cause it, when started running for such
interactive use in the most ordinary way, to print or display an
announcement including an appropriate copyright notice and a
notice that there is no warranty (or else, saying that you provide
a warranty) and that users may redistribute the program under
these conditions, and telling the user how to view a copy of this
License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.
In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:
a) Accompany it with the complete corresponding machine-readable
source code, which must be distributed under the terms of Sections
1 and 2 above on a medium customarily used for software interchange; or,
b) Accompany it with a written offer, valid for at least three
years, to give any third party, for a charge no more than your
cost of physically performing source distribution, a complete
machine-readable copy of the corresponding source code, to be
distributed under the terms of Sections 1 and 2 above on a medium
customarily used for software interchange; or,
c) Accompany it with the information you received as to the offer
to distribute corresponding source code. (This alternative is
allowed only for noncommercial distribution and only if you
received the program in object code or executable form with such
an offer, in accord with Subsection b above.)
The source code for a work means the preferred form of the work for
making modifications to it. For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable. However, as a
special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component
itself accompanies the executable.
If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.
4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this License.
However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such
parties remain in full compliance.
5. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Program or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying