NixOS on ARM/Banana Pi: Difference between revisions
imported>M-Gregoire m Fix missing packages for u-boot compilation |
m Remove duplicate packages from nix-shell line (double edit?) Tag: Manual revert |
||
(3 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
{{ARM/breadcrumb}} | |||
== Building U-Boot == | == Building U-Boot == | ||
Line 4: | Line 5: | ||
$ git clone git://git.denx.de/u-boot.git | $ git clone git://git.denx.de/u-boot.git | ||
$ cd u-boot | $ cd u-boot | ||
$ nix-shell -p ubootTools gcc-arm-embedded dtc flex bison swig 'python311.withPackages(ps: with ps; [ setuptools ])' openssl | $ nix-shell -p ubootTools gcc-arm-embedded dtc flex bison swig 'python311.withPackages(ps: with ps; [ setuptools ])' openssl libuuid gnutls | ||
$ make -j4 ARCH=arm CROSS_COMPILE=arm-none-eabi- Bananapi_defconfig | $ make -j4 ARCH=arm CROSS_COMPILE=arm-none-eabi- Bananapi_defconfig | ||
$ make -j4 ARCH=arm CROSS_COMPILE=arm-none-eabi- | $ make -j4 ARCH=arm CROSS_COMPILE=arm-none-eabi- |
Latest revision as of 12:02, 13 September 2024
Building U-Boot
$ git clone git://git.denx.de/u-boot.git
$ cd u-boot
$ nix-shell -p ubootTools gcc-arm-embedded dtc flex bison swig 'python311.withPackages(ps: with ps; [ setuptools ])' openssl libuuid gnutls
$ make -j4 ARCH=arm CROSS_COMPILE=arm-none-eabi- Bananapi_defconfig
$ make -j4 ARCH=arm CROSS_COMPILE=arm-none-eabi-
Board-specific installation notes
First follow the generic installation steps to get the installer image.
U-Boot needs to be copied to specific sectors on the microSD card with dd
:
sudo dd if=u-boot-sunxi-with-spl.bin of=/dev/sdX bs=1024 seek=8
Then, install using the installation and configuration steps.
SATA Port multiplier (PMP)
It used to be necessary to make some changes to the kernel source and recompile, but on recent linux versions (including the one shipped with the NixOS arm image) this is no longer necessary. Instead, all that is required is merely to set
boot.kernelParams = ["ahci_sunxi.enable_pmp=1"]
in configuration.nix
. Note that this will prevent the use of a hard drive connected to the SATA port directly without a port multiplier in between.
See here for more details.