Hey,
> baselayout-lite will probably be obsoleted very soon in favor of
> baselayout-2 (aka openrc). A project developed with busybox,mdev etc in
> mind. I highly suggest you explore that route vs -lite.
That's also what I did. I've attached my notes on what I did. In particular,
I've noted everything (I hope anyway) I did on the embedded rootfs. That
doesn't include emerging/compiling the packages in the development rootfs.
Also, I have only included end results, not experiments with different
versions of packages and patches etc.
I've also included my overlay directory. You'll have to unmask some of those
packages, because I generally used ~x86 versions for overlays. The contents of
the tgz should go into /usr/local/, and you should add a
PORTDIR_OVERLAY="/usr/local/portage" to your make.conf.
Most of the patches in the overlays have already been reported to
bugs.gentoo.org or upstream.
Gr.
Matthijs
#
# Add ipv6 and alsa to the use flags
# Remove iconv from /usr/portage/profiles/uclibc/use.mask
emerge uclibc
# Make vim work
# Add app-editors/vim -minimal to /etc/portage/package.use
emerge vim
echo alias vim=vi >> /targetfull/root/.profile
ROOT=/targetfull emerge --ask --usepkgonly --nodeps baselayout
mkdir /targetfull/dev /targetfull/dev/shm /dev/targetfull/misc /targetfull/dev/pts /targetfull/sys /targetfull/proc
cd /targetfull/dev && MAKEDEV std ptmx console
# busybox' hwclock expects rtc to be in /dev/misc
cd /targetfull/dev/misc && MAKEDEV rtc
# Add some sound devices (minor values taken from /proc/asound/devices)
mkdir /targetfull/dev/snd
mknod /targetfull/dev/snd/controlC0 c 116 0
mknod /targetfull/dev/snd/pcmC0D0p c 116 16
mknod /targetfull/dev/snd/pcmC0D0c c 116 24
mknod /targetfull/dev/snd/timer c 116 33
ROOT=/targetfull emerge --ask --usepkgonly uclibc busybox
# Set our timezone
echo Europe/Amsterdam > /targetfull/etc/TZ
# Make busybox the default everything
mount -o bind /proc /targetfull/proc
chroot /targetfull /bin/busybox --install -s
umount /targetfull/proc
# Set a password and sane shell for root
chroot /targetfull passwd root
sed -i s/bash/sh/ /targetfull/etc/passwd
# Create dirs for rc / runscript to work
for i in coldplugged depconfig exclusive inactive scheduled starting
wasinactive daemons deptree failed options started stopping;
do mkdir /targetfull/lib/rc/init.d/$i; done
# Don't start unneeded and unavailable services
ROOT=/targetfull rc-config delete keymaps
ROOT=/targetfull rc-config delete consolefont
# Fixup inittab
TODO
# Install dropbear and start it by default
ROOT=/targetfull emerge --ask --usepkgonly dropbear rsync
ROOT=/targetfull rc-config add dropbear default
#echo -e "/dev/sda2 / ext2 defaults 0 0" > /targetfull/etc/fstab
echo -e "proc /proc proc defaults 0 0" >> /targetfull/etc/fstab
echo -e "sysfs /sys sysfs defaults 0 0" >> /targetfull/etc/fstab
echo -e "tmpfs /dev/shm tmpfs defaults 0 0" >> /targetfull/etc/fstab
# Set up networking (The ln will work whatever the current working dir is)
ln -s net.lo /targetfull/etc/init.d/net.eth0
ROOT=/targetfull rc-config add net.eth0 default
# Ensure there is a script for udhcpc / busybox to call (this is normally done
# by the udhcp ebuild).
mkdir -p /targetfull/lib/rcscripts/sh
cp /usr/portage/net-misc/udhcp/files/udhcpc.sh /targetfull/lib/rcscripts/sh/
chmod a+x /targetfull/lib/rcscripts/sh/udhcpc.sh
# Create some stuff to make dropbear happy
mkdir /targetfull/var/log
touch /targetfull/var/log/lastlog
mkdir /targetfull/root
# Create a /boot to put the kernel (config) in.
mkdir /targefull/boot
# Create ssh keys for dropbear (useful if /targetfull is not the actual
# target device, to prevent the ssh keys from being regenerated every
# time).
mkdir /targetfull/etc/dropbear
chroot /targetfull /usr/bin/dropbearkey -t rsa -f /etc/dropbear/dropbear_rsa_host_key
chroot /targetfull /usr/bin/dropbearkey -t rsa -f /etc/dropbear/dropbear_rsa_host_key
# Add to /etc/portage/profile/package.provided
# sys-devel/libtool-1.5.24
# app-admin/eselect-esd-1.0
# gnome-extra/gnome-audio-2.0.0
ROOT=/targetfull emerge --ask --usepkgonly pulseaudio
cp /usr/lib/libltdl.so.* /targetfull/usr/lib
# Let alsa and pulse start by default
ROOT=/targetfull rc-config add pulseaudio default
ROOT=/targetfull rc-config add alsasound default
# Add some groups needed for dbus and avahi
# Not sure why emerge doesn't do this...
egrep "(messagebus|avahi|netdev|pulse)" /etc/group >> /targetfull/etc/group
egrep "(messagebus|avahi|pulse)" /etc/passwd >> /targetfull/etc/passwd
# Make sound devices available for system-wide pulse daemon
chown -R pulse

ulse /targetfull/dev/snd/