User:Zulu Foxtrott

From Gentoo Wiki
Jump to:navigation Jump to:search

WIP

Warning
Do not use! The instructions are unofficial, as such unsupported, and they're incomplete! The content is not intended for use by the public.

arm handbook missing: https://bugs.gentoo.org/534376

The following are notes to myself:

Draft1 / Overview: structure

 User:Zulu_Foxtrott/Parts/Installation/About* # bug 534376
 User:Zulu_Foxtrott/Parts/Installation/Host # rename: Preparation
   User:Zulu_Foxtrott/ARM64/Blocks/Target
   User:Zulu_Foxtrott/ARM64/Blocks/Host # rename: Preparation
 User:Zulu_Foxtrott/Parts/Installation/Disks*+
   User:Zulu_Foxtrott/ARM64/Blocks/Disks # add ./Rockchip/Blocks/Disks?
   User:Zulu_Foxtrott/Parts/Blocks/LayoutBtrfsSubvolumes
   User:Zulu_Foxtrott/Parts/Blocks/DesigningPartitionScheme*
 User:Zulu_Foxtrott/Parts/Installation/Stage*
   User:Zulu_Foxtrott/ARM64/Blocks/Stage
 #upstream has User:Zulu_Foxtrott/Parts/Installation/Base at this position
 User:Zulu_Foxtrott/Parts/Installation/Kernel*
   User:Zulu_Foxtrott/ARM64/Blocks/Kernel
 User:Zulu_Foxtrott/Parts/Installation/System*
 #upstream has User:Zulu_Foxtrott/Parts/Installation/Tools at this position
 User:Zulu_Foxtrott/Rockpro64/Bootloader
 User:Zulu_Foxtrott/Parts/Installation/Bootloader
   User:Zulu_Foxtrott/ARM64/Blocks/Bootloader
 User:Zulu_Foxtrott/Parts/Installation/Base
 User:Zulu_Foxtrott/Parts/Installation/Tools
 User:Zulu_Foxtrott/Parts/Installation/Finalize 

* conflicts with handbook

+ new variable(s)

Related bugs

how to obtain cryptsetup[static]?: https://bugs.gentoo.org/770817

Draft2: Flat approach

A preview of this (WIP) approach can be found here.

first, select target arch (sets var:arch [$arch]) (sets var:experimental [0/1]) (sets var:table [gpt/mbr])

second, depending on var:arch, select board (overwrites var:table [gpt/mbr]) (sets var:board [$board])


Introduction
  Welcome
  Installation options for Gentoo
  Scope of this document
  How the installation is structured
  Troubles

Preparing the environment(contains "Host architecture")
  Setting up a cross build environment(uses var:arch)
  Installing required tools(contains "Installing a build toolchain")
  Setting the date and time

Preparing the storage device
  Introduction to block devices(title only)
    Block devices
    Partition tables
      GPT
      MBR
  Introduction to LUKS
  Introduction to filesystems(title only)
    Filesystems
  Default partitioning scheme and filesystem layout
  Default Btrfs filesystem layout
  Default: Structuring a Btrfs filesystem with subvolumes
  Alternative: Designing a partition scheme
  Partitioning the storage device
    Using parted to partition the device(specific to var:table=gpt)
    Using fdisk to partition the device(specific to var:table=mbr)
  Optional: Using LUKS to encrypt the main partition
  Initializing file systems
    Default: Using Btrfs + Alternative: Not using Btrfs

Installing the Gentoo installation files
  Choosing a stage tarball(if var:experimental=1 display "Experimental tarballs")
  Downloading the stage tarball
  Unpacking the stage tarball
  Configuring compile options

Configuring the kernel
  Installing the sources
  Manual configuration
    Activating required options
    Architecture specific kernel configuration(specific to var:arch)
    Platform and board specific kernel configuration(specific to var:board)
    Optional: Activating required options for LUKS encryption
    Optional: Building an initramfs
  Compiling and installing the kernel

