Skip to content
Snippets Groups Projects
  1. Jan 24, 2022
  2. Jan 17, 2022
    • Ansuel Smith's avatar
      treewide: drop use of which · 88204bfa
      Ansuel Smith authored
      
      Ubuntu started to flag which as deprecated and it
      seems which is not really standard and may vary
      across Distro.
      Drop the use of which and use the standard 'command -v'
      for this simple task.
      Which is still present in the prereq if some package/script
      still use which.
      A utility script called command_all.sh is implemented that
      will just mimic the output of which -a.
      
      Signed-off-by: default avatarAnsuel Smith <ansuelsmth@gmail.com>
      88204bfa
  3. Dec 29, 2021
    • Paul Spooren's avatar
      scripts: dump-target-info print kernel versions · 02de391b
      Paul Spooren authored
      
      This commits adds the ability to print Kernel versions of all
      targets/subtargets. If a testing Kernel is set print that version as
      well.
      
      Example output:
      
          apm821xx/nand 5.10
          apm821xx/sata 5.10
          arc770/generic 5.4
          archs38/generic 5.4
          armvirt/32 5.10
          armvirt/64 5.10
          at91/sam9x 5.10
          at91/sama5 5.10
          ath25/generic 5.4
          ath79/generic 5.4 5.10
          ath79/mikrotik 5.4 5.10
          --- %< ---
      
      This should help to get a quick update on the state of Kernels.
      
      Signed-off-by: default avatarPaul Spooren <mail@aparcar.org>
      02de391b
  4. Dec 02, 2021
    • Enrico Mioso's avatar
      base-files: add eMMC sysupgrade support · 57c1f3f9
      Enrico Mioso authored
      
      Adds generic support for sysupgrading on eMMC-based devices.
      
      Provide function emmc_do_upgrade and emmc_copy_config to be used in
      /lib/upgrade/platform.sh instead of redundantly implementing the same
      logic over and over again.
      Similar to generic sysupgrade on NAND, use environment variables
      CI_KERNPART, CI_ROOTPART and newly introduce CI_DATAPART to indicate
      GPT partition names to be used. On devices with more than one MMC
      block device, CI_ROOTDEV can be used to specify the MMC device for
      partition name lookups.
      
      Also allow to select block devices directly using EMMC_KERN_DEV,
      EMMC_ROOT_DEV and EMMC_DATA_DEV, as using GPT partition names is not
      always an option (e.g. when forced to use MBR).
      
      To easily handle writing kernel and rootfs make use of sysupgrade.tar
      format convention which is also already used for generic NAND support.
      
      Signed-off-by: default avatarEnrico Mioso <mrkiko.rs@gmail.com>
      Signed-off-by: default avatarDaniel Golle <daniel@makrotopia.org>
      CC: Li Zhang <li.zhang@gl-inet.com>
      CC: TruongSinh Tran-Nguyen <i@truongsinh.pro>
      Unverified
      57c1f3f9
  5. Nov 28, 2021
  6. Nov 16, 2021
  7. Nov 13, 2021
  8. Oct 31, 2021
  9. Oct 30, 2021
  10. Oct 28, 2021
  11. Oct 23, 2021
  12. Oct 11, 2021
  13. Sep 24, 2021
  14. Sep 23, 2021
  15. Sep 14, 2021
    • Paul Spooren's avatar
      build: store artifacts in JSON · 5ef4608c
      Paul Spooren authored
      
      Multiple profiles create artifacts, these should be stored in the JSON
      file as well, allowing downstream tooling to show those files, too.
      
      Artifacts don't have specific filesystems so only the fields `name`,
      `type` and `sha256` are available.
      
      Rename env variable names from IMAGE_ to FILE_ prefixes to reflect that
      images, kernels and artifacts are added with the same command.
      
      Signed-off-by: default avatarPaul Spooren <mail@aparcar.org>
      5ef4608c
  16. Aug 16, 2021
    • Daniel Golle's avatar
      base-files: rename 'sdcard' to 'legacy-sdcard' · 98bccdaf
      Daniel Golle authored
      
      While an image layout based on MBR and 'bootfs' partition may be easy
      to understand for users who are very used to the IBM PC and always have
      the option to access the SD card outside of the device (and hence don't
      really depend on other recovery methods or dual-boot), in my opinion
      it's a dead end for many desirable features on embedded systems,
      especially when managed remotely (and hence without an easy option to
      access the SD card using another device in case things go wrong, for
      example).
      
      Let me explain:
      
      * using a MSDOS/VFAT filesystem to store kernel(s) is problematic, as a
        single corruption of the bootfs can render the system into a state
        that it no longer boots at all. This makes dual-boot useless, or at
        least very tedious to setup with then 2 independent boot partitions
        to avoid the single point of failure on a "hot" block (the FAT index
        of the boot partition, written every time a file is changed in
        bootfs). And well: most targets even store the bootloader environment
        in a file in that very same FAT filesystem, hence it cannot be used
        to script a reliable dual-boot method (as loading the environment
        itself will already fail if the filesystem is corrupted).
      
      * loading the kernel uImage from bootfs and using rootfs inside an
        additional partition means the bootloader can only validate the
        kernel -- if rootfs is broken or corrupted, this can lead to a reboot
        loop, which is often a quite costly thing to happen in terms of
        hardware lifetime.
      
      * imitating MBR-boot behavior with a FAT-formatted bootfs partition
        (like IBM PC in the 80s and 90s) is just one of many choices on
        embedded targets. There are much better options with modern U-Boot
        (which is what we use and build from source for all targets booting
        off SD cards), see examples in mediatek/mt7622 and mediatek/mt7623.
      
      Hence rename the 'sdcard' feature to 'legacy-sdcard', and prefix
      functions with 'legacy_sdcard_' instead of 'sdcard_'.
      
      Tested-by: default avatarStijn Tintel <stijn@linux-ipv6.be>
      Signed-off-by: default avatarDaniel Golle <daniel@makrotopia.org>
      Unverified
      98bccdaf
  17. Aug 06, 2021
  18. Jul 18, 2021
  19. Jul 06, 2021
  20. Jun 21, 2021
  21. Jun 17, 2021
  22. Jun 07, 2021
    • Karel Kočí's avatar
      scripts/feeds: generate index after all feeds are updated · 1aa80ce3
      Karel Kočí authored
      
      This separates index update from feed update. The result is that all
      requested feeds are first updated and only then indexed.
      
      The reason for this change is to prevent errors being reported and
      potentially invalid index being generated thanks to cross feeds
      dependency.
      The feeds script pulls in default all feeds as they come and on install
      prefers packages from first feeds (unless special feed is requested).
      Thus order of feeds in some way specifies preferences. This is handy for
      downstream distributions as they can simply override any package from
      upstream feeds by placing their feed before them. This removes need to
      patch or fork upstream feeds.
      The problem is that such feed most likely depends in some way also on
      subsequent feeds. The most likely feeds are 'packages' or 'luci'. The
      example would be Python package that needs 'python.mk' from 'packages'
      feed. Ordering custom feed after dependent feeds is sometimes just not
      possible because of preference requirement described before.
      The solution is to just first pull all feeds and generate indexes only
      after that. In the end this ensures that index is generated correctly at
      first try without any error.
      
      In terms of code this removes 'perform_update' argument from
      'update_feed' as with index update removal the update is the only action
      performed in that subroutine. Thus this moves condition to 'update'
      subroutine.
      
      Signed-off-by: default avatarKarel Kočí <karel.koci@nic.cz>
      1aa80ce3
  23. May 29, 2021
  24. May 13, 2021
    • Leonardo Mörlein's avatar
      build: introduce $(MKHASH) · b993b68b
      Leonardo Mörlein authored
      
      Before this commit, it was assumed that mkhash is in the PATH. While
      this was fine for the normal build workflow, this led to some issues if
      
          make TOPDIR="$(pwd)" -C "$pkgdir" compile
      
      was called manually. In most of the cases, I just saw warnings like this:
      
          make: Entering directory '/home/.../package/gluon-status-page'
          bash: line 1: mkhash: command not found
          bash: line 1: mkhash: command not found
          bash: line 1: mkhash: command not found
          bash: line 1: mkhash: command not found
          bash: line 1: mkhash: command not found
          bash: line 1: mkhash: command not found
          bash: line 1: mkhash: command not found
          bash: line 1: mkhash: command not found
          [...]
      
      While these were only warnings and the package still compiled sucessfully,
      I also observed that some package even fail to build because of this.
      
      After applying this commit, the variable $(MKHASH) is introduced. This
      variable points to $(STAGING_DIR_HOST)/bin/mkhash, which is always the
      correct path.
      
      Signed-off-by: default avatarLeonardo Mörlein <me@irrelefant.net>
      b993b68b
  25. Mar 25, 2021
    • Paul Spooren's avatar
      build,json: 3rd fixup of default_packages · 7880a648
      Paul Spooren authored
      
      This became a bit of a tragedy, caused by a corner cases which wasn't
      put into account during testing. DEFAULT_PACKAGES are defined in
      target/linux/<target>/Makefile but also in
      target/linux/<target>/<subtarget>/target.mk.
      
      The latter was no longer imported when using DUMP=1, however not using
      DUMP=1 while running the Makefile in target/linux/<target>/ caused duplicate
      packages in the list.
      
      As a solution, which should have been used from day 0, `make` runs in
      target/linux/ without DUMP=1, resulting in no duplicate packages and all
      inclusions from include/target.mk, linux/target/<target>/{Makefile,
      <subtarget>/target.mk}
      
      While at it, sort the list of default packages.
      
      Signed-off-by: default avatarPaul Spooren <mail@aparcar.org>
      7880a648
    • Paul Spooren's avatar
      build,json: fixup fixup of arch_packages · b36068d3
      Paul Spooren authored
      
      The commit "1bf2b3fe build,json: fixup missing arch_packages" fixes
      the missing package architecture locally but runs $(TOPDIR)/Makefile
      rather than a target specific one. While this works on local builds just
      fine, it causes the buildbots to add garbage to the `arch_packages`
      variable:
      
          cd \"/builder/shared-workdir/build\"; git log --format=%h -1
          toolchain > /builder/shared-workdir/build/tmp/.ver_check\ncmp -s
          /builder/shared-workdir/build/tmp/.ver_check
          /builder/shared-workdir/build/staging_dir/toolchain-x86_64_gcc-8.4.0_musl/stamp/.ver_check
          || { \\\n\trm -rf
          /builder/shared-workdir/build/build_dir/target-x86_64_musl
          /builder/shared-workdir/build/staging_dir/target-x86_64_musl
          /builder/shared-workdir/build/staging_dir/toolchain-x86_64_gcc-8.4.0_musl
          /builder/shared-workdir/build/build_dir/toolchain-x86_64_gcc-8.4.0_musl;
          \\\n\tmkdir -p
          /builder/shared-workdir/build/staging_dir/toolchain-x86_64_gcc-8.4.0_musl/stamp;
          \\\n\tmv /builder/shared-workdir/build/tmp/.ver_check
          /builder/shared-workdir/build/staging_dir/toolchain-x86_64_gcc-8.4.0_musl/stamp/.ver_check;
          \\\n}\nx86_64
      
      Only the last line contains the desired string.
      
      Future investigation should check why the build system prints this to
      stdout rather than stderr.
      
      Signed-off-by: default avatarPaul Spooren <mail@aparcar.org>
      b36068d3
  26. Mar 24, 2021
    • Paul Spooren's avatar
      build,json: fixup missing arch_packages · 1bf2b3fe
      Paul Spooren authored
      
      Fix 7f4c2b1a "build,json: fix duplicates in default_packages" which
      removed duplicate default packages but also removed the package
      architecture from the profiles.json.
      
      If DUMP=1 is set, the `ARCH_PACKAGES` is no longer exported and
      therefore empty. Fix this by running make twice, once with DUMP=1 and
      once without.
      
      Signed-off-by: default avatarPaul Spooren <mail@aparcar.org>
      1bf2b3fe
  27. Mar 21, 2021
    • Paul Spooren's avatar
      build,json: fix duplicates in default_packages · 7f4c2b1a
      Paul Spooren authored
      
      Calling without the DUMP=1 argument causes the target specific Makefile
      to be "included" again which adds the target specific packages twice,
      once on the actual run and once included from `include/target.mk`.
      
      This led to duplicate package entries, causing confusion in downstream
      projects using the generated JSON files.
      
      While at it, apply `black` style to Python script.
      
      Signed-off-by: default avatarPaul Spooren <mail@aparcar.org>
      7f4c2b1a
  28. Mar 17, 2021
    • Daniel Golle's avatar
      include/image*: add support for device-tree overlays · 6890f6fe
      Daniel Golle authored
      
      Add new target feature 'dt-overlay' which makes DTC keep the symbol
      names in the generated dtb.
      Make sure additional DT overlay sources specified by the new device
      variable DEVICE_DTS_OVERLAY get compiled together with the main DTS
      (currently overlays got to be in the same folder). Let Build/fit pass
      the generated DT overlay blobs to mkits.sh.
      
      Signed-off-by: default avatarDaniel Golle <daniel@makrotopia.org>
      6890f6fe
    • Daniel Golle's avatar
      scripts/mkits.sh: add support for adding DT overlay blobs to image · 4e6de4f0
      Daniel Golle authored
      
      Allow adding multiple device tree overlay blobs to an image and
      generate configurations for each of them.
      This is useful on boards with modern U-Boot which allow e.g. user-
      configurable peripherals ("shields") in that way.
      Note that currently, each generated configuration adds exactly one
      overlay on top of the base image, ie. adding multiple overlays at the
      same time is not yet supported.
      
      Signed-off-by: default avatarDaniel Golle <daniel@makrotopia.org>
      4e6de4f0
  29. Mar 15, 2021
  30. Mar 05, 2021
Loading