descriptions, explanations and links (which took far too much time to be found out) that are useful to get arch linux running on a banana pi r2
Find a file
2020-07-31 00:52:54 +02:00
kernel update kernel config (raid + dm support) + various scripts 2020-07-31 00:52:54 +02:00
chroot-setup.sh update kernel config (raid + dm support) + various scripts 2020-07-31 00:52:54 +02:00
mkbootimg.sh update kernel config (raid + dm support) + various scripts 2020-07-31 00:52:54 +02:00
README.md basic stuff I can remember at the moment... 2020-07-29 01:37:49 +02:00
setup.sh update kernel config (raid + dm support) + various scripts 2020-07-31 00:52:54 +02:00

Everything this document is about is how to setup the sd card that finally is inserted to the banana. So lets start:

The sd card contains the following:

  • Pre-Loader
  • u-boot
  • vfat: boot (/dev/mmcblk1p1)
  • ext4: root (/dev/mmcblk1p2)
  • ...

Pre-Loader:

...!!!

u-boot:

...!!!

boot-partition:

Contains:

/zImage
/dts/mt7623n-bananapi-bpi-r2.dtb

and further images (eg diifferent kernel versions etc...)

how to create these files:

(because they are not available anywhere, at least not for the most recent kernel. The most recent version provided by some debain derivates is 4.4 or 4.14... too old for my taste!)

git clone https://github.com/mbgg/linux-mediatek.git
cd linux-mediatek
git checkout <commit_I_recommend>
cp <this_repo>/kernel/linux-mediatek-<commit_hash>.config .config
cp <this_repo>/kernel/mt7623n-bananapi-bpi-r2.dts arch/arm/boot/dts
make ARCH=arm CROSS_COMPILE=/usr/bin/arm-linux-gnueabihf- oldconfig
make -j4 ARCH=arm CROSS_COMPILE=/usr/bin/arm-linux-gnueabihf- zImage dtbs
mkdir boot.setup
mount /dev/mmcblk0p1 boot.setup
cp arch/arm/boot/zImage boot.setup
cp arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dtb boot.setup/dts
sync
umount boot.setup
rmdir boot.setup

root-partition:

If you did no mistake so far (...) this should be the easiest part: There are two possibilities:

  • Use the provided image [name], dd it to your root partition, boot into this root and update and customaize the system
  • dd the image to a temporary partition, boot into it, and setup the root partition using pacstrap (you dont need the linux or linux-firmware package, you already cared about these parts in the previous section)

... !!!