Project

General

Profile

Actions

Feature #1004

closed

Drop ext4 image build

Added by Hammel 10 months ago. Updated 9 months ago.

Status:
Closed
Priority:
Immediate
Assignee:
Category:
04 - Root File System
Target version:
Start date:
05 Jul 2023
Due date:
% Done:

100%

Estimated time:
Severity:
01 - Critical

Description

There is no need for this. The tar image option in Buildroot is sufficient for creating a file system than can be copied to an SD card. The ext4 is overkill and can die too easily if enough space has not been allocated in the configuration file.


Related issues

Related to launcher - Bug #951: Keyboard not working with Media, Player or Kiosk modesClosedHammel26 Mar 2023

Actions
Actions #1

Updated by Hammel 9 months ago

  • Severity changed from 03 - Medium to 01 - Critical
Actions #2

Updated by Hammel 9 months ago

The steps to implement this are as follows.

  1. gzip rootfs.tar in buildroot config
  2. Add rpi-userland build to buildroot config
  3. Remove -ext3 build target
  4. Copy <br>/output/images/rootfs.tar to <pkgdir> in -pkg
  5. Change dd_root_partition to unpack_rootfs in mkinstall

The rootfs.squashfs and rootfs.tar will already have rpitools since buildroot is now handling them.

If this works then we can drop the gles component build. However, if the Buildroot build doesn't work then we'll have to keep the PiBox build and generate the squashfs after we copy in the rpi-userland stuff to the rootfs tarball.

Buildroot's version of GLES:
commit 14b90ff9d9f031391a299e6e006965d02bfd1bb1
Author: Dave Stevenson <>
Date: Wed Nov 24 16:51:04 2021 +0000

My Version:
commit f97b1af1b3e653f9da2c1a3643479bfd469e3b74 (HEAD)
Author: popcornmix <>
Date: Thu May 28 14:34:53 2020 +0100

Actions #3

Updated by Hammel 9 months ago

  • Status changed from New to In Progress
  • % Done changed from 0 to 10
Actions #4

Updated by Hammel 9 months ago

  • % Done changed from 10 to 50

Updates made to rpi1. Test build of buildroot in progress.

When that completes, rebuild all pkg targets and test on RPi2 hardware.

Actions #5

Updated by Hammel 9 months ago

Tested on hardware. Seems to be okay - the tvservice app is there and the rest of the binaries are in the buildroot/output/target tree. However, I can't run manual tests on hardware because the keyboard doesn't work (see RM #951). The only thing I see that didn't get installed but that I used previously was the hello_pi source directory, which has Vera.ttf font. I'm not sure if I used that anywhere, but if any of the system apps do I can just copy that file from build/rpi-userland*/host_applications/linux/apps/hello_pi/hello_font/Vera.ttf in the postbuild.sh script.

Actions #6

Updated by Hammel 9 months ago

This seems to work, in general. I also fixed the keyboard problem. So the check-ins will be combined later.

However, the change to using Buildroot's rpi-userland package changes the location of the libraries. They used to be in /opt/vc/lib. Now they are in /usr/lib. That requires changing omxplayer's build.

Actions #7

Updated by Hammel 9 months ago

omxplayer doesn't build - it's missing some libraries, even after I update the custom Makefiles.

Honestly, I don't want to mess with this. The external build of rpi-userland and omxplayer works fine. Instead of making these big changes I'm going to leave them the way they were.

So that means we need to have the gles stuff added to the custom tree that gets copied to the build tree before we run postbuild.sh, which is run before squashfs. I think that already happens, but I need to check to be sure. It just requires that gles is built before buildroot, which is what was happening previously.

In any case, the Buildroot build will just generate a tarball (for non-overlay installs) and the squashfs (for overlay installs). We might even simply this by just generating the squashfs and then mounting it to copy over to the non-overlay file system.

Actions #8

Updated by Hammel 9 months ago

To unpack a squashfs

  sudo unsquashfs -f -d <dest> <squashfs file>

So that means I don't need the tarball generated.

To mount the squashfs (if the unsquashfs copy doesn't work as desired)

  sudo mount -t squashfs -o loop rootfs.squashfs /mnt/disk
Actions #9

Updated by Hammel 9 months ago

  • % Done changed from 50 to 70

Updated the build to remove ext3 and keep just the squashfs image, plus fixed the keyboard problem of RM #951. The build completes fine and the mkXXX.sh scripts generate a file image with either overlay or non-overlay rootfs without error. omxplayer builds against the staging tree.

What's left is to test the build on hardware.

Actions #10

Updated by Hammel 9 months ago

  • Related to Bug #951: Keyboard not working with Media, Player or Kiosk modes added
Actions #11

Updated by Hammel 9 months ago

  • Status changed from In Progress to Closed
  • % Done changed from 70 to 100

Tested on hw and everything works as expected. Have not tested apps yet, but that will come later.

Changes committed and pushed.

Closing issue.

Actions

Also available in: Atom PDF