README.md: Adapt to ADVANSEE's fork

Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
rpi: mkimage: Fix root privilege check

The UID environment variable is not provided by all shells (e.g. not by Ubuntu
14.04's sh, which defaults to dash), so use instead the id command to determine
the effective user ID.

Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
rpi: mkimage: Fix loop device management

On some systems (e.g. Ubuntu 14.04), the util-linux package is outdated, so the
losetup command does not provide the -P and -D options, respectively to scan the
partition table and to detach all used loop devices. It is also wrong to detach
all used loop devices before exiting this script since some loop devices might
have been set up before this script was launched.

In order to fix this, handle partitions thanks to offset and size limit options,
and detach only the loop devices set up by this script.

Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
rpi: mk* scripts: Fix possible busy folder preventing unmount

The partition activity created by these scripts triggers some processes on some
systems (e.g. Ubuntu 14.04). These processes then prevent umount from working,
so these scripts must wait for these processes to finish before invoking umount.

Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
rpi: mkimage: Place the generated image into the images folder

This is where it belongs, and this is more convenient than leaving it at the top
of the build folder.

Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
rpi: mkimage: Make the image large enough for future additions

Change the image size from 64 MiB to 256 MiB in order to have enough room left
for future additions.

Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
rpi-firmware: Fix config naming breakage

BR2_PACKAGE_RPI_FIRMWARE was used instead of BR2_TARGET_RPI_FIRMWARE, preventing
some config options from being available. Most config options also had the same
naming error in their prefix.

Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
rpi-userland: No need for staging cleanup

The files added by default to the staging folder by the install are harmless, so
keep them and simplify the make rules of this package.

Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
rpi-userland: Install to /usr

Installing to /usr instead of to /opt/vc has several benefits:
 - The libraries and binaries paths are defaults, so no /lib or /bin prefix
   fixup is required at build time for packages depending on rpi-userland, and
   no LD_LIBRARY_PATH / ld.so.conf or PATH fixup is required at run time.
 - The target folder cleanup can be partially handled by target-finalize, so the
   make rules of this package can be simplified.
 - This fixes the pkgconfig files that were installed in a path ignored by other
   packages, so the QMAKE_LIBS_OPENGL_ES2 option is no longer needed for
   qt5base.

Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
rpi-userland: Fix vcfiled startup

The make rules of this package prevented the VideoCore file server daemon from
starting, so add a suitable (i.e. compatible with BuildRoot) startup file for
this daemon.

Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
rpi: defconfig: Maintain a single kernel version

Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
rpi: defconfig: Save using default format

Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
rpi: Use rootfs overlay instead of skeleton

The custom rootfs skeleton was almost identical to the default one, so use
instead a rootfs overlay containing only the differences, which also gives
access to more BuildRoot features.

Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
rpi: Run /etc/init.d/rc* on ttyAMA0

Use ttyAMA0 as the default tty.

Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
rpi: Make session profile more convenient

Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
rpi: Automatically generate sdcard.img

Once all BuildRoot image files have been built, always generate sdcard.img so
that it is readily available without further manual operation.

Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
rpi: linux: Use rpi Git ref instead of remote patch

This makes maintenance easier and more reliable since a Git ref is stable while
a remote patch may change unexpectedly, and it's better to stick to the official
rpi Git repository.

Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
rpi: Bump versions

Bump rpi-firmware, linux and rpi-userland versions in order to get the latest
updates.

Bumping linux version will especially be useful for DHCP because commit
25673c31a1cd5bcbc000c9b30c2d7ad81c831fa2 is required in order to avoid a system
hang once a lease has been obtained.

Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
rpi: Build with -O2 instead of -Os

Speed is more important than size.

Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
rpi: Use extended firmware

This is required in order to enable all hardware features.

Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>