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/18 22:46] – austin | libre_computer_board_aml-s905x-cc_le_potato [2024/09/22 22:08] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 41: | Line 41: | ||
| * dracut --kver=" | * dracut --kver=" | ||
| * grub-mkconfig -o / | * grub-mkconfig -o / | ||
| - | * grub-mkstandalone -O arm64-efi -o / | + | * grub-mkstandalone -O arm64-efi -o / |
| - | === Crossdev Env === | + | === Qemu chroot environment (For compiling packages on amd64 host with more memory/cpu)=== |
| - | * emerge --ask sys-devel/crossdev | + | * emerge --ask app-emulation/qemu |
| - | * crossdev | + | * QEMU_USER_TARGETS=" |
| - | * mkdir -p /var/ | + | * cd /usr |
| - | * echo ' | + | * mkdir potato |
| - | * chown -R portage:portage | + | * cd potato |
| - | * vim /var/db/repos/crossdev/metadata/layout.conf< | + | * wget https://bouncer.gentoo.org/fetch/root/all/releases/arm64/autobuilds/20230416T233158Z/stage3-arm64-openrc-20230416T233158Z.tar.xz |
| - | masters | + | * tar xvf stage3*tar.xz |
| - | thin-manifests = true</code | + | * cp -rp kernel firmware headers modules to the new chroot env |
| - | * vim / | + | * < |
| - | [crossdev] | + | * make file requires -pid-sandbox in features or qemu bug rears its ugly head |
| - | location | + | * mkdir any mount points that dont' exist for the chroot script |
| - | priority | + | * setup your package.use etc |
| - | masters | + | |
| - | auto-sync = no | + | / |
| + | < | ||
| + | # 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=/var/potato/binpkgs/ | ||
| + | # 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="-X gpm fbcon alsa -udev" | ||
| + | ACCEPT_LICENSE=" | ||
| + | GRUB_PLATFORMS=" | ||
| + | PORTDIR_OVERLAY="/ | ||
| </ | </ | ||
| - | * crossdev --stable -t aarch64-unknown-linux-gnu | ||
| + | potato-chroot.sh | ||
| + | < | ||
| + | / | ||
| - | === Qemu chroot environment | + | cd / |
| + | 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 | ||
| + | |||
| + | {{: | ||
| - | * emerge --ask app-emulation/ | ||
| - | * QEMU_USER_TARGETS=" | ||
| - | * cd / | ||
| - | * ROOT=$PWD/ emerge --ask --usepkgonly --oneshot --nodeps qemu | ||