Configuring the system
  Filesystem information (About fstab, Filesystem labels and UUIDs, Partition labels and UUIDs)
    Creating the fstab file (includes the /boot/ example)
    Default fstab file
    Optional: fstab file for encrypted disks
    Optional: fstab file for filesystems other than Btrfs
  Setting the hostname
  Setting a temporary root password
  Init and boot configuration

Setting up the bootloader and the firmware(specific to var:board)

Booting the target device
  



Config the system pt2


flow


   EasyInstall
        |
(platform specific redirect; useful for anything (vars)?)
        |
    Preparing
        |
   BlockDevices
        |
        Filesystems   # include StructuringBtrfs and DesigningPartitionScheme to simplify flow
        |         |
StructuringBtrfs  DesigningPartitionScheme
        |         |
     -----------------------------------------------------...    var firmware
    |                             |               |
RockchipPartitionTable   RasPi4PartitionTable    ...
    |                             |               |
     -----------------------------------------------------...
        |         |
        |     EncryptedRootfs
        |         |
     CreatingFilesystems
        |
      Stage
        |
 CompileOptions
        |
  KernelSources
        |
 KernelBaseConfig
        |
     -----------------------------------------------------...    var board # firmware uefi has different boards
    |                             |               |
Rockpro64Kernel              RasPi4Kernel        ...      # it's probably enough to distinguish arches here,
    |                             |               |       # handbook doesn't distinguish i5/i7/zen/... either
     -----------------------------------------------------...
        |         |       |
        |         |    LuksKernel
        |         |       |
        |         Initramfs
        |         |
    KernelInstallation
        |
FilesystemInformation
        |
     -----------------------------------------------------...    var firmware
    |                             |               |
RockchipFstab                   RasPi4Fstab      ...
    |                             |               |
     -----------------------------------------------------...
        |
SystemConfiguration
        |
     -----------------------------------------------------...    var firmware
    |                             |               |
RockchipBootloader          RasPi4Bootloader     ...
    |                             |               |
     -----------------------------------------------------...
        |
     Booting
        |
     > Base
        |
     > Tools
        |
    > Finalize

# move KernelBaseConfig behind arch specific config
# move section 'Introduction' from KernelBaseConfig to arch specific config, set environment variables here
# repeat setting environment variables in *Bootloader where necessary



ConventionalInstall
        |
(platform specific redirect; useful for anything (vars)?)
        |
    PreparingX # add install/setup  qemu-static binfmt
        |
   BlockDevices
        |
     Filesystems   # include StructuringBtrfs and DesigningPartitionScheme to simplify flow
        |
     -----------------------------------------------------...    var firmware
    |                             |               |
RockchipPartitionTable   RasPi4PartitionTable    ...
    |                             |               |
     -----------------------------------------------------...
        |         |
        |     EncryptedRootfs
        |         |
     CreatingFilesystems
        |
      StageX # cp /usr/bin/qemu-aarch64 /mnt/gentoo/usr/bin/
        |
     > BaseX # verify, adapt chroot'ing
        |
 CompileOptions
        |
  KernelSources
        |
 KernelBaseConfigX # needs to stay here, with introduction 
        |
     -----------------------------------------------------...    var arch
    |                             |               |
  ARM64                          ARM             ...      # avoid setting env vars here, not needed for
    |                             |               |       # conventional install
     -----------------------------------------------------...
        |         |       |
        |         |    LuksKernel
        |         |       |
        |         Initramfs
        |         |
    KernelInstallation
        |
FilesystemInformation
        |
     -----------------------------------------------------...    var firmware
    |                             |               |
RockchipFstab                   RasPi4Fstab      ...
    |                             |               |
     -----------------------------------------------------...
        |
SystemConfiguration
        |
     > Tools
        |
     -----------------------------------------------------...    var firmware
    |                             |               |
RockchipBootloader          RasPi4Bootloader     ...             # don't set environment vars here, not needed for
    |                             |               |              # conventional install
     -----------------------------------------------------...
        |
     BootingX # instruct to leave chroot env
        |
    > Finalize