[linux-aarch64-chromebook] .install device

Problems with packages? Post here, using [tags] of the package name.

[linux-aarch64-chromebook] .install device

Postby ericwoud » Mon Sep 12, 2022 10:26 am

About [linux-aarch64-chromebook] [linux-aarch64-rc-chromebook] [linux-armv7-chromebook] [linux-armv7-rc-chromebook]

In the file linux-aarch64-chromebook.install the line:

$this->bbcode_second_pass_code('', ' device="/dev/${device/%2/1}"')

Assumes the rootfs is installed on partition 2 and the kernel on partition 1.

But this does not always have to be on these exact partitions. I prefer to use partition numbers 6 and 7.
This allows me to dualboot. I can switch over to ChromeOS <-> Archlinux only by
changing the kernel priority on partition 6.

$this->bbcode_second_pass_code('', 'ChromeOS partition table (partially)
2 kernel A Initially installed kernel.
3 rootfs A Initially installed rootfs.
4 kernel B Alternate kernel, for use by automatic upgrades.
5 rootfs B Alternate rootfs, for use by automatic upgrades.
6 kernel C Minimal-size partition for future third kernel.
7 rootfs C Minimal-size partition for future third rootfs.')

However, the rootfs partition number always is 1 higher then the kernel partition, on archlinux and also on chromeos.
(On chromeos they use "PARTNROFF=1" in the kernel commandline to find the root partition number offset 1 from kernel partition number.)

May I suggest changing the line to the following:

$this->bbcode_second_pass_code('', ' device="/dev/${device::-1}$(( ${device: -1} -1 ))"')

Then it will always work. Nothing changes when using partition 1 and 2, but it is more flexible for other partition numbers.
ericwoud
 
Posts: 10
Joined: Mon Sep 12, 2022 10:18 am

Return to Packages

Who is online

Users browsing this forum: No registered users and 12 guests