Quirky installed on old PC

Comments
The old PC (without monitor) that I bought a few days ago, had Windows 10 installed. I reported on the purchase here:
http://barryk.org/news/?viewDetailed=00532

I want this PC to be my workhorse for big compiling jobs, such as with OpenEmbedded. Windows is not wanted, so I wiped all the partitions, using Gparted.

Then I created partitions:
sda1 fat32 511MB
sda2 ext4 approx 860GB
sda3 ext4 approx 32GB
sda5 swap partition 16GB (logical partition)


The "BIOS" on the motherboard is actually UEFI-firmware, so it looks for what are called ESP fat partitions at bootup.
There is no need for any boot manager, other than that provided by the UEFI-firmware. There is nothing to configure in the UEFI-setup, the factory default is that it will look for ESP partitions, first on the internal hard drive.

I wrote how to do this kind of easy-peasy installation last year:
http://barryk.org/news/?viewDetailed=00475

In Gparted, right-click on sda1 and set the "boot" and "esp" flags.
Copy the "EFI" folder and file "vmlinuz" from partition-1 of the USB stick (that I booted Quirky off) to sda1.

Open /mnt/sda1/EFI/BOOT/syslinux.cfg in an editor and change to "root=/dev/sda3" --- I am next going to install Quirky to sda3

In the menu, Setup -> Quirky Universal Installer, choose to install to a partition, and choose sda3

That's it. Shutdown, remove the USB-stick, power-up and you are running the installed Quirky.
Posted on 5 May 2017, 21:27 - Categories: Linux


Bought old PC

Comments
As reported yesterday, needed a PC for doing OpenEmbedded compiles. My laptop, running one core, took about 24 hours to compile everything.

So I looked in our free online marketplace, http://gumtree.com.au, and found one that looks good, asking AU$295 negotiable.

I bought it for AU$270, typing on it right now.

It has an Intel i5 2400 3.10GHz CPU, 16GB DDR3 (1333MHz) RAM, 1TB hard drive, DVD drive, a multi-card reader, and a Radeon HD6870 video card.

The owner told me it is 3 years old, but it is older than that. The BIOS is dated 10/13/2011. It is AMI BIOS version 7.15.

So, more like 5 years old. No complaints though. That CPU is fairly fast, and with the 16GB RAM, OpenEmbedded builds are going to be very fast.

It is a middy-tower case. Never thought that I would be buying one of those again!

The first thing I did was remove the video card, now using the on-board Intel graphics. Good enough for my needs.
The motherboard has a HDMI socket, great, using my second TV as the monitor.

Ah, the motherboard is showing it's age, no USB3 sockets.

Next job is to wipe Windows 10 off the hard drive. Currently running Quirky 8.1.6, booted off a USB stick.
Posted on 2 May 2017, 22:48 - Categories: Linux


New Quirky layer in OpenEmbedded

Comments
Having lots of fun. Recently posted about getting started with Yocto/OpenEmbedded:
http://barryk.org/news/?viewDetailed=00530

The Yocto books from Amazon arrived a few days ago, and I have had my nose down. Complicated, but making progress.

I decided to use OpenEmbedded from git as the basis for building packages for Quirky, not Yocto.

I have created a new layer, named 'meta-quirky', and so far it builds a basic X11 system with development tools.

Kernel also. I have just now looked at how to substitute my own '.config' file, will give that a go.

I will add more packages later. But very carefully, as want to build a very lean-and-mean distro.

Currently, just compiling packages, which are then imported into woofQ. However, in theory, OE could do the whole thing, build an image file ready to be written to a flash stick.
Down the track, might aim to achieve this, if I can master OE sufficiently.

Then, I could provide a single tarball, that someone can download, then run just a couple of commands and it builds the entire Quirky (or Puppy) image file. All it would need is a compatible host system, such as Quirky 8.1.6 or one of the ubuntu-pups or debian-pups (with some small fixes and extra pkgs installed).

The biggest problem right now is how long a build takes. Even a minimal build takes 12 hours, a big one (LibreOffice etc.) more like 24 hours.
That's because it is running one core only on my laptop.
Maybe I should invest in a fast PC/laptop, maybe i5 or i7 CPU, 8GB RAM, 256GB SSD ....don't want to spend the money right now though...
Posted on 1 May 2017, 17:39 - Categories: Linux


Part 2, LibreOffice compiled in OE

Comments
I am documenting how I compiled LibreOffice in OpenEmbedded. Part 1 is the previous blog post:
http://barryk.org/news/?viewDetailed=00529

One thing about that previous post. I changed the number of parallel processes to one. That is because I have an overheating problem with my laptop, but you might want leave those out, and it will default to using all CPU cores.

Setup OE environment
As explained in the previous post, folder "oe-project" has been created. There needs to be a bit of preliminary work before the actual build can take place...
# cd oe-project

# source ./oe-init-build-env buildQ

...working dir is now in buildQ

buildQ/conf/bblayers.conf, add the layers that we want:
BBLAYERS ?= " \
/mnt/sda1/projects/oe/oe-project/meta \
/mnt/sda1/projects/oe/oe-project/meta-oe \
/mnt/sda1/projects/oe/oe-project/meta-python \
/mnt/sda1/projects/oe/oe-project/meta-office \
"

confirm layer is picked up:
# bitbake-layers show-layers

keep the downloaded src pkgs outside:
# ln -s ../../downloads downloads

edit buildQ/conf/local.conf:
----------------------------
change these lines:
MACHINE ??= "qemux86-64"
PACKAGE_CLASSES ?= "package_deb"

append:
BB_NUMBER_THREADS = "1"
PARALLEL_MAKE = "-j 1"
BB_NUMBER_PARSE_THREADS = "1"

# in yocto, got an error when building initramfs, default maxsize is too small.
# INITRAMFS_MAXSIZE is set in meta/conf/bitbake.conf (= 131072 kb, 128MB).
# override here, 160MB:
INITRAMFS_MAXSIZE = "163840"

# yocto/poky/meta/conf/bitbake.conf has this line:
# DISTRO_FEATURES_BACKFILL = "pulseaudio sysvinit bluez5 gobject-introspection-data"
# ...this could be edited, or insert this into build/conf/local.conf:
#DISTRO_FEATURES_BACKFILL_CONSIDERED = "pulseaudio"

# want to add libreoffice. have already installed meta-office layer
DISTRO_FEATURES_append = " opengl"
IMAGE_INSTALL_append = " libreoffice"
<

I personally would prefer not to have 'pulseaudio'. Unfortunately, it is required to be there in some recipes in OE. Then there is the problem of the latest Firefox requiring it.
So, I have left 'pulseaudio' in the build for now.

Fix LibreOffice recipes
I am posting fixes to the recipes here, after failures occurred, so hopefully if someone follows my instructions, the build will just sail through.

The Libreoffice recipes specify two dependencies, 'clucene' and 'postgresql', however, these packages failed to build. So, I removed them from the LibreOffice recipes.
These are the two recipe files:

/mnt/sda1/projects/oe/oe-project/meta-office/recipes-libreoffice/libreoffice/libreoffice.bb,
libreoffice-native.bb

In libreoffice.bb I took out these two lines:
clucene-core \
--with-system-clucene \

In libreoffice-native.bb I took out:
clucene-core-native \
--with-system-clucene \

To get rid of postgresql, edit libreoffice.bb
remove postgresql line from here, in libreoffice.bb:
PACKAGECONFIG ??= " \
gtk \
mariadb \
postgresql \
"
insert this configure option:
--disable-postgresql-sdbc \
and comment-out this line:
PACKAGECONFIG[postgresql] = "--enable-postgresql-sdbc --with-system-postgresql, --disable-postgresql-sdbc, postgresql"
<

Not there yet. Unpacking of libreoffice-native failed, reported that 'unzip' does not exist. Then, configuring, failed, reported something about 'neon' package not being in the repository.
To fix both of these:
have added these deps to libreoffice-native.bb:

unzip-native \
neon-native \
insert this configure option:
--with-system-neon \

added dep to libreoffice.bb:
unzip \
<

Start the build
Having already run that "source ./oe-init-build-env buildQ" command, "pwd" will show that you are now in the "buildQ" folder, and everything is setup ready to build. Do this:

# bitbake core-image-sato-sdk

If you get a failure somewhere, it may not be a show-stopper, and you can keep going with:

# bitbake --continue core-image-sato-sdk

Be prepared to wait a very long time!
Posted on 23 Apr 2017, 18:30 - Categories: Linux


LibreOffice compiled in OE

Comments
My play with OpenEmbedded/Yocto is continuing, with success. For a very long time, I have dreamed of compiling OpenOffice, then LibreOffice, from source. It has been a couple of years since I last tried, but the few times that I had a go, just never got there. Too big and complex, too many failures. This was attempted on various flavours of Puppy and Quirky.

Now, having another go at being able to build a Quirky (or pup) from packages that I have compiled entirely from source, rather than relying on the effort of some other distro, I thought the cherry on the cake would be if I could actually get it to compile LibreOffice.

This blog post is to report success. Well, almost. There was a little fudge that I had to do to get Libreoffice to compile, then the "do_install" function failed. However, it is all there, and I can create a binary package manually.

I am communicating with Andreas, the maintainer of the LibreOffice recipe in OpenEmbedded, so hopefully the "fudge" can get fixed. For now, it would be good to document how I got this far. Remember, I am an almost absolute beginner with OE/Yocto, so there is room for improvement. However, documenting my steps might help others. So, here we go...

The host system
The host operating system has to be setup to be OE-friendly. There are online instructions for the major OS's, but I am running Quirky Linux 8.1.6, x86_64. This is a full installation, not one of those frugal thingies that you can do with Puppy Linux.
Quirky, being built with Ubuntu 16.04 Xenial Xerus DEBs, is pretty close to OK, just needs some tweaks, as documented here:
Running Quirky 8.1.6 x86_64

'devx' PET must be installed.

Needs 'setterm' utility, this is in the 'util-linux' DEB, download and extract
this utility, to /usr/bin:
http://packages.ubuntu.com/xenial/util-linux

check (ok in quirky):
must have "messagebus" and "shutdown" groups in /etc/group
(had to add this to quirky):
must have "crontab" group.

bitbake requires python 3.4.0 or later.
have installed "python3" from the PPM.
this symlink is needed:
# ln -s python3.5 /usr/bin/python3
<

Downloading OE
Previously, I had followed the getting-started page for Yocto, and checked out the "morty" release.
However, I ran into issues when trying to incorporate the "meta-office" layer (which has LibreOffice recipe).
So, I decided to do things at a bit differently. I downloaded from the OpenEmbedded git repository, like this:
create these folders, then cd into:

# cd /mnt/sda1/projects/oe/downloads-oe

# git clone git://git.openembedded.org/meta-openembedded meta-openembedded --depth 1
# git clone git://git.openembedded.org/openembedded-core openembedded-core --depth 1
# git clone git://github.com/schnitzeltony/meta-office.git meta-office --depth 1
# git clone git://git.openembedded.org/bitbake bitbake --depth 1

# cd ..
# mkdir oe-project
# cp -a downloads/openembedded-core/* oe-project/
# cp -a downloads/openembedded-core/.templateconf oe-project/
# cp -a -f --remove-destination downloads/meta-openembedded/* oe-project/
# cp -a downloads/meta-office oe-project/
# cp -a downloads/bitbake oe-project/
<

The "--depth 1" means that no history is being downloaded, so I am working with the very latest only, of master branch.

Folder "oe-project" is now ready for action!

There is just one little hack needed, before can get going. Quirky, like Puppy, we run as the root user. We could probably set this up for a non-root user, but leaving things as they are, a couple of lines need to be commented out:
edit meta/classes/sanity.bbclass, comment-out:


if 0 == os.getuid():
raise_sanity_error("Do not use Bitbake as root.", d)

Like this (keep the indentation):

# if 0 == os.getuid():
# raise_sanity_error("Do not use Bitbake as root.", d)
<

The only downside to doing this, at completion of the build a whole lot of warning messages will be spitted out on the terminal, containing the text "is owned by uid 0, which is the same as the user running bitbake". These are warnings only, not errors.

The next step is to setup the build environment. That will be the next blog post.
Posted on 23 Apr 2017, 17:40 - Categories: Linux


Pages: ... [4] [5] [6] [7] [8] [9] ...