Commit Graph

469 Commits

Author SHA1 Message Date
Aristo Chen
21b4d4bd42
Ask user again if the response is not expected (#3411) 2022-01-20 14:44:40 +01:00
Igor Pečovnik
310495ddf1
Refactor armbian-bsp-cli package creation (#3378)
* Refactor armbian-bsp-cli package creation

- added general distro status for all in separate file inside BSP
- remove branch and distro specifics

* Looking for prebuild pack

* Small fixes
2022-01-06 11:50:24 +01:00
Igor Pečovnik
e76a5b0bfe
Improve fist login UX (#3375)
* Improve 1st login script

* Update packages/bsp/common/usr/lib/armbian/armbian-firstlogin

Co-authored-by: Manuel Rüger <manuel@rueg.eu>

* Address accessibility issue

Co-authored-by: Manuel Rüger <manuel@rueg.eu>
2022-01-05 17:55:10 +01:00
Oleg
3f8da052e8
fixes the manual launch of the installation script from USB media (#3377) 2022-01-05 17:54:30 +01:00
Leo
3c5e8820d1
Source /etc/armbian-release before the motd conf file (#3326)
That way the user can set $BOARD_NAME in /etc/default/armbian-motd. This is useful because e.g. the Odroid HC2 is internally an Odroid XU4, and in /etc/armbian-release it shows up as Odroid XU4.
2021-12-07 20:13:34 +01:00
Ricardo Pardini
90e0fe0ba2
extensions framework + UEFI aarch64/x86 + rpi4b + core changes/fixes (#3300)
* extensions framework (née "fragments")

- this should actually change nothing at this point, just add capabilities
- the framework is implemented in lib/extensions.sh
- the "if function x exists then call x" replaced with call_extension_method()
  - +inline documentation
  - +compatibility names

Signed-off-by: Ricardo Pardini <ricardo@pardini.net>

* extensions framework; meta-extensions: auto-docs and sample extension gen

- 2 extensions dealing with extensibility itself
  - detect-unused-extensions: shows which extensions are enabled, but never called.
  - gen-sample-extension-docs: generates a sample empty extension & Markdown documentation for extensions

Signed-off-by: Ricardo Pardini <ricardo@pardini.net>

* new extension methods and features via config variables in core Armbian

- `SKIP_EXTERNAL_TOOLCHAINS=yes` - does not download or use any linaro toolchains, only build host-installed ones
- `SKIP_BOOTSPLASH=yes` - does not patch kernel for splash file
- `EXTRA_BSP_NAME=xyz` - allows for BSP variants, useful for when extensions modify the BSP
- `EXTRA_ROOTFS_MIB_SIZE=x` - add x mib's to rootfs size, for use with very small images
- `KERNEL_EXTRA_TARGETS` - what extra targets to make kernel for, default to "modules dtbs"
- `BOOTCONFIG=none` - does not build nor install u-boot; also doesn't handle bootscripts et al
- `unset KERNELSOURCE` - does not build nor install kernel, nor build initrd, nor build nor install firmware
- `ARMHF_ARCH=skip` - does not add armhf to apt/dpkg, thus pure arm64
- `SKIP_ARMBIAN_REPO=yes` - results in armbian.list.disabled in the final image
- define `APT_EXTRA_DIST_PARAMS` with apt-cacher-ng options and use it for `PACKAGE_LIST_INSTALL/REMOVE` et al
- initial support for targeting x86/amd64 UEFI and BIOS
    - some do's/don'ts for x86/amd64, like a different `UBUNTU_MIRROR` default
    - GPT/EFI(ESP) partitions (fat, `UEFISIZE=256` to enable, mount `UEFI_MOUNT_POINT=/boot/efi`, first on disk but ends
      up at `$uefipart`=15)
    - GPT/BIOS partitions (fat, `BIOSSIZE=1` to enable, second on disk but ends up at partition 14)
    - `UEFI_FS_LABEL="armbiefi"` - to set the FAT label for the EFI partition, visible in Win/Mac
    - hard-requires gdisk package host-side
- add add_host_dependencies() extension method; fill `EXTRA_BUILD_DEPS="pkg pkg2"` to install to host before toolchains
  download
- add pre_prepare_partitions() extension method, for custom partition size calculations
- add create_partition_table() extension method, used to do full-custom partitioning if `USE_HOOK_FOR_PARTITION=yes`
- add post_create_partitions() extension method, mostly for easy debugging
- add post_write_sdcard() extension method, where you can also set `SKIP_VERIFY=yes` to skip sdcard verification
- add post_install_kernel_debs() extension method.
- multiple fixes to bsp to avoid spurious errors when files are not where it expects
- v4: detect `update-initramfs` failure and abort build with useful message if it does
- v4: show useful stacktrace in `exit_with_error`
  - if `ERROR_DEBUG_SHELL=yes`, drop into a shell before unmounting/deleting everything, so we can inspect what went wrong
- v4: display a message before `apt-get remove PACKAGE_LIST_BOARD_REMOVE` packages, so any errors while removing are easy to understand
- v4: preserve kernel .config's dates when copying

Signed-off-by: Ricardo Pardini <ricardo@pardini.net>

* extensions framework; refactor tool fetching/building into extensions

- a few examples of core refactoring using extensions
- sunxi-tools extension, enabled by 2 different sunxi family includes ("reuse" example)
- marvel-tools extension, enabled by 2 different mvebu family includes
- rkbin-tools extension, enabled by rockship64_common family include
- amlogic-fip/c2-blobs stuff refactored directly into meson64_common.inc ("single-use" example)
- removed the 'testings' fetch_from_repo completely since not used anywhere.

Signed-off-by: Ricardo Pardini <ricardo@pardini.net>

* .wip's for UEFI arm64 and UEFI/BIOS x86 via new GRUB extension

- v3: added `growroot`-awareness to `armbian-resize-filesystem`
    - the partition-growing part of `armbian-resize-filesystem` does not deal correctly with the UEFI layout
    - `growroot` is installed on UEFI images by default, that handles growing partition during initramfs
    - now `armbian-resize-filesystem` handles `resize2fs` only, and works.
- v4: reworked UEFI board/family/include structure:
    - use Distro's `linux-generic` kernel only for `current`
    - `edge` now builds it's own pure-mainline `5.15.y` kernel, for both x86 and arm64
        - `.config` taken from Ubuntu, probably needs tuning for EXTRAWIFI=yes et al
- v4: introduce `SKIP_KERNEL_SYMLINK=yes`, tested in `builddeb`
    - to avoid symlinking kernel; u-boot likes it, but grub and flash-kernel hates it
- v5: many fixes
- v7: more small fixes.

Signed-off-by: Ricardo Pardini <ricardo@pardini.net>

* .wip for the RaspberryPi 4B via new flash-kernel extension

- this does not build it's own kernel "yet", but uses default linux-raspi kernel from Ubuntu
- flash-kernel is not really a bootloader
    - it just prepares kernel et al a FAT partition for booting by the RPi4b bootloader
    - flash-kernel is standard Debian package, but has only been tested on Ubuntu releases
- it is really only known-working since Hirsute release.
  - Debian's rpi kernel is armhf only, so out of scope here, at least until we add source-built kernels.
- v3: fixed focal rootfs build. untested.
- v3: better variable names, preparing for source-built kernel.
- v5: new edge build with pure mainline kernel.
- v6: many fixes and some hacks for packaging and layout, also firmware (using Ubuntu's)

Signed-off-by: Ricardo Pardini <ricardo@pardini.net>

* Added first patch to edge x86 related to wifi drivers

* extensions: leave hostapd alone; remove hackish ext; block reentrancy

- package-list-utils does not belong in this PR
- grub or bcm2711 is not the place to remove hostapd
- block recursive enable_extension() calls, for now.

Signed-off-by: Ricardo Pardini <ricardo@pardini.net>

* gen-sample-extension-docs: fix: avoid counter in generated sample

Signed-off-by: Ricardo Pardini <ricardo@pardini.net>

* extensions: dependencies: enable_extension() in extensions with a stack

- and better stacktraces, I hope

Signed-off-by: Ricardo Pardini <ricardo@pardini.net>

* Remove code from package list since we don't have it in repository
Adjust kernel config to disable driver that needs further polishing.

* Allow amd64 to build the same desktops as aarch64. We only have this limit for armhf, where some desktops don't work

* amd64: allow building amd64 on aarch64 with system toolchain

- conditionally add gcc-x86-64-linux-gnu to hostdeps

Signed-off-by: Ricardo Pardini <ricardo@pardini.net>

* add libelf-dev directly to hostdeps (and Dockerfile), remove extension

Signed-off-by: Ricardo Pardini <ricardo@pardini.net>

* packaging: remove SKIP_KERNEL_SYMLINK hack, fix the root cause

- which was the missing $image_name for non-arm64 & non-arm, so: x86 for example

Signed-off-by: Ricardo Pardini <ricardo@pardini.net>

* grub: really obliterate u-boot stuff from BSP

- for now. soon we'll refactor u-boot so not have to do this

Signed-off-by: Ricardo Pardini <ricardo@pardini.net>

* flash-kernel: really obliterate u-boot stuff from BSP

- for now. soon we'll refactor u-boot so not have to do this

Signed-off-by: Ricardo Pardini <ricardo@pardini.net>

* extensions: add host_dependencies_ready() hook

- this passes FINAL_HOST_DEPS containing all hostdeps for the run after they're installed

Signed-off-by: Ricardo Pardini <ricardo@pardini.net>

* Add verification functions for correct selection.

* If UEFI Skip symlink creation

* Do not create dtb package for amd64

* Skip scripts folder cleaning if build process native.

Skip creating  postinst prerm scripts  for headers.

* Skip applying headers-debian-byteshift.patch if build native

* Fix architecture syntax as x86_64

* Revert "amd64: allow building amd64 on aarch64 with system toolchain"

This reverts commit 0c5ee20bb1.

* Compare architectures before starting compilation.



Signed-off-by: The-going <48602507+The-going@users.noreply.github.com>

* extensions: cleanups after fixes by the-Going

- packaging:
  - there is _no need_ anymore for the symlink hack, CONFIG_EFI or no. But check is great, see below
  - it's not `amd64` that has no DTB's, it's all UEFI, thus: `is_enabled CONFIG_EFI`, thanks!
- Explicitly disallow "reverse cross compile" in amd64.conf.
- whitespace-only-deletions: revert. we shall shellfmt the whole thing one day, but not today.
- fix a few syntax warnings in newly introduced code (floating `$ARCH` vs `"${ARCH}`) - blame shellcheck

Signed-off-by: Ricardo Pardini <ricardo@pardini.net>

* packaging: fix: turns out a lot of boards have CONFIG_EFI=y, can't use that for dtb/no-dtb decision.

Signed-off-by: Ricardo Pardini <ricardo@pardini.net>

* grub: remove debug

Signed-off-by: Ricardo Pardini <ricardo@pardini.net>

* firmware: allow installing `armbian-firmware-full`; make it really full

- can now use `BOARD_FIRMWARE_INSTALL="-full"` to install full firmware for the board. enable for UEFI.
- don't rely on KERNELSOURCE for firmware-related decisions. introduce `INSTALL_ARMBIAN_FIRMWARE` which defaults to `yes`
- rpi4b/flash-kernel: disable Armbian firmware; we need linux-firmware-raspi2, which conflicts.

Signed-off-by: Ricardo Pardini <ricardo@pardini.net>

* extensions: log to /${LOG_SUBPATH}/ instead of fixed /debug/

Signed-off-by: Ricardo Pardini <ricardo@pardini.net>

* extensions: introduce cleanup_extension_manager() called by build-all-ng's unset_all()

- to reset/unset everything done by the the initializer, so build can run again

Signed-off-by: Ricardo Pardini <ricardo@pardini.net>

* extensions: remove 'global' logging, for use with build_all_ng

- enable_extensions() will have to live on without logging to file. it's just too early.
- now init EXTENSION_MANAGER_TMP_DIR in initialize_extension_manager()
- now init EXTENSION_MANAGER_LOG_FILE in initialize_extension_manager()

Signed-off-by: Ricardo Pardini <ricardo@pardini.net>

* extensions: build-all-ng.sh bugfix due to extension's debug to stdout

- extensions (among other things) can produce output to stdout when activated
- fix: check_hash() produced "idential" (sic, now changed to IDENTICAL) to stdout as a trigger
- debugging output got mixed with "idential", rendering hash cache void for families that used extensions
  - eg: sunxi, others
- fix is to send stdout to the bitbucket when sourcing the board & arch config files
- proper fix would be stop using stdout in this case and use return code for check_hash()
  - one day soon

Signed-off-by: Ricardo Pardini <ricardo@pardini.net>

* Add CI build targets

Co-authored-by: Igor Pecovnik <igor.pecovnik@gmail.com>
Co-authored-by: The-going <48602507+The-going@users.noreply.github.com>
2021-12-06 09:49:49 +01:00
Igor Pečovnik
aaa050959b
Replace which with command -v (#3253) 2021-11-15 23:30:39 +01:00
Igor Pecovnik
612529aa8f
Fixing errors in armbianmonitor and add release info
Close https://github.com/armbian/build/issues/2798
2021-10-28 23:22:29 +02:00
Piotr Szczepanik
0069ad60a6
Preliminary support for rockchip rk35xx boards (#3111) 2021-09-15 22:08:39 +02:00
Aristo Chen
905cf37bd3
Enlarge dialog size to prevent string cut off (#3141) 2021-09-12 19:26:33 +02:00
Aristo Chen
fab9ff1dba
Remove unused variable in format string (#3105) 2021-09-02 21:51:54 +02:00
Werner
23d5aa12ba
Possible fix for syntax error (#3115)
https://forum.armbian.com/topic/18838-invalid-armbian-trucate-logs-error/
I assume all userspaces have bash shipped anyways?
2021-09-02 20:47:46 +02:00
Aristo Chen
9aa60df063
Exclude IP of network interface with :avahi at the end of name (#3099) 2021-08-21 11:04:22 +02:00
Igor Pečovnik
84b111487f
Fixing first login shows "degraded" (#3091)
Status is shown to stdout, but we don't want that in 1st login screen
2021-08-11 00:01:21 +02:00
lanefu
4b91e49c72
khadas edge tweaks (#3022)
* remove static mac assignment hack for khadas edge

* khadased edge rk3399 default asound
2021-07-18 23:14:02 -04:00
Oleg
1e5133dd2b
fix u-boot sector station (#2999) 2021-07-12 09:32:35 +02:00
Oleg
4c80535fd8
update kernel legacy 4.9.201 and current 5.10 (#2987) for jetson 2021-07-09 20:54:40 -04:00
Oleg
6bd67e18e5
add media kernel for arm64 (#2971) 2021-07-07 16:15:34 +02:00
lanefu
71f67e664e
wait for systemd fully started before first login (#2979) 2021-07-06 22:32:37 -04:00
Igor Pecovnik
8ab6aeb342 Cosmetic - supress error vnstat can't be found at first login 2021-07-03 19:27:39 +02:00
Aristo Chen
5082eb9d4e
Skip checking TX/RX for interface not exists in /var/lib/vnstat/ (#2948) 2021-07-02 07:56:27 +02:00
lanefu
cb18979a64
Merge pull request #2896 from AristoChen/master
Modify the mechanism for showing IP address in 30-armbian-sysinfo
2021-06-13 11:24:41 -04:00
AristoChen
a84da70535
Modify the mechanism for showing IP address in 30-armbian-sysinfo
Exclude "dummy0" and "lo" interface, thus the IP address for all other
interface(include those having customized name) can be properly displayed
2021-06-13 20:58:05 +08:00
Nathaniel Wesley Filardo
2606d17ec7 armbian-ramlog: extra rsync options
Add two bash arrays, XTRA_RSYNC_{FROM,TO}, defined in
/etc/default/armbian-ramlog, and expand these in the two rsync
invocations in /usr/lib/armbian/armbian-ramlog.

The use of bash arrays simplifies the use of multiple arguments and also
allows for in-band commentary between array elements.

When expanding, safely test for these arrays to exist.  This is, sadly,
a little verbose in bash, so, while here, split the rsync invocations to
use line continuations.

Fixes https://github.com/armbian/build/issues/2846
2021-06-12 02:25:23 +01:00
Laurent
a9f5c0a050
AR-315: Add support for GPT table inside nand-sata-install (#2856) 2021-06-10 11:49:29 +02:00
Aristo Chen
78894792a5
Update URLs (#2870)
* Update URLs

* Update URLs

* Update URLs
2021-06-10 11:27:51 +02:00
Igor Pečovnik
adaf5956bb
Less chatty logs for 8189fs (#2857) 2021-06-01 19:49:21 +02:00
Aristo Chen
9f27fd9274
Fix issues in read_password() (#2860)
- When trying to delete by using "backspace", it will also print a "*"
and also appended to password
- When pressing keys too fast, it is possible that some characters
actually printed on the screen
2021-06-01 19:49:08 +02:00
Werner
1f2dc3423a
Delete 80-update-htop-and-offload-tx
- users are "confused" about manipulating files in their home directories
- introduced security issues which have been worked around but there might be others too
- more recent  htop may support network stuff oob (https://armbian.atlassian.net/browse/AR-771?focusedCommentId=10546)
2021-05-26 05:49:52 +02:00
Igor Pečovnik
f7c2dc2bc3
More motd related fixed (#2848)
Fixing error when we don't have etherned
2021-05-23 18:25:21 +02:00
ThomasKaiser
0f348185be
Fix typo in f0f10a5 (workaround for 7350topless) 2021-05-23 14:48:51 +02:00
ThomasKaiser
f0f10a5b68
Workaround for 7350topless
Not touching logic or the (IMO ridiculous) behavior of this script. Just meant as a quick&dirty workaround for the specific sed/symlink attack vector. Check https://github.com/stealth/7350topless for details.
2021-05-23 13:51:04 +02:00
Igor Pečovnik
4cc754e0b3
Bugfix - vnstat doesn't like very long input parameterts and it fails on certain wireless devices (Ampak, most common ones) (#2839)
Limiting device to eth* enp* only seems like a viable workaround.
2021-05-18 09:15:55 +02:00
Igor Pečovnik
73e8dfcc7e
Extracting branch and write it to the /etc/armbian-release file. This information is still needed for armbian-config (#2831) 2021-05-15 18:38:11 +02:00
Przemysław Sztoch
486a821a55
VENDOR, rock-pi-n10, RM_LIST for armbian-config/zsh, Static MAC for networkd (#2789)
* VENDOR, rock-pi-n10, RM_LIST for armbian-config/zsh

VENDOR parameter in configuration
zsh is the best of course...
Static MAC for networkd

ROCK Pi N10 (Radxa) - Initial support, knwon bugs:
- Problem with poweroff (kernel panic).
- DeviceTree is not fully verified, I suspect missing and unnecessary
entries.
- No support for NPU
- u-boot without NVME support
- I have doubts if I chose the right preboot loader for RK3399Pro, NPU
  and installed DDR memory.

* New RK3399Pro boot preloaders.

* rootfs checksum, DEBOOTSTRAP_LIST fix, output.log fix

Repaired checksum for rootfs
Added use PACKAGE_LIST_RM to purge DEBOOTSTRAP_LIST
Better logging to output.log
Fix for new host distribution detection (ie Debian Bullseye).
ubootdebs as new cleaning option
2021-05-11 21:50:14 +02:00
Oleg
20c06c0ba3
fix install-nand for extlinux.conf (#2775) 2021-04-15 01:16:13 +02:00
lanefu
3369a0d538
Merge pull request #2608 from ChrisDumont/fix-alignment
fix arithmetic to align filesystem sizes to 16MiB (not 16KiB)
2021-04-11 15:02:29 -04:00
Chris Dumont
5bbf2f0396 Fix arithmetic to align filesystem sizes to 16MiB on nand devices. 2021-04-03 10:18:23 -07:00
Igor Pečovnik
d9e3657171
First login keyboard configuration bugfix (#2746)
* 1st login keyboard configuration bugfix

- added small bugfix which caused to select locales too broad
- switch "automated" keyboard detection for selection prompt

* Remove dpkg-reconfigure keyboard-configuration

* Remve unused variable
2021-04-02 08:21:59 +02:00
Igor Pecovnik
93ed1e85b8 Displays that EDGE branch is in action 2021-03-28 12:21:02 +02:00
NekoB0x
8b063ca8a6
Update armbian-ram-logging 2021-03-25 11:19:35 +02:00
NekoB0x
540d7abd88
Fix redundant log writing
Fixes calling "armbian-ramlog write" twice on systems with logrotate systemd unit.
2021-03-25 01:02:23 +02:00
NekoB0x
271756dcc4
Some 30-armbian-sysinfo fixes (#2732)
* Update 30-armbian-sysinfo

Fixed alignment of "Local users" and "IP" in third column.
Made it more compact by adding extra new line.
Added "both" traffic direction.
Removed "-h" vnstat argument because it doesn't do anything, changed "last 24h" to "today" (there is only "rx/tx for today" in --oneline output).

* Update armbian-motd.dpkg-dist

Add PRIMARY_DIRECTION description

* Update 30-armbian-sysinfo

fix new line logic
clean-up unused variables
2021-03-24 19:19:38 +01:00
Igor Pečovnik
61b87bee74
W1 temp sensor can have different properties. Adjusting (#2737) 2021-03-24 19:07:53 +01:00
Gauthier Provost
5e69351b3d
Re-enable network checksum TX offload on rockchip64 family (#2623)
* Re-enable network checksum TX offload on rockchip64 family

* Adjust gmac PBL setting for rk3399 legacy to fix network issues with MTU 1500

* Adjust gmac PBL setting for rk3328 in rockchip64-legacy to fix network issues with MTU 1500

Co-authored-by: Piotr Szczepanik <piter75@gmail.com>
2021-03-23 08:00:10 +01:00
NekoB0x
9e599d0f87
Fix motd traffic stats
Fixes:
RX/TX: "Unknown parameter "1". Use --help for help."
RX always displaying "n/a"
2021-03-19 11:35:38 +02:00
lurdan
d264a8fd74
Change apt's default compression method to gzip (#2729)
APT uses lz4 as its default compression method, but Some ARM board has performance problem on it.
This setting make apt prefer gzip over lz4.

cf. https://forum.armbian.com/topic/14064-my-apt-search-has-become-super-slow-recently/page/2/
2021-03-19 07:17:30 +01:00
Oleg
9aa7aafd4f
Adding Nvidia Jetson Nano (#2720)
* add Jetson Nano

* Update jetson-nano.conf

* Update targets.conf

* Add better description

* Adjust config - try to enable ZRAM

* Packaging patch not needed

* Extlinux was solved in other commit

* Move board to CSC for now

Co-authored-by: Igor Pečovnik <igorpecovnik@users.noreply.github.com>
Co-authored-by: Igor Pecovnik <igor.pecovnik@gmail.com>
2021-03-18 18:29:34 +01:00
NekoB0x
922f1ca49e
Fix Motd disk temperature (#2707)
Fixes displaying of "Always°C" temperature on disks without Min/Max temperature values.
2021-03-14 16:34:32 +01:00
NekoB0x
975025f170
Fix armbian-hardware-optimization logrotate (#2705)
Fixes editing of logrotate configs when ramlog is enabled and /var/log is mounted on zram device other than /dev/zram0.
2021-03-13 19:43:18 +01:00