Talk:Creating bootable media for depthcharge based devices
Mounting Root
Don't do
root #
mount /dev/sd*2 /mnt
/mnt is normally a directory for other mount points. Consider
root #
mount /dev/sd*2 /mnt/gentoo
that allows to point to the standard handbook an it does that.
You will need to change that throughout.
--NeddySeagoon 08:33, 24 September 2023 (UTC)
Cross Compiler Tuple
Use whatever the downloaded stage3 uses for CHOST
. I don't think it matters for cross compiling the kernel but it will if other packages are cross compiled.
Its only a short step from installing a cross toolchain to converting it to a a QEMU static-user chroot so your big hairy amd64 system can appear to execute the target code.
Getting the Tuple right at this stage will make the later QEMU static-user step simpler.
--NeddySeagoon (talk) 08:45, 24 September 2023 (UTC)
Kernel Build
After you do
user $
export ARCH=TARGETARCH
user $
export CROSS_COMPILE=TUPLE-
The all the following commands to configure and build the kernel must be done in the same shell or the exports need to be repeated.
My personal preference is, for example, for a Pi4,
user $
ARCH=arm64 CROSS_COMPILE=aarch64-unknown-linux-gnu- make ...
then being in the same shell does not matter.
Is that the issue you asked about on IRC?
--NeddySeagoon (talk) 09:04, 24 September 2023 (UTC)