Skip to content

WIP: Resolve "Reorganize directory structure"

Subs requested to merge 130-reorganize-directory-structure into master

Closes #130 (closed)

What needs to be carefully checked :

  • Dockerfile: edited to make it more "buildroot way" (no need for any sed) + for a git reset HEAD --hard in buildroot submodule dir to be ready for bumps on runners
  • Makefile: I don't know anything about makefiles. The one I wrote fulfilled my needs : make, make ..._defconfig, make clean and make V=1 sdl2-dirclean sdl2
  • mergeToBR.sh is very strict and picky when it comes to merging. I tested merToBR.sh in various ways:
    • source and dest files fit the list.hash
    • source and dest file don't fit the list.hash : dest file md5 differs from the expected
    • a file exsists in custom/ and is not listed in list.hash (except list.hash itself)
    • files that need to be added to dest (with the file already existing in dest, different than source or not)
    • the script reports which files are olk to copy, ok to patch if the dest file is not the expected one but can be patched, and which file can't be patched
  • generateCustom.sh generates the custom folder based on the current buildroot dir, and rename the previous custom dir Defconfigs all had to be make ..._defconfig && make oldconfig && make savedefconfig because on some unstability in CI

Here is how one would bump buildroot now (for ex: bump to 2017.08-rc2):

( cd buildroot && git fetch && git checkout 2017.08-rc2 )
BUILDROOT_DIR=./buildroot/ scripts/linux/mergeToBR.sh -f
BUILDROOT_DIR=./buildroot/ scripts/linux/generateCustom.sh
BUILDROOT_DIR=./buildroot/ scripts/linux/mergeToBR.sh

Explanations:

  • BUILDROOT_DIR=./buildroot/ scripts/linux/mergeToBR.sh -f would apply what can be applied, here is a part of the output of the example:
Valid files: system/device_table.txt package/sdl_sound/Config.in package/rpi-firmware/config.txt package/rpi-firmware/cmdline.txt package/kodi-visualisation-waveform/Config.in package/kodi-visualisation-waveforhue/Config.in package/kodi-visualisation-spectrum/Config.in package/kodi-visualisation-goom/Config.in package/kodi-visualisation-fishbmc/Config.in package/dropbear/S50dropbear 
Valid patches: package/sdl_sound/sdl_sound.mk package/omxplayer/omxplayer.mk package/mesa3d/mesa3d.mk package/lirc-tools/lirc-tools.mk package/libcec/libcec.mk package/ffmpeg/ffmpeg.mk package/eigen/eigen.mk package/bluez_utils/Config.in 
Files that need to be reworked: support/scripts/mkusers package/sqlite/sqlite.mk package/skeleton/skeleton.mk package/sdl2/sdl2.mk package/sdl2/sdl2.hash package/sdl2/Config.in package/rpi-firmware/rpi-firmware.mk package/rpi-firmware/rpi-firmware.hash package/python-django/python-django.mk package/python-django/python-django.hash package/nodejs/nodejs.mk package/nodejs/Config.in package/linux-firmware/linux-firmware.mk package/kodi/Config.in package/kodi-visualisation-shadertoy/Config.in package/kodi-visualisation-fountain/Config.in package/bluez_utils/bluez_utils.mk package/kodi/kodi.mk
  • BUILDROOT_DIR=./buildroot/ scripts/linux/generateCustom.sh generates a new custom folder, renaming the previous one to custom.pre-2017.08-rc2
  • BUILDROOT_DIR=./buildroot/ scripts/linux/mergeToBR.sh applies the new custom to ./buildroot/
  • the user now must take care of the remaining files liste in Files that need to be reworked
  • Once the buildroot dir is finally customized, the user must run again BUILDROOT_DIR=./buildroot/ scripts/linux/generateCustom.sh, making sure custom.pre-2017.08-rc2 has been deleted before
  • and finally git add custom/* and then commit !
Edited by Subs

Merge request reports