Difference between revisions of "IoTGateway/BSP/Linux/Quark/BuildingDebianJessieRootfs"

From ESS-WIKI
Jump to: navigation, search
(Created page with "{{DISPLAYTITLE:Building Debian (Jessie) Rootfs for Quark}} <!-- {| align="right" |- | <span class="fck_mw_magic" _fck_mw_customtag="true" _fck_mw_tagname="TOC" _fck_mw_tagtype...")
 
Line 12: Line 12:
 
= Building Procedures =
 
= Building Procedures =
  
== debootstrap ==
+
== first stage rootfs ==
 +
 
 +
 
 
<syntaxhighlight lang="bash">
 
<syntaxhighlight lang="bash">
 
SID=jessie
 
SID=jessie

Revision as of 07:43, 1 November 2017


Host Required

Ubuntu 14.04 LTS

All building procedures are verified in Ubuntu 14.04 LTS.

Building Procedures

first stage rootfs

SID=jessie
IMAGE=./image-$SID-quark.ext3
ROOTFS=~/rootfs
dd if=/dev/zero of=$IMAGE bs=1G count=1
mkfs.ext3 $IMAGE
mkdir $ROOTFS
sudo mount -o loop $IMAGE $ROOTFS
sudo debootstrap --arch=i386 --foreign $SID $ROOTFS

chroot environment

beginning

sudo cp /etc/resolv.conf $ROOTFS/etc
HOME=/root sudo chroot $ROOTFS /bin/bash --login -i

installation

cd ~
cat <<EOT > /etc/apt/sources.list
deb http://ports.ubuntu.com/ubuntu-ports/ trusty main restricted universe multiverse
#deb http://ports.ubuntu.com/ubuntu-ports/ trusty-updates main restricted universe multiverse
#deb http://ports.ubuntu.com/ubuntu-ports/ trusty-security main restricted universe multiverse

#deb http://ports.ubuntu.com/ubuntu-ports/ trusty main universe
deb-src http://ports.ubuntu.com/ubuntu-ports/ trusty main universe
EOT

apt-get update

apt-get install sudo openssh-server net-tools wireless-tools lxde iputils-ping rsyslog alsa-utils --no-install-recommends
apt-get install xserver-xorg x11-utils x11-xserver-utils xterm lxdm lxmusic
apt-get install xscreensaver --no-install-recommends
apt-get install alsa-base python python3-dbus python3-apport samba-common smbclient gvfs
apt-get install anacron at-spi2-core avahi-daemon bc bluez-alsa bogofilter btrfs-tools colord dc galculator \
gdbserver genisoimage gksu gtk2-engines gvfs-fuse gvfs-backends hicolor-icon-theme inputattach kerneloops-daemon \
krb5-locales lftp menu menu-xdg ncurses-term p7zip-full pcmciautils policykit-desktop-privileges python-xdg rfkill \
screen scrot smemcap ssh-import-id tcpd ttf-dejavu-core ttf-freefont usbutils wamerican wget wpasupplicant xml-core \
xz-utils zip

wget -P ~ http://launchpadlibrarian.net/197440683/libdrm-freedreno1_2.4.56-1~ubuntu2_armhf.deb
dpkg -i ~/libdrm-freedreno1_2.4.56-1~ubuntu2_armhf.deb

apt-get install libegl1-mesa libgles1-mesa libgles2-mesa libgtk-3-bin

apt-get install libfm-modules libglib2.0-data libgtk2.0-bin libhtml-form-perl libhtml-format-perl libfont-afm-perl \
libhttp-daemon-perl libio-socket-inet6-perl libjpeg-progs libmailtools-perl libpam-ck-connector libxp6

apt-get install firefox fonts-wqy-zenhei smplayer

configuration

sed -i "s/^root:[^:]\+:/root::/" /etc/shadow
echo "quark" > /etc/hostname
echo -e "127.0.0.1    localhost \n127.0.1.1    `cat /etc/hostname`\n" > /etc/hosts

cat >> /etc/network/interfaces << EOT

auto eth0
iface eth0 inet dhcp
EOT

sed -i "s/# \"\\\e\[1~\"/\"\\\e\[1~\"/" /etc/inputrc; \
sed -i "s/# \"\\\e\[4~\"/\"\\\e\[4~\"/" /etc/inputrc; \
sed -i "s/# \"\\\e\[3~\"/\"\\\e\[3~\"/" /etc/inputrc; \
sed -i "s/# \"\\\e\[5~\"\: history/\"\\\e\[A\": history/" /etc/inputrc; \
sed -i "s/# \"\\\e\[6~\"\: history/\"\\\e\[B\": history/" /etc/inputrc

sed -i '/^# .*dircolors/s/^# //; /^# .*LS_OPTIONS/s/^# //;' /root/.bashrc
sed -i "s/\xf0\x0f\xb1\x8b/\x90\x0f\xb1\x8b/g" /lib/i386-linux-gnu/libpthread-2.19.so
sed -i '/\[Service\]/a Environment="TERM=xterm"' "/lib/systemd/system/serial-getty@.service"

dpkg-reconfigure tzdata
apt-get clean
history -c && rm ~/.bash_history

ending

logout
sudo rm $ROOTFS/etc/resolv.conf

modules & firmware

Copy the modules.tgz to /lib/modules.

Depending on chosen kernel, please copy/install proper modules $ROOTFS/lib/modules.

Depending the official build version :

For example : 4411A1LIV8210 Check your lib module path

Module.jpg

Load module

depmod -a 4.1.15-official_build_version
sync
If you already insert module, please send command "lsmod" and check it.
Depmod.jpg

Check your load module

Lsmod.jpg

Depending on chosen kernel, please copy/install firmware $ROOTFS/lib/firmwware.