This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| libre_computer_board_aml-s905x-cc_le_potato [2023/04/15 03:51] – austin | libre_computer_board_aml-s905x-cc_le_potato [2024/09/22 22:08] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 19: | Line 19: | ||
| - mount new partition at /mnt/gentoo (mkdir if needed) | - mount new partition at /mnt/gentoo (mkdir if needed) | ||
| - mount the existing EFI partition | - mount the existing EFI partition | ||
| - | - cp -rp the firmware, kernel modules, and the rest of /boot from the raspian microSD you are booted on to the one on the adapter to the same path | + | - cp -rp the firmware, kernel modules, |
| - use lsmod and put list of modules into / | - use lsmod and put list of modules into / | ||
| - at this point you can mostly follow the normal gentoo amd64 handbook for setup (use end0 for ethernet device) | - at this point you can mostly follow the normal gentoo amd64 handbook for setup (use end0 for ethernet device) | ||
| - | - make sure you adjust / | + | - make sure you adjust / |
| - | < | + | |
| # Architecture specific features | # Architecture specific features | ||
| f0: | f0: | ||
| </ | </ | ||
| - | - when you get to bootloader installation/ | + | - when you get to bootloader installation/ |
| - | < | + | |
| GRUB_PLATFORMS=" | GRUB_PLATFORMS=" | ||
| </ | </ | ||
| - grub-mkconfig -o / | - grub-mkconfig -o / | ||
| - grub-mkstandalone -O arm64-efi -o / | - grub-mkstandalone -O arm64-efi -o / | ||
| + | |||
| + | === Custom Kernel === | ||
| + | |||
| + | * [[https:// | ||
| + | * Branch: v6.0/ | ||
| + | * Start with Config from /boot (from Raspbian image) | ||
| + | * make menuconfig/ | ||
| + | * emerge dracut | ||
| + | * dracut --kver=" | ||
| + | * grub-mkconfig -o / | ||
| + | * grub-mkstandalone -O arm64-efi -o / | ||
| + | |||
| + | |||
| + | === Qemu chroot environment (For compiling packages on amd64 host with more memory/ | ||
| + | |||
| + | * emerge --ask app-emulation/ | ||
| + | * QEMU_USER_TARGETS=" | ||
| + | * cd /usr | ||
| + | * mkdir potato | ||
| + | * cd potato | ||
| + | * wget https:// | ||
| + | * tar xvf stage3*tar.xz | ||
| + | * cp -rp kernel firmware headers modules to the new chroot env | ||
| + | * < | ||
| + | * make file requires -pid-sandbox in features or qemu bug rears its ugly head | ||
| + | * mkdir any mount points that dont' exist for the chroot script | ||
| + | * setup your package.use etc | ||
| + | |||
| + | / | ||
| + | < | ||
| + | # These settings were set by the catalyst build script that automatically | ||
| + | # built this stage. | ||
| + | # Please consult / | ||
| + | # detailed example. | ||
| + | COMMON_FLAGS=" | ||
| + | CFLAGS=" | ||
| + | CXXFLAGS=" | ||
| + | FCFLAGS=" | ||
| + | FFLAGS=" | ||
| + | # WARNING: Changing your CHOST is not something that should be done lightly. | ||
| + | # Please consult https:// | ||
| + | CHOST=" | ||
| + | MAKEOPTS=" | ||
| + | FEATURES=" | ||
| + | # | ||
| + | PKGDIR=/ | ||
| + | # NOTE: This stage was built with the bindist Use flag enabled | ||
| + | |||
| + | # This sets the language of build output to English. | ||
| + | # Please keep this setting intact when reporting bugs. | ||
| + | LC_MESSAGES=C | ||
| + | USE=" | ||
| + | ACCEPT_LICENSE=" | ||
| + | GRUB_PLATFORMS=" | ||
| + | PORTDIR_OVERLAY="/ | ||
| + | </ | ||
| + | |||
| + | potato-chroot.sh | ||
| + | < | ||
| + | / | ||
| + | |||
| + | cd /usr/potato | ||
| + | mount -t proc none proc | ||
| + | mount -o bind /dev dev | ||
| + | mount -o bind / | ||
| + | mount -o bind /sys sys | ||
| + | cp / | ||
| + | echo ': | ||
| + | |||
| + | chroot . /bin/bash --login | ||
| + | |||
| + | umount sys | ||
| + | umount var/ | ||
| + | umount dev | ||
| + | umount proc | ||
| + | </ | ||
| + | |||
| + | === Configuring binary package repo over ssh === | ||
| + | |||
| + | * get public key from root user on potato | ||
| + | * add potato root public key to authorized_keys file of a user with read access on the compile host | ||
| + | * add feature and pkg host to / | ||
| + | |||
| + | < | ||
| + | PORTAGE_BINHOST=" | ||
| + | FEATURES=" | ||
| + | </ | ||
| + | |||
| + | === Adding RTC === | ||
| + | |||
| + | * wire your RTC to the GPIO same as a raspberry pi{{: | ||
| + | * install deps< | ||
| + | * clone libretech-wiring-tool< | ||
| + | git clone https:// | ||
| + | </ | ||
| + | * compile and install the overlays and commands< | ||
| + | make | ||
| + | make install | ||
| + | </ | ||
| + | * create an init script to add the overlays: | ||
| + | * < | ||
| + | * < | ||
| + | # | ||
| + | # Copyright 2023 Gentoo Authors | ||
| + | # Distributed under the terms of the GNU General Public License v2 | ||
| + | |||
| + | name=" | ||
| + | description=" | ||
| + | |||
| + | depend() { | ||
| + | before hwclock | ||
| + | } | ||
| + | |||
| + | start() { | ||
| + | / | ||
| + | / | ||
| + | } | ||
| + | </ | ||
| + | * set make script executable and add too boot runlevel< | ||
| + | chmod 755 rtc | ||
| + | rc-update add rtc boot | ||
| + | </ | ||
| + | * reboot and check dmesg, if it worked you'll see a log like so< | ||
| + | [ | ||
| + | [ | ||
| + | </ | ||
| + | * you can also check with i2cdetect denoting the UU in 0x68 location< | ||
| + | mobilemouse ~ # i2cdetect -y 1 | ||
| + | | ||
| + | 00: -- -- -- -- -- -- -- -- | ||
| + | 10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- | ||
| + | 20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- | ||
| + | 30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- | ||
| + | 40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- | ||
| + | 50: -- -- -- -- -- -- -- 57 -- -- -- -- -- -- -- -- | ||
| + | 60: -- -- -- -- -- -- -- -- UU -- -- -- -- -- -- -- | ||
| + | 70: -- -- -- -- -- -- -- -- | ||
| + | </ | ||
| + | |||
| + | === GPIO Reference === | ||
| + | |||
| + | {{: | ||
| + | |||