View Single Post
Old 04-10-2016, 11:04 AM   #12
knc1
Going Viral
knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.
 
knc1's Avatar
 
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
Image building, the set-up

After sleeping on this situation over-night . . .
I decided I would native build (under emulation) the things I want in this new image.

The set-up process:

Ref: https://wiki.debian.org/ArmHardFloatChroot (using: armel / jessie instead of examples)
Requires to build: https://packages.debian.org/jessie/qemu-user-static
Requires to run: binfmt-misc support in host kernel
Spoiler:

Code:
~ $ sudo mkdir /var1/ARMel
~ $ sudo chown you:yours /var1/ARMel
~ $ cd /var1
var1 $ sudo qemu-debootstrap --no-check-gpg --arch=armel jessie /var1/ARMel ftp://ftp.debian.org/debian
- - - - -
I: Base system installed successfully.

# 'root' is the only user in the chroot at the moment.
sudo chroot ARMel
root@core2quad:/# mount -t proc proc /proc

# No daemons in the chroot allowed:
root@core2quad:/# echo 'exit 101' > /usr/sbin/policy-rc.d
root@core2quad:/# chmod +x /usr/sbin/policy-rc.d

# Fix-up package sources:
root@core2quad:/# cat /etc/apt/sources.list
deb http://ftp.us.debian.org/debian jessie main
root@core2quad:/# echo 'deb-src http://ftp.us.debian.org/debian jessie main' >> /etc/apt/sources.list

# Note: I keep seeing:
# qemu: Unsupported syscall: 374
# but nothing has crashed (yet) - I probably should be running a newer qemu-user-static

# update package database
root@core2quad:/# apt-get update

# fix-up (current only) PS1 (because I have more than one terminal open at a time):
core2quad:/root# PS1='ARMel \h:\w \$ '
ARMel core2quad:/ # 

# make sure packages key-ring is current:
ARMel core2quad:/ # apt-get install debian-archive-keyring
Reading package lists... Done
Building dependency tree... Done
debian-archive-keyring is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

# install the build essentials and a selection of the suggested packages:
ARMel core2quad:/ # apt-get install build-essential gcc-4.9-locales \
  debian-keyring libstdc++6-4.9-dbg autoconf automake libtool flex bison \
  gdb libgcc1-dbg libgomp1-dbg libatomic1-dbg libasan1-dbg libubsan0-dbg \
  ed libterm-readline-gnu-perl libterm-readline-perl-perl libb-lint-perl \
  libcpanplus-dist-build-perl libcpanplus-perl libfile-checktree-perl \
  libobject-accessor-perl

# plus - we will need to be able to create u-boot images:
ARMel core2quad:/ # apt-get install u-boot-tools
ARMel core2quad:/ #

There, that should be a good starting set of 'stuff' .

meanwhile - see just how far I can get building the things I want in my K2-Rescue image.
knc1 is offline   Reply With Quote