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])

flow

easy conventional

# Path mostly w/ prefix '/mnt/gentoo'
# Path w/o prefix '/mnt/gentoo': TBD


Creating unofficial Gentoo boot media
        |
(platform specific redirect; useful for anything (vars)?)
        |
Preparing the environment: Installing a cross build toolchain
        uses '$ARCH'
        |
Preparing the environment: Installing required tools
        |
Preparing the storage device: Introduction to block devices
        |
Preparing the storage device: Introduction to filesystems
Introduction: Filesystems
        |
Preparing the storage device: Introduction to organizing data and storage devices
        |
        | partitionlayout=?
--------------------------------------------------------------------...
|                                         |
Preparing the storage device:             Preparing the storage device:
Creating partitions for Rockchip devices  Creating partitions for ?
|                                         |
--------------------------------------------------------------------...
        |         |
        |     Preparing the storage device: Encrypting
        |         the new installation
        |         |
Preparing the storage device: Creating filesystems
        |
Installing the Gentoo installation files
        |
        |
        |
        |
        |
        |
        |
        |
        |
        |
Configuring the kernel: Obtaining the kernel sources from upstream
        |
Configuring the kernel: Manual kernel configuration
        uses '$ARCH'
        |
        | arch=?
--------------------------------------------------------------------...
|                                    |
Configuring the kernel:              Configuring the kernel:
ARM64 specific kernel configuration  ARM specific kernel configuration
|                                    |
-------------------------------------------------------------------...
        |
Configuring the kernel: Activating basic kernel options
        |     |     |
        |     |  Configuring the kernel: Activating kernel options for
        |     |     LUKS support
        |     |     |
        |    Configuring the kernel: Building an initramfs
        |        |
Configuring the kernel: Compiling and installing the kernel
        |
Configuring the system: Filesystem Information
        |
        | partitonlayout=?
--------------------------------------------------------------------...
|                                   |
Configuring the system:             Configuring the system:
Example fstab for Rockchip devices  Example fstab for ? [devices]
|                                   |
--------------------------------------------------------------------...
        |
Configuring the system: Configuring additional options
        |
        |
        |
        | firmware=?
--------------------------------------------------------------------...
|                                  |
Configuring the bootloader:        Configuring the bootloader:
Bootloader for RK3399-mainline     Bootloader for ?
|                                  |
--------------------------------------------------------------------...
        |
Booting the new installation
        |
Configuring the network
        |
Installing the Gentoo base system: Configuring compile options
        |
Installing the Gentoo base system: Configuring Portage
        |
Installing the Gentoo base system: Init?, timezone, locales
        |
Installing system tools
        |
    Finalizing


# Path mostly w/o prefix '/mnt/gentoo'
# Path w/ prefix: TBD


Installing Gentoo cross architecture
        |
(platform specific redirect; useful for anything (vars)?)
        |
Preparing the environment: Emulating the target platform
        uses '$QEMU_USER_TARGET'
        |
Preparing the environment: Installing required tools
        |
Preparing the storage device: Introduction to block devices
        |
Preparing the storage device: Introduction to filesystems
Introduction: Filesystems
        |
Preparing the storage device: Introduction to organizing data and storage devices
        |
        | partitionlayout=?
--------------------------------------------------------------------...
|                                         |
Preparing the storage device:             Preparing the storage device:
Creating partitions for Rockchip devices  Creating partitions for ?
|                                         |
--------------------------------------------------------------------...
        |         |
        |     Preparing the storage device: Encrypting
        |         the new installation
        |         |
Preparing the storage device: Creating filesystems
        |
Installing the Gentoo installation files
        |
Installing the Gentoo base system: Configuring compile options
        |
Installing the Gentoo base system: Chrooting
        uses '$QEMU_USER_TARGET'
        |
Installing the Gentoo base system: Configuring Portage
        |
Installing the Gentoo base system: Init?, timezone, locales
        |
Configuring the kernel: Obtaining the Gentoo kernel sources
        |
Configuring the kernel: Manual kernel configuration
        |
        |
        | arch=?
--------------------------------------------------------------------...
|                                    |
Configuring the kernel:              Configuring the kernel:
ARM64 specific kernel configuration  ARM specific kernel configuration
|                                    |
-------------------------------------------------------------------...
        |
Configuring the kernel: Activating basic kernel options
        |     |     |
        |     |  Configuring the kernel: Activating kernel options for
        |     |     LUKS support
        |     |     |
        |    Configuring the kernel: Building an initramfs
        |        |
Configuring the kernel: Compiling and installing the kernel
        |
Configuring the system: Filesystem Information
        |
        | partitonlayout=?
--------------------------------------------------------------------...
|                                   |
Configuring the system:             Configuring the system:
Example fstab for Rockchip devices  Example fstab for ? [devices]
|                                   |
--------------------------------------------------------------------...
        |
Configuring the system: Configuring additional options
        |
Installing system tools
        |
        | firmware=?
--------------------------------------------------------------------...
|                                  |
Configuring the bootloader:        Configuring the bootloader:
Bootloader for RK3399-mainline     Bootloader for ?
|                                  |
--------------------------------------------------------------------...
        |
Booting the new installation
        |
        |
        |
        |
        |
        |
        |
        |
        |
        |
        |
    Finalizing




# actually, e.g. on rk3328 bootloader instr differ from rockpro64
# and for firmware=uboot different instr. may apply as well, not
# everything will be make rk3399_defconfig...

# maybe do something like
partitiontable[rockchip,rpi,...]
firmware[rk3399,rk3328,rpi,rk3399-roc-cc,...]
# so, bootloader probably mostly depends on board, but not always

}