* Remove create_desktop_package.sh for rk3318 board from
config/optional, clearing the whole directory tree
* Add an extension to implement serverflags workaround
for X.Org and Lima driver not being autodetected
* Fix rk3318-box and rk322x family to use extension in place
of 40-serverflags.conf bsp file
- this extension is _100% optional_ and shouldn't adversely affect any builds if not enabled
- requires `UEFI_EDK2_BOARD_ID` to be set in board file, so we know which UEFI/edk2 build to use
- it finds the latest edk2 version from GitHub automatically (currently `v0.9.1`)
- it downloads (and caches) the correct edk2 build image automatically
- if forces certain aspects of the image:
- must use GPT partitioning
- must NOT use a separate /boot partition
- it _disables_ the building and deploying of u-boot _completely_ (thus blobs etc are from edk2)
- it creates a GPT `"uboot"` partition pointing to edk2's FIT, required by SPL
- this extension:
- automatically enables 'grub-with-dtb'
- automatically enable 'initramfs-usb-gadget-ums', to compensate for lack of ums/rockusb since we dont have u-boot anymore
- this optional extension adds an initramfs script that:
- enumerates and filters all block devices
- exposes each device as an UMS (USB Mass Storage) in an USB Gadget
- loops forever with info (board never boots)
- the idea here is to compensate for UEFI's lack of "ums" or "rockusb" mode that's present in u-boot
- it also allows to expose USB/NVMe devices that might or not be detected by bootloader, if the kernel works
- this should make `09_linux_with_dtb.sh` work across all RELEASE's, `sid` and `mantic` included
- extra: if `grub-mkconfig` (`update-grub`) fails, show all involved source files
- requires `KHADAS_OOWOW_BOARD_ID` set in board file (see next commit)
- always produces xz-compressed images, so this automatically disables `COMPRESS_OUTPUTIMAGE`
- uses `xze` script from Khadas, forcing `IN` and `OUT` env vars so it's not confused by fd 1
- to use, add `EXT=image-output-oowow` parameter to build
- to get into oowow:
- VIM3/VIM3L:
- download oowow SD card image from Khadas:
- VIM3: https://dl.khadas.com/products/oowow/system/vim3-oowow-latest-sd.img.gz
- VIM3L: https://dl.khadas.com/products/oowow/system/vim3l-oowow-latest-sd.img.gz
- write image to SD card, use BalenaEtcher or similar
- insert SD card into board (and remove NVMe if present and bootable)
- boot board into Upgrade mode, see https://docs.khadas.com/products/sbc/vim3/install-os/boot-into-upgrade-mode
- oowow should be running now
- recommended: go into Advanced and reset to factory defaults, so MCU, PCIe/USB3 etc is reset to defaults
- VIM4/VIM4N/VIM1S/Edge2: those have oowow in SPI from factory, check out the manual
- there's a few ways to use these images with oowow:
- Using External media
- prepare media (USB), format it with ext4 or fat, copy produced oowow.img.xz to it
- for ease of use, rename the image file, so it begins with the board-id (`vim1s-/vim4-/edge2-` etc)
- boot board into oowow (see oowow's manual)
- insert media into board
- exit wizard, use "Write image to eMMC", browse to "../"
- change from "XXXX only" to "All" if you didn't rename the image
- choose image file and write
- (remove SD card if using one) and reboot
- Via network (Ethernet or Wi-Fi)
- boot board into oowow
- plug in Ethernet cable or connect to Wi-Fi (see oowow's manual)
- set the firewall mode to "allow" in oowow's Network Settings (see oowow's manual)
- obtain the IP address of the board in oowow (usually shown on top of the screen, or see manual)
- from a remote machine, use curl to upload and write the image to oowow's eMMC, example:
- `curl -L <ip_address>/shell/write | sh -s - <image_filename>.oowow.img.xz`
- reboot board
- From the Internet (one day)
- when Khadas publishes Armbian oowow images to their HTTP server
- I thought sending the spl_loader blob puts it into "Loader" mode, but...
- ... turns out "Loader" mode is a separate (rockusb, etc) mode.
- So if in Maskrom mode, just send the loader, and _trust_ it can now WriteLba
- still keeps the timeout, for when a loader is not accepted
- notice: the rkbin repo or the bins themselves are not hashed or included in the u-boot version (yet)
- make sure to avoid caching when building with those custom git/branch (`ARTIFACT_IGNORE_CACHE=yes CLEAN_LEVEL=make-uboot`)
- introduce hooks `grub_early_config`, `grub_pre_install` and `grub_late_config`
- what we see here is an extension that itself has hooks, that just works
- introduce extension `grub-with-dtb`, which
- enables `grub` extension
- requires `BOOT_FDT_FILE` to be set
- includes `/etc/armbian-grub-with-dtb` with `BOOT_FDT_FILE=` in the bsp-cli
- includes `/etc/kernel/postinst.d/armbian-grub-with-dtb` in the bsp-cli
- which reads the above and creates links for `/boot/armbian-dtb-<version>` when deploying deb's
- adds implementations of the hooks above to
- replace the distro's `10_linux` with our own `09_linux_with_dtb`
- which looks for `/boot/armbian-dtb-<version>`
- forcibly run `/etc/kernel/postinst.d/armbian-grub-with-dtb` during image build, since bsp-cli is installed after linux-image
- uefi-arm64: enable GRUB wallpaper by setting `UEFI_GRUB_TERMINAL=gfxterm`
- force GRUB_FONT so Ubuntu is not confused and gfxterm (incl wallpaper) finally works
- rootfs: rootfs-create: show a summary of the 20 biggest dirs, right before tarring the rootfs (for debugging)
- rootfs: rootfs-create: show usage of caches between first and second stages
- rootfs: rootfs-create: cleanup junk left by `debootstrap` after second stage
- rootfs: rootfs-create: _always_ clean apt stuff at the end
- rename `apt_purge_unneeded_packages()` to `apt_purge_unneeded_packages_and_clean_apt_caches()` for clarity
- image: `apt_purge_unneeded_packages_and_clean_apt_caches()`: warn if apt caches not empty; clean them off, always.
- host-utils: `local_apt_deb_cache_prepare()`: also test the target, warn if not empty
- extension: cleanup-space-final-image: do NOT clean apt stuff. done in core now
- the metric shit-ton of debugs added should help the next person who faces this in the future
- compress *all* present output images, not only .img
- remove 7zip compression & hostdep
- squash a few shortcircuits (yeah, this late in the game...)