Commit Graph

86 Commits

Author SHA1 Message Date
Paolo Sabatino
d953ddb1ef better indentation for x.org lima serverflags workaround 2023-12-09 14:19:32 +01:00
Paolo Sabatino
f6baa4c2f2 Use extension for Lima X.Org serverflags
* 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
2023-12-09 14:19:32 +01:00
amazingfate
8289ba7bf4 xiaomi-elish: add slot_suffix arg to kernel cmdline for qbootctl 2023-12-06 23:30:15 +08:00
amazingfate
8342030f2d extensions: abl: add mkbootimg to host dep 2023-12-02 17:31:04 +05:30
Ricardo Pardini
4e37b276d1 bash: run shellfmt, no changes 2023-11-25 13:38:30 +01:00
Gunjan Gupta
c51f412df8 Flash-kernel: Add workaround for broken upgrade 2023-11-22 21:31:07 +05:30
Ricardo Pardini
820472d137 extensions: uefi-edk2-rk3588: deploy edk2 (not u-boot) for rk3588 boards
- 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
2023-11-19 22:31:33 +01:00
Ricardo Pardini
055d871315 extensions: initramfs-usb-gadget-ums: kernel cmdline enables initramfs UMS of all block devices
- 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
2023-11-19 22:31:33 +01:00
Kevin Schmidt
72922908c5 Refresh jetson-nano board config. 2023-11-19 22:27:28 +01:00
Ricardo Pardini
ec4803f099 extensions: image-output-vhd: outputs the image in VHD format (for HyperV/Azure) with correct size 2023-11-06 16:17:33 +01:00
amazingfate
ac90826105 qcom-abl: use mkbootimg package to generate abl boot image 2023-10-26 21:17:01 +08:00
Ricardo Pardini
e436bf9e1d image-output-abl: fix shellcheck error 2023-10-26 21:17:01 +08:00
Ricardo Pardini
f5ea983f50 xiaomi-elish / image-output-abl: shellfmt, no changes 2023-10-26 21:17:01 +08:00
amazingfate
43b17bacfc add extension image-output-abl for abl images 2023-10-26 21:17:01 +08:00
Ricardo Pardini
6219927ce9 grub + grub-with-dtb: add back functions removed from mkconfig_lib in recent GRUB versions (2.12)
- 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
2023-10-13 18:01:17 +02:00
Ricardo Pardini
11df81403d config/lib/exts: run shellfmt
- `bash lib/tools/shellfmt.sh`
- mostly spacing changes that accumulated over time
2023-08-22 14:28:14 +02:00
Gunjan Gupta
1d6a779ed1 Drop HOST OS that doesnot support crust compilation 2023-08-22 13:03:51 +02:00
Ricardo Pardini
24db9fb2ec extensions: image-output-oowow: creates Khadas oowow compatible images
- 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
2023-08-15 18:53:55 +05:30
Ricardo Pardini
c9b5b7462d u-boot-menu: curb logging, no need to emit warn's here 2023-08-12 10:05:02 +02:00
Ricardo Pardini
c44ed98005 u-boot-menu: allow skipping U_BOOT_FDT even with BOOT_FDT_FILE set, by specifying EXTLINUX_SPECIFIC_FDT=no 2023-08-09 11:20:28 +02:00
Gunjan Gupta
154fdb83f9 Fix cryptroot setup with flash-kernel and ssh unlock on newer dropbear versions 2023-08-02 08:30:27 +02:00
Gunjan Gupta
909fa47b7e Fix caching of cryptroot packages. Also moved the crypt code to extension 2023-07-22 02:18:49 +05:30
Ricardo Pardini
02d428382b u-boot-menu: allow avoid using uInitrd, for when the bootloader requires modern initrd.img 2023-07-12 00:46:56 +02:00
Gunjan Gupta
5b65b6b29f Add openssh-client as a dependency when building with CRYPTROOT 2023-07-09 16:03:53 +05:30
Ricardo Pardini
1c7f2248d5 rkdevflash: don't wait for "Loader" mode after sending spl_loader; show the loop counter
- 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
2023-07-01 14:50:20 +02:00
Ricardo Pardini
a878f3c93d rkbin-tools: allow using custom rkbin RKBIN_GIT_BRANCH as well as RKBIN_GIT_URL
- 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`)
2023-07-01 14:49:49 +02:00
Gunjan Gupta
a747ba2c37 Only install gcc-or1k-bin package when building images with crust-firmware support 2023-06-26 20:54:55 +02:00
Ricardo Pardini
6c232a1303 grub: add hooks, fix GRUB font & wallpaper, introduce grub-with-dtb extension
- 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
2023-06-26 13:52:29 +02:00
Ricardo Pardini
017a006acb cleanup-space-final-image: keep qcom and qed firmware (for thinkpad-x13s) 2023-06-26 13:47:00 +02:00
Gunjan Gupta
8278dc5e42 allwinner: Enable crust compilation 2023-06-20 21:36:31 +02:00
Ricardo Pardini
44e547d6a8 armbian-gaming customize launcher for @NicoD-SBC (v2)
- add image suffix `-gaming`
2023-06-12 10:47:15 +02:00
Ricardo Pardini
a9cc0620ec bluetooth-hciattach: new generic extension to facilitate adding hciattach systemd service, given the correct params 2023-05-24 19:22:22 +02:00
Ricardo Pardini
89a7cc971b grub: fixes for wallpaper / gfxmode / submenu /etc
- Debian working
- Ubuntu's grub needs more work
2023-05-21 16:18:20 +02:00
Igor Velkov
9b68c4e42a Add support for nilfs2 fs based image
Signed-off-by: Igor Velkov <iav@iav.lv>
2023-05-16 08:51:05 +02:00
Pander
9ed24a6e86 extension fake-vcgencmd 2023-05-03 15:10:18 +02:00
Ricardo Pardini
ba413c9b25 bcm2711/grub: add busybox (for initrd grep/sed) so initramfs-growroot works again on Debian
- bcm2711: bomb early when `RELEASE` is set and not supported
2023-04-28 21:32:52 +02:00
Ricardo Pardini
5ad3caefee extensions: introduce u-boot-menu extension, for use with extlinux
- this is using the default Debian/Ubuntu package, we probably should replace that with our own scripts
2023-04-28 21:32:52 +02:00
Ricardo Pardini
01c49e0cf1 grub: keep u-boot stuff if UEFI_GRUB=yes 2023-04-28 21:32:52 +02:00
Ricardo Pardini
2b28f29ebe rootfs/image: avoid apt junk leftover by debootstrap; add warnings and debugs over target cache and general rootfs sizes
- 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
2023-04-18 16:27:06 +02:00
Ricardo Pardini
a140bf1339 extensions: add v4l2loopback-dkms, very similar to the zfs extension
- Raison d'être: prove `linux-headers` work, at least, minimally
2023-04-15 22:43:33 +02:00
Ricardo Pardini
14286c018c extensions: rkdevflash: switch to using Radxa's fork of rkdeveloptool, which has compile fixes 2023-04-15 22:43:19 +02:00
Ricardo Pardini
f8402a59da extensions: rkdevflash: simplify usage of rkdeveloptool (on Linux only, not Docker) to flash Rockchip images to eMMC 2023-04-15 22:43:19 +02:00
Ricardo Pardini
439882ce7a extensions/grub: use array for pkg list
- also for the media-sbc clone
2023-04-15 22:43:06 +02:00
Ricardo Pardini
f6f621b9a1 extensions: don't export, declare -g 2023-04-15 22:43:06 +02:00
Ricardo Pardini
6f57ba64b6 sunxi-tools: bring in gcc-arm-linux-gnueabi hostdep required for building sunxi's boot stages 2023-04-07 13:00:09 +02:00
Ricardo Pardini
6b965c605c completely remove any traces of KERNEL_ONLY and exit with error if set 2023-03-17 08:32:11 +01:00
Ricardo Pardini
fc8536b700 extension: c-plus-plus-compiler: include g++ package as well as g++-aarch64-linux-gnu 2023-03-10 10:49:45 -03:00
Ricardo Pardini
2f7423d0e4
shellfmt/.editorconfig: enable trim whitespaces, run shellfmt, no actual code changes (#4849)
- shellfmt: bump to 3.6.0 (run with `bash lib/tools/shellfmt.sh`)
- .editorconfig: rationalize, remove duplicated logic
2023-02-23 09:24:41 +01:00
Ricardo Pardini
a2304f28b0
armbian-next: post_build_image: run hook first, then write to CARD_DEVICE, then compress, in that order
- compress *all* present output images, not only .img
- remove 7zip compression & hostdep
- squash a few shortcircuits (yeah, this late in the game...)
2023-02-18 07:46:12 -03:00
Ricardo Pardini
9bffa5e749
armbian-next: artifacts: firmware/rootfs and actual usage of artifacts during image build
- artifacts: introduce `ARTIFACT_IGNORE_CACHE=yes`
- artifacts: introduce `DONT_BUILD_ARTIFACTS`, list of artifacts that if not found cached, fail the build
- kernel_package_source() is no more
- a long dissertation about kernels, families, and the universe
- artifacts: actually use rootfs artifact for image build
- artifacts: detangle via artifact_base_dir
- artifacts: rootfs: use folders in artifact_name; include cache_type
- artifacts: some cleanups / validations
- rootfs artifact; drop old rootfs cli
- artifacts: new CLI shortcuts; remove old firmware CLI
- artifacts: full firmware & usage
- use firmware artifacts in image build and install its debs
- kernel artifact sans legacy; use tmpdir for .deb target for all packages
- legacy artifact versions is no more; pack/unpack now in common obtain;
- artifacts: uboot: cleanup legacy renaming, use artifact version directly
- artifacts: add firmware (small) artifact
- deploy uboot to loop from artifact; allow tty to artifact; todos for cleaning
- fixes, kernel dtb/headers conditional; remove `.git` from Makefile url; use mapfile for finding files to hash
  - completely remove KERNEL_HAS_WORKING_HEADERS_FULL_SOURCE and `kernel_package_callback_linux_headers_full_source()`
  - don't use realpath for artifact_file_relative
  - curb some warnings
  - fix: only install headers & dtbs if such exist
- kernel .config hook modification hash versioning
- OCI_TARGET_BASE vs per-artifact defaults; only deploy to remote from CLI with OTB
- artifact revolver & installing into image
  - add artifact_map_packages and artifact_map_debs dicts
  - revolver accumulates all info
  - REPOSITORY_INSTALL is no more (for uboot/kernel, later others)
  - rename `VER` to `IMAGE_INSTALLED_KERNEL_VERSION`
2023-02-18 07:46:03 -03:00