https://wiki.parabola.nu/api.php?action=feedcontributions&user=Mai&feedformat=atomParabolaWiki - User contributions [en]2024-03-29T08:59:37ZUser contributionsMediaWiki 1.26.3https://wiki.parabola.nu/index.php?title=User:Mai&diff=23905User:Mai2022-11-22T02:36:12Z<p>Mai: /* Boot! */</p>
<hr />
<div>{{stub}}<br />
== Status for Samsung Chromebook Plus v1 aka kevin aka gru-kevin aka xe513c24 ==<br />
=== Kernel ===<br />
{{pkg|linux-libre-64}} (armv7h) works but needs to be packed correctly to boot, the following is a rough guide on how i was able to boot this kernel on this hardware<br />
<br />
=== what does not work ===<br />
- onboard wifi<br />
- probably more stuff<br />
<br />
=== What you will need ===<br />
- this laptop :P<br />
- micro sd card at least 2GB, 8+GB reccomended<br />
- another computer that has a linux environment so we can download / extract / pack the kernel and install rootfs<br />
<br />
== Unlock external booting ==<br />
=== Switch to developer mode ===<br />
<br />
# Turn off the laptop.<br />
# To invoke Recovery mode, you hold down the ESC and Refresh keys and poke the Power button.<br />
# At the Recovery screen press Ctrl-D (there’s no prompt - you have to know to do it).<br />
# Confirm switching to developer mode by pressing enter, and the laptop will reboot and reset the system. This takes about 10-15 minutes.<br />
<br />
Note: After enabling developer mode, you will need to press Ctrl-D each time you boot, or wait 30 seconds to continue booting.<br />
=== Enable booting from external storage ===<br />
<br />
# After booting into developer mode, hold Ctrl and Alt and poke the F2 key. This will open up the developer console.<br />
# Type root to the login screen.<br />
# Then type this to enable USB booting:<br />
<br />
<pre><br />
# crossystem dev_boot_usb=1<br />
# crossystem dev_default_boot=usb<br />
</pre><br />
<br />
Reboot the system to allow the change to take effect.<br />
<br />
Source: https://chromebooks.readthedocs.io/en/latest/source/README.html#switch-to-developer-mode<br />
<br />
== Install packages ==<br />
<code>pacman -S {{pkg|vboot-utils}} {{pkg|uboot-tools}} {{pkg|gptfdisk}} {{pkg|dtc}}</code><br />
<br />
== Gather files ==<br />
<br />
<pre><br />
$ mkdir parabola-armv7-64<br />
$ cd parabola-armv7-64<br />
<br />
$ wget -c https://redirector.parabola.nu/iso/armv7h-systemd-cli-2020.02/parabola-armv7h-systemd-cli-2020.02-tarball.tar.gz<br />
$ wget -c https://redirector.parabola.nu/iso/armv7h-systemd-cli-2020.02/parabola-armv7h-systemd-cli-2020.02-tarball.tar.gz.sig<br />
$ wget -c https://repomirror.parabola.nu/pool/parabola/linux-libre-64-5.11.11-3-armv7h.pkg.tar.xz<br />
$ wget -c https://repomirror.parabola.nu/pool/parabola/linux-libre-64-5.11.11-3-armv7h.pkg.tar.xz.sig<br />
$ wget -c https://git.parabola.nu/abslibre.git/plain/libre/linux-libre/kernel.keyblock<br />
$ wget -c https://git.parabola.nu/abslibre.git/plain/libre/linux-libre/kernel_data_key.vbprivk<br />
<br />
<br />
$ gpg --recv-keys FBCC5AD7421197B7ABA72853908710913E8C7778<br />
$ gpg --verify parabola-armv7h-systemd-cli-2020.02-tarball.tar.gz.sig<br />
$ gpg --recv-keys 782F9DDBE36BA7F3D4DE49065F5DFCC14177E263<br />
$ gpg --verify linux-libre-64-5.11.11-3-armv7h.pkg.tar.xz.sig<br />
</pre><br />
<br />
save the following code as <code>partition_vboot.sh</code><br />
<br />
<pre><br />
#!/bin/bash <br />
<br />
DISK="$1" <br />
<br />
# Make sure only root can run our script<br />
if [ "$(id -u)" != "0" ]; then<br />
echo "This script must be run as root" 1>&2<br />
exit 1 <br />
fi <br />
<br />
if [ x"$DISK" == 'x' ]; then<br />
echo "This script requires a base block device as its only arguement" 1>&2<br />
echo "example: $0 /dev/sdb"<br />
exit 1 <br />
fi <br />
<br />
DISK_DEVICE_NAME="$(echo $DISK | awk -F'/' '{print $NF}')"<br />
if [[ "$DISK_DEVICE_NAME" == *mmcblk* ]]; then<br />
ROOT_PARTITION="$DISK"p2<br />
SWAP_PARTITION="$DISK"p3<br />
else<br />
ROOT_PARTITION="$DISK"2<br />
SWAP_PARTITION="$DISK"3<br />
fi<br />
<br />
# TODO allow specify TOTAL_SECTORS<br />
TOTAL_SECTORS=$(cat /sys/block/$DISK_DEVICE_NAME/size)<br />
SECTOR_SIZE=$(cat /sys/block/$DISK_DEVICE_NAME/queue/hw_sector_size)<br />
<br />
# the following are in sectors, 1MB = 2048 sectors<br />
FIRST_GAP_SIZE=8192 # 2048 sectors * 4MB<br />
LAST_GAP_SIZE=2048 # 2048 sectors * 1MB<br />
SWAP_PART_SIZE=8388608 # 2048 sectors * 4096MB<br />
KERNEL_PART_SIZE=65536 # 2048 sectors * 32MB<br />
<br />
# layout arithmatic <br />
FIRST_GAP_START=0 <br />
FIRST_GAP_END=$(( $FIRST_GAP_SIZE - 1 ))<br />
KERNEL_PART_START=$(( $FIRST_GAP_END + 1 ))<br />
KERNEL_PART_END=$(( $FIRST_GAP_END + $KERNEL_PART_SIZE ))<br />
ROOTFS_PART_START=$(( $KERNEL_PART_END + 1 ))<br />
<br />
LAST_GAP_END=$(( $TOTAL_SECTORS - 1 ))<br />
LAST_GAP_START=$(( $LAST_GAP_END - $LAST_GAP_SIZE + 1 ))<br />
if [ $TOTAL_SECTORS -lt 10000000 ]; then # if size of disk is less than 5GB do not make swap<br />
MAKESWAP='false' <br />
ROOTFS_PART_END=$(( $LAST_GAP_START - 1 ))<br />
SWAP_PART_END=0<br />
SWAP_PART_START=0<br />
else<br />
MAKESWAP='true' <br />
SWAP_PART_END=$(( $LAST_GAP_START - 1 ))<br />
SWAP_PART_START=$(( $SWAP_PART_END - $SWAP_PART_SIZE + 1 ))<br />
ROOTFS_PART_END=$(( $SWAP_PART_START - 1 ))<br />
fi<br />
<br />
echo "TOTAL_SECTORS = $TOTAL_SECTORS"<br />
echo "SECTOR_SIZE = $SECTOR_SIZE"<br />
echo ""<br />
echo "FIRST_GAP_SIZE = $FIRST_GAP_SIZE"<br />
echo "LAST_GAP_SIZE = $LAST_GAP_SIZE"<br />
echo "SWAP_PART_SIZE = $SWAP_PART_SIZE"<br />
echo "KERNEL_PART_SIZE = $KERNEL_PART_SIZE"<br />
echo ""<br />
echo "FIRST_GAP_START = $FIRST_GAP_START $(( $FIRST_GAP_START / 2048 )) MB"<br />
echo "FIRST_GAP_END = $FIRST_GAP_END"<br />
echo "KERNEL_PART_START = $KERNEL_PART_START $(( $KERNEL_PART_START / 2048 )) MB"<br />
echo "KERNEL_PART_END = $KERNEL_PART_END"<br />
echo "ROOTFS_PART_START = $ROOTFS_PART_START $(( $ROOTFS_PART_START / 2048 )) MB"<br />
echo "ROOTFS_PART_END = $ROOTFS_PART_END"<br />
echo "SWAP_PART_START = $SWAP_PART_START $(( $SWAP_PART_START / 2048 )) MB"<br />
echo "SWAP_PART_END = $SWAP_PART_END"<br />
echo "LAST_GAP_START = $LAST_GAP_START $(( $LAST_GAP_START / 2048 )) MB"<br />
echo "LAST_GAP_END = $LAST_GAP_END"<br />
<br />
# use `sgdisk --list-types' to get all possible type codes<br />
KERNEL_PART_TYPE='7f00'<br />
ROOTFS_PART_TYPE='7f01'<br />
SWAP_PART_TYPE='8200'<br />
<br />
# wipe disk, and create new gpt partition table<br />
sgdisk --zap-all $DISK<br />
sgdisk -o $DISK<br />
<br />
# create the kernel partition<br />
sgdisk --new=1:$KERNEL_PART_START:$KERNEL_PART_END $DISK<br />
sgdisk --typecode=1:$KERNEL_PART_TYPE $DISK<br />
sgdisk --change-name=1:Kernel $DISK<br />
sgdisk --attributes=1:=:015A000000000000 $DISK<br />
<br />
# create the rootfs partition <br />
sgdisk --new=2:$ROOTFS_PART_START:$ROOTFS_PART_END $DISK<br />
sgdisk --typecode=2:$ROOTFS_PART_TYPE $DISK<br />
sgdisk --change-name=2:Root $DISK<br />
mkfs.ext4 $ROOT_PARTITION<br />
<br />
# create the swap partition<br />
if [ $MAKESWAP = 'true' ]; then<br />
sgdisk --new=3:$SWAP_PART_START:$SWAP_PART_END $DISK<br />
sgdisk --typecode=3:$SWAP_PART_TYPE $DISK<br />
sgdisk --change-name=3:Swap $DISK<br />
mkswap $SWAP_PARTITION<br />
fi<br />
<br />
sgdisk --print $DISK<br />
lsblk $DISK<br />
</pre><br />
<br />
== partition micro sd card & mount the rootfs partition ==<br />
<br />
<code>partition_vboot.sh</code> is a replacement for cgpt i made that uses sgdisk to create a compatible partition layout for depthcharge chromebooks (asus c201 & samsung chromebook plus v1). I have tested it with cards as small as 2GB, it will automatically make a 4GB swap partition if the size of the disk is detected to be above 4GB, the rest of the disk will be used for the rootfs partition<br />
<br />
<pre># sh partition_vboot.sh /dev/sdX</pre><br />
<br />
if you dont want to run this script you can follow the partitioning instructions on the archlinuxarm wiki page for this device<br />
https://archlinuxarm.org/platforms/armv8/rockchip/samsung-chromebook-plus<br />
<br />
<br />
after the rootfs partition is created and formated, mount it<br />
<pre><br />
# mkdir $MOUNTPOINT<br />
# mount /dev/sdX2 $MOUNTPOINT<br />
</pre><br />
<br />
== extract / copy files ==<br />
<pre><br />
# bsdtar -xf parabola-armv7h-systemd-cli-2020.02-tarball.tar.gz -C $MOUNTPOINT<br />
# bsdtar -xf linux-libre-64-5.11.11-3-armv7h.pkg.tar.xz -C $MOUNTPOINT<br />
# cp linux-libre-64-5.11.11-3-armv7h.pkg.tar.xz $MOUNTPOINT/var/cache/pacman/pkg/<br />
<br />
# echo > $MOUNTPOINT/etc/fstab<br />
<br />
# mkdir $MOUNTPOINT/boot/pack<br />
# cp kernel.keyblock $MOUNTPOINT/boot/pack<br />
# cp kernel_data_key.vbprivk $MOUNTPOINT/boot/pack<br />
# cp $MOUNTPOINT/usr/lib/modules/5.11.11-gnu-3-64-ARCH/vmlinuz $MOUNTPOINT/boot/pack<br />
# cp $MOUNTPOINT/boot/dtbs/linux-libre-64/rockchip/rk3399-gru-kevin.dtb $MOUNTPOINT/boot/pack<br />
<br />
# cd $MOUNTPOINT/boot/pack<br />
<br />
# lz4 -k vmlinuz<br />
# echo "console=tty0 console=ttyS2,115200n8 earlyprintk=ttyS2,115200n8 init=/sbin/init root=PARTUUID=%U/PARTNROFF=1 rootwait rw noinitrd" > cmdline<br />
# dd if=/dev/zero of=bootloader.bin bs=512 count=1<br />
</pre><br />
<br />
paste the following code into <code>kernel.its</code><br />
<br />
<pre><br />
/dts-v1/;<br />
<br />
/ {<br />
description = "Chrome OS kernel image with one or more FDT blobs";<br />
images {<br />
kernel@1{<br />
description = "kernel";<br />
data = /incbin/("vmlinuz.lz4");<br />
type = "kernel_noload";<br />
arch = "arm64";<br />
os = "linux";<br />
compression = "lz4";<br />
load = <0>;<br />
entry = <0>;<br />
};<br />
fdt@1{<br />
description = "rk3399-gru-kevin.dtb";<br />
data = /incbin/("rk3399-gru-kevin.dtb");<br />
type = "flat_dt";<br />
arch = "arm64";<br />
compression = "none";<br />
hash@1{<br />
algo = "sha1";<br />
};<br />
};<br />
};<br />
configurations {<br />
default = "conf@1";<br />
conf@1{<br />
kernel = "kernel@1";<br />
fdt = "fdt@1";<br />
};<br />
};<br />
};<br />
</pre><br />
<br />
<pre># mkimage -f kernel.its kernel.itb</pre><br />
<br />
if you see the following error message, just ignore, it will still work<br />
<pre><br />
kernel.its:6.17-15.11: Warning (unit_address_vs_reg): /images/kernel@1: node has a unit name, but no reg or ranges property<br />
kernel.its:16.14-25.11: Warning (unit_address_vs_reg): /images/fdt@1: node has a unit name, but no reg or ranges property<br />
kernel.its:22.19-24.15: Warning (unit_address_vs_reg): /images/fdt@1/hash@1: node has a unit name, but no reg or ranges property<br />
kernel.its:29.15-32.11: Warning (unit_address_vs_reg): /configurations/conf@1: node has a unit name, but no reg or ranges property<br />
mkimage: verify_header failed for FIT Image support with exit code 1<br />
</pre><br />
<br />
and paste the following code into <code>pack_vboot.sh</code><br />
<br />
<pre><br />
futility --debug vbutil_kernel \<br />
--pack vmlinux.kpart \<br />
--version 1 \<br />
--vmlinuz kernel.itb \<br />
--arch aarch64 \<br />
--keyblock kernel.keyblock \<br />
--signprivate kernel_data_key.vbprivk \<br />
--config cmdline \<br />
--bootloader bootloader.bin<br />
</pre><br />
Now run the following commands:<br />
<pre><br />
# sh pack_vboot.sh<br />
# dd if=vmlinux.kpart of=/dev/sdX1<br />
# cd<br />
# umount $MOUNTPOINT<br />
</pre><br />
<br />
== Boot! ==<br />
<br />
<br />
it should boot up. (press ctrl+u at the white bios screen if it still boots into chromeos)<br />
<br />
login as root<br />
<br />
in order to update the system you will need some way to connect to the internet, i am using a usb-c ethernet adapter<br />
https://www.amazon.com/Nekteck-Ethernet-Compatible-Pixelbook-Thunderbolt/dp/B0749DCDRV/<br />
<br />
plug in the usb ethernet and dhcp should assign an ip<br />
<br />
then sync the time<br />
<pre><br />
# systemctl restart systemd-timesyncd.service<br />
# pacman -Sy<br />
# pacman -S archlinux-keyring archlinux32-keyring archlinuxarm-keyring parabola-keyring<br />
</pre><br />
it will fail because of keyring, but you downloaded it!<br />
<pre><br />
# pacman -U /var/cache/pacman/pkg/*-keyring-*<br />
# pacman -S archlinux-keyring archlinux32-keyring archlinuxarm-keyring parabola-keyring<br />
# pacman -S archlinux-keyring archlinux32-keyring archlinuxarm-keyring parabola-keyring<br />
</pre><br />
<br />
TODO: get <code>pacman-key --refresh</code> to work. try: https://wiki.parabola.nu/Parabola_Keyring<br />
<br />
as an alternative temporary way around, we will just disable signature checking for this test environment.<br />
<br />
<pre><br />
sed -i '/^SigLevel.*/SigLevel = Never/' /etc/pacman.conf<br />
</pre><br />
<br />
<pre><br />
# pacman -S linux-libre-64 --overwrite '/*'<br />
# pacman -Su linux-libre-firmware acpi vim nano networkmanager<br />
</pre><br />
<br />
== Bonus extra info ==<br />
<br />
=== make your own debug port breakout ===<br />
I dont know where to get a servo board but the you can make your own debug header breakout to get serial console access / early boot logs etc<br />
<br />
the breakout https://www.amazon.com/Proto-Advantage-DR040D254P050-50-Pin-Connector-Adapter/dp/B097S2268V or https://www.ebay.com/itm/202502988342<br />
<br />
the connector https://www.digikey.com/en/products/detail/panasonic-electric-works/AXK850145WG/1986616<br />
<br />
usb <--> rs232 https://www.amazon.com/HiLetgo-CP2102-Converter-Adapter-Downloader/dp/B00LODGRV8 (get 2)<br />
<br />
servo connector pinout is described in this pdf (page 14) (V2 DEBUG HEADER)<br />
<br />
https://www.chromium.org/chromium-os/servo/810-10010-03_20120227_servo_SCH_0.pdf<br />
<br />
you can use a continuity meter to determine connector orientation by finding the corner pin that is ground<br />
<br />
<pre><br />
<br />
<br />
PIN-33 UART1_DUT_SERVO_TX --+ +-- PIN-17 UART2_DUT_SERVO_TX<br />
| |<br />
| |<br />
| |<br />
49 vG vG G 1<br />
|||||||||||||||||||||||||<br />
9753197531975319753197531<br />
1234567890123210987654321<br />
0864208642086420864208642<br />
|||||||||||||||||||||||||<br />
50 G G ^ G ^ G 2<br />
| |<br />
| |<br />
| |<br />
PIN-32 UART1_SERVO_DUT_TX --+ +-- PIN-16 UART2_SERVO_DUT_TX<br />
<br />
<br />
GND PINS = 1, 8, 15, 20, 31, 36, 42<br />
</pre><br />
<br />
=== set bios boot timeout to 2 seconds ===<br />
<br />
https://old.reddit.com/r/Crouton/comments/2szn59/how_to_shorten_os_verfication_warning_screen_on/<br />
<br />
https://old.reddit.com/r/chromeos/comments/6j5ig9/chromebook_pro_hardware_writeprotect/dll73kq/<br />
<br />
install package from aur flashrom-chromeos<br />
<br />
info about gbb flags<br />
<br />
<pre><br />
/* Flags for .flags field */<br />
/* Reduce the dev screen delay to 2 sec from 30 sec to speedup factory. */<br />
#define GBB_FLAG_DEV_SCREEN_SHORT_DELAY 0x00000001<br />
/*<br />
* BIOS should load option ROMs from arbitrary PCI devices. We'll never enable<br />
* this ourselves because it executes non-verified code, but if a customer<br />
* wants to void their warranty and set this flag in the read-only flash, they<br />
* should be able to do so.<br />
*/<br />
#define GBB_FLAG_LOAD_OPTION_ROMS 0x00000002<br />
/*<br />
* The factory flow may need the BIOS to boot a non-ChromeOS kernel if the<br />
* dev-switch is on. This flag allows that.<br />
*/<br />
#define GBB_FLAG_ENABLE_ALTERNATE_OS 0x00000004<br />
/* Force dev switch on, regardless of physical/keyboard dev switch position. */<br />
#define GBB_FLAG_FORCE_DEV_SWITCH_ON 0x00000008<br />
/* Allow booting from USB in dev mode even if dev_boot_usb=0. */<br />
#define GBB_FLAG_FORCE_DEV_BOOT_USB 0x00000010<br />
/* Disable firmware rollback protection. */<br />
#define GBB_FLAG_DISABLE_FW_ROLLBACK_CHECK 0x00000020<br />
/* Allow Enter key to trigger dev->tonorm screen transition */<br />
#define GBB_FLAG_ENTER_TRIGGERS_TONORM 0x00000040<br />
/* Allow booting Legacy OSes in dev mode even if dev_boot_legacy=0. */<br />
#define GBB_FLAG_FORCE_DEV_BOOT_LEGACY 0x00000080<br />
/* Allow booting using alternate keys for FAFT servo testing */<br />
#define GBB_FLAG_FAFT_KEY_OVERIDE 0x00000100<br />
/* Disable EC software sync */<br />
#define GBB_FLAG_DISABLE_EC_SOFTWARE_SYNC 0x00000200<br />
/* Default to booting legacy OS when dev screen times out */<br />
#define GBB_FLAG_DEFAULT_DEV_BOOT_LEGACY 0x00000400<br />
/* Disable PD software sync */<br />
#define GBB_FLAG_DISABLE_PD_SOFTWARE_SYNC 0x00000800<br />
/* Disable shutdown on lid closed */<br />
#define GBB_FLAG_DISABLE_LID_SHUTDOWN 0x00001000<br />
/*<br />
* Allow full fastboot capability in firmware even if<br />
* dev_boot_fastboot_full_cap=0.<br />
*/<br />
#define GBB_FLAG_FORCE_DEV_BOOT_FASTBOOT_FULL_CAP 0x00002000<br />
/* Enable serial console */<br />
#define GBB_FLAG_ENABLE_SERIAL 0x00004000<br />
<br />
source: https://chromium.googlesource.com/chromiumos/platform/vboot/+/master/_vboot_reference/firmware/include/gbb_header.h<br />
</pre><br />
<br />
=== blobless coreboot / etc ===<br />
https://gitlab.com/vicencb/kevinboot/</div>Maihttps://wiki.parabola.nu/index.php?title=User:Mai&diff=23904User:Mai2022-11-22T02:34:28Z<p>Mai: /* Enable booting from external storage */</p>
<hr />
<div>{{stub}}<br />
== Status for Samsung Chromebook Plus v1 aka kevin aka gru-kevin aka xe513c24 ==<br />
=== Kernel ===<br />
{{pkg|linux-libre-64}} (armv7h) works but needs to be packed correctly to boot, the following is a rough guide on how i was able to boot this kernel on this hardware<br />
<br />
=== what does not work ===<br />
- onboard wifi<br />
- probably more stuff<br />
<br />
=== What you will need ===<br />
- this laptop :P<br />
- micro sd card at least 2GB, 8+GB reccomended<br />
- another computer that has a linux environment so we can download / extract / pack the kernel and install rootfs<br />
<br />
== Unlock external booting ==<br />
=== Switch to developer mode ===<br />
<br />
# Turn off the laptop.<br />
# To invoke Recovery mode, you hold down the ESC and Refresh keys and poke the Power button.<br />
# At the Recovery screen press Ctrl-D (there’s no prompt - you have to know to do it).<br />
# Confirm switching to developer mode by pressing enter, and the laptop will reboot and reset the system. This takes about 10-15 minutes.<br />
<br />
Note: After enabling developer mode, you will need to press Ctrl-D each time you boot, or wait 30 seconds to continue booting.<br />
=== Enable booting from external storage ===<br />
<br />
# After booting into developer mode, hold Ctrl and Alt and poke the F2 key. This will open up the developer console.<br />
# Type root to the login screen.<br />
# Then type this to enable USB booting:<br />
<br />
<pre><br />
# crossystem dev_boot_usb=1<br />
# crossystem dev_default_boot=usb<br />
</pre><br />
<br />
Reboot the system to allow the change to take effect.<br />
<br />
Source: https://chromebooks.readthedocs.io/en/latest/source/README.html#switch-to-developer-mode<br />
<br />
== Install packages ==<br />
<code>pacman -S {{pkg|vboot-utils}} {{pkg|uboot-tools}} {{pkg|gptfdisk}} {{pkg|dtc}}</code><br />
<br />
== Gather files ==<br />
<br />
<pre><br />
$ mkdir parabola-armv7-64<br />
$ cd parabola-armv7-64<br />
<br />
$ wget -c https://redirector.parabola.nu/iso/armv7h-systemd-cli-2020.02/parabola-armv7h-systemd-cli-2020.02-tarball.tar.gz<br />
$ wget -c https://redirector.parabola.nu/iso/armv7h-systemd-cli-2020.02/parabola-armv7h-systemd-cli-2020.02-tarball.tar.gz.sig<br />
$ wget -c https://repomirror.parabola.nu/pool/parabola/linux-libre-64-5.11.11-3-armv7h.pkg.tar.xz<br />
$ wget -c https://repomirror.parabola.nu/pool/parabola/linux-libre-64-5.11.11-3-armv7h.pkg.tar.xz.sig<br />
$ wget -c https://git.parabola.nu/abslibre.git/plain/libre/linux-libre/kernel.keyblock<br />
$ wget -c https://git.parabola.nu/abslibre.git/plain/libre/linux-libre/kernel_data_key.vbprivk<br />
<br />
<br />
$ gpg --recv-keys FBCC5AD7421197B7ABA72853908710913E8C7778<br />
$ gpg --verify parabola-armv7h-systemd-cli-2020.02-tarball.tar.gz.sig<br />
$ gpg --recv-keys 782F9DDBE36BA7F3D4DE49065F5DFCC14177E263<br />
$ gpg --verify linux-libre-64-5.11.11-3-armv7h.pkg.tar.xz.sig<br />
</pre><br />
<br />
save the following code as <code>partition_vboot.sh</code><br />
<br />
<pre><br />
#!/bin/bash <br />
<br />
DISK="$1" <br />
<br />
# Make sure only root can run our script<br />
if [ "$(id -u)" != "0" ]; then<br />
echo "This script must be run as root" 1>&2<br />
exit 1 <br />
fi <br />
<br />
if [ x"$DISK" == 'x' ]; then<br />
echo "This script requires a base block device as its only arguement" 1>&2<br />
echo "example: $0 /dev/sdb"<br />
exit 1 <br />
fi <br />
<br />
DISK_DEVICE_NAME="$(echo $DISK | awk -F'/' '{print $NF}')"<br />
if [[ "$DISK_DEVICE_NAME" == *mmcblk* ]]; then<br />
ROOT_PARTITION="$DISK"p2<br />
SWAP_PARTITION="$DISK"p3<br />
else<br />
ROOT_PARTITION="$DISK"2<br />
SWAP_PARTITION="$DISK"3<br />
fi<br />
<br />
# TODO allow specify TOTAL_SECTORS<br />
TOTAL_SECTORS=$(cat /sys/block/$DISK_DEVICE_NAME/size)<br />
SECTOR_SIZE=$(cat /sys/block/$DISK_DEVICE_NAME/queue/hw_sector_size)<br />
<br />
# the following are in sectors, 1MB = 2048 sectors<br />
FIRST_GAP_SIZE=8192 # 2048 sectors * 4MB<br />
LAST_GAP_SIZE=2048 # 2048 sectors * 1MB<br />
SWAP_PART_SIZE=8388608 # 2048 sectors * 4096MB<br />
KERNEL_PART_SIZE=65536 # 2048 sectors * 32MB<br />
<br />
# layout arithmatic <br />
FIRST_GAP_START=0 <br />
FIRST_GAP_END=$(( $FIRST_GAP_SIZE - 1 ))<br />
KERNEL_PART_START=$(( $FIRST_GAP_END + 1 ))<br />
KERNEL_PART_END=$(( $FIRST_GAP_END + $KERNEL_PART_SIZE ))<br />
ROOTFS_PART_START=$(( $KERNEL_PART_END + 1 ))<br />
<br />
LAST_GAP_END=$(( $TOTAL_SECTORS - 1 ))<br />
LAST_GAP_START=$(( $LAST_GAP_END - $LAST_GAP_SIZE + 1 ))<br />
if [ $TOTAL_SECTORS -lt 10000000 ]; then # if size of disk is less than 5GB do not make swap<br />
MAKESWAP='false' <br />
ROOTFS_PART_END=$(( $LAST_GAP_START - 1 ))<br />
SWAP_PART_END=0<br />
SWAP_PART_START=0<br />
else<br />
MAKESWAP='true' <br />
SWAP_PART_END=$(( $LAST_GAP_START - 1 ))<br />
SWAP_PART_START=$(( $SWAP_PART_END - $SWAP_PART_SIZE + 1 ))<br />
ROOTFS_PART_END=$(( $SWAP_PART_START - 1 ))<br />
fi<br />
<br />
echo "TOTAL_SECTORS = $TOTAL_SECTORS"<br />
echo "SECTOR_SIZE = $SECTOR_SIZE"<br />
echo ""<br />
echo "FIRST_GAP_SIZE = $FIRST_GAP_SIZE"<br />
echo "LAST_GAP_SIZE = $LAST_GAP_SIZE"<br />
echo "SWAP_PART_SIZE = $SWAP_PART_SIZE"<br />
echo "KERNEL_PART_SIZE = $KERNEL_PART_SIZE"<br />
echo ""<br />
echo "FIRST_GAP_START = $FIRST_GAP_START $(( $FIRST_GAP_START / 2048 )) MB"<br />
echo "FIRST_GAP_END = $FIRST_GAP_END"<br />
echo "KERNEL_PART_START = $KERNEL_PART_START $(( $KERNEL_PART_START / 2048 )) MB"<br />
echo "KERNEL_PART_END = $KERNEL_PART_END"<br />
echo "ROOTFS_PART_START = $ROOTFS_PART_START $(( $ROOTFS_PART_START / 2048 )) MB"<br />
echo "ROOTFS_PART_END = $ROOTFS_PART_END"<br />
echo "SWAP_PART_START = $SWAP_PART_START $(( $SWAP_PART_START / 2048 )) MB"<br />
echo "SWAP_PART_END = $SWAP_PART_END"<br />
echo "LAST_GAP_START = $LAST_GAP_START $(( $LAST_GAP_START / 2048 )) MB"<br />
echo "LAST_GAP_END = $LAST_GAP_END"<br />
<br />
# use `sgdisk --list-types' to get all possible type codes<br />
KERNEL_PART_TYPE='7f00'<br />
ROOTFS_PART_TYPE='7f01'<br />
SWAP_PART_TYPE='8200'<br />
<br />
# wipe disk, and create new gpt partition table<br />
sgdisk --zap-all $DISK<br />
sgdisk -o $DISK<br />
<br />
# create the kernel partition<br />
sgdisk --new=1:$KERNEL_PART_START:$KERNEL_PART_END $DISK<br />
sgdisk --typecode=1:$KERNEL_PART_TYPE $DISK<br />
sgdisk --change-name=1:Kernel $DISK<br />
sgdisk --attributes=1:=:015A000000000000 $DISK<br />
<br />
# create the rootfs partition <br />
sgdisk --new=2:$ROOTFS_PART_START:$ROOTFS_PART_END $DISK<br />
sgdisk --typecode=2:$ROOTFS_PART_TYPE $DISK<br />
sgdisk --change-name=2:Root $DISK<br />
mkfs.ext4 $ROOT_PARTITION<br />
<br />
# create the swap partition<br />
if [ $MAKESWAP = 'true' ]; then<br />
sgdisk --new=3:$SWAP_PART_START:$SWAP_PART_END $DISK<br />
sgdisk --typecode=3:$SWAP_PART_TYPE $DISK<br />
sgdisk --change-name=3:Swap $DISK<br />
mkswap $SWAP_PARTITION<br />
fi<br />
<br />
sgdisk --print $DISK<br />
lsblk $DISK<br />
</pre><br />
<br />
== partition micro sd card & mount the rootfs partition ==<br />
<br />
<code>partition_vboot.sh</code> is a replacement for cgpt i made that uses sgdisk to create a compatible partition layout for depthcharge chromebooks (asus c201 & samsung chromebook plus v1). I have tested it with cards as small as 2GB, it will automatically make a 4GB swap partition if the size of the disk is detected to be above 4GB, the rest of the disk will be used for the rootfs partition<br />
<br />
<pre># sh partition_vboot.sh /dev/sdX</pre><br />
<br />
if you dont want to run this script you can follow the partitioning instructions on the archlinuxarm wiki page for this device<br />
https://archlinuxarm.org/platforms/armv8/rockchip/samsung-chromebook-plus<br />
<br />
<br />
after the rootfs partition is created and formated, mount it<br />
<pre><br />
# mkdir $MOUNTPOINT<br />
# mount /dev/sdX2 $MOUNTPOINT<br />
</pre><br />
<br />
== extract / copy files ==<br />
<pre><br />
# bsdtar -xf parabola-armv7h-systemd-cli-2020.02-tarball.tar.gz -C $MOUNTPOINT<br />
# bsdtar -xf linux-libre-64-5.11.11-3-armv7h.pkg.tar.xz -C $MOUNTPOINT<br />
# cp linux-libre-64-5.11.11-3-armv7h.pkg.tar.xz $MOUNTPOINT/var/cache/pacman/pkg/<br />
<br />
# echo > $MOUNTPOINT/etc/fstab<br />
<br />
# mkdir $MOUNTPOINT/boot/pack<br />
# cp kernel.keyblock $MOUNTPOINT/boot/pack<br />
# cp kernel_data_key.vbprivk $MOUNTPOINT/boot/pack<br />
# cp $MOUNTPOINT/usr/lib/modules/5.11.11-gnu-3-64-ARCH/vmlinuz $MOUNTPOINT/boot/pack<br />
# cp $MOUNTPOINT/boot/dtbs/linux-libre-64/rockchip/rk3399-gru-kevin.dtb $MOUNTPOINT/boot/pack<br />
<br />
# cd $MOUNTPOINT/boot/pack<br />
<br />
# lz4 -k vmlinuz<br />
# echo "console=tty0 console=ttyS2,115200n8 earlyprintk=ttyS2,115200n8 init=/sbin/init root=PARTUUID=%U/PARTNROFF=1 rootwait rw noinitrd" > cmdline<br />
# dd if=/dev/zero of=bootloader.bin bs=512 count=1<br />
</pre><br />
<br />
paste the following code into <code>kernel.its</code><br />
<br />
<pre><br />
/dts-v1/;<br />
<br />
/ {<br />
description = "Chrome OS kernel image with one or more FDT blobs";<br />
images {<br />
kernel@1{<br />
description = "kernel";<br />
data = /incbin/("vmlinuz.lz4");<br />
type = "kernel_noload";<br />
arch = "arm64";<br />
os = "linux";<br />
compression = "lz4";<br />
load = <0>;<br />
entry = <0>;<br />
};<br />
fdt@1{<br />
description = "rk3399-gru-kevin.dtb";<br />
data = /incbin/("rk3399-gru-kevin.dtb");<br />
type = "flat_dt";<br />
arch = "arm64";<br />
compression = "none";<br />
hash@1{<br />
algo = "sha1";<br />
};<br />
};<br />
};<br />
configurations {<br />
default = "conf@1";<br />
conf@1{<br />
kernel = "kernel@1";<br />
fdt = "fdt@1";<br />
};<br />
};<br />
};<br />
</pre><br />
<br />
<pre># mkimage -f kernel.its kernel.itb</pre><br />
<br />
if you see the following error message, just ignore, it will still work<br />
<pre><br />
kernel.its:6.17-15.11: Warning (unit_address_vs_reg): /images/kernel@1: node has a unit name, but no reg or ranges property<br />
kernel.its:16.14-25.11: Warning (unit_address_vs_reg): /images/fdt@1: node has a unit name, but no reg or ranges property<br />
kernel.its:22.19-24.15: Warning (unit_address_vs_reg): /images/fdt@1/hash@1: node has a unit name, but no reg or ranges property<br />
kernel.its:29.15-32.11: Warning (unit_address_vs_reg): /configurations/conf@1: node has a unit name, but no reg or ranges property<br />
mkimage: verify_header failed for FIT Image support with exit code 1<br />
</pre><br />
<br />
and paste the following code into <code>pack_vboot.sh</code><br />
<br />
<pre><br />
futility --debug vbutil_kernel \<br />
--pack vmlinux.kpart \<br />
--version 1 \<br />
--vmlinuz kernel.itb \<br />
--arch aarch64 \<br />
--keyblock kernel.keyblock \<br />
--signprivate kernel_data_key.vbprivk \<br />
--config cmdline \<br />
--bootloader bootloader.bin<br />
</pre><br />
Now run the following commands:<br />
<pre><br />
# sh pack_vboot.sh<br />
# dd if=vmlinux.kpart of=/dev/sdX1<br />
# cd<br />
# umount $MOUNTPOINT<br />
</pre><br />
<br />
== Boot! ==<br />
<br />
<br />
it should boot up. login as root<br />
<br />
in order to update the system you will need some way to connect to the internet, i am using a usb-c ethernet adapter<br />
https://www.amazon.com/Nekteck-Ethernet-Compatible-Pixelbook-Thunderbolt/dp/B0749DCDRV/<br />
<br />
plug in the usb ethernet and dhcp should assign an ip<br />
<br />
then sync the time<br />
<pre><br />
# systemctl restart systemd-timesyncd.service<br />
# pacman -Sy<br />
# pacman -S archlinux-keyring archlinux32-keyring archlinuxarm-keyring parabola-keyring<br />
</pre><br />
it will fail because of keyring, but you downloaded it!<br />
<pre><br />
# pacman -U /var/cache/pacman/pkg/*-keyring-*<br />
# pacman -S archlinux-keyring archlinux32-keyring archlinuxarm-keyring parabola-keyring<br />
# pacman -S archlinux-keyring archlinux32-keyring archlinuxarm-keyring parabola-keyring<br />
</pre><br />
<br />
TODO: get <code>pacman-key --refresh</code> to work. try: https://wiki.parabola.nu/Parabola_Keyring<br />
<br />
as an alternative temporary way around, we will just disable signature checking for this test environment.<br />
<br />
<pre><br />
sed -i '/^SigLevel.*/SigLevel = Never/' /etc/pacman.conf<br />
</pre><br />
<br />
<pre><br />
# pacman -S linux-libre-64 --overwrite '/*'<br />
# pacman -Su linux-libre-firmware acpi vim nano networkmanager<br />
</pre><br />
<br />
== Bonus extra info ==<br />
<br />
=== make your own debug port breakout ===<br />
I dont know where to get a servo board but the you can make your own debug header breakout to get serial console access / early boot logs etc<br />
<br />
the breakout https://www.amazon.com/Proto-Advantage-DR040D254P050-50-Pin-Connector-Adapter/dp/B097S2268V or https://www.ebay.com/itm/202502988342<br />
<br />
the connector https://www.digikey.com/en/products/detail/panasonic-electric-works/AXK850145WG/1986616<br />
<br />
usb <--> rs232 https://www.amazon.com/HiLetgo-CP2102-Converter-Adapter-Downloader/dp/B00LODGRV8 (get 2)<br />
<br />
servo connector pinout is described in this pdf (page 14) (V2 DEBUG HEADER)<br />
<br />
https://www.chromium.org/chromium-os/servo/810-10010-03_20120227_servo_SCH_0.pdf<br />
<br />
you can use a continuity meter to determine connector orientation by finding the corner pin that is ground<br />
<br />
<pre><br />
<br />
<br />
PIN-33 UART1_DUT_SERVO_TX --+ +-- PIN-17 UART2_DUT_SERVO_TX<br />
| |<br />
| |<br />
| |<br />
49 vG vG G 1<br />
|||||||||||||||||||||||||<br />
9753197531975319753197531<br />
1234567890123210987654321<br />
0864208642086420864208642<br />
|||||||||||||||||||||||||<br />
50 G G ^ G ^ G 2<br />
| |<br />
| |<br />
| |<br />
PIN-32 UART1_SERVO_DUT_TX --+ +-- PIN-16 UART2_SERVO_DUT_TX<br />
<br />
<br />
GND PINS = 1, 8, 15, 20, 31, 36, 42<br />
</pre><br />
<br />
=== set bios boot timeout to 2 seconds ===<br />
<br />
https://old.reddit.com/r/Crouton/comments/2szn59/how_to_shorten_os_verfication_warning_screen_on/<br />
<br />
https://old.reddit.com/r/chromeos/comments/6j5ig9/chromebook_pro_hardware_writeprotect/dll73kq/<br />
<br />
install package from aur flashrom-chromeos<br />
<br />
info about gbb flags<br />
<br />
<pre><br />
/* Flags for .flags field */<br />
/* Reduce the dev screen delay to 2 sec from 30 sec to speedup factory. */<br />
#define GBB_FLAG_DEV_SCREEN_SHORT_DELAY 0x00000001<br />
/*<br />
* BIOS should load option ROMs from arbitrary PCI devices. We'll never enable<br />
* this ourselves because it executes non-verified code, but if a customer<br />
* wants to void their warranty and set this flag in the read-only flash, they<br />
* should be able to do so.<br />
*/<br />
#define GBB_FLAG_LOAD_OPTION_ROMS 0x00000002<br />
/*<br />
* The factory flow may need the BIOS to boot a non-ChromeOS kernel if the<br />
* dev-switch is on. This flag allows that.<br />
*/<br />
#define GBB_FLAG_ENABLE_ALTERNATE_OS 0x00000004<br />
/* Force dev switch on, regardless of physical/keyboard dev switch position. */<br />
#define GBB_FLAG_FORCE_DEV_SWITCH_ON 0x00000008<br />
/* Allow booting from USB in dev mode even if dev_boot_usb=0. */<br />
#define GBB_FLAG_FORCE_DEV_BOOT_USB 0x00000010<br />
/* Disable firmware rollback protection. */<br />
#define GBB_FLAG_DISABLE_FW_ROLLBACK_CHECK 0x00000020<br />
/* Allow Enter key to trigger dev->tonorm screen transition */<br />
#define GBB_FLAG_ENTER_TRIGGERS_TONORM 0x00000040<br />
/* Allow booting Legacy OSes in dev mode even if dev_boot_legacy=0. */<br />
#define GBB_FLAG_FORCE_DEV_BOOT_LEGACY 0x00000080<br />
/* Allow booting using alternate keys for FAFT servo testing */<br />
#define GBB_FLAG_FAFT_KEY_OVERIDE 0x00000100<br />
/* Disable EC software sync */<br />
#define GBB_FLAG_DISABLE_EC_SOFTWARE_SYNC 0x00000200<br />
/* Default to booting legacy OS when dev screen times out */<br />
#define GBB_FLAG_DEFAULT_DEV_BOOT_LEGACY 0x00000400<br />
/* Disable PD software sync */<br />
#define GBB_FLAG_DISABLE_PD_SOFTWARE_SYNC 0x00000800<br />
/* Disable shutdown on lid closed */<br />
#define GBB_FLAG_DISABLE_LID_SHUTDOWN 0x00001000<br />
/*<br />
* Allow full fastboot capability in firmware even if<br />
* dev_boot_fastboot_full_cap=0.<br />
*/<br />
#define GBB_FLAG_FORCE_DEV_BOOT_FASTBOOT_FULL_CAP 0x00002000<br />
/* Enable serial console */<br />
#define GBB_FLAG_ENABLE_SERIAL 0x00004000<br />
<br />
source: https://chromium.googlesource.com/chromiumos/platform/vboot/+/master/_vboot_reference/firmware/include/gbb_header.h<br />
</pre><br />
<br />
=== blobless coreboot / etc ===<br />
https://gitlab.com/vicencb/kevinboot/</div>Maihttps://wiki.parabola.nu/index.php?title=User:Mai&diff=23604User:Mai2021-11-30T22:49:04Z<p>Mai: /* Gather files */</p>
<hr />
<div>{{stub}}<br />
== Status for Samsung Chromebook Plus v1 aka kevin aka gru-kevin aka xe513c24 ==<br />
=== Kernel ===<br />
{{pkg|linux-libre-64}} (armv7h) works but needs to be packed correctly to boot, the following is a rough guide on how i was able to boot this kernel on this hardware<br />
<br />
=== what does not work ===<br />
- onboard wifi<br />
- probably more stuff<br />
<br />
=== What you will need ===<br />
- this laptop :P<br />
- micro sd card at least 2GB, 8+GB reccomended<br />
- another computer that has a linux environment so we can download / extract / pack the kernel and install rootfs<br />
<br />
== Unlock external booting ==<br />
=== Switch to developer mode ===<br />
<br />
# Turn off the laptop.<br />
# To invoke Recovery mode, you hold down the ESC and Refresh keys and poke the Power button.<br />
# At the Recovery screen press Ctrl-D (there’s no prompt - you have to know to do it).<br />
# Confirm switching to developer mode by pressing enter, and the laptop will reboot and reset the system. This takes about 10-15 minutes.<br />
<br />
Note: After enabling developer mode, you will need to press Ctrl-D each time you boot, or wait 30 seconds to continue booting.<br />
=== Enable booting from external storage ===<br />
<br />
# After booting into developer mode, hold Ctrl and Alt and poke the F2 key. This will open up the developer console.<br />
# Type root to the login screen.<br />
# Then type this to enable USB booting:<br />
<br />
<code>$ enable_dev_usb_boot</code><br />
<br />
Reboot the system to allow the change to take effect.<br />
<br />
Source: https://chromebooks.readthedocs.io/en/latest/source/README.html#switch-to-developer-mode<br />
<br />
== Install packages ==<br />
<code>pacman -S {{pkg|vboot-utils}} {{pkg|uboot-tools}} {{pkg|gptfdisk}} {{pkg|dtc}}</code><br />
<br />
== Gather files ==<br />
<br />
<pre><br />
$ mkdir parabola-armv7-64<br />
$ cd parabola-armv7-64<br />
<br />
$ wget -c https://redirector.parabola.nu/iso/armv7h-systemd-cli-2020.02/parabola-armv7h-systemd-cli-2020.02-tarball.tar.gz<br />
$ wget -c https://redirector.parabola.nu/iso/armv7h-systemd-cli-2020.02/parabola-armv7h-systemd-cli-2020.02-tarball.tar.gz.sig<br />
$ wget -c https://repomirror.parabola.nu/pool/parabola/linux-libre-64-5.11.11-3-armv7h.pkg.tar.xz<br />
$ wget -c https://repomirror.parabola.nu/pool/parabola/linux-libre-64-5.11.11-3-armv7h.pkg.tar.xz.sig<br />
$ wget -c https://git.parabola.nu/abslibre.git/plain/libre/linux-libre/kernel.keyblock<br />
$ wget -c https://git.parabola.nu/abslibre.git/plain/libre/linux-libre/kernel_data_key.vbprivk<br />
<br />
<br />
$ gpg --recv-keys FBCC5AD7421197B7ABA72853908710913E8C7778<br />
$ gpg --verify parabola-armv7h-systemd-cli-2020.02-tarball.tar.gz.sig<br />
$ gpg --recv-keys 782F9DDBE36BA7F3D4DE49065F5DFCC14177E263<br />
$ gpg --verify linux-libre-64-5.11.11-3-armv7h.pkg.tar.xz.sig<br />
</pre><br />
<br />
save the following code as <code>partition_vboot.sh</code><br />
<br />
<pre><br />
#!/bin/bash <br />
<br />
DISK="$1" <br />
<br />
# Make sure only root can run our script<br />
if [ "$(id -u)" != "0" ]; then<br />
echo "This script must be run as root" 1>&2<br />
exit 1 <br />
fi <br />
<br />
if [ x"$DISK" == 'x' ]; then<br />
echo "This script requires a base block device as its only arguement" 1>&2<br />
echo "example: $0 /dev/sdb"<br />
exit 1 <br />
fi <br />
<br />
DISK_DEVICE_NAME="$(echo $DISK | awk -F'/' '{print $NF}')"<br />
if [[ "$DISK_DEVICE_NAME" == *mmcblk* ]]; then<br />
ROOT_PARTITION="$DISK"p2<br />
SWAP_PARTITION="$DISK"p3<br />
else<br />
ROOT_PARTITION="$DISK"2<br />
SWAP_PARTITION="$DISK"3<br />
fi<br />
<br />
# TODO allow specify TOTAL_SECTORS<br />
TOTAL_SECTORS=$(cat /sys/block/$DISK_DEVICE_NAME/size)<br />
SECTOR_SIZE=$(cat /sys/block/$DISK_DEVICE_NAME/queue/hw_sector_size)<br />
<br />
# the following are in sectors, 1MB = 2048 sectors<br />
FIRST_GAP_SIZE=8192 # 2048 sectors * 4MB<br />
LAST_GAP_SIZE=2048 # 2048 sectors * 1MB<br />
SWAP_PART_SIZE=8388608 # 2048 sectors * 4096MB<br />
KERNEL_PART_SIZE=65536 # 2048 sectors * 32MB<br />
<br />
# layout arithmatic <br />
FIRST_GAP_START=0 <br />
FIRST_GAP_END=$(( $FIRST_GAP_SIZE - 1 ))<br />
KERNEL_PART_START=$(( $FIRST_GAP_END + 1 ))<br />
KERNEL_PART_END=$(( $FIRST_GAP_END + $KERNEL_PART_SIZE ))<br />
ROOTFS_PART_START=$(( $KERNEL_PART_END + 1 ))<br />
<br />
LAST_GAP_END=$(( $TOTAL_SECTORS - 1 ))<br />
LAST_GAP_START=$(( $LAST_GAP_END - $LAST_GAP_SIZE + 1 ))<br />
if [ $TOTAL_SECTORS -lt 10000000 ]; then # if size of disk is less than 5GB do not make swap<br />
MAKESWAP='false' <br />
ROOTFS_PART_END=$(( $LAST_GAP_START - 1 ))<br />
SWAP_PART_END=0<br />
SWAP_PART_START=0<br />
else<br />
MAKESWAP='true' <br />
SWAP_PART_END=$(( $LAST_GAP_START - 1 ))<br />
SWAP_PART_START=$(( $SWAP_PART_END - $SWAP_PART_SIZE + 1 ))<br />
ROOTFS_PART_END=$(( $SWAP_PART_START - 1 ))<br />
fi<br />
<br />
echo "TOTAL_SECTORS = $TOTAL_SECTORS"<br />
echo "SECTOR_SIZE = $SECTOR_SIZE"<br />
echo ""<br />
echo "FIRST_GAP_SIZE = $FIRST_GAP_SIZE"<br />
echo "LAST_GAP_SIZE = $LAST_GAP_SIZE"<br />
echo "SWAP_PART_SIZE = $SWAP_PART_SIZE"<br />
echo "KERNEL_PART_SIZE = $KERNEL_PART_SIZE"<br />
echo ""<br />
echo "FIRST_GAP_START = $FIRST_GAP_START $(( $FIRST_GAP_START / 2048 )) MB"<br />
echo "FIRST_GAP_END = $FIRST_GAP_END"<br />
echo "KERNEL_PART_START = $KERNEL_PART_START $(( $KERNEL_PART_START / 2048 )) MB"<br />
echo "KERNEL_PART_END = $KERNEL_PART_END"<br />
echo "ROOTFS_PART_START = $ROOTFS_PART_START $(( $ROOTFS_PART_START / 2048 )) MB"<br />
echo "ROOTFS_PART_END = $ROOTFS_PART_END"<br />
echo "SWAP_PART_START = $SWAP_PART_START $(( $SWAP_PART_START / 2048 )) MB"<br />
echo "SWAP_PART_END = $SWAP_PART_END"<br />
echo "LAST_GAP_START = $LAST_GAP_START $(( $LAST_GAP_START / 2048 )) MB"<br />
echo "LAST_GAP_END = $LAST_GAP_END"<br />
<br />
# use `sgdisk --list-types' to get all possible type codes<br />
KERNEL_PART_TYPE='7f00'<br />
ROOTFS_PART_TYPE='7f01'<br />
SWAP_PART_TYPE='8200'<br />
<br />
# wipe disk, and create new gpt partition table<br />
sgdisk --zap-all $DISK<br />
sgdisk -o $DISK<br />
<br />
# create the kernel partition<br />
sgdisk --new=1:$KERNEL_PART_START:$KERNEL_PART_END $DISK<br />
sgdisk --typecode=1:$KERNEL_PART_TYPE $DISK<br />
sgdisk --change-name=1:Kernel $DISK<br />
sgdisk --attributes=1:=:015A000000000000 $DISK<br />
<br />
# create the rootfs partition <br />
sgdisk --new=2:$ROOTFS_PART_START:$ROOTFS_PART_END $DISK<br />
sgdisk --typecode=2:$ROOTFS_PART_TYPE $DISK<br />
sgdisk --change-name=2:Root $DISK<br />
mkfs.ext4 $ROOT_PARTITION<br />
<br />
# create the swap partition<br />
if [ $MAKESWAP = 'true' ]; then<br />
sgdisk --new=3:$SWAP_PART_START:$SWAP_PART_END $DISK<br />
sgdisk --typecode=3:$SWAP_PART_TYPE $DISK<br />
sgdisk --change-name=3:Swap $DISK<br />
mkswap $SWAP_PARTITION<br />
fi<br />
<br />
sgdisk --print $DISK<br />
lsblk $DISK<br />
</pre><br />
<br />
== partition micro sd card & mount the rootfs partition ==<br />
<br />
<code>partition_vboot.sh</code> is a replacement for cgpt i made that uses sgdisk to create a compatible partition layout for depthcharge chromebooks (asus c201 & samsung chromebook plus v1). I have tested it with cards as small as 2GB, it will automatically make a 4GB swap partition if the size of the disk is detected to be above 4GB, the rest of the disk will be used for the rootfs partition<br />
<br />
<pre># sh partition_vboot.sh /dev/sdX</pre><br />
<br />
if you dont want to run this script you can follow the partitioning instructions on the archlinuxarm wiki page for this device<br />
https://archlinuxarm.org/platforms/armv8/rockchip/samsung-chromebook-plus<br />
<br />
<br />
after the rootfs partition is created and formated, mount it<br />
<pre><br />
# mkdir $MOUNTPOINT<br />
# mount /dev/sdX2 $MOUNTPOINT<br />
</pre><br />
<br />
== extract / copy files ==<br />
<pre><br />
# bsdtar -xf parabola-armv7h-systemd-cli-2020.02-tarball.tar.gz -C $MOUNTPOINT<br />
# bsdtar -xf linux-libre-64-5.11.11-3-armv7h.pkg.tar.xz -C $MOUNTPOINT<br />
# cp linux-libre-64-5.11.11-3-armv7h.pkg.tar.xz $MOUNTPOINT/var/cache/pacman/pkg/<br />
<br />
# echo > $MOUNTPOINT/etc/fstab<br />
<br />
# mkdir $MOUNTPOINT/boot/pack<br />
# cp kernel.keyblock $MOUNTPOINT/boot/pack<br />
# cp kernel_data_key.vbprivk $MOUNTPOINT/boot/pack<br />
# cp $MOUNTPOINT/usr/lib/modules/5.11.11-gnu-3-64-ARCH/vmlinuz $MOUNTPOINT/boot/pack<br />
# cp $MOUNTPOINT/boot/dtbs/linux-libre-64/rockchip/rk3399-gru-kevin.dtb $MOUNTPOINT/boot/pack<br />
<br />
# cd $MOUNTPOINT/boot/pack<br />
<br />
# lz4 -k vmlinuz<br />
# echo "console=tty0 console=ttyS2,115200n8 earlyprintk=ttyS2,115200n8 init=/sbin/init root=PARTUUID=%U/PARTNROFF=1 rootwait rw noinitrd" > cmdline<br />
# dd if=/dev/zero of=bootloader.bin bs=512 count=1<br />
</pre><br />
<br />
paste the following code into <code>kernel.its</code><br />
<br />
<pre><br />
/dts-v1/;<br />
<br />
/ {<br />
description = "Chrome OS kernel image with one or more FDT blobs";<br />
images {<br />
kernel@1{<br />
description = "kernel";<br />
data = /incbin/("vmlinuz.lz4");<br />
type = "kernel_noload";<br />
arch = "arm64";<br />
os = "linux";<br />
compression = "lz4";<br />
load = <0>;<br />
entry = <0>;<br />
};<br />
fdt@1{<br />
description = "rk3399-gru-kevin.dtb";<br />
data = /incbin/("rk3399-gru-kevin.dtb");<br />
type = "flat_dt";<br />
arch = "arm64";<br />
compression = "none";<br />
hash@1{<br />
algo = "sha1";<br />
};<br />
};<br />
};<br />
configurations {<br />
default = "conf@1";<br />
conf@1{<br />
kernel = "kernel@1";<br />
fdt = "fdt@1";<br />
};<br />
};<br />
};<br />
</pre><br />
<br />
<pre># mkimage -f kernel.its kernel.itb</pre><br />
<br />
if you see the following error message, just ignore, it will still work<br />
<pre><br />
kernel.its:6.17-15.11: Warning (unit_address_vs_reg): /images/kernel@1: node has a unit name, but no reg or ranges property<br />
kernel.its:16.14-25.11: Warning (unit_address_vs_reg): /images/fdt@1: node has a unit name, but no reg or ranges property<br />
kernel.its:22.19-24.15: Warning (unit_address_vs_reg): /images/fdt@1/hash@1: node has a unit name, but no reg or ranges property<br />
kernel.its:29.15-32.11: Warning (unit_address_vs_reg): /configurations/conf@1: node has a unit name, but no reg or ranges property<br />
mkimage: verify_header failed for FIT Image support with exit code 1<br />
</pre><br />
<br />
and paste the following code into <code>pack_vboot.sh</code><br />
<br />
<pre><br />
futility --debug vbutil_kernel \<br />
--pack vmlinux.kpart \<br />
--version 1 \<br />
--vmlinuz kernel.itb \<br />
--arch aarch64 \<br />
--keyblock kernel.keyblock \<br />
--signprivate kernel_data_key.vbprivk \<br />
--config cmdline \<br />
--bootloader bootloader.bin<br />
</pre><br />
Now run the following commands:<br />
<pre><br />
# sh pack_vboot.sh<br />
# dd if=vmlinux.kpart of=/dev/sdX1<br />
# cd<br />
# umount $MOUNTPOINT<br />
</pre><br />
<br />
== Boot! ==<br />
<br />
<br />
it should boot up. login as root<br />
<br />
in order to update the system you will need some way to connect to the internet, i am using a usb-c ethernet adapter<br />
https://www.amazon.com/Nekteck-Ethernet-Compatible-Pixelbook-Thunderbolt/dp/B0749DCDRV/<br />
<br />
plug in the usb ethernet and dhcp should assign an ip<br />
<br />
then sync the time<br />
<pre><br />
# systemctl restart systemd-timesyncd.service<br />
# pacman -Sy<br />
# pacman -S archlinux-keyring archlinux32-keyring archlinuxarm-keyring parabola-keyring<br />
</pre><br />
it will fail because of keyring, but you downloaded it!<br />
<pre><br />
# pacman -U /var/cache/pacman/pkg/*-keyring-*<br />
# pacman -S archlinux-keyring archlinux32-keyring archlinuxarm-keyring parabola-keyring<br />
# pacman -S archlinux-keyring archlinux32-keyring archlinuxarm-keyring parabola-keyring<br />
</pre><br />
<br />
TODO: get <code>pacman-key --refresh</code> to work. try: https://wiki.parabola.nu/Parabola_Keyring<br />
<br />
as an alternative temporary way around, we will just disable signature checking for this test environment.<br />
<br />
<pre><br />
sed -i '/^SigLevel.*/SigLevel = Never/' /etc/pacman.conf<br />
</pre><br />
<br />
<pre><br />
# pacman -S linux-libre-64 --overwrite '/*'<br />
# pacman -Su linux-libre-firmware acpi vim nano networkmanager<br />
</pre><br />
<br />
== Bonus extra info ==<br />
<br />
=== make your own debug port breakout ===<br />
I dont know where to get a servo board but the you can make your own debug header breakout to get serial console access / early boot logs etc<br />
<br />
the breakout https://www.amazon.com/Proto-Advantage-DR040D254P050-50-Pin-Connector-Adapter/dp/B097S2268V or https://www.ebay.com/itm/202502988342<br />
<br />
the connector https://www.digikey.com/en/products/detail/panasonic-electric-works/AXK850145WG/1986616<br />
<br />
usb <--> rs232 https://www.amazon.com/HiLetgo-CP2102-Converter-Adapter-Downloader/dp/B00LODGRV8 (get 2)<br />
<br />
servo connector pinout is described in this pdf (page 14) (V2 DEBUG HEADER)<br />
<br />
https://www.chromium.org/chromium-os/servo/810-10010-03_20120227_servo_SCH_0.pdf<br />
<br />
you can use a continuity meter to determine connector orientation by finding the corner pin that is ground<br />
<br />
<pre><br />
<br />
<br />
PIN-33 UART1_DUT_SERVO_TX --+ +-- PIN-17 UART2_DUT_SERVO_TX<br />
| |<br />
| |<br />
| |<br />
49 vG vG G 1<br />
|||||||||||||||||||||||||<br />
9753197531975319753197531<br />
1234567890123210987654321<br />
0864208642086420864208642<br />
|||||||||||||||||||||||||<br />
50 G G ^ G ^ G 2<br />
| |<br />
| |<br />
| |<br />
PIN-32 UART1_SERVO_DUT_TX --+ +-- PIN-16 UART2_SERVO_DUT_TX<br />
<br />
<br />
GND PINS = 1, 8, 15, 20, 31, 36, 42<br />
</pre><br />
<br />
=== set bios boot timeout to 2 seconds ===<br />
<br />
https://old.reddit.com/r/Crouton/comments/2szn59/how_to_shorten_os_verfication_warning_screen_on/<br />
<br />
https://old.reddit.com/r/chromeos/comments/6j5ig9/chromebook_pro_hardware_writeprotect/dll73kq/<br />
<br />
install package from aur flashrom-chromeos<br />
<br />
info about gbb flags<br />
<br />
<pre><br />
/* Flags for .flags field */<br />
/* Reduce the dev screen delay to 2 sec from 30 sec to speedup factory. */<br />
#define GBB_FLAG_DEV_SCREEN_SHORT_DELAY 0x00000001<br />
/*<br />
* BIOS should load option ROMs from arbitrary PCI devices. We'll never enable<br />
* this ourselves because it executes non-verified code, but if a customer<br />
* wants to void their warranty and set this flag in the read-only flash, they<br />
* should be able to do so.<br />
*/<br />
#define GBB_FLAG_LOAD_OPTION_ROMS 0x00000002<br />
/*<br />
* The factory flow may need the BIOS to boot a non-ChromeOS kernel if the<br />
* dev-switch is on. This flag allows that.<br />
*/<br />
#define GBB_FLAG_ENABLE_ALTERNATE_OS 0x00000004<br />
/* Force dev switch on, regardless of physical/keyboard dev switch position. */<br />
#define GBB_FLAG_FORCE_DEV_SWITCH_ON 0x00000008<br />
/* Allow booting from USB in dev mode even if dev_boot_usb=0. */<br />
#define GBB_FLAG_FORCE_DEV_BOOT_USB 0x00000010<br />
/* Disable firmware rollback protection. */<br />
#define GBB_FLAG_DISABLE_FW_ROLLBACK_CHECK 0x00000020<br />
/* Allow Enter key to trigger dev->tonorm screen transition */<br />
#define GBB_FLAG_ENTER_TRIGGERS_TONORM 0x00000040<br />
/* Allow booting Legacy OSes in dev mode even if dev_boot_legacy=0. */<br />
#define GBB_FLAG_FORCE_DEV_BOOT_LEGACY 0x00000080<br />
/* Allow booting using alternate keys for FAFT servo testing */<br />
#define GBB_FLAG_FAFT_KEY_OVERIDE 0x00000100<br />
/* Disable EC software sync */<br />
#define GBB_FLAG_DISABLE_EC_SOFTWARE_SYNC 0x00000200<br />
/* Default to booting legacy OS when dev screen times out */<br />
#define GBB_FLAG_DEFAULT_DEV_BOOT_LEGACY 0x00000400<br />
/* Disable PD software sync */<br />
#define GBB_FLAG_DISABLE_PD_SOFTWARE_SYNC 0x00000800<br />
/* Disable shutdown on lid closed */<br />
#define GBB_FLAG_DISABLE_LID_SHUTDOWN 0x00001000<br />
/*<br />
* Allow full fastboot capability in firmware even if<br />
* dev_boot_fastboot_full_cap=0.<br />
*/<br />
#define GBB_FLAG_FORCE_DEV_BOOT_FASTBOOT_FULL_CAP 0x00002000<br />
/* Enable serial console */<br />
#define GBB_FLAG_ENABLE_SERIAL 0x00004000<br />
<br />
source: https://chromium.googlesource.com/chromiumos/platform/vboot/+/master/_vboot_reference/firmware/include/gbb_header.h<br />
</pre><br />
<br />
=== blobless coreboot / etc ===<br />
https://gitlab.com/vicencb/kevinboot/</div>Maihttps://wiki.parabola.nu/index.php?title=User:Mai&diff=23597User:Mai2021-11-17T20:28:46Z<p>Mai: /* set bios boot timeout to 2 seconds */</p>
<hr />
<div>{{stub}}<br />
== Status for Samsung Chromebook Plus v1 aka kevin aka gru-kevin aka xe513c24 ==<br />
=== Kernel ===<br />
{{pkg|linux-libre-64}} (armv7h) works but needs to be packed correctly to boot, the following is a rough guide on how i was able to boot this kernel on this hardware<br />
<br />
=== what does not work ===<br />
- onboard wifi<br />
- probably more stuff<br />
<br />
=== What you will need ===<br />
- this laptop :P<br />
- micro sd card at least 2GB, 8+GB reccomended<br />
- another computer that has a linux environment so we can download / extract / pack the kernel and install rootfs<br />
<br />
== Unlock external booting ==<br />
=== Switch to developer mode ===<br />
<br />
# Turn off the laptop.<br />
# To invoke Recovery mode, you hold down the ESC and Refresh keys and poke the Power button.<br />
# At the Recovery screen press Ctrl-D (there’s no prompt - you have to know to do it).<br />
# Confirm switching to developer mode by pressing enter, and the laptop will reboot and reset the system. This takes about 10-15 minutes.<br />
<br />
Note: After enabling developer mode, you will need to press Ctrl-D each time you boot, or wait 30 seconds to continue booting.<br />
=== Enable booting from external storage ===<br />
<br />
# After booting into developer mode, hold Ctrl and Alt and poke the F2 key. This will open up the developer console.<br />
# Type root to the login screen.<br />
# Then type this to enable USB booting:<br />
<br />
<code>$ enable_dev_usb_boot</code><br />
<br />
Reboot the system to allow the change to take effect.<br />
<br />
Source: https://chromebooks.readthedocs.io/en/latest/source/README.html#switch-to-developer-mode<br />
<br />
== Install packages ==<br />
<code>pacman -S {{pkg|vboot-utils}} {{pkg|uboot-tools}} {{pkg|gptfdisk}} {{pkg|dtc}}</code><br />
<br />
== Gather files ==<br />
<br />
<pre><br />
$ mkdir parabola-armv7-64<br />
$ cd parabola-armv7-64<br />
<br />
$ wget -c https://redirector.parabola.nu/iso/armv7h-systemd-cli-2020.02/parabola-armv7h-systemd-cli-2020.02-tarball.tar.gz<br />
$ wget -c https://redirector.parabola.nu/iso/armv7h-systemd-cli-2020.02/parabola-armv7h-systemd-cli-2020.02-tarball.tar.gz.sig<br />
$ wget -c https://repomirror.parabola.nu/pool/parabola/linux-libre-64-5.11.11-3-armv7h.pkg.tar.xz<br />
$ wget -c https://repomirror.parabola.nu/pool/parabola/linux-libre-64-5.11.11-3-armv7h.pkg.tar.xz.sig<br />
$ wget -c https://git.parabola.nu/abslibre.git/plain/libre/linux-libre/kernel.keyblock<br />
$ wget -c https://git.parabola.nu/abslibre.git/plain/libre/linux-libre/kernel_data_key.vbprivk<br />
<br />
<br />
$ gpg --recv-keys FBCC5AD7421197B7ABA72853908710913E8C7778<br />
$ gpg --verify parabola-armv7h-systemd-cli-2020.02-tarball.tar.gz.sig<br />
$ gpg --recv-keys 782F9DDBE36BA7F3D4DE49065F5DFCC14177E263<br />
$ gpg --verify linux-libre-64-5.11.11-3-armv7h.pkg.tar.xz.sig<br />
</pre><br />
<br />
save the following code as <code>partition_vboot.sh</code><br />
<br />
<pre><br />
#!/bin/bash <br />
<br />
DISK="$1" <br />
<br />
# Make sure only root can run our script<br />
if [ "$(id -u)" != "0" ]; then<br />
echo "This script must be run as root" 1>&2<br />
exit 1 <br />
fi <br />
<br />
if [ x"$DISK" == 'x' ]; then<br />
echo "This script requires a base block device as its only arguement" 1>&2<br />
echo "example: $0 /dev/sdb"<br />
exit 1 <br />
fi <br />
<br />
DISK_DEVICE_NAME="$(echo $DISK | awk -F'/' '{print $NF}')"<br />
ROOT_PARTITION="$DISK"2<br />
SWAP_PARTITION="$DISK"3<br />
# TODO allow specify TOTAL_SECTORS<br />
TOTAL_SECTORS=$(cat /sys/block/$DISK_DEVICE_NAME/size)<br />
SECTOR_SIZE=$(cat /sys/block/$DISK_DEVICE_NAME/queue/hw_sector_size)<br />
<br />
# the following are in sectors, 1MB = 2048 sectors<br />
FIRST_GAP_SIZE=8192 # 2048 sectors * 4MB<br />
LAST_GAP_SIZE=2048 # 2048 sectors * 1MB<br />
SWAP_PART_SIZE=8388608 # 2048 sectors * 4096MB<br />
KERNEL_PART_SIZE=65536 # 2048 sectors * 32MB<br />
<br />
# layout arithmatic <br />
FIRST_GAP_START=0 <br />
FIRST_GAP_END=$(( $FIRST_GAP_SIZE - 1 ))<br />
KERNEL_PART_START=$(( $FIRST_GAP_END + 1 ))<br />
KERNEL_PART_END=$(( $FIRST_GAP_END + $KERNEL_PART_SIZE ))<br />
ROOTFS_PART_START=$(( $KERNEL_PART_END + 1 ))<br />
<br />
LAST_GAP_END=$(( $TOTAL_SECTORS - 1 ))<br />
LAST_GAP_START=$(( $LAST_GAP_END - $LAST_GAP_SIZE + 1 ))<br />
if [ $TOTAL_SECTORS -lt 10000000 ]; then # if size of disk is less than 5GB do not make swap<br />
MAKESWAP='false' <br />
ROOTFS_PART_END=$(( $LAST_GAP_START - 1 ))<br />
SWAP_PART_END=0<br />
SWAP_PART_START=0<br />
else<br />
MAKESWAP='true' <br />
SWAP_PART_END=$(( $LAST_GAP_START - 1 ))<br />
SWAP_PART_START=$(( $SWAP_PART_END - $SWAP_PART_SIZE + 1 ))<br />
ROOTFS_PART_END=$(( $SWAP_PART_START - 1 ))<br />
fi<br />
<br />
echo "TOTAL_SECTORS = $TOTAL_SECTORS"<br />
echo "SECTOR_SIZE = $SECTOR_SIZE"<br />
echo ""<br />
echo "FIRST_GAP_SIZE = $FIRST_GAP_SIZE"<br />
echo "LAST_GAP_SIZE = $LAST_GAP_SIZE"<br />
echo "SWAP_PART_SIZE = $SWAP_PART_SIZE"<br />
echo "KERNEL_PART_SIZE = $KERNEL_PART_SIZE"<br />
echo ""<br />
echo "FIRST_GAP_START = $FIRST_GAP_START $(( $FIRST_GAP_START / 2048 )) MB"<br />
echo "FIRST_GAP_END = $FIRST_GAP_END"<br />
echo "KERNEL_PART_START = $KERNEL_PART_START $(( $KERNEL_PART_START / 2048 )) MB"<br />
echo "KERNEL_PART_END = $KERNEL_PART_END"<br />
echo "ROOTFS_PART_START = $ROOTFS_PART_START $(( $ROOTFS_PART_START / 2048 )) MB"<br />
echo "ROOTFS_PART_END = $ROOTFS_PART_END"<br />
echo "SWAP_PART_START = $SWAP_PART_START $(( $SWAP_PART_START / 2048 )) MB"<br />
echo "SWAP_PART_END = $SWAP_PART_END"<br />
echo "LAST_GAP_START = $LAST_GAP_START $(( $LAST_GAP_START / 2048 )) MB"<br />
echo "LAST_GAP_END = $LAST_GAP_END"<br />
<br />
# use `sgdisk --list-types' to get all possible type codes<br />
KERNEL_PART_TYPE='7f00'<br />
ROOTFS_PART_TYPE='7f01'<br />
SWAP_PART_TYPE='8200'<br />
<br />
# wipe disk, and create new gpt partition table<br />
sgdisk --zap-all $DISK<br />
sgdisk -o $DISK<br />
<br />
# create the kernel partition<br />
sgdisk --new=1:$KERNEL_PART_START:$KERNEL_PART_END $DISK<br />
sgdisk --typecode=1:$KERNEL_PART_TYPE $DISK<br />
sgdisk --change-name=1:Kernel $DISK<br />
sgdisk --attributes=1:=:015A000000000000 $DISK<br />
<br />
# create the rootfs partition <br />
sgdisk --new=2:$ROOTFS_PART_START:$ROOTFS_PART_END $DISK<br />
sgdisk --typecode=2:$ROOTFS_PART_TYPE $DISK<br />
sgdisk --change-name=2:Root $DISK<br />
mkfs.ext4 $ROOT_PARTITION<br />
<br />
# create the swap partition<br />
if [ $MAKESWAP = 'true' ]; then<br />
sgdisk --new=3:$SWAP_PART_START:$SWAP_PART_END $DISK<br />
sgdisk --typecode=3:$SWAP_PART_TYPE $DISK<br />
sgdisk --change-name=3:Swap $DISK<br />
mkswap $SWAP_PARTITION<br />
fi<br />
<br />
sgdisk --print $DISK<br />
lsblk $DISK<br />
</pre><br />
<br />
== partition micro sd card & mount the rootfs partition ==<br />
<br />
<code>partition_vboot.sh</code> is a replacement for cgpt i made that uses sgdisk to create a compatible partition layout for depthcharge chromebooks (asus c201 & samsung chromebook plus v1). I have tested it with cards as small as 2GB, it will automatically make a 4GB swap partition if the size of the disk is detected to be above 4GB, the rest of the disk will be used for the rootfs partition<br />
<br />
<pre># sh partition_vboot.sh /dev/sdX</pre><br />
<br />
if you dont want to run this script you can follow the partitioning instructions on the archlinuxarm wiki page for this device<br />
https://archlinuxarm.org/platforms/armv8/rockchip/samsung-chromebook-plus<br />
<br />
<br />
after the rootfs partition is created and formated, mount it<br />
<pre><br />
# mkdir $MOUNTPOINT<br />
# mount /dev/sdX2 $MOUNTPOINT<br />
</pre><br />
<br />
== extract / copy files ==<br />
<pre><br />
# bsdtar -xf parabola-armv7h-systemd-cli-2020.02-tarball.tar.gz -C $MOUNTPOINT<br />
# bsdtar -xf linux-libre-64-5.11.11-3-armv7h.pkg.tar.xz -C $MOUNTPOINT<br />
# cp linux-libre-64-5.11.11-3-armv7h.pkg.tar.xz $MOUNTPOINT/var/cache/pacman/pkg/<br />
<br />
# echo > $MOUNTPOINT/etc/fstab<br />
<br />
# mkdir $MOUNTPOINT/boot/pack<br />
# cp kernel.keyblock $MOUNTPOINT/boot/pack<br />
# cp kernel_data_key.vbprivk $MOUNTPOINT/boot/pack<br />
# cp $MOUNTPOINT/usr/lib/modules/5.11.11-gnu-3-64-ARCH/vmlinuz $MOUNTPOINT/boot/pack<br />
# cp $MOUNTPOINT/boot/dtbs/linux-libre-64/rockchip/rk3399-gru-kevin.dtb $MOUNTPOINT/boot/pack<br />
<br />
# cd $MOUNTPOINT/boot/pack<br />
<br />
# lz4 -k vmlinuz<br />
# echo "console=tty0 console=ttyS2,115200n8 earlyprintk=ttyS2,115200n8 init=/sbin/init root=PARTUUID=%U/PARTNROFF=1 rootwait rw noinitrd" > cmdline<br />
# dd if=/dev/zero of=bootloader.bin bs=512 count=1<br />
</pre><br />
<br />
paste the following code into <code>kernel.its</code><br />
<br />
<pre><br />
/dts-v1/;<br />
<br />
/ {<br />
description = "Chrome OS kernel image with one or more FDT blobs";<br />
images {<br />
kernel@1{<br />
description = "kernel";<br />
data = /incbin/("vmlinuz.lz4");<br />
type = "kernel_noload";<br />
arch = "arm64";<br />
os = "linux";<br />
compression = "lz4";<br />
load = <0>;<br />
entry = <0>;<br />
};<br />
fdt@1{<br />
description = "rk3399-gru-kevin.dtb";<br />
data = /incbin/("rk3399-gru-kevin.dtb");<br />
type = "flat_dt";<br />
arch = "arm64";<br />
compression = "none";<br />
hash@1{<br />
algo = "sha1";<br />
};<br />
};<br />
};<br />
configurations {<br />
default = "conf@1";<br />
conf@1{<br />
kernel = "kernel@1";<br />
fdt = "fdt@1";<br />
};<br />
};<br />
};<br />
</pre><br />
<br />
<pre># mkimage -f kernel.its kernel.itb</pre><br />
<br />
if you see the following error message, just ignore, it will still work<br />
<pre><br />
kernel.its:6.17-15.11: Warning (unit_address_vs_reg): /images/kernel@1: node has a unit name, but no reg or ranges property<br />
kernel.its:16.14-25.11: Warning (unit_address_vs_reg): /images/fdt@1: node has a unit name, but no reg or ranges property<br />
kernel.its:22.19-24.15: Warning (unit_address_vs_reg): /images/fdt@1/hash@1: node has a unit name, but no reg or ranges property<br />
kernel.its:29.15-32.11: Warning (unit_address_vs_reg): /configurations/conf@1: node has a unit name, but no reg or ranges property<br />
mkimage: verify_header failed for FIT Image support with exit code 1<br />
</pre><br />
<br />
and paste the following code into <code>pack_vboot.sh</code><br />
<br />
<pre><br />
futility --debug vbutil_kernel \<br />
--pack vmlinux.kpart \<br />
--version 1 \<br />
--vmlinuz kernel.itb \<br />
--arch aarch64 \<br />
--keyblock kernel.keyblock \<br />
--signprivate kernel_data_key.vbprivk \<br />
--config cmdline \<br />
--bootloader bootloader.bin<br />
</pre><br />
Now run the following commands:<br />
<pre><br />
# sh pack_vboot.sh<br />
# dd if=vmlinux.kpart of=/dev/sdX1<br />
# cd<br />
# umount $MOUNTPOINT<br />
</pre><br />
<br />
== Boot! ==<br />
<br />
<br />
it should boot up. login as root<br />
<br />
in order to update the system you will need some way to connect to the internet, i am using a usb-c ethernet adapter<br />
https://www.amazon.com/Nekteck-Ethernet-Compatible-Pixelbook-Thunderbolt/dp/B0749DCDRV/<br />
<br />
plug in the usb ethernet and dhcp should assign an ip<br />
<br />
then sync the time<br />
<pre><br />
# systemctl restart systemd-timesyncd.service<br />
# pacman -Sy<br />
# pacman -S archlinux-keyring archlinux32-keyring archlinuxarm-keyring parabola-keyring<br />
</pre><br />
it will fail because of keyring, but you downloaded it!<br />
<pre><br />
# pacman -U /var/cache/pacman/pkg/*-keyring-*<br />
# pacman -S archlinux-keyring archlinux32-keyring archlinuxarm-keyring parabola-keyring<br />
# pacman -S archlinux-keyring archlinux32-keyring archlinuxarm-keyring parabola-keyring<br />
</pre><br />
<br />
TODO: get <code>pacman-key --refresh</code> to work. try: https://wiki.parabola.nu/Parabola_Keyring<br />
<br />
as an alternative temporary way around, we will just disable signature checking for this test environment.<br />
<br />
<pre><br />
sed -i '/^SigLevel.*/SigLevel = Never/' /etc/pacman.conf<br />
</pre><br />
<br />
<pre><br />
# pacman -S linux-libre-64 --overwrite '/*'<br />
# pacman -Su linux-libre-firmware acpi vim nano networkmanager<br />
</pre><br />
<br />
== Bonus extra info ==<br />
<br />
=== make your own debug port breakout ===<br />
I dont know where to get a servo board but the you can make your own debug header breakout to get serial console access / early boot logs etc<br />
<br />
the breakout https://www.amazon.com/Proto-Advantage-DR040D254P050-50-Pin-Connector-Adapter/dp/B097S2268V or https://www.ebay.com/itm/202502988342<br />
<br />
the connector https://www.digikey.com/en/products/detail/panasonic-electric-works/AXK850145WG/1986616<br />
<br />
usb <--> rs232 https://www.amazon.com/HiLetgo-CP2102-Converter-Adapter-Downloader/dp/B00LODGRV8 (get 2)<br />
<br />
servo connector pinout is described in this pdf (page 14) (V2 DEBUG HEADER)<br />
<br />
https://www.chromium.org/chromium-os/servo/810-10010-03_20120227_servo_SCH_0.pdf<br />
<br />
you can use a continuity meter to determine connector orientation by finding the corner pin that is ground<br />
<br />
<pre><br />
<br />
<br />
PIN-33 UART1_DUT_SERVO_TX --+ +-- PIN-17 UART2_DUT_SERVO_TX<br />
| |<br />
| |<br />
| |<br />
49 vG vG G 1<br />
|||||||||||||||||||||||||<br />
9753197531975319753197531<br />
1234567890123210987654321<br />
0864208642086420864208642<br />
|||||||||||||||||||||||||<br />
50 G G ^ G ^ G 2<br />
| |<br />
| |<br />
| |<br />
PIN-32 UART1_SERVO_DUT_TX --+ +-- PIN-16 UART2_SERVO_DUT_TX<br />
<br />
<br />
GND PINS = 1, 8, 15, 20, 31, 36, 42<br />
</pre><br />
<br />
=== set bios boot timeout to 2 seconds ===<br />
<br />
https://old.reddit.com/r/Crouton/comments/2szn59/how_to_shorten_os_verfication_warning_screen_on/<br />
<br />
https://old.reddit.com/r/chromeos/comments/6j5ig9/chromebook_pro_hardware_writeprotect/dll73kq/<br />
<br />
install package from aur flashrom-chromeos<br />
<br />
info about gbb flags<br />
<br />
<pre><br />
/* Flags for .flags field */<br />
/* Reduce the dev screen delay to 2 sec from 30 sec to speedup factory. */<br />
#define GBB_FLAG_DEV_SCREEN_SHORT_DELAY 0x00000001<br />
/*<br />
* BIOS should load option ROMs from arbitrary PCI devices. We'll never enable<br />
* this ourselves because it executes non-verified code, but if a customer<br />
* wants to void their warranty and set this flag in the read-only flash, they<br />
* should be able to do so.<br />
*/<br />
#define GBB_FLAG_LOAD_OPTION_ROMS 0x00000002<br />
/*<br />
* The factory flow may need the BIOS to boot a non-ChromeOS kernel if the<br />
* dev-switch is on. This flag allows that.<br />
*/<br />
#define GBB_FLAG_ENABLE_ALTERNATE_OS 0x00000004<br />
/* Force dev switch on, regardless of physical/keyboard dev switch position. */<br />
#define GBB_FLAG_FORCE_DEV_SWITCH_ON 0x00000008<br />
/* Allow booting from USB in dev mode even if dev_boot_usb=0. */<br />
#define GBB_FLAG_FORCE_DEV_BOOT_USB 0x00000010<br />
/* Disable firmware rollback protection. */<br />
#define GBB_FLAG_DISABLE_FW_ROLLBACK_CHECK 0x00000020<br />
/* Allow Enter key to trigger dev->tonorm screen transition */<br />
#define GBB_FLAG_ENTER_TRIGGERS_TONORM 0x00000040<br />
/* Allow booting Legacy OSes in dev mode even if dev_boot_legacy=0. */<br />
#define GBB_FLAG_FORCE_DEV_BOOT_LEGACY 0x00000080<br />
/* Allow booting using alternate keys for FAFT servo testing */<br />
#define GBB_FLAG_FAFT_KEY_OVERIDE 0x00000100<br />
/* Disable EC software sync */<br />
#define GBB_FLAG_DISABLE_EC_SOFTWARE_SYNC 0x00000200<br />
/* Default to booting legacy OS when dev screen times out */<br />
#define GBB_FLAG_DEFAULT_DEV_BOOT_LEGACY 0x00000400<br />
/* Disable PD software sync */<br />
#define GBB_FLAG_DISABLE_PD_SOFTWARE_SYNC 0x00000800<br />
/* Disable shutdown on lid closed */<br />
#define GBB_FLAG_DISABLE_LID_SHUTDOWN 0x00001000<br />
/*<br />
* Allow full fastboot capability in firmware even if<br />
* dev_boot_fastboot_full_cap=0.<br />
*/<br />
#define GBB_FLAG_FORCE_DEV_BOOT_FASTBOOT_FULL_CAP 0x00002000<br />
/* Enable serial console */<br />
#define GBB_FLAG_ENABLE_SERIAL 0x00004000<br />
<br />
source: https://chromium.googlesource.com/chromiumos/platform/vboot/+/master/_vboot_reference/firmware/include/gbb_header.h<br />
</pre><br />
<br />
=== blobless coreboot / etc ===<br />
https://gitlab.com/vicencb/kevinboot/</div>Maihttps://wiki.parabola.nu/index.php?title=User:Mai&diff=23596User:Mai2021-11-17T20:28:37Z<p>Mai: /* set bios boot timeout to 2 seconds */</p>
<hr />
<div>{{stub}}<br />
== Status for Samsung Chromebook Plus v1 aka kevin aka gru-kevin aka xe513c24 ==<br />
=== Kernel ===<br />
{{pkg|linux-libre-64}} (armv7h) works but needs to be packed correctly to boot, the following is a rough guide on how i was able to boot this kernel on this hardware<br />
<br />
=== what does not work ===<br />
- onboard wifi<br />
- probably more stuff<br />
<br />
=== What you will need ===<br />
- this laptop :P<br />
- micro sd card at least 2GB, 8+GB reccomended<br />
- another computer that has a linux environment so we can download / extract / pack the kernel and install rootfs<br />
<br />
== Unlock external booting ==<br />
=== Switch to developer mode ===<br />
<br />
# Turn off the laptop.<br />
# To invoke Recovery mode, you hold down the ESC and Refresh keys and poke the Power button.<br />
# At the Recovery screen press Ctrl-D (there’s no prompt - you have to know to do it).<br />
# Confirm switching to developer mode by pressing enter, and the laptop will reboot and reset the system. This takes about 10-15 minutes.<br />
<br />
Note: After enabling developer mode, you will need to press Ctrl-D each time you boot, or wait 30 seconds to continue booting.<br />
=== Enable booting from external storage ===<br />
<br />
# After booting into developer mode, hold Ctrl and Alt and poke the F2 key. This will open up the developer console.<br />
# Type root to the login screen.<br />
# Then type this to enable USB booting:<br />
<br />
<code>$ enable_dev_usb_boot</code><br />
<br />
Reboot the system to allow the change to take effect.<br />
<br />
Source: https://chromebooks.readthedocs.io/en/latest/source/README.html#switch-to-developer-mode<br />
<br />
== Install packages ==<br />
<code>pacman -S {{pkg|vboot-utils}} {{pkg|uboot-tools}} {{pkg|gptfdisk}} {{pkg|dtc}}</code><br />
<br />
== Gather files ==<br />
<br />
<pre><br />
$ mkdir parabola-armv7-64<br />
$ cd parabola-armv7-64<br />
<br />
$ wget -c https://redirector.parabola.nu/iso/armv7h-systemd-cli-2020.02/parabola-armv7h-systemd-cli-2020.02-tarball.tar.gz<br />
$ wget -c https://redirector.parabola.nu/iso/armv7h-systemd-cli-2020.02/parabola-armv7h-systemd-cli-2020.02-tarball.tar.gz.sig<br />
$ wget -c https://repomirror.parabola.nu/pool/parabola/linux-libre-64-5.11.11-3-armv7h.pkg.tar.xz<br />
$ wget -c https://repomirror.parabola.nu/pool/parabola/linux-libre-64-5.11.11-3-armv7h.pkg.tar.xz.sig<br />
$ wget -c https://git.parabola.nu/abslibre.git/plain/libre/linux-libre/kernel.keyblock<br />
$ wget -c https://git.parabola.nu/abslibre.git/plain/libre/linux-libre/kernel_data_key.vbprivk<br />
<br />
<br />
$ gpg --recv-keys FBCC5AD7421197B7ABA72853908710913E8C7778<br />
$ gpg --verify parabola-armv7h-systemd-cli-2020.02-tarball.tar.gz.sig<br />
$ gpg --recv-keys 782F9DDBE36BA7F3D4DE49065F5DFCC14177E263<br />
$ gpg --verify linux-libre-64-5.11.11-3-armv7h.pkg.tar.xz.sig<br />
</pre><br />
<br />
save the following code as <code>partition_vboot.sh</code><br />
<br />
<pre><br />
#!/bin/bash <br />
<br />
DISK="$1" <br />
<br />
# Make sure only root can run our script<br />
if [ "$(id -u)" != "0" ]; then<br />
echo "This script must be run as root" 1>&2<br />
exit 1 <br />
fi <br />
<br />
if [ x"$DISK" == 'x' ]; then<br />
echo "This script requires a base block device as its only arguement" 1>&2<br />
echo "example: $0 /dev/sdb"<br />
exit 1 <br />
fi <br />
<br />
DISK_DEVICE_NAME="$(echo $DISK | awk -F'/' '{print $NF}')"<br />
ROOT_PARTITION="$DISK"2<br />
SWAP_PARTITION="$DISK"3<br />
# TODO allow specify TOTAL_SECTORS<br />
TOTAL_SECTORS=$(cat /sys/block/$DISK_DEVICE_NAME/size)<br />
SECTOR_SIZE=$(cat /sys/block/$DISK_DEVICE_NAME/queue/hw_sector_size)<br />
<br />
# the following are in sectors, 1MB = 2048 sectors<br />
FIRST_GAP_SIZE=8192 # 2048 sectors * 4MB<br />
LAST_GAP_SIZE=2048 # 2048 sectors * 1MB<br />
SWAP_PART_SIZE=8388608 # 2048 sectors * 4096MB<br />
KERNEL_PART_SIZE=65536 # 2048 sectors * 32MB<br />
<br />
# layout arithmatic <br />
FIRST_GAP_START=0 <br />
FIRST_GAP_END=$(( $FIRST_GAP_SIZE - 1 ))<br />
KERNEL_PART_START=$(( $FIRST_GAP_END + 1 ))<br />
KERNEL_PART_END=$(( $FIRST_GAP_END + $KERNEL_PART_SIZE ))<br />
ROOTFS_PART_START=$(( $KERNEL_PART_END + 1 ))<br />
<br />
LAST_GAP_END=$(( $TOTAL_SECTORS - 1 ))<br />
LAST_GAP_START=$(( $LAST_GAP_END - $LAST_GAP_SIZE + 1 ))<br />
if [ $TOTAL_SECTORS -lt 10000000 ]; then # if size of disk is less than 5GB do not make swap<br />
MAKESWAP='false' <br />
ROOTFS_PART_END=$(( $LAST_GAP_START - 1 ))<br />
SWAP_PART_END=0<br />
SWAP_PART_START=0<br />
else<br />
MAKESWAP='true' <br />
SWAP_PART_END=$(( $LAST_GAP_START - 1 ))<br />
SWAP_PART_START=$(( $SWAP_PART_END - $SWAP_PART_SIZE + 1 ))<br />
ROOTFS_PART_END=$(( $SWAP_PART_START - 1 ))<br />
fi<br />
<br />
echo "TOTAL_SECTORS = $TOTAL_SECTORS"<br />
echo "SECTOR_SIZE = $SECTOR_SIZE"<br />
echo ""<br />
echo "FIRST_GAP_SIZE = $FIRST_GAP_SIZE"<br />
echo "LAST_GAP_SIZE = $LAST_GAP_SIZE"<br />
echo "SWAP_PART_SIZE = $SWAP_PART_SIZE"<br />
echo "KERNEL_PART_SIZE = $KERNEL_PART_SIZE"<br />
echo ""<br />
echo "FIRST_GAP_START = $FIRST_GAP_START $(( $FIRST_GAP_START / 2048 )) MB"<br />
echo "FIRST_GAP_END = $FIRST_GAP_END"<br />
echo "KERNEL_PART_START = $KERNEL_PART_START $(( $KERNEL_PART_START / 2048 )) MB"<br />
echo "KERNEL_PART_END = $KERNEL_PART_END"<br />
echo "ROOTFS_PART_START = $ROOTFS_PART_START $(( $ROOTFS_PART_START / 2048 )) MB"<br />
echo "ROOTFS_PART_END = $ROOTFS_PART_END"<br />
echo "SWAP_PART_START = $SWAP_PART_START $(( $SWAP_PART_START / 2048 )) MB"<br />
echo "SWAP_PART_END = $SWAP_PART_END"<br />
echo "LAST_GAP_START = $LAST_GAP_START $(( $LAST_GAP_START / 2048 )) MB"<br />
echo "LAST_GAP_END = $LAST_GAP_END"<br />
<br />
# use `sgdisk --list-types' to get all possible type codes<br />
KERNEL_PART_TYPE='7f00'<br />
ROOTFS_PART_TYPE='7f01'<br />
SWAP_PART_TYPE='8200'<br />
<br />
# wipe disk, and create new gpt partition table<br />
sgdisk --zap-all $DISK<br />
sgdisk -o $DISK<br />
<br />
# create the kernel partition<br />
sgdisk --new=1:$KERNEL_PART_START:$KERNEL_PART_END $DISK<br />
sgdisk --typecode=1:$KERNEL_PART_TYPE $DISK<br />
sgdisk --change-name=1:Kernel $DISK<br />
sgdisk --attributes=1:=:015A000000000000 $DISK<br />
<br />
# create the rootfs partition <br />
sgdisk --new=2:$ROOTFS_PART_START:$ROOTFS_PART_END $DISK<br />
sgdisk --typecode=2:$ROOTFS_PART_TYPE $DISK<br />
sgdisk --change-name=2:Root $DISK<br />
mkfs.ext4 $ROOT_PARTITION<br />
<br />
# create the swap partition<br />
if [ $MAKESWAP = 'true' ]; then<br />
sgdisk --new=3:$SWAP_PART_START:$SWAP_PART_END $DISK<br />
sgdisk --typecode=3:$SWAP_PART_TYPE $DISK<br />
sgdisk --change-name=3:Swap $DISK<br />
mkswap $SWAP_PARTITION<br />
fi<br />
<br />
sgdisk --print $DISK<br />
lsblk $DISK<br />
</pre><br />
<br />
== partition micro sd card & mount the rootfs partition ==<br />
<br />
<code>partition_vboot.sh</code> is a replacement for cgpt i made that uses sgdisk to create a compatible partition layout for depthcharge chromebooks (asus c201 & samsung chromebook plus v1). I have tested it with cards as small as 2GB, it will automatically make a 4GB swap partition if the size of the disk is detected to be above 4GB, the rest of the disk will be used for the rootfs partition<br />
<br />
<pre># sh partition_vboot.sh /dev/sdX</pre><br />
<br />
if you dont want to run this script you can follow the partitioning instructions on the archlinuxarm wiki page for this device<br />
https://archlinuxarm.org/platforms/armv8/rockchip/samsung-chromebook-plus<br />
<br />
<br />
after the rootfs partition is created and formated, mount it<br />
<pre><br />
# mkdir $MOUNTPOINT<br />
# mount /dev/sdX2 $MOUNTPOINT<br />
</pre><br />
<br />
== extract / copy files ==<br />
<pre><br />
# bsdtar -xf parabola-armv7h-systemd-cli-2020.02-tarball.tar.gz -C $MOUNTPOINT<br />
# bsdtar -xf linux-libre-64-5.11.11-3-armv7h.pkg.tar.xz -C $MOUNTPOINT<br />
# cp linux-libre-64-5.11.11-3-armv7h.pkg.tar.xz $MOUNTPOINT/var/cache/pacman/pkg/<br />
<br />
# echo > $MOUNTPOINT/etc/fstab<br />
<br />
# mkdir $MOUNTPOINT/boot/pack<br />
# cp kernel.keyblock $MOUNTPOINT/boot/pack<br />
# cp kernel_data_key.vbprivk $MOUNTPOINT/boot/pack<br />
# cp $MOUNTPOINT/usr/lib/modules/5.11.11-gnu-3-64-ARCH/vmlinuz $MOUNTPOINT/boot/pack<br />
# cp $MOUNTPOINT/boot/dtbs/linux-libre-64/rockchip/rk3399-gru-kevin.dtb $MOUNTPOINT/boot/pack<br />
<br />
# cd $MOUNTPOINT/boot/pack<br />
<br />
# lz4 -k vmlinuz<br />
# echo "console=tty0 console=ttyS2,115200n8 earlyprintk=ttyS2,115200n8 init=/sbin/init root=PARTUUID=%U/PARTNROFF=1 rootwait rw noinitrd" > cmdline<br />
# dd if=/dev/zero of=bootloader.bin bs=512 count=1<br />
</pre><br />
<br />
paste the following code into <code>kernel.its</code><br />
<br />
<pre><br />
/dts-v1/;<br />
<br />
/ {<br />
description = "Chrome OS kernel image with one or more FDT blobs";<br />
images {<br />
kernel@1{<br />
description = "kernel";<br />
data = /incbin/("vmlinuz.lz4");<br />
type = "kernel_noload";<br />
arch = "arm64";<br />
os = "linux";<br />
compression = "lz4";<br />
load = <0>;<br />
entry = <0>;<br />
};<br />
fdt@1{<br />
description = "rk3399-gru-kevin.dtb";<br />
data = /incbin/("rk3399-gru-kevin.dtb");<br />
type = "flat_dt";<br />
arch = "arm64";<br />
compression = "none";<br />
hash@1{<br />
algo = "sha1";<br />
};<br />
};<br />
};<br />
configurations {<br />
default = "conf@1";<br />
conf@1{<br />
kernel = "kernel@1";<br />
fdt = "fdt@1";<br />
};<br />
};<br />
};<br />
</pre><br />
<br />
<pre># mkimage -f kernel.its kernel.itb</pre><br />
<br />
if you see the following error message, just ignore, it will still work<br />
<pre><br />
kernel.its:6.17-15.11: Warning (unit_address_vs_reg): /images/kernel@1: node has a unit name, but no reg or ranges property<br />
kernel.its:16.14-25.11: Warning (unit_address_vs_reg): /images/fdt@1: node has a unit name, but no reg or ranges property<br />
kernel.its:22.19-24.15: Warning (unit_address_vs_reg): /images/fdt@1/hash@1: node has a unit name, but no reg or ranges property<br />
kernel.its:29.15-32.11: Warning (unit_address_vs_reg): /configurations/conf@1: node has a unit name, but no reg or ranges property<br />
mkimage: verify_header failed for FIT Image support with exit code 1<br />
</pre><br />
<br />
and paste the following code into <code>pack_vboot.sh</code><br />
<br />
<pre><br />
futility --debug vbutil_kernel \<br />
--pack vmlinux.kpart \<br />
--version 1 \<br />
--vmlinuz kernel.itb \<br />
--arch aarch64 \<br />
--keyblock kernel.keyblock \<br />
--signprivate kernel_data_key.vbprivk \<br />
--config cmdline \<br />
--bootloader bootloader.bin<br />
</pre><br />
Now run the following commands:<br />
<pre><br />
# sh pack_vboot.sh<br />
# dd if=vmlinux.kpart of=/dev/sdX1<br />
# cd<br />
# umount $MOUNTPOINT<br />
</pre><br />
<br />
== Boot! ==<br />
<br />
<br />
it should boot up. login as root<br />
<br />
in order to update the system you will need some way to connect to the internet, i am using a usb-c ethernet adapter<br />
https://www.amazon.com/Nekteck-Ethernet-Compatible-Pixelbook-Thunderbolt/dp/B0749DCDRV/<br />
<br />
plug in the usb ethernet and dhcp should assign an ip<br />
<br />
then sync the time<br />
<pre><br />
# systemctl restart systemd-timesyncd.service<br />
# pacman -Sy<br />
# pacman -S archlinux-keyring archlinux32-keyring archlinuxarm-keyring parabola-keyring<br />
</pre><br />
it will fail because of keyring, but you downloaded it!<br />
<pre><br />
# pacman -U /var/cache/pacman/pkg/*-keyring-*<br />
# pacman -S archlinux-keyring archlinux32-keyring archlinuxarm-keyring parabola-keyring<br />
# pacman -S archlinux-keyring archlinux32-keyring archlinuxarm-keyring parabola-keyring<br />
</pre><br />
<br />
TODO: get <code>pacman-key --refresh</code> to work. try: https://wiki.parabola.nu/Parabola_Keyring<br />
<br />
as an alternative temporary way around, we will just disable signature checking for this test environment.<br />
<br />
<pre><br />
sed -i '/^SigLevel.*/SigLevel = Never/' /etc/pacman.conf<br />
</pre><br />
<br />
<pre><br />
# pacman -S linux-libre-64 --overwrite '/*'<br />
# pacman -Su linux-libre-firmware acpi vim nano networkmanager<br />
</pre><br />
<br />
== Bonus extra info ==<br />
<br />
=== make your own debug port breakout ===<br />
I dont know where to get a servo board but the you can make your own debug header breakout to get serial console access / early boot logs etc<br />
<br />
the breakout https://www.amazon.com/Proto-Advantage-DR040D254P050-50-Pin-Connector-Adapter/dp/B097S2268V or https://www.ebay.com/itm/202502988342<br />
<br />
the connector https://www.digikey.com/en/products/detail/panasonic-electric-works/AXK850145WG/1986616<br />
<br />
usb <--> rs232 https://www.amazon.com/HiLetgo-CP2102-Converter-Adapter-Downloader/dp/B00LODGRV8 (get 2)<br />
<br />
servo connector pinout is described in this pdf (page 14) (V2 DEBUG HEADER)<br />
<br />
https://www.chromium.org/chromium-os/servo/810-10010-03_20120227_servo_SCH_0.pdf<br />
<br />
you can use a continuity meter to determine connector orientation by finding the corner pin that is ground<br />
<br />
<pre><br />
<br />
<br />
PIN-33 UART1_DUT_SERVO_TX --+ +-- PIN-17 UART2_DUT_SERVO_TX<br />
| |<br />
| |<br />
| |<br />
49 vG vG G 1<br />
|||||||||||||||||||||||||<br />
9753197531975319753197531<br />
1234567890123210987654321<br />
0864208642086420864208642<br />
|||||||||||||||||||||||||<br />
50 G G ^ G ^ G 2<br />
| |<br />
| |<br />
| |<br />
PIN-32 UART1_SERVO_DUT_TX --+ +-- PIN-16 UART2_SERVO_DUT_TX<br />
<br />
<br />
GND PINS = 1, 8, 15, 20, 31, 36, 42<br />
</pre><br />
<br />
=== set bios boot timeout to 2 seconds ===<br />
<br />
https://old.reddit.com/r/Crouton/comments/2szn59/how_to_shorten_os_verfication_warning_screen_on/<br />
https://old.reddit.com/r/chromeos/comments/6j5ig9/chromebook_pro_hardware_writeprotect/dll73kq/<br />
<br />
install package from aur flashrom-chromeos<br />
<br />
info about gbb flags<br />
<br />
<pre><br />
/* Flags for .flags field */<br />
/* Reduce the dev screen delay to 2 sec from 30 sec to speedup factory. */<br />
#define GBB_FLAG_DEV_SCREEN_SHORT_DELAY 0x00000001<br />
/*<br />
* BIOS should load option ROMs from arbitrary PCI devices. We'll never enable<br />
* this ourselves because it executes non-verified code, but if a customer<br />
* wants to void their warranty and set this flag in the read-only flash, they<br />
* should be able to do so.<br />
*/<br />
#define GBB_FLAG_LOAD_OPTION_ROMS 0x00000002<br />
/*<br />
* The factory flow may need the BIOS to boot a non-ChromeOS kernel if the<br />
* dev-switch is on. This flag allows that.<br />
*/<br />
#define GBB_FLAG_ENABLE_ALTERNATE_OS 0x00000004<br />
/* Force dev switch on, regardless of physical/keyboard dev switch position. */<br />
#define GBB_FLAG_FORCE_DEV_SWITCH_ON 0x00000008<br />
/* Allow booting from USB in dev mode even if dev_boot_usb=0. */<br />
#define GBB_FLAG_FORCE_DEV_BOOT_USB 0x00000010<br />
/* Disable firmware rollback protection. */<br />
#define GBB_FLAG_DISABLE_FW_ROLLBACK_CHECK 0x00000020<br />
/* Allow Enter key to trigger dev->tonorm screen transition */<br />
#define GBB_FLAG_ENTER_TRIGGERS_TONORM 0x00000040<br />
/* Allow booting Legacy OSes in dev mode even if dev_boot_legacy=0. */<br />
#define GBB_FLAG_FORCE_DEV_BOOT_LEGACY 0x00000080<br />
/* Allow booting using alternate keys for FAFT servo testing */<br />
#define GBB_FLAG_FAFT_KEY_OVERIDE 0x00000100<br />
/* Disable EC software sync */<br />
#define GBB_FLAG_DISABLE_EC_SOFTWARE_SYNC 0x00000200<br />
/* Default to booting legacy OS when dev screen times out */<br />
#define GBB_FLAG_DEFAULT_DEV_BOOT_LEGACY 0x00000400<br />
/* Disable PD software sync */<br />
#define GBB_FLAG_DISABLE_PD_SOFTWARE_SYNC 0x00000800<br />
/* Disable shutdown on lid closed */<br />
#define GBB_FLAG_DISABLE_LID_SHUTDOWN 0x00001000<br />
/*<br />
* Allow full fastboot capability in firmware even if<br />
* dev_boot_fastboot_full_cap=0.<br />
*/<br />
#define GBB_FLAG_FORCE_DEV_BOOT_FASTBOOT_FULL_CAP 0x00002000<br />
/* Enable serial console */<br />
#define GBB_FLAG_ENABLE_SERIAL 0x00004000<br />
<br />
source: https://chromium.googlesource.com/chromiumos/platform/vboot/+/master/_vboot_reference/firmware/include/gbb_header.h<br />
</pre><br />
<br />
=== blobless coreboot / etc ===<br />
https://gitlab.com/vicencb/kevinboot/</div>Maihttps://wiki.parabola.nu/index.php?title=User:Mai&diff=23595User:Mai2021-11-17T17:20:38Z<p>Mai: /* set bios boot timeout to 2 seconds */</p>
<hr />
<div>{{stub}}<br />
== Status for Samsung Chromebook Plus v1 aka kevin aka gru-kevin aka xe513c24 ==<br />
=== Kernel ===<br />
{{pkg|linux-libre-64}} (armv7h) works but needs to be packed correctly to boot, the following is a rough guide on how i was able to boot this kernel on this hardware<br />
<br />
=== what does not work ===<br />
- onboard wifi<br />
- probably more stuff<br />
<br />
=== What you will need ===<br />
- this laptop :P<br />
- micro sd card at least 2GB, 8+GB reccomended<br />
- another computer that has a linux environment so we can download / extract / pack the kernel and install rootfs<br />
<br />
== Unlock external booting ==<br />
=== Switch to developer mode ===<br />
<br />
# Turn off the laptop.<br />
# To invoke Recovery mode, you hold down the ESC and Refresh keys and poke the Power button.<br />
# At the Recovery screen press Ctrl-D (there’s no prompt - you have to know to do it).<br />
# Confirm switching to developer mode by pressing enter, and the laptop will reboot and reset the system. This takes about 10-15 minutes.<br />
<br />
Note: After enabling developer mode, you will need to press Ctrl-D each time you boot, or wait 30 seconds to continue booting.<br />
=== Enable booting from external storage ===<br />
<br />
# After booting into developer mode, hold Ctrl and Alt and poke the F2 key. This will open up the developer console.<br />
# Type root to the login screen.<br />
# Then type this to enable USB booting:<br />
<br />
<code>$ enable_dev_usb_boot</code><br />
<br />
Reboot the system to allow the change to take effect.<br />
<br />
Source: https://chromebooks.readthedocs.io/en/latest/source/README.html#switch-to-developer-mode<br />
<br />
== Install packages ==<br />
<code>pacman -S {{pkg|vboot-utils}} {{pkg|uboot-tools}} {{pkg|gptfdisk}} {{pkg|dtc}}</code><br />
<br />
== Gather files ==<br />
<br />
<pre><br />
$ mkdir parabola-armv7-64<br />
$ cd parabola-armv7-64<br />
<br />
$ wget -c https://redirector.parabola.nu/iso/armv7h-systemd-cli-2020.02/parabola-armv7h-systemd-cli-2020.02-tarball.tar.gz<br />
$ wget -c https://redirector.parabola.nu/iso/armv7h-systemd-cli-2020.02/parabola-armv7h-systemd-cli-2020.02-tarball.tar.gz.sig<br />
$ wget -c https://repomirror.parabola.nu/pool/parabola/linux-libre-64-5.11.11-3-armv7h.pkg.tar.xz<br />
$ wget -c https://repomirror.parabola.nu/pool/parabola/linux-libre-64-5.11.11-3-armv7h.pkg.tar.xz.sig<br />
$ wget -c https://git.parabola.nu/abslibre.git/plain/libre/linux-libre/kernel.keyblock<br />
$ wget -c https://git.parabola.nu/abslibre.git/plain/libre/linux-libre/kernel_data_key.vbprivk<br />
<br />
<br />
$ gpg --recv-keys FBCC5AD7421197B7ABA72853908710913E8C7778<br />
$ gpg --verify parabola-armv7h-systemd-cli-2020.02-tarball.tar.gz.sig<br />
$ gpg --recv-keys 782F9DDBE36BA7F3D4DE49065F5DFCC14177E263<br />
$ gpg --verify linux-libre-64-5.11.11-3-armv7h.pkg.tar.xz.sig<br />
</pre><br />
<br />
save the following code as <code>partition_vboot.sh</code><br />
<br />
<pre><br />
#!/bin/bash <br />
<br />
DISK="$1" <br />
<br />
# Make sure only root can run our script<br />
if [ "$(id -u)" != "0" ]; then<br />
echo "This script must be run as root" 1>&2<br />
exit 1 <br />
fi <br />
<br />
if [ x"$DISK" == 'x' ]; then<br />
echo "This script requires a base block device as its only arguement" 1>&2<br />
echo "example: $0 /dev/sdb"<br />
exit 1 <br />
fi <br />
<br />
DISK_DEVICE_NAME="$(echo $DISK | awk -F'/' '{print $NF}')"<br />
ROOT_PARTITION="$DISK"2<br />
SWAP_PARTITION="$DISK"3<br />
# TODO allow specify TOTAL_SECTORS<br />
TOTAL_SECTORS=$(cat /sys/block/$DISK_DEVICE_NAME/size)<br />
SECTOR_SIZE=$(cat /sys/block/$DISK_DEVICE_NAME/queue/hw_sector_size)<br />
<br />
# the following are in sectors, 1MB = 2048 sectors<br />
FIRST_GAP_SIZE=8192 # 2048 sectors * 4MB<br />
LAST_GAP_SIZE=2048 # 2048 sectors * 1MB<br />
SWAP_PART_SIZE=8388608 # 2048 sectors * 4096MB<br />
KERNEL_PART_SIZE=65536 # 2048 sectors * 32MB<br />
<br />
# layout arithmatic <br />
FIRST_GAP_START=0 <br />
FIRST_GAP_END=$(( $FIRST_GAP_SIZE - 1 ))<br />
KERNEL_PART_START=$(( $FIRST_GAP_END + 1 ))<br />
KERNEL_PART_END=$(( $FIRST_GAP_END + $KERNEL_PART_SIZE ))<br />
ROOTFS_PART_START=$(( $KERNEL_PART_END + 1 ))<br />
<br />
LAST_GAP_END=$(( $TOTAL_SECTORS - 1 ))<br />
LAST_GAP_START=$(( $LAST_GAP_END - $LAST_GAP_SIZE + 1 ))<br />
if [ $TOTAL_SECTORS -lt 10000000 ]; then # if size of disk is less than 5GB do not make swap<br />
MAKESWAP='false' <br />
ROOTFS_PART_END=$(( $LAST_GAP_START - 1 ))<br />
SWAP_PART_END=0<br />
SWAP_PART_START=0<br />
else<br />
MAKESWAP='true' <br />
SWAP_PART_END=$(( $LAST_GAP_START - 1 ))<br />
SWAP_PART_START=$(( $SWAP_PART_END - $SWAP_PART_SIZE + 1 ))<br />
ROOTFS_PART_END=$(( $SWAP_PART_START - 1 ))<br />
fi<br />
<br />
echo "TOTAL_SECTORS = $TOTAL_SECTORS"<br />
echo "SECTOR_SIZE = $SECTOR_SIZE"<br />
echo ""<br />
echo "FIRST_GAP_SIZE = $FIRST_GAP_SIZE"<br />
echo "LAST_GAP_SIZE = $LAST_GAP_SIZE"<br />
echo "SWAP_PART_SIZE = $SWAP_PART_SIZE"<br />
echo "KERNEL_PART_SIZE = $KERNEL_PART_SIZE"<br />
echo ""<br />
echo "FIRST_GAP_START = $FIRST_GAP_START $(( $FIRST_GAP_START / 2048 )) MB"<br />
echo "FIRST_GAP_END = $FIRST_GAP_END"<br />
echo "KERNEL_PART_START = $KERNEL_PART_START $(( $KERNEL_PART_START / 2048 )) MB"<br />
echo "KERNEL_PART_END = $KERNEL_PART_END"<br />
echo "ROOTFS_PART_START = $ROOTFS_PART_START $(( $ROOTFS_PART_START / 2048 )) MB"<br />
echo "ROOTFS_PART_END = $ROOTFS_PART_END"<br />
echo "SWAP_PART_START = $SWAP_PART_START $(( $SWAP_PART_START / 2048 )) MB"<br />
echo "SWAP_PART_END = $SWAP_PART_END"<br />
echo "LAST_GAP_START = $LAST_GAP_START $(( $LAST_GAP_START / 2048 )) MB"<br />
echo "LAST_GAP_END = $LAST_GAP_END"<br />
<br />
# use `sgdisk --list-types' to get all possible type codes<br />
KERNEL_PART_TYPE='7f00'<br />
ROOTFS_PART_TYPE='7f01'<br />
SWAP_PART_TYPE='8200'<br />
<br />
# wipe disk, and create new gpt partition table<br />
sgdisk --zap-all $DISK<br />
sgdisk -o $DISK<br />
<br />
# create the kernel partition<br />
sgdisk --new=1:$KERNEL_PART_START:$KERNEL_PART_END $DISK<br />
sgdisk --typecode=1:$KERNEL_PART_TYPE $DISK<br />
sgdisk --change-name=1:Kernel $DISK<br />
sgdisk --attributes=1:=:015A000000000000 $DISK<br />
<br />
# create the rootfs partition <br />
sgdisk --new=2:$ROOTFS_PART_START:$ROOTFS_PART_END $DISK<br />
sgdisk --typecode=2:$ROOTFS_PART_TYPE $DISK<br />
sgdisk --change-name=2:Root $DISK<br />
mkfs.ext4 $ROOT_PARTITION<br />
<br />
# create the swap partition<br />
if [ $MAKESWAP = 'true' ]; then<br />
sgdisk --new=3:$SWAP_PART_START:$SWAP_PART_END $DISK<br />
sgdisk --typecode=3:$SWAP_PART_TYPE $DISK<br />
sgdisk --change-name=3:Swap $DISK<br />
mkswap $SWAP_PARTITION<br />
fi<br />
<br />
sgdisk --print $DISK<br />
lsblk $DISK<br />
</pre><br />
<br />
== partition micro sd card & mount the rootfs partition ==<br />
<br />
<code>partition_vboot.sh</code> is a replacement for cgpt i made that uses sgdisk to create a compatible partition layout for depthcharge chromebooks (asus c201 & samsung chromebook plus v1). I have tested it with cards as small as 2GB, it will automatically make a 4GB swap partition if the size of the disk is detected to be above 4GB, the rest of the disk will be used for the rootfs partition<br />
<br />
<pre># sh partition_vboot.sh /dev/sdX</pre><br />
<br />
if you dont want to run this script you can follow the partitioning instructions on the archlinuxarm wiki page for this device<br />
https://archlinuxarm.org/platforms/armv8/rockchip/samsung-chromebook-plus<br />
<br />
<br />
after the rootfs partition is created and formated, mount it<br />
<pre><br />
# mkdir $MOUNTPOINT<br />
# mount /dev/sdX2 $MOUNTPOINT<br />
</pre><br />
<br />
== extract / copy files ==<br />
<pre><br />
# bsdtar -xf parabola-armv7h-systemd-cli-2020.02-tarball.tar.gz -C $MOUNTPOINT<br />
# bsdtar -xf linux-libre-64-5.11.11-3-armv7h.pkg.tar.xz -C $MOUNTPOINT<br />
# cp linux-libre-64-5.11.11-3-armv7h.pkg.tar.xz $MOUNTPOINT/var/cache/pacman/pkg/<br />
<br />
# echo > $MOUNTPOINT/etc/fstab<br />
<br />
# mkdir $MOUNTPOINT/boot/pack<br />
# cp kernel.keyblock $MOUNTPOINT/boot/pack<br />
# cp kernel_data_key.vbprivk $MOUNTPOINT/boot/pack<br />
# cp $MOUNTPOINT/usr/lib/modules/5.11.11-gnu-3-64-ARCH/vmlinuz $MOUNTPOINT/boot/pack<br />
# cp $MOUNTPOINT/boot/dtbs/linux-libre-64/rockchip/rk3399-gru-kevin.dtb $MOUNTPOINT/boot/pack<br />
<br />
# cd $MOUNTPOINT/boot/pack<br />
<br />
# lz4 -k vmlinuz<br />
# echo "console=tty0 console=ttyS2,115200n8 earlyprintk=ttyS2,115200n8 init=/sbin/init root=PARTUUID=%U/PARTNROFF=1 rootwait rw noinitrd" > cmdline<br />
# dd if=/dev/zero of=bootloader.bin bs=512 count=1<br />
</pre><br />
<br />
paste the following code into <code>kernel.its</code><br />
<br />
<pre><br />
/dts-v1/;<br />
<br />
/ {<br />
description = "Chrome OS kernel image with one or more FDT blobs";<br />
images {<br />
kernel@1{<br />
description = "kernel";<br />
data = /incbin/("vmlinuz.lz4");<br />
type = "kernel_noload";<br />
arch = "arm64";<br />
os = "linux";<br />
compression = "lz4";<br />
load = <0>;<br />
entry = <0>;<br />
};<br />
fdt@1{<br />
description = "rk3399-gru-kevin.dtb";<br />
data = /incbin/("rk3399-gru-kevin.dtb");<br />
type = "flat_dt";<br />
arch = "arm64";<br />
compression = "none";<br />
hash@1{<br />
algo = "sha1";<br />
};<br />
};<br />
};<br />
configurations {<br />
default = "conf@1";<br />
conf@1{<br />
kernel = "kernel@1";<br />
fdt = "fdt@1";<br />
};<br />
};<br />
};<br />
</pre><br />
<br />
<pre># mkimage -f kernel.its kernel.itb</pre><br />
<br />
if you see the following error message, just ignore, it will still work<br />
<pre><br />
kernel.its:6.17-15.11: Warning (unit_address_vs_reg): /images/kernel@1: node has a unit name, but no reg or ranges property<br />
kernel.its:16.14-25.11: Warning (unit_address_vs_reg): /images/fdt@1: node has a unit name, but no reg or ranges property<br />
kernel.its:22.19-24.15: Warning (unit_address_vs_reg): /images/fdt@1/hash@1: node has a unit name, but no reg or ranges property<br />
kernel.its:29.15-32.11: Warning (unit_address_vs_reg): /configurations/conf@1: node has a unit name, but no reg or ranges property<br />
mkimage: verify_header failed for FIT Image support with exit code 1<br />
</pre><br />
<br />
and paste the following code into <code>pack_vboot.sh</code><br />
<br />
<pre><br />
futility --debug vbutil_kernel \<br />
--pack vmlinux.kpart \<br />
--version 1 \<br />
--vmlinuz kernel.itb \<br />
--arch aarch64 \<br />
--keyblock kernel.keyblock \<br />
--signprivate kernel_data_key.vbprivk \<br />
--config cmdline \<br />
--bootloader bootloader.bin<br />
</pre><br />
Now run the following commands:<br />
<pre><br />
# sh pack_vboot.sh<br />
# dd if=vmlinux.kpart of=/dev/sdX1<br />
# cd<br />
# umount $MOUNTPOINT<br />
</pre><br />
<br />
== Boot! ==<br />
<br />
<br />
it should boot up. login as root<br />
<br />
in order to update the system you will need some way to connect to the internet, i am using a usb-c ethernet adapter<br />
https://www.amazon.com/Nekteck-Ethernet-Compatible-Pixelbook-Thunderbolt/dp/B0749DCDRV/<br />
<br />
plug in the usb ethernet and dhcp should assign an ip<br />
<br />
then sync the time<br />
<pre><br />
# systemctl restart systemd-timesyncd.service<br />
# pacman -Sy<br />
# pacman -S archlinux-keyring archlinux32-keyring archlinuxarm-keyring parabola-keyring<br />
</pre><br />
it will fail because of keyring, but you downloaded it!<br />
<pre><br />
# pacman -U /var/cache/pacman/pkg/*-keyring-*<br />
# pacman -S archlinux-keyring archlinux32-keyring archlinuxarm-keyring parabola-keyring<br />
# pacman -S archlinux-keyring archlinux32-keyring archlinuxarm-keyring parabola-keyring<br />
</pre><br />
<br />
TODO: get <code>pacman-key --refresh</code> to work. try: https://wiki.parabola.nu/Parabola_Keyring<br />
<br />
as an alternative temporary way around, we will just disable signature checking for this test environment.<br />
<br />
<pre><br />
sed -i '/^SigLevel.*/SigLevel = Never/' /etc/pacman.conf<br />
</pre><br />
<br />
<pre><br />
# pacman -S linux-libre-64 --overwrite '/*'<br />
# pacman -Su linux-libre-firmware acpi vim nano networkmanager<br />
</pre><br />
<br />
== Bonus extra info ==<br />
<br />
=== make your own debug port breakout ===<br />
I dont know where to get a servo board but the you can make your own debug header breakout to get serial console access / early boot logs etc<br />
<br />
the breakout https://www.amazon.com/Proto-Advantage-DR040D254P050-50-Pin-Connector-Adapter/dp/B097S2268V or https://www.ebay.com/itm/202502988342<br />
<br />
the connector https://www.digikey.com/en/products/detail/panasonic-electric-works/AXK850145WG/1986616<br />
<br />
usb <--> rs232 https://www.amazon.com/HiLetgo-CP2102-Converter-Adapter-Downloader/dp/B00LODGRV8 (get 2)<br />
<br />
servo connector pinout is described in this pdf (page 14) (V2 DEBUG HEADER)<br />
<br />
https://www.chromium.org/chromium-os/servo/810-10010-03_20120227_servo_SCH_0.pdf<br />
<br />
you can use a continuity meter to determine connector orientation by finding the corner pin that is ground<br />
<br />
<pre><br />
<br />
<br />
PIN-33 UART1_DUT_SERVO_TX --+ +-- PIN-17 UART2_DUT_SERVO_TX<br />
| |<br />
| |<br />
| |<br />
49 vG vG G 1<br />
|||||||||||||||||||||||||<br />
9753197531975319753197531<br />
1234567890123210987654321<br />
0864208642086420864208642<br />
|||||||||||||||||||||||||<br />
50 G G ^ G ^ G 2<br />
| |<br />
| |<br />
| |<br />
PIN-32 UART1_SERVO_DUT_TX --+ +-- PIN-16 UART2_SERVO_DUT_TX<br />
<br />
<br />
GND PINS = 1, 8, 15, 20, 31, 36, 42<br />
</pre><br />
<br />
=== set bios boot timeout to 2 seconds ===<br />
<br />
https://old.reddit.com/r/Crouton/comments/2szn59/how_to_shorten_os_verfication_warning_screen_on/<br />
<br />
install package from aur flashrom-chromeos<br />
<br />
info about gbb flags<br />
<br />
<pre><br />
/* Flags for .flags field */<br />
/* Reduce the dev screen delay to 2 sec from 30 sec to speedup factory. */<br />
#define GBB_FLAG_DEV_SCREEN_SHORT_DELAY 0x00000001<br />
/*<br />
* BIOS should load option ROMs from arbitrary PCI devices. We'll never enable<br />
* this ourselves because it executes non-verified code, but if a customer<br />
* wants to void their warranty and set this flag in the read-only flash, they<br />
* should be able to do so.<br />
*/<br />
#define GBB_FLAG_LOAD_OPTION_ROMS 0x00000002<br />
/*<br />
* The factory flow may need the BIOS to boot a non-ChromeOS kernel if the<br />
* dev-switch is on. This flag allows that.<br />
*/<br />
#define GBB_FLAG_ENABLE_ALTERNATE_OS 0x00000004<br />
/* Force dev switch on, regardless of physical/keyboard dev switch position. */<br />
#define GBB_FLAG_FORCE_DEV_SWITCH_ON 0x00000008<br />
/* Allow booting from USB in dev mode even if dev_boot_usb=0. */<br />
#define GBB_FLAG_FORCE_DEV_BOOT_USB 0x00000010<br />
/* Disable firmware rollback protection. */<br />
#define GBB_FLAG_DISABLE_FW_ROLLBACK_CHECK 0x00000020<br />
/* Allow Enter key to trigger dev->tonorm screen transition */<br />
#define GBB_FLAG_ENTER_TRIGGERS_TONORM 0x00000040<br />
/* Allow booting Legacy OSes in dev mode even if dev_boot_legacy=0. */<br />
#define GBB_FLAG_FORCE_DEV_BOOT_LEGACY 0x00000080<br />
/* Allow booting using alternate keys for FAFT servo testing */<br />
#define GBB_FLAG_FAFT_KEY_OVERIDE 0x00000100<br />
/* Disable EC software sync */<br />
#define GBB_FLAG_DISABLE_EC_SOFTWARE_SYNC 0x00000200<br />
/* Default to booting legacy OS when dev screen times out */<br />
#define GBB_FLAG_DEFAULT_DEV_BOOT_LEGACY 0x00000400<br />
/* Disable PD software sync */<br />
#define GBB_FLAG_DISABLE_PD_SOFTWARE_SYNC 0x00000800<br />
/* Disable shutdown on lid closed */<br />
#define GBB_FLAG_DISABLE_LID_SHUTDOWN 0x00001000<br />
/*<br />
* Allow full fastboot capability in firmware even if<br />
* dev_boot_fastboot_full_cap=0.<br />
*/<br />
#define GBB_FLAG_FORCE_DEV_BOOT_FASTBOOT_FULL_CAP 0x00002000<br />
/* Enable serial console */<br />
#define GBB_FLAG_ENABLE_SERIAL 0x00004000<br />
<br />
source: https://chromium.googlesource.com/chromiumos/platform/vboot/+/master/_vboot_reference/firmware/include/gbb_header.h<br />
</pre><br />
<br />
=== blobless coreboot / etc ===<br />
https://gitlab.com/vicencb/kevinboot/</div>Maihttps://wiki.parabola.nu/index.php?title=User:Mai&diff=23594User:Mai2021-11-17T16:41:40Z<p>Mai: /* Bonus extra info */</p>
<hr />
<div>{{stub}}<br />
== Status for Samsung Chromebook Plus v1 aka kevin aka gru-kevin aka xe513c24 ==<br />
=== Kernel ===<br />
{{pkg|linux-libre-64}} (armv7h) works but needs to be packed correctly to boot, the following is a rough guide on how i was able to boot this kernel on this hardware<br />
<br />
=== what does not work ===<br />
- onboard wifi<br />
- probably more stuff<br />
<br />
=== What you will need ===<br />
- this laptop :P<br />
- micro sd card at least 2GB, 8+GB reccomended<br />
- another computer that has a linux environment so we can download / extract / pack the kernel and install rootfs<br />
<br />
== Unlock external booting ==<br />
=== Switch to developer mode ===<br />
<br />
# Turn off the laptop.<br />
# To invoke Recovery mode, you hold down the ESC and Refresh keys and poke the Power button.<br />
# At the Recovery screen press Ctrl-D (there’s no prompt - you have to know to do it).<br />
# Confirm switching to developer mode by pressing enter, and the laptop will reboot and reset the system. This takes about 10-15 minutes.<br />
<br />
Note: After enabling developer mode, you will need to press Ctrl-D each time you boot, or wait 30 seconds to continue booting.<br />
=== Enable booting from external storage ===<br />
<br />
# After booting into developer mode, hold Ctrl and Alt and poke the F2 key. This will open up the developer console.<br />
# Type root to the login screen.<br />
# Then type this to enable USB booting:<br />
<br />
<code>$ enable_dev_usb_boot</code><br />
<br />
Reboot the system to allow the change to take effect.<br />
<br />
Source: https://chromebooks.readthedocs.io/en/latest/source/README.html#switch-to-developer-mode<br />
<br />
== Install packages ==<br />
<code>pacman -S {{pkg|vboot-utils}} {{pkg|uboot-tools}} {{pkg|gptfdisk}} {{pkg|dtc}}</code><br />
<br />
== Gather files ==<br />
<br />
<pre><br />
$ mkdir parabola-armv7-64<br />
$ cd parabola-armv7-64<br />
<br />
$ wget -c https://redirector.parabola.nu/iso/armv7h-systemd-cli-2020.02/parabola-armv7h-systemd-cli-2020.02-tarball.tar.gz<br />
$ wget -c https://redirector.parabola.nu/iso/armv7h-systemd-cli-2020.02/parabola-armv7h-systemd-cli-2020.02-tarball.tar.gz.sig<br />
$ wget -c https://repomirror.parabola.nu/pool/parabola/linux-libre-64-5.11.11-3-armv7h.pkg.tar.xz<br />
$ wget -c https://repomirror.parabola.nu/pool/parabola/linux-libre-64-5.11.11-3-armv7h.pkg.tar.xz.sig<br />
$ wget -c https://git.parabola.nu/abslibre.git/plain/libre/linux-libre/kernel.keyblock<br />
$ wget -c https://git.parabola.nu/abslibre.git/plain/libre/linux-libre/kernel_data_key.vbprivk<br />
<br />
<br />
$ gpg --recv-keys FBCC5AD7421197B7ABA72853908710913E8C7778<br />
$ gpg --verify parabola-armv7h-systemd-cli-2020.02-tarball.tar.gz.sig<br />
$ gpg --recv-keys 782F9DDBE36BA7F3D4DE49065F5DFCC14177E263<br />
$ gpg --verify linux-libre-64-5.11.11-3-armv7h.pkg.tar.xz.sig<br />
</pre><br />
<br />
save the following code as <code>partition_vboot.sh</code><br />
<br />
<pre><br />
#!/bin/bash <br />
<br />
DISK="$1" <br />
<br />
# Make sure only root can run our script<br />
if [ "$(id -u)" != "0" ]; then<br />
echo "This script must be run as root" 1>&2<br />
exit 1 <br />
fi <br />
<br />
if [ x"$DISK" == 'x' ]; then<br />
echo "This script requires a base block device as its only arguement" 1>&2<br />
echo "example: $0 /dev/sdb"<br />
exit 1 <br />
fi <br />
<br />
DISK_DEVICE_NAME="$(echo $DISK | awk -F'/' '{print $NF}')"<br />
ROOT_PARTITION="$DISK"2<br />
SWAP_PARTITION="$DISK"3<br />
# TODO allow specify TOTAL_SECTORS<br />
TOTAL_SECTORS=$(cat /sys/block/$DISK_DEVICE_NAME/size)<br />
SECTOR_SIZE=$(cat /sys/block/$DISK_DEVICE_NAME/queue/hw_sector_size)<br />
<br />
# the following are in sectors, 1MB = 2048 sectors<br />
FIRST_GAP_SIZE=8192 # 2048 sectors * 4MB<br />
LAST_GAP_SIZE=2048 # 2048 sectors * 1MB<br />
SWAP_PART_SIZE=8388608 # 2048 sectors * 4096MB<br />
KERNEL_PART_SIZE=65536 # 2048 sectors * 32MB<br />
<br />
# layout arithmatic <br />
FIRST_GAP_START=0 <br />
FIRST_GAP_END=$(( $FIRST_GAP_SIZE - 1 ))<br />
KERNEL_PART_START=$(( $FIRST_GAP_END + 1 ))<br />
KERNEL_PART_END=$(( $FIRST_GAP_END + $KERNEL_PART_SIZE ))<br />
ROOTFS_PART_START=$(( $KERNEL_PART_END + 1 ))<br />
<br />
LAST_GAP_END=$(( $TOTAL_SECTORS - 1 ))<br />
LAST_GAP_START=$(( $LAST_GAP_END - $LAST_GAP_SIZE + 1 ))<br />
if [ $TOTAL_SECTORS -lt 10000000 ]; then # if size of disk is less than 5GB do not make swap<br />
MAKESWAP='false' <br />
ROOTFS_PART_END=$(( $LAST_GAP_START - 1 ))<br />
SWAP_PART_END=0<br />
SWAP_PART_START=0<br />
else<br />
MAKESWAP='true' <br />
SWAP_PART_END=$(( $LAST_GAP_START - 1 ))<br />
SWAP_PART_START=$(( $SWAP_PART_END - $SWAP_PART_SIZE + 1 ))<br />
ROOTFS_PART_END=$(( $SWAP_PART_START - 1 ))<br />
fi<br />
<br />
echo "TOTAL_SECTORS = $TOTAL_SECTORS"<br />
echo "SECTOR_SIZE = $SECTOR_SIZE"<br />
echo ""<br />
echo "FIRST_GAP_SIZE = $FIRST_GAP_SIZE"<br />
echo "LAST_GAP_SIZE = $LAST_GAP_SIZE"<br />
echo "SWAP_PART_SIZE = $SWAP_PART_SIZE"<br />
echo "KERNEL_PART_SIZE = $KERNEL_PART_SIZE"<br />
echo ""<br />
echo "FIRST_GAP_START = $FIRST_GAP_START $(( $FIRST_GAP_START / 2048 )) MB"<br />
echo "FIRST_GAP_END = $FIRST_GAP_END"<br />
echo "KERNEL_PART_START = $KERNEL_PART_START $(( $KERNEL_PART_START / 2048 )) MB"<br />
echo "KERNEL_PART_END = $KERNEL_PART_END"<br />
echo "ROOTFS_PART_START = $ROOTFS_PART_START $(( $ROOTFS_PART_START / 2048 )) MB"<br />
echo "ROOTFS_PART_END = $ROOTFS_PART_END"<br />
echo "SWAP_PART_START = $SWAP_PART_START $(( $SWAP_PART_START / 2048 )) MB"<br />
echo "SWAP_PART_END = $SWAP_PART_END"<br />
echo "LAST_GAP_START = $LAST_GAP_START $(( $LAST_GAP_START / 2048 )) MB"<br />
echo "LAST_GAP_END = $LAST_GAP_END"<br />
<br />
# use `sgdisk --list-types' to get all possible type codes<br />
KERNEL_PART_TYPE='7f00'<br />
ROOTFS_PART_TYPE='7f01'<br />
SWAP_PART_TYPE='8200'<br />
<br />
# wipe disk, and create new gpt partition table<br />
sgdisk --zap-all $DISK<br />
sgdisk -o $DISK<br />
<br />
# create the kernel partition<br />
sgdisk --new=1:$KERNEL_PART_START:$KERNEL_PART_END $DISK<br />
sgdisk --typecode=1:$KERNEL_PART_TYPE $DISK<br />
sgdisk --change-name=1:Kernel $DISK<br />
sgdisk --attributes=1:=:015A000000000000 $DISK<br />
<br />
# create the rootfs partition <br />
sgdisk --new=2:$ROOTFS_PART_START:$ROOTFS_PART_END $DISK<br />
sgdisk --typecode=2:$ROOTFS_PART_TYPE $DISK<br />
sgdisk --change-name=2:Root $DISK<br />
mkfs.ext4 $ROOT_PARTITION<br />
<br />
# create the swap partition<br />
if [ $MAKESWAP = 'true' ]; then<br />
sgdisk --new=3:$SWAP_PART_START:$SWAP_PART_END $DISK<br />
sgdisk --typecode=3:$SWAP_PART_TYPE $DISK<br />
sgdisk --change-name=3:Swap $DISK<br />
mkswap $SWAP_PARTITION<br />
fi<br />
<br />
sgdisk --print $DISK<br />
lsblk $DISK<br />
</pre><br />
<br />
== partition micro sd card & mount the rootfs partition ==<br />
<br />
<code>partition_vboot.sh</code> is a replacement for cgpt i made that uses sgdisk to create a compatible partition layout for depthcharge chromebooks (asus c201 & samsung chromebook plus v1). I have tested it with cards as small as 2GB, it will automatically make a 4GB swap partition if the size of the disk is detected to be above 4GB, the rest of the disk will be used for the rootfs partition<br />
<br />
<pre># sh partition_vboot.sh /dev/sdX</pre><br />
<br />
if you dont want to run this script you can follow the partitioning instructions on the archlinuxarm wiki page for this device<br />
https://archlinuxarm.org/platforms/armv8/rockchip/samsung-chromebook-plus<br />
<br />
<br />
after the rootfs partition is created and formated, mount it<br />
<pre><br />
# mkdir $MOUNTPOINT<br />
# mount /dev/sdX2 $MOUNTPOINT<br />
</pre><br />
<br />
== extract / copy files ==<br />
<pre><br />
# bsdtar -xf parabola-armv7h-systemd-cli-2020.02-tarball.tar.gz -C $MOUNTPOINT<br />
# bsdtar -xf linux-libre-64-5.11.11-3-armv7h.pkg.tar.xz -C $MOUNTPOINT<br />
# cp linux-libre-64-5.11.11-3-armv7h.pkg.tar.xz $MOUNTPOINT/var/cache/pacman/pkg/<br />
<br />
# echo > $MOUNTPOINT/etc/fstab<br />
<br />
# mkdir $MOUNTPOINT/boot/pack<br />
# cp kernel.keyblock $MOUNTPOINT/boot/pack<br />
# cp kernel_data_key.vbprivk $MOUNTPOINT/boot/pack<br />
# cp $MOUNTPOINT/usr/lib/modules/5.11.11-gnu-3-64-ARCH/vmlinuz $MOUNTPOINT/boot/pack<br />
# cp $MOUNTPOINT/boot/dtbs/linux-libre-64/rockchip/rk3399-gru-kevin.dtb $MOUNTPOINT/boot/pack<br />
<br />
# cd $MOUNTPOINT/boot/pack<br />
<br />
# lz4 -k vmlinuz<br />
# echo "console=tty0 console=ttyS2,115200n8 earlyprintk=ttyS2,115200n8 init=/sbin/init root=PARTUUID=%U/PARTNROFF=1 rootwait rw noinitrd" > cmdline<br />
# dd if=/dev/zero of=bootloader.bin bs=512 count=1<br />
</pre><br />
<br />
paste the following code into <code>kernel.its</code><br />
<br />
<pre><br />
/dts-v1/;<br />
<br />
/ {<br />
description = "Chrome OS kernel image with one or more FDT blobs";<br />
images {<br />
kernel@1{<br />
description = "kernel";<br />
data = /incbin/("vmlinuz.lz4");<br />
type = "kernel_noload";<br />
arch = "arm64";<br />
os = "linux";<br />
compression = "lz4";<br />
load = <0>;<br />
entry = <0>;<br />
};<br />
fdt@1{<br />
description = "rk3399-gru-kevin.dtb";<br />
data = /incbin/("rk3399-gru-kevin.dtb");<br />
type = "flat_dt";<br />
arch = "arm64";<br />
compression = "none";<br />
hash@1{<br />
algo = "sha1";<br />
};<br />
};<br />
};<br />
configurations {<br />
default = "conf@1";<br />
conf@1{<br />
kernel = "kernel@1";<br />
fdt = "fdt@1";<br />
};<br />
};<br />
};<br />
</pre><br />
<br />
<pre># mkimage -f kernel.its kernel.itb</pre><br />
<br />
if you see the following error message, just ignore, it will still work<br />
<pre><br />
kernel.its:6.17-15.11: Warning (unit_address_vs_reg): /images/kernel@1: node has a unit name, but no reg or ranges property<br />
kernel.its:16.14-25.11: Warning (unit_address_vs_reg): /images/fdt@1: node has a unit name, but no reg or ranges property<br />
kernel.its:22.19-24.15: Warning (unit_address_vs_reg): /images/fdt@1/hash@1: node has a unit name, but no reg or ranges property<br />
kernel.its:29.15-32.11: Warning (unit_address_vs_reg): /configurations/conf@1: node has a unit name, but no reg or ranges property<br />
mkimage: verify_header failed for FIT Image support with exit code 1<br />
</pre><br />
<br />
and paste the following code into <code>pack_vboot.sh</code><br />
<br />
<pre><br />
futility --debug vbutil_kernel \<br />
--pack vmlinux.kpart \<br />
--version 1 \<br />
--vmlinuz kernel.itb \<br />
--arch aarch64 \<br />
--keyblock kernel.keyblock \<br />
--signprivate kernel_data_key.vbprivk \<br />
--config cmdline \<br />
--bootloader bootloader.bin<br />
</pre><br />
Now run the following commands:<br />
<pre><br />
# sh pack_vboot.sh<br />
# dd if=vmlinux.kpart of=/dev/sdX1<br />
# cd<br />
# umount $MOUNTPOINT<br />
</pre><br />
<br />
== Boot! ==<br />
<br />
<br />
it should boot up. login as root<br />
<br />
in order to update the system you will need some way to connect to the internet, i am using a usb-c ethernet adapter<br />
https://www.amazon.com/Nekteck-Ethernet-Compatible-Pixelbook-Thunderbolt/dp/B0749DCDRV/<br />
<br />
plug in the usb ethernet and dhcp should assign an ip<br />
<br />
then sync the time<br />
<pre><br />
# systemctl restart systemd-timesyncd.service<br />
# pacman -Sy<br />
# pacman -S archlinux-keyring archlinux32-keyring archlinuxarm-keyring parabola-keyring<br />
</pre><br />
it will fail because of keyring, but you downloaded it!<br />
<pre><br />
# pacman -U /var/cache/pacman/pkg/*-keyring-*<br />
# pacman -S archlinux-keyring archlinux32-keyring archlinuxarm-keyring parabola-keyring<br />
# pacman -S archlinux-keyring archlinux32-keyring archlinuxarm-keyring parabola-keyring<br />
</pre><br />
<br />
TODO: get <code>pacman-key --refresh</code> to work. try: https://wiki.parabola.nu/Parabola_Keyring<br />
<br />
as an alternative temporary way around, we will just disable signature checking for this test environment.<br />
<br />
<pre><br />
sed -i '/^SigLevel.*/SigLevel = Never/' /etc/pacman.conf<br />
</pre><br />
<br />
<pre><br />
# pacman -S linux-libre-64 --overwrite '/*'<br />
# pacman -Su linux-libre-firmware acpi vim nano networkmanager<br />
</pre><br />
<br />
== Bonus extra info ==<br />
<br />
=== make your own debug port breakout ===<br />
I dont know where to get a servo board but the you can make your own debug header breakout to get serial console access / early boot logs etc<br />
<br />
the breakout https://www.amazon.com/Proto-Advantage-DR040D254P050-50-Pin-Connector-Adapter/dp/B097S2268V or https://www.ebay.com/itm/202502988342<br />
<br />
the connector https://www.digikey.com/en/products/detail/panasonic-electric-works/AXK850145WG/1986616<br />
<br />
usb <--> rs232 https://www.amazon.com/HiLetgo-CP2102-Converter-Adapter-Downloader/dp/B00LODGRV8 (get 2)<br />
<br />
servo connector pinout is described in this pdf (page 14) (V2 DEBUG HEADER)<br />
<br />
https://www.chromium.org/chromium-os/servo/810-10010-03_20120227_servo_SCH_0.pdf<br />
<br />
you can use a continuity meter to determine connector orientation by finding the corner pin that is ground<br />
<br />
<pre><br />
<br />
<br />
PIN-33 UART1_DUT_SERVO_TX --+ +-- PIN-17 UART2_DUT_SERVO_TX<br />
| |<br />
| |<br />
| |<br />
49 vG vG G 1<br />
|||||||||||||||||||||||||<br />
9753197531975319753197531<br />
1234567890123210987654321<br />
0864208642086420864208642<br />
|||||||||||||||||||||||||<br />
50 G G ^ G ^ G 2<br />
| |<br />
| |<br />
| |<br />
PIN-32 UART1_SERVO_DUT_TX --+ +-- PIN-16 UART2_SERVO_DUT_TX<br />
<br />
<br />
GND PINS = 1, 8, 15, 20, 31, 36, 42<br />
</pre><br />
<br />
=== set bios boot timeout to 2 seconds ===<br />
<br />
https://old.reddit.com/r/Crouton/comments/2szn59/how_to_shorten_os_verfication_warning_screen_on/<br />
<br />
=== blobless coreboot / etc ===<br />
https://gitlab.com/vicencb/kevinboot/</div>Maihttps://wiki.parabola.nu/index.php?title=User:Mai&diff=23593User:Mai2021-11-14T22:08:07Z<p>Mai: /* Boot! */</p>
<hr />
<div>{{stub}}<br />
== Status for Samsung Chromebook Plus v1 aka kevin aka gru-kevin aka xe513c24 ==<br />
=== Kernel ===<br />
{{pkg|linux-libre-64}} (armv7h) works but needs to be packed correctly to boot, the following is a rough guide on how i was able to boot this kernel on this hardware<br />
<br />
=== what does not work ===<br />
- onboard wifi<br />
- probably more stuff<br />
<br />
=== What you will need ===<br />
- this laptop :P<br />
- micro sd card at least 2GB, 8+GB reccomended<br />
- another computer that has a linux environment so we can download / extract / pack the kernel and install rootfs<br />
<br />
== Unlock external booting ==<br />
=== Switch to developer mode ===<br />
<br />
# Turn off the laptop.<br />
# To invoke Recovery mode, you hold down the ESC and Refresh keys and poke the Power button.<br />
# At the Recovery screen press Ctrl-D (there’s no prompt - you have to know to do it).<br />
# Confirm switching to developer mode by pressing enter, and the laptop will reboot and reset the system. This takes about 10-15 minutes.<br />
<br />
Note: After enabling developer mode, you will need to press Ctrl-D each time you boot, or wait 30 seconds to continue booting.<br />
=== Enable booting from external storage ===<br />
<br />
# After booting into developer mode, hold Ctrl and Alt and poke the F2 key. This will open up the developer console.<br />
# Type root to the login screen.<br />
# Then type this to enable USB booting:<br />
<br />
<code>$ enable_dev_usb_boot</code><br />
<br />
Reboot the system to allow the change to take effect.<br />
<br />
Source: https://chromebooks.readthedocs.io/en/latest/source/README.html#switch-to-developer-mode<br />
<br />
== Install packages ==<br />
<code>pacman -S {{pkg|vboot-utils}} {{pkg|uboot-tools}} {{pkg|gptfdisk}} {{pkg|dtc}}</code><br />
<br />
== Gather files ==<br />
<br />
<pre><br />
$ mkdir parabola-armv7-64<br />
$ cd parabola-armv7-64<br />
<br />
$ wget -c https://redirector.parabola.nu/iso/armv7h-systemd-cli-2020.02/parabola-armv7h-systemd-cli-2020.02-tarball.tar.gz<br />
$ wget -c https://redirector.parabola.nu/iso/armv7h-systemd-cli-2020.02/parabola-armv7h-systemd-cli-2020.02-tarball.tar.gz.sig<br />
$ wget -c https://repomirror.parabola.nu/pool/parabola/linux-libre-64-5.11.11-3-armv7h.pkg.tar.xz<br />
$ wget -c https://repomirror.parabola.nu/pool/parabola/linux-libre-64-5.11.11-3-armv7h.pkg.tar.xz.sig<br />
$ wget -c https://git.parabola.nu/abslibre.git/plain/libre/linux-libre/kernel.keyblock<br />
$ wget -c https://git.parabola.nu/abslibre.git/plain/libre/linux-libre/kernel_data_key.vbprivk<br />
<br />
<br />
$ gpg --recv-keys FBCC5AD7421197B7ABA72853908710913E8C7778<br />
$ gpg --verify parabola-armv7h-systemd-cli-2020.02-tarball.tar.gz.sig<br />
$ gpg --recv-keys 782F9DDBE36BA7F3D4DE49065F5DFCC14177E263<br />
$ gpg --verify linux-libre-64-5.11.11-3-armv7h.pkg.tar.xz.sig<br />
</pre><br />
<br />
save the following code as <code>partition_vboot.sh</code><br />
<br />
<pre><br />
#!/bin/bash <br />
<br />
DISK="$1" <br />
<br />
# Make sure only root can run our script<br />
if [ "$(id -u)" != "0" ]; then<br />
echo "This script must be run as root" 1>&2<br />
exit 1 <br />
fi <br />
<br />
if [ x"$DISK" == 'x' ]; then<br />
echo "This script requires a base block device as its only arguement" 1>&2<br />
echo "example: $0 /dev/sdb"<br />
exit 1 <br />
fi <br />
<br />
DISK_DEVICE_NAME="$(echo $DISK | awk -F'/' '{print $NF}')"<br />
ROOT_PARTITION="$DISK"2<br />
SWAP_PARTITION="$DISK"3<br />
# TODO allow specify TOTAL_SECTORS<br />
TOTAL_SECTORS=$(cat /sys/block/$DISK_DEVICE_NAME/size)<br />
SECTOR_SIZE=$(cat /sys/block/$DISK_DEVICE_NAME/queue/hw_sector_size)<br />
<br />
# the following are in sectors, 1MB = 2048 sectors<br />
FIRST_GAP_SIZE=8192 # 2048 sectors * 4MB<br />
LAST_GAP_SIZE=2048 # 2048 sectors * 1MB<br />
SWAP_PART_SIZE=8388608 # 2048 sectors * 4096MB<br />
KERNEL_PART_SIZE=65536 # 2048 sectors * 32MB<br />
<br />
# layout arithmatic <br />
FIRST_GAP_START=0 <br />
FIRST_GAP_END=$(( $FIRST_GAP_SIZE - 1 ))<br />
KERNEL_PART_START=$(( $FIRST_GAP_END + 1 ))<br />
KERNEL_PART_END=$(( $FIRST_GAP_END + $KERNEL_PART_SIZE ))<br />
ROOTFS_PART_START=$(( $KERNEL_PART_END + 1 ))<br />
<br />
LAST_GAP_END=$(( $TOTAL_SECTORS - 1 ))<br />
LAST_GAP_START=$(( $LAST_GAP_END - $LAST_GAP_SIZE + 1 ))<br />
if [ $TOTAL_SECTORS -lt 10000000 ]; then # if size of disk is less than 5GB do not make swap<br />
MAKESWAP='false' <br />
ROOTFS_PART_END=$(( $LAST_GAP_START - 1 ))<br />
SWAP_PART_END=0<br />
SWAP_PART_START=0<br />
else<br />
MAKESWAP='true' <br />
SWAP_PART_END=$(( $LAST_GAP_START - 1 ))<br />
SWAP_PART_START=$(( $SWAP_PART_END - $SWAP_PART_SIZE + 1 ))<br />
ROOTFS_PART_END=$(( $SWAP_PART_START - 1 ))<br />
fi<br />
<br />
echo "TOTAL_SECTORS = $TOTAL_SECTORS"<br />
echo "SECTOR_SIZE = $SECTOR_SIZE"<br />
echo ""<br />
echo "FIRST_GAP_SIZE = $FIRST_GAP_SIZE"<br />
echo "LAST_GAP_SIZE = $LAST_GAP_SIZE"<br />
echo "SWAP_PART_SIZE = $SWAP_PART_SIZE"<br />
echo "KERNEL_PART_SIZE = $KERNEL_PART_SIZE"<br />
echo ""<br />
echo "FIRST_GAP_START = $FIRST_GAP_START $(( $FIRST_GAP_START / 2048 )) MB"<br />
echo "FIRST_GAP_END = $FIRST_GAP_END"<br />
echo "KERNEL_PART_START = $KERNEL_PART_START $(( $KERNEL_PART_START / 2048 )) MB"<br />
echo "KERNEL_PART_END = $KERNEL_PART_END"<br />
echo "ROOTFS_PART_START = $ROOTFS_PART_START $(( $ROOTFS_PART_START / 2048 )) MB"<br />
echo "ROOTFS_PART_END = $ROOTFS_PART_END"<br />
echo "SWAP_PART_START = $SWAP_PART_START $(( $SWAP_PART_START / 2048 )) MB"<br />
echo "SWAP_PART_END = $SWAP_PART_END"<br />
echo "LAST_GAP_START = $LAST_GAP_START $(( $LAST_GAP_START / 2048 )) MB"<br />
echo "LAST_GAP_END = $LAST_GAP_END"<br />
<br />
# use `sgdisk --list-types' to get all possible type codes<br />
KERNEL_PART_TYPE='7f00'<br />
ROOTFS_PART_TYPE='7f01'<br />
SWAP_PART_TYPE='8200'<br />
<br />
# wipe disk, and create new gpt partition table<br />
sgdisk --zap-all $DISK<br />
sgdisk -o $DISK<br />
<br />
# create the kernel partition<br />
sgdisk --new=1:$KERNEL_PART_START:$KERNEL_PART_END $DISK<br />
sgdisk --typecode=1:$KERNEL_PART_TYPE $DISK<br />
sgdisk --change-name=1:Kernel $DISK<br />
sgdisk --attributes=1:=:015A000000000000 $DISK<br />
<br />
# create the rootfs partition <br />
sgdisk --new=2:$ROOTFS_PART_START:$ROOTFS_PART_END $DISK<br />
sgdisk --typecode=2:$ROOTFS_PART_TYPE $DISK<br />
sgdisk --change-name=2:Root $DISK<br />
mkfs.ext4 $ROOT_PARTITION<br />
<br />
# create the swap partition<br />
if [ $MAKESWAP = 'true' ]; then<br />
sgdisk --new=3:$SWAP_PART_START:$SWAP_PART_END $DISK<br />
sgdisk --typecode=3:$SWAP_PART_TYPE $DISK<br />
sgdisk --change-name=3:Swap $DISK<br />
mkswap $SWAP_PARTITION<br />
fi<br />
<br />
sgdisk --print $DISK<br />
lsblk $DISK<br />
</pre><br />
<br />
== partition micro sd card & mount the rootfs partition ==<br />
<br />
<code>partition_vboot.sh</code> is a replacement for cgpt i made that uses sgdisk to create a compatible partition layout for depthcharge chromebooks (asus c201 & samsung chromebook plus v1). I have tested it with cards as small as 2GB, it will automatically make a 4GB swap partition if the size of the disk is detected to be above 4GB, the rest of the disk will be used for the rootfs partition<br />
<br />
<pre># sh partition_vboot.sh /dev/sdX</pre><br />
<br />
if you dont want to run this script you can follow the partitioning instructions on the archlinuxarm wiki page for this device<br />
https://archlinuxarm.org/platforms/armv8/rockchip/samsung-chromebook-plus<br />
<br />
<br />
after the rootfs partition is created and formated, mount it<br />
<pre><br />
# mkdir $MOUNTPOINT<br />
# mount /dev/sdX2 $MOUNTPOINT<br />
</pre><br />
<br />
== extract / copy files ==<br />
<pre><br />
# bsdtar -xf parabola-armv7h-systemd-cli-2020.02-tarball.tar.gz -C $MOUNTPOINT<br />
# bsdtar -xf linux-libre-64-5.11.11-3-armv7h.pkg.tar.xz -C $MOUNTPOINT<br />
# cp linux-libre-64-5.11.11-3-armv7h.pkg.tar.xz $MOUNTPOINT/var/cache/pacman/pkg/<br />
<br />
# echo > $MOUNTPOINT/etc/fstab<br />
<br />
# mkdir $MOUNTPOINT/boot/pack<br />
# cp kernel.keyblock $MOUNTPOINT/boot/pack<br />
# cp kernel_data_key.vbprivk $MOUNTPOINT/boot/pack<br />
# cp $MOUNTPOINT/usr/lib/modules/5.11.11-gnu-3-64-ARCH/vmlinuz $MOUNTPOINT/boot/pack<br />
# cp $MOUNTPOINT/boot/dtbs/linux-libre-64/rockchip/rk3399-gru-kevin.dtb $MOUNTPOINT/boot/pack<br />
<br />
# cd $MOUNTPOINT/boot/pack<br />
<br />
# lz4 -k vmlinuz<br />
# echo "console=tty0 console=ttyS2,115200n8 earlyprintk=ttyS2,115200n8 init=/sbin/init root=PARTUUID=%U/PARTNROFF=1 rootwait rw noinitrd" > cmdline<br />
# dd if=/dev/zero of=bootloader.bin bs=512 count=1<br />
</pre><br />
<br />
paste the following code into <code>kernel.its</code><br />
<br />
<pre><br />
/dts-v1/;<br />
<br />
/ {<br />
description = "Chrome OS kernel image with one or more FDT blobs";<br />
images {<br />
kernel@1{<br />
description = "kernel";<br />
data = /incbin/("vmlinuz.lz4");<br />
type = "kernel_noload";<br />
arch = "arm64";<br />
os = "linux";<br />
compression = "lz4";<br />
load = <0>;<br />
entry = <0>;<br />
};<br />
fdt@1{<br />
description = "rk3399-gru-kevin.dtb";<br />
data = /incbin/("rk3399-gru-kevin.dtb");<br />
type = "flat_dt";<br />
arch = "arm64";<br />
compression = "none";<br />
hash@1{<br />
algo = "sha1";<br />
};<br />
};<br />
};<br />
configurations {<br />
default = "conf@1";<br />
conf@1{<br />
kernel = "kernel@1";<br />
fdt = "fdt@1";<br />
};<br />
};<br />
};<br />
</pre><br />
<br />
<pre># mkimage -f kernel.its kernel.itb</pre><br />
<br />
if you see the following error message, just ignore, it will still work<br />
<pre><br />
kernel.its:6.17-15.11: Warning (unit_address_vs_reg): /images/kernel@1: node has a unit name, but no reg or ranges property<br />
kernel.its:16.14-25.11: Warning (unit_address_vs_reg): /images/fdt@1: node has a unit name, but no reg or ranges property<br />
kernel.its:22.19-24.15: Warning (unit_address_vs_reg): /images/fdt@1/hash@1: node has a unit name, but no reg or ranges property<br />
kernel.its:29.15-32.11: Warning (unit_address_vs_reg): /configurations/conf@1: node has a unit name, but no reg or ranges property<br />
mkimage: verify_header failed for FIT Image support with exit code 1<br />
</pre><br />
<br />
and paste the following code into <code>pack_vboot.sh</code><br />
<br />
<pre><br />
futility --debug vbutil_kernel \<br />
--pack vmlinux.kpart \<br />
--version 1 \<br />
--vmlinuz kernel.itb \<br />
--arch aarch64 \<br />
--keyblock kernel.keyblock \<br />
--signprivate kernel_data_key.vbprivk \<br />
--config cmdline \<br />
--bootloader bootloader.bin<br />
</pre><br />
Now run the following commands:<br />
<pre><br />
# sh pack_vboot.sh<br />
# dd if=vmlinux.kpart of=/dev/sdX1<br />
# cd<br />
# umount $MOUNTPOINT<br />
</pre><br />
<br />
== Boot! ==<br />
<br />
<br />
it should boot up. login as root<br />
<br />
in order to update the system you will need some way to connect to the internet, i am using a usb-c ethernet adapter<br />
https://www.amazon.com/Nekteck-Ethernet-Compatible-Pixelbook-Thunderbolt/dp/B0749DCDRV/<br />
<br />
plug in the usb ethernet and dhcp should assign an ip<br />
<br />
then sync the time<br />
<pre><br />
# systemctl restart systemd-timesyncd.service<br />
# pacman -Sy<br />
# pacman -S archlinux-keyring archlinux32-keyring archlinuxarm-keyring parabola-keyring<br />
</pre><br />
it will fail because of keyring, but you downloaded it!<br />
<pre><br />
# pacman -U /var/cache/pacman/pkg/*-keyring-*<br />
# pacman -S archlinux-keyring archlinux32-keyring archlinuxarm-keyring parabola-keyring<br />
# pacman -S archlinux-keyring archlinux32-keyring archlinuxarm-keyring parabola-keyring<br />
</pre><br />
<br />
TODO: get <code>pacman-key --refresh</code> to work. try: https://wiki.parabola.nu/Parabola_Keyring<br />
<br />
as an alternative temporary way around, we will just disable signature checking for this test environment.<br />
<br />
<pre><br />
sed -i '/^SigLevel.*/SigLevel = Never/' /etc/pacman.conf<br />
</pre><br />
<br />
<pre><br />
# pacman -S linux-libre-64 --overwrite '/*'<br />
# pacman -Su linux-libre-firmware acpi vim nano networkmanager<br />
</pre><br />
<br />
== Bonus extra info ==<br />
<br />
=== make your own debug port breakout ===<br />
I dont know where to get a servo board but the you can make your own debug header breakout to get serial console access / early boot logs etc<br />
<br />
the breakout https://www.amazon.com/Proto-Advantage-DR040D254P050-50-Pin-Connector-Adapter/dp/B097S2268V or https://www.ebay.com/itm/202502988342<br />
<br />
the connector https://www.digikey.com/en/products/detail/panasonic-electric-works/AXK850145WG/1986616<br />
<br />
usb <--> rs232 https://www.amazon.com/HiLetgo-CP2102-Converter-Adapter-Downloader/dp/B00LODGRV8 (get 2)<br />
<br />
servo connector pinout is described in this pdf (page 14) (V2 DEBUG HEADER)<br />
<br />
https://www.chromium.org/chromium-os/servo/810-10010-03_20120227_servo_SCH_0.pdf<br />
<br />
you can use a continuity meter to determine connector orientation but finding the corner pin that is ground<br />
<br />
<pre><br />
<br />
<br />
PIN-33 UART1_DUT_SERVO_TX --+ +-- PIN-17 UART2_DUT_SERVO_TX<br />
| |<br />
| |<br />
| |<br />
49 vG vG G 1<br />
|||||||||||||||||||||||||<br />
9753197531975319753197531<br />
1234567890123210987654321<br />
0864208642086420864208642<br />
|||||||||||||||||||||||||<br />
50 G G ^ G ^ G 2<br />
| |<br />
| |<br />
| |<br />
PIN-32 UART1_SERVO_DUT_TX --+ +-- PIN-16 UART2_SERVO_DUT_TX<br />
<br />
<br />
GND PINS = 1, 8, 15, 20, 31, 36, 42<br />
</pre><br />
<br />
=== set bios boot timeout to 2 seconds ===<br />
<br />
https://old.reddit.com/r/Crouton/comments/2szn59/how_to_shorten_os_verfication_warning_screen_on/<br />
<br />
=== blobless coreboot / etc ===<br />
https://gitlab.com/vicencb/kevinboot/</div>Maihttps://wiki.parabola.nu/index.php?title=User:Mai&diff=23588User:Mai2021-11-13T21:00:41Z<p>Mai: /* Install packages */</p>
<hr />
<div>{{stub}}<br />
== Status for Samsung Chromebook Plus v1 aka kevin aka gru-kevin aka xe513c24 ==<br />
=== Kernel ===<br />
{{pkg|linux-libre-64}} (armv7h) works but needs to be packed correctly to boot, the following is a rough guide on how i was able to boot this kernel on this hardware<br />
<br />
=== what does not work ===<br />
- onboard wifi<br />
- probably more stuff<br />
<br />
=== What you will need ===<br />
- this laptop :P<br />
- micro sd card at least 2GB, 8+GB reccomended<br />
- another computer that has a linux environment so we can download / extract / pack the kernel and install rootfs<br />
<br />
== Unlock external booting ==<br />
=== Switch to developer mode ===<br />
<br />
# Turn off the laptop.<br />
# To invoke Recovery mode, you hold down the ESC and Refresh keys and poke the Power button.<br />
# At the Recovery screen press Ctrl-D (there’s no prompt - you have to know to do it).<br />
# Confirm switching to developer mode by pressing enter, and the laptop will reboot and reset the system. This takes about 10-15 minutes.<br />
<br />
Note: After enabling developer mode, you will need to press Ctrl-D each time you boot, or wait 30 seconds to continue booting.<br />
=== Enable booting from external storage ===<br />
<br />
# After booting into developer mode, hold Ctrl and Alt and poke the F2 key. This will open up the developer console.<br />
# Type root to the login screen.<br />
# Then type this to enable USB booting:<br />
<br />
<code>$ enable_dev_usb_boot</code><br />
<br />
Reboot the system to allow the change to take effect.<br />
<br />
Source: https://chromebooks.readthedocs.io/en/latest/source/README.html#switch-to-developer-mode<br />
<br />
== Install packages ==<br />
<code>pacman -S {{pkg|vboot-utils}} {{pkg|uboot-tools}} {{pkg|gptfdisk}} {{pkg|dtc}}</code><br />
<br />
== Gather files ==<br />
<br />
<pre><br />
$ mkdir parabola-armv7-64<br />
$ cd parabola-armv7-64<br />
<br />
$ wget -c https://redirector.parabola.nu/iso/armv7h-systemd-cli-2020.02/parabola-armv7h-systemd-cli-2020.02-tarball.tar.gz<br />
$ wget -c https://redirector.parabola.nu/iso/armv7h-systemd-cli-2020.02/parabola-armv7h-systemd-cli-2020.02-tarball.tar.gz.sig<br />
$ wget -c https://repomirror.parabola.nu/pool/parabola/linux-libre-64-5.11.11-3-armv7h.pkg.tar.xz<br />
$ wget -c https://repomirror.parabola.nu/pool/parabola/linux-libre-64-5.11.11-3-armv7h.pkg.tar.xz.sig<br />
$ wget -c https://git.parabola.nu/abslibre.git/plain/libre/linux-libre/kernel.keyblock<br />
$ wget -c https://git.parabola.nu/abslibre.git/plain/libre/linux-libre/kernel_data_key.vbprivk<br />
<br />
<br />
$ gpg --recv-keys FBCC5AD7421197B7ABA72853908710913E8C7778<br />
$ gpg --verify parabola-armv7h-systemd-cli-2020.02-tarball.tar.gz.sig<br />
$ gpg --recv-keys 782F9DDBE36BA7F3D4DE49065F5DFCC14177E263<br />
$ gpg --verify linux-libre-64-5.11.11-3-armv7h.pkg.tar.xz.sig<br />
</pre><br />
<br />
save the following code as <code>partition_vboot.sh</code><br />
<br />
<pre><br />
#!/bin/bash <br />
<br />
DISK="$1" <br />
<br />
# Make sure only root can run our script<br />
if [ "$(id -u)" != "0" ]; then<br />
echo "This script must be run as root" 1>&2<br />
exit 1 <br />
fi <br />
<br />
if [ x"$DISK" == 'x' ]; then<br />
echo "This script requires a base block device as its only arguement" 1>&2<br />
echo "example: $0 /dev/sdb"<br />
exit 1 <br />
fi <br />
<br />
DISK_DEVICE_NAME="$(echo $DISK | awk -F'/' '{print $NF}')"<br />
ROOT_PARTITION="$DISK"2<br />
SWAP_PARTITION="$DISK"3<br />
# TODO allow specify TOTAL_SECTORS<br />
TOTAL_SECTORS=$(cat /sys/block/$DISK_DEVICE_NAME/size)<br />
SECTOR_SIZE=$(cat /sys/block/$DISK_DEVICE_NAME/queue/hw_sector_size)<br />
<br />
# the following are in sectors, 1MB = 2048 sectors<br />
FIRST_GAP_SIZE=8192 # 2048 sectors * 4MB<br />
LAST_GAP_SIZE=2048 # 2048 sectors * 1MB<br />
SWAP_PART_SIZE=8388608 # 2048 sectors * 4096MB<br />
KERNEL_PART_SIZE=65536 # 2048 sectors * 32MB<br />
<br />
# layout arithmatic <br />
FIRST_GAP_START=0 <br />
FIRST_GAP_END=$(( $FIRST_GAP_SIZE - 1 ))<br />
KERNEL_PART_START=$(( $FIRST_GAP_END + 1 ))<br />
KERNEL_PART_END=$(( $FIRST_GAP_END + $KERNEL_PART_SIZE ))<br />
ROOTFS_PART_START=$(( $KERNEL_PART_END + 1 ))<br />
<br />
LAST_GAP_END=$(( $TOTAL_SECTORS - 1 ))<br />
LAST_GAP_START=$(( $LAST_GAP_END - $LAST_GAP_SIZE + 1 ))<br />
if [ $TOTAL_SECTORS -lt 10000000 ]; then # if size of disk is less than 5GB do not make swap<br />
MAKESWAP='false' <br />
ROOTFS_PART_END=$(( $LAST_GAP_START - 1 ))<br />
SWAP_PART_END=0<br />
SWAP_PART_START=0<br />
else<br />
MAKESWAP='true' <br />
SWAP_PART_END=$(( $LAST_GAP_START - 1 ))<br />
SWAP_PART_START=$(( $SWAP_PART_END - $SWAP_PART_SIZE + 1 ))<br />
ROOTFS_PART_END=$(( $SWAP_PART_START - 1 ))<br />
fi<br />
<br />
echo "TOTAL_SECTORS = $TOTAL_SECTORS"<br />
echo "SECTOR_SIZE = $SECTOR_SIZE"<br />
echo ""<br />
echo "FIRST_GAP_SIZE = $FIRST_GAP_SIZE"<br />
echo "LAST_GAP_SIZE = $LAST_GAP_SIZE"<br />
echo "SWAP_PART_SIZE = $SWAP_PART_SIZE"<br />
echo "KERNEL_PART_SIZE = $KERNEL_PART_SIZE"<br />
echo ""<br />
echo "FIRST_GAP_START = $FIRST_GAP_START $(( $FIRST_GAP_START / 2048 )) MB"<br />
echo "FIRST_GAP_END = $FIRST_GAP_END"<br />
echo "KERNEL_PART_START = $KERNEL_PART_START $(( $KERNEL_PART_START / 2048 )) MB"<br />
echo "KERNEL_PART_END = $KERNEL_PART_END"<br />
echo "ROOTFS_PART_START = $ROOTFS_PART_START $(( $ROOTFS_PART_START / 2048 )) MB"<br />
echo "ROOTFS_PART_END = $ROOTFS_PART_END"<br />
echo "SWAP_PART_START = $SWAP_PART_START $(( $SWAP_PART_START / 2048 )) MB"<br />
echo "SWAP_PART_END = $SWAP_PART_END"<br />
echo "LAST_GAP_START = $LAST_GAP_START $(( $LAST_GAP_START / 2048 )) MB"<br />
echo "LAST_GAP_END = $LAST_GAP_END"<br />
<br />
# use `sgdisk --list-types' to get all possible type codes<br />
KERNEL_PART_TYPE='7f00'<br />
ROOTFS_PART_TYPE='7f01'<br />
SWAP_PART_TYPE='8200'<br />
<br />
# wipe disk, and create new gpt partition table<br />
sgdisk --zap-all $DISK<br />
sgdisk -o $DISK<br />
<br />
# create the kernel partition<br />
sgdisk --new=1:$KERNEL_PART_START:$KERNEL_PART_END $DISK<br />
sgdisk --typecode=1:$KERNEL_PART_TYPE $DISK<br />
sgdisk --change-name=1:Kernel $DISK<br />
sgdisk --attributes=1:=:015A000000000000 $DISK<br />
<br />
# create the rootfs partition <br />
sgdisk --new=2:$ROOTFS_PART_START:$ROOTFS_PART_END $DISK<br />
sgdisk --typecode=2:$ROOTFS_PART_TYPE $DISK<br />
sgdisk --change-name=2:Root $DISK<br />
mkfs.ext4 $ROOT_PARTITION<br />
<br />
# create the swap partition<br />
if [ $MAKESWAP = 'true' ]; then<br />
sgdisk --new=3:$SWAP_PART_START:$SWAP_PART_END $DISK<br />
sgdisk --typecode=3:$SWAP_PART_TYPE $DISK<br />
sgdisk --change-name=3:Swap $DISK<br />
mkswap $SWAP_PARTITION<br />
fi<br />
<br />
sgdisk --print $DISK<br />
lsblk $DISK<br />
</pre><br />
<br />
== partition micro sd card & mount the rootfs partition ==<br />
<br />
<code>partition_vboot.sh</code> is a replacement for cgpt i made that uses sgdisk to create a compatible partition layout for depthcharge chromebooks (asus c201 & samsung chromebook plus v1). I have tested it with cards as small as 2GB, it will automatically make a 4GB swap partition if the size of the disk is detected to be above 4GB, the rest of the disk will be used for the rootfs partition<br />
<br />
<pre># sh partition_vboot.sh /dev/sdX</pre><br />
<br />
if you dont want to run this script you can follow the partitioning instructions on the archlinuxarm wiki page for this device<br />
https://archlinuxarm.org/platforms/armv8/rockchip/samsung-chromebook-plus<br />
<br />
<br />
after the rootfs partition is created and formated, mount it<br />
<pre><br />
# mkdir $MOUNTPOINT<br />
# mount /dev/sdX2 $MOUNTPOINT<br />
</pre><br />
<br />
== extract / copy files ==<br />
<pre><br />
# bsdtar -xf parabola-armv7h-systemd-cli-2020.02-tarball.tar.gz -C $MOUNTPOINT<br />
# bsdtar -xf linux-libre-64-5.11.11-3-armv7h.pkg.tar.xz -C $MOUNTPOINT<br />
# cp linux-libre-64-5.11.11-3-armv7h.pkg.tar.xz $MOUNTPOINT/var/cache/pacman/pkg/<br />
<br />
# echo > $MOUNTPOINT/etc/fstab<br />
<br />
# mkdir $MOUNTPOINT/boot/pack<br />
# cp kernel.keyblock $MOUNTPOINT/boot/pack<br />
# cp kernel_data_key.vbprivk $MOUNTPOINT/boot/pack<br />
# cp $MOUNTPOINT/usr/lib/modules/5.11.11-gnu-3-64-ARCH/vmlinuz $MOUNTPOINT/boot/pack<br />
# cp $MOUNTPOINT/boot/dtbs/linux-libre-64/rockchip/rk3399-gru-kevin.dtb $MOUNTPOINT/boot/pack<br />
<br />
# cd $MOUNTPOINT/boot/pack<br />
<br />
# lz4 -k vmlinuz<br />
# echo "console=tty0 console=ttyS2,115200n8 earlyprintk=ttyS2,115200n8 init=/sbin/init root=PARTUUID=%U/PARTNROFF=1 rootwait rw noinitrd" > cmdline<br />
# dd if=/dev/zero of=bootloader.bin bs=512 count=1<br />
</pre><br />
<br />
paste the following code into <code>kernel.its</code><br />
<br />
<pre><br />
/dts-v1/;<br />
<br />
/ {<br />
description = "Chrome OS kernel image with one or more FDT blobs";<br />
images {<br />
kernel@1{<br />
description = "kernel";<br />
data = /incbin/("vmlinuz.lz4");<br />
type = "kernel_noload";<br />
arch = "arm64";<br />
os = "linux";<br />
compression = "lz4";<br />
load = <0>;<br />
entry = <0>;<br />
};<br />
fdt@1{<br />
description = "rk3399-gru-kevin.dtb";<br />
data = /incbin/("rk3399-gru-kevin.dtb");<br />
type = "flat_dt";<br />
arch = "arm64";<br />
compression = "none";<br />
hash@1{<br />
algo = "sha1";<br />
};<br />
};<br />
};<br />
configurations {<br />
default = "conf@1";<br />
conf@1{<br />
kernel = "kernel@1";<br />
fdt = "fdt@1";<br />
};<br />
};<br />
};<br />
</pre><br />
<br />
<pre># mkimage -f kernel.its kernel.itb</pre><br />
<br />
if you see the following error message, just ignore, it will still work<br />
<pre><br />
kernel.its:6.17-15.11: Warning (unit_address_vs_reg): /images/kernel@1: node has a unit name, but no reg or ranges property<br />
kernel.its:16.14-25.11: Warning (unit_address_vs_reg): /images/fdt@1: node has a unit name, but no reg or ranges property<br />
kernel.its:22.19-24.15: Warning (unit_address_vs_reg): /images/fdt@1/hash@1: node has a unit name, but no reg or ranges property<br />
kernel.its:29.15-32.11: Warning (unit_address_vs_reg): /configurations/conf@1: node has a unit name, but no reg or ranges property<br />
mkimage: verify_header failed for FIT Image support with exit code 1<br />
</pre><br />
<br />
and paste the following code into <code>pack_vboot.sh</code><br />
<br />
<pre><br />
futility --debug vbutil_kernel \<br />
--pack vmlinux.kpart \<br />
--version 1 \<br />
--vmlinuz kernel.itb \<br />
--arch aarch64 \<br />
--keyblock kernel.keyblock \<br />
--signprivate kernel_data_key.vbprivk \<br />
--config cmdline \<br />
--bootloader bootloader.bin<br />
</pre><br />
Now run the following commands:<br />
<pre><br />
# sh pack_vboot.sh<br />
# dd if=vmlinux.kpart of=/dev/sdX1<br />
# cd<br />
# umount $MOUNTPOINT<br />
</pre><br />
<br />
== Boot! ==<br />
<br />
<br />
it should boot up. login as root<br />
<br />
in order to update the system you will need some way to connect to the internet, i am using a usb-c ethernet adapter<br />
https://www.amazon.com/Nekteck-Ethernet-Compatible-Pixelbook-Thunderbolt/dp/B0749DCDRV/<br />
<br />
plug in the usb ethernet and dhcp should assign an ip<br />
<br />
then sync the time<br />
<pre><br />
# systemctl restart systemd-timesyncd.service<br />
# pacman -Sy<br />
# pacman -S archlinux-keyring archlinux32-keyring archlinuxarm-keyring parabola-keyring<br />
</pre><br />
it will fail because of keyring, but you downloaded it!<br />
<pre><br />
# pacman -U /var/cache/pacman/pkg/*-keyring-*<br />
# pacman -S archlinux-keyring archlinux32-keyring archlinuxarm-keyring parabola-keyring<br />
# pacman -S archlinux-keyring archlinux32-keyring archlinuxarm-keyring parabola-keyring<br />
</pre><br />
<br />
TODO: get <code>pacman-key --refresh</code> to work<br />
<br />
as an alternative temporary way around, we will just disable signature checking for this test environment.<br />
<br />
<pre><br />
sed -i '/^SigLevel.*/SigLevel = Never/' /etc/pacman.conf<br />
</pre><br />
<br />
<pre><br />
# pacman -S linux-libre-64 --overwrite '/*'<br />
# pacman -Su linux-libre-firmware acpi vim nano networkmanager<br />
</pre><br />
<br />
== Bonus extra info ==<br />
<br />
=== make your own debug port breakout ===<br />
I dont know where to get a servo board but the you can make your own debug header breakout to get serial console access / early boot logs etc<br />
<br />
the breakout https://www.amazon.com/Proto-Advantage-DR040D254P050-50-Pin-Connector-Adapter/dp/B097S2268V or https://www.ebay.com/itm/202502988342<br />
<br />
the connector https://www.digikey.com/en/products/detail/panasonic-electric-works/AXK850145WG/1986616<br />
<br />
usb <--> rs232 https://www.amazon.com/HiLetgo-CP2102-Converter-Adapter-Downloader/dp/B00LODGRV8 (get 2)<br />
<br />
servo connector pinout is described in this pdf (page 14) (V2 DEBUG HEADER)<br />
<br />
https://www.chromium.org/chromium-os/servo/810-10010-03_20120227_servo_SCH_0.pdf<br />
<br />
you can use a continuity meter to determine connector orientation but finding the corner pin that is ground<br />
<br />
<pre><br />
<br />
<br />
PIN-33 UART1_DUT_SERVO_TX --+ +-- PIN-17 UART2_DUT_SERVO_TX<br />
| |<br />
| |<br />
| |<br />
49 vG vG G 1<br />
|||||||||||||||||||||||||<br />
9753197531975319753197531<br />
1234567890123210987654321<br />
0864208642086420864208642<br />
|||||||||||||||||||||||||<br />
50 G G ^ G ^ G 2<br />
| |<br />
| |<br />
| |<br />
PIN-32 UART1_SERVO_DUT_TX --+ +-- PIN-16 UART2_SERVO_DUT_TX<br />
<br />
<br />
GND PINS = 1, 8, 15, 20, 31, 36, 42<br />
</pre><br />
<br />
=== set bios boot timeout to 2 seconds ===<br />
<br />
https://old.reddit.com/r/Crouton/comments/2szn59/how_to_shorten_os_verfication_warning_screen_on/<br />
<br />
=== blobless coreboot / etc ===<br />
https://gitlab.com/vicencb/kevinboot/</div>Maihttps://wiki.parabola.nu/index.php?title=User:Mai&diff=23587User:Mai2021-11-12T21:49:31Z<p>Mai: /* make your own debug port breakout */</p>
<hr />
<div>{{stub}}<br />
== Status for Samsung Chromebook Plus v1 aka kevin aka gru-kevin aka xe513c24 ==<br />
=== Kernel ===<br />
{{pkg|linux-libre-64}} (armv7h) works but needs to be packed correctly to boot, the following is a rough guide on how i was able to boot this kernel on this hardware<br />
<br />
=== what does not work ===<br />
- onboard wifi<br />
- probably more stuff<br />
<br />
=== What you will need ===<br />
- this laptop :P<br />
- micro sd card at least 2GB, 8+GB reccomended<br />
- another computer that has a linux environment so we can download / extract / pack the kernel and install rootfs<br />
<br />
== Unlock external booting ==<br />
=== Switch to developer mode ===<br />
<br />
# Turn off the laptop.<br />
# To invoke Recovery mode, you hold down the ESC and Refresh keys and poke the Power button.<br />
# At the Recovery screen press Ctrl-D (there’s no prompt - you have to know to do it).<br />
# Confirm switching to developer mode by pressing enter, and the laptop will reboot and reset the system. This takes about 10-15 minutes.<br />
<br />
Note: After enabling developer mode, you will need to press Ctrl-D each time you boot, or wait 30 seconds to continue booting.<br />
=== Enable booting from external storage ===<br />
<br />
# After booting into developer mode, hold Ctrl and Alt and poke the F2 key. This will open up the developer console.<br />
# Type root to the login screen.<br />
# Then type this to enable USB booting:<br />
<br />
<code>$ enable_dev_usb_boot</code><br />
<br />
Reboot the system to allow the change to take effect.<br />
<br />
Source: https://chromebooks.readthedocs.io/en/latest/source/README.html#switch-to-developer-mode<br />
<br />
== Install packages ==<br />
<code>pacman -S {{pkg|vboot-utils}} {{pkg|uboot-tools}} {{pkg|gptfdisk}}</code><br />
<br />
== Gather files ==<br />
<br />
<pre><br />
$ mkdir parabola-armv7-64<br />
$ cd parabola-armv7-64<br />
<br />
$ wget -c https://redirector.parabola.nu/iso/armv7h-systemd-cli-2020.02/parabola-armv7h-systemd-cli-2020.02-tarball.tar.gz<br />
$ wget -c https://redirector.parabola.nu/iso/armv7h-systemd-cli-2020.02/parabola-armv7h-systemd-cli-2020.02-tarball.tar.gz.sig<br />
$ wget -c https://repomirror.parabola.nu/pool/parabola/linux-libre-64-5.11.11-3-armv7h.pkg.tar.xz<br />
$ wget -c https://repomirror.parabola.nu/pool/parabola/linux-libre-64-5.11.11-3-armv7h.pkg.tar.xz.sig<br />
$ wget -c https://git.parabola.nu/abslibre.git/plain/libre/linux-libre/kernel.keyblock<br />
$ wget -c https://git.parabola.nu/abslibre.git/plain/libre/linux-libre/kernel_data_key.vbprivk<br />
<br />
<br />
$ gpg --recv-keys FBCC5AD7421197B7ABA72853908710913E8C7778<br />
$ gpg --verify parabola-armv7h-systemd-cli-2020.02-tarball.tar.gz.sig<br />
$ gpg --recv-keys 782F9DDBE36BA7F3D4DE49065F5DFCC14177E263<br />
$ gpg --verify linux-libre-64-5.11.11-3-armv7h.pkg.tar.xz.sig<br />
</pre><br />
<br />
save the following code as <code>partition_vboot.sh</code><br />
<br />
<pre><br />
#!/bin/bash <br />
<br />
DISK="$1" <br />
<br />
# Make sure only root can run our script<br />
if [ "$(id -u)" != "0" ]; then<br />
echo "This script must be run as root" 1>&2<br />
exit 1 <br />
fi <br />
<br />
if [ x"$DISK" == 'x' ]; then<br />
echo "This script requires a base block device as its only arguement" 1>&2<br />
echo "example: $0 /dev/sdb"<br />
exit 1 <br />
fi <br />
<br />
DISK_DEVICE_NAME="$(echo $DISK | awk -F'/' '{print $NF}')"<br />
ROOT_PARTITION="$DISK"2<br />
SWAP_PARTITION="$DISK"3<br />
# TODO allow specify TOTAL_SECTORS<br />
TOTAL_SECTORS=$(cat /sys/block/$DISK_DEVICE_NAME/size)<br />
SECTOR_SIZE=$(cat /sys/block/$DISK_DEVICE_NAME/queue/hw_sector_size)<br />
<br />
# the following are in sectors, 1MB = 2048 sectors<br />
FIRST_GAP_SIZE=8192 # 2048 sectors * 4MB<br />
LAST_GAP_SIZE=2048 # 2048 sectors * 1MB<br />
SWAP_PART_SIZE=8388608 # 2048 sectors * 4096MB<br />
KERNEL_PART_SIZE=65536 # 2048 sectors * 32MB<br />
<br />
# layout arithmatic <br />
FIRST_GAP_START=0 <br />
FIRST_GAP_END=$(( $FIRST_GAP_SIZE - 1 ))<br />
KERNEL_PART_START=$(( $FIRST_GAP_END + 1 ))<br />
KERNEL_PART_END=$(( $FIRST_GAP_END + $KERNEL_PART_SIZE ))<br />
ROOTFS_PART_START=$(( $KERNEL_PART_END + 1 ))<br />
<br />
LAST_GAP_END=$(( $TOTAL_SECTORS - 1 ))<br />
LAST_GAP_START=$(( $LAST_GAP_END - $LAST_GAP_SIZE + 1 ))<br />
if [ $TOTAL_SECTORS -lt 10000000 ]; then # if size of disk is less than 5GB do not make swap<br />
MAKESWAP='false' <br />
ROOTFS_PART_END=$(( $LAST_GAP_START - 1 ))<br />
SWAP_PART_END=0<br />
SWAP_PART_START=0<br />
else<br />
MAKESWAP='true' <br />
SWAP_PART_END=$(( $LAST_GAP_START - 1 ))<br />
SWAP_PART_START=$(( $SWAP_PART_END - $SWAP_PART_SIZE + 1 ))<br />
ROOTFS_PART_END=$(( $SWAP_PART_START - 1 ))<br />
fi<br />
<br />
echo "TOTAL_SECTORS = $TOTAL_SECTORS"<br />
echo "SECTOR_SIZE = $SECTOR_SIZE"<br />
echo ""<br />
echo "FIRST_GAP_SIZE = $FIRST_GAP_SIZE"<br />
echo "LAST_GAP_SIZE = $LAST_GAP_SIZE"<br />
echo "SWAP_PART_SIZE = $SWAP_PART_SIZE"<br />
echo "KERNEL_PART_SIZE = $KERNEL_PART_SIZE"<br />
echo ""<br />
echo "FIRST_GAP_START = $FIRST_GAP_START $(( $FIRST_GAP_START / 2048 )) MB"<br />
echo "FIRST_GAP_END = $FIRST_GAP_END"<br />
echo "KERNEL_PART_START = $KERNEL_PART_START $(( $KERNEL_PART_START / 2048 )) MB"<br />
echo "KERNEL_PART_END = $KERNEL_PART_END"<br />
echo "ROOTFS_PART_START = $ROOTFS_PART_START $(( $ROOTFS_PART_START / 2048 )) MB"<br />
echo "ROOTFS_PART_END = $ROOTFS_PART_END"<br />
echo "SWAP_PART_START = $SWAP_PART_START $(( $SWAP_PART_START / 2048 )) MB"<br />
echo "SWAP_PART_END = $SWAP_PART_END"<br />
echo "LAST_GAP_START = $LAST_GAP_START $(( $LAST_GAP_START / 2048 )) MB"<br />
echo "LAST_GAP_END = $LAST_GAP_END"<br />
<br />
# use `sgdisk --list-types' to get all possible type codes<br />
KERNEL_PART_TYPE='7f00'<br />
ROOTFS_PART_TYPE='7f01'<br />
SWAP_PART_TYPE='8200'<br />
<br />
# wipe disk, and create new gpt partition table<br />
sgdisk --zap-all $DISK<br />
sgdisk -o $DISK<br />
<br />
# create the kernel partition<br />
sgdisk --new=1:$KERNEL_PART_START:$KERNEL_PART_END $DISK<br />
sgdisk --typecode=1:$KERNEL_PART_TYPE $DISK<br />
sgdisk --change-name=1:Kernel $DISK<br />
sgdisk --attributes=1:=:015A000000000000 $DISK<br />
<br />
# create the rootfs partition <br />
sgdisk --new=2:$ROOTFS_PART_START:$ROOTFS_PART_END $DISK<br />
sgdisk --typecode=2:$ROOTFS_PART_TYPE $DISK<br />
sgdisk --change-name=2:Root $DISK<br />
mkfs.ext4 $ROOT_PARTITION<br />
<br />
# create the swap partition<br />
if [ $MAKESWAP = 'true' ]; then<br />
sgdisk --new=3:$SWAP_PART_START:$SWAP_PART_END $DISK<br />
sgdisk --typecode=3:$SWAP_PART_TYPE $DISK<br />
sgdisk --change-name=3:Swap $DISK<br />
mkswap $SWAP_PARTITION<br />
fi<br />
<br />
sgdisk --print $DISK<br />
lsblk $DISK<br />
</pre><br />
<br />
== partition micro sd card & mount the rootfs partition ==<br />
<br />
<code>partition_vboot.sh</code> is a replacement for cgpt i made that uses sgdisk to create a compatible partition layout for depthcharge chromebooks (asus c201 & samsung chromebook plus v1). I have tested it with cards as small as 2GB, it will automatically make a 4GB swap partition if the size of the disk is detected to be above 4GB, the rest of the disk will be used for the rootfs partition<br />
<br />
<pre># sh partition_vboot.sh /dev/sdX</pre><br />
<br />
if you dont want to run this script you can follow the partitioning instructions on the archlinuxarm wiki page for this device<br />
https://archlinuxarm.org/platforms/armv8/rockchip/samsung-chromebook-plus<br />
<br />
<br />
after the rootfs partition is created and formated, mount it<br />
<pre><br />
# mkdir $MOUNTPOINT<br />
# mount /dev/sdX2 $MOUNTPOINT<br />
</pre><br />
<br />
== extract / copy files ==<br />
<pre><br />
# bsdtar -xf parabola-armv7h-systemd-cli-2020.02-tarball.tar.gz -C $MOUNTPOINT<br />
# bsdtar -xf linux-libre-64-5.11.11-3-armv7h.pkg.tar.xz -C $MOUNTPOINT<br />
# cp linux-libre-64-5.11.11-3-armv7h.pkg.tar.xz $MOUNTPOINT/var/cache/pacman/pkg/<br />
<br />
# echo > $MOUNTPOINT/etc/fstab<br />
<br />
# mkdir $MOUNTPOINT/boot/pack<br />
# cp kernel.keyblock $MOUNTPOINT/boot/pack<br />
# cp kernel_data_key.vbprivk $MOUNTPOINT/boot/pack<br />
# cp $MOUNTPOINT/usr/lib/modules/5.11.11-gnu-3-64-ARCH/vmlinuz $MOUNTPOINT/boot/pack<br />
# cp $MOUNTPOINT/boot/dtbs/linux-libre-64/rockchip/rk3399-gru-kevin.dtb $MOUNTPOINT/boot/pack<br />
<br />
# cd $MOUNTPOINT/boot/pack<br />
<br />
# lz4 -k vmlinuz<br />
# echo "console=tty0 console=ttyS2,115200n8 earlyprintk=ttyS2,115200n8 init=/sbin/init root=PARTUUID=%U/PARTNROFF=1 rootwait rw noinitrd" > cmdline<br />
# dd if=/dev/zero of=bootloader.bin bs=512 count=1<br />
</pre><br />
<br />
paste the following code into <code>kernel.its</code><br />
<br />
<pre><br />
/dts-v1/;<br />
<br />
/ {<br />
description = "Chrome OS kernel image with one or more FDT blobs";<br />
images {<br />
kernel@1{<br />
description = "kernel";<br />
data = /incbin/("vmlinuz.lz4");<br />
type = "kernel_noload";<br />
arch = "arm64";<br />
os = "linux";<br />
compression = "lz4";<br />
load = <0>;<br />
entry = <0>;<br />
};<br />
fdt@1{<br />
description = "rk3399-gru-kevin.dtb";<br />
data = /incbin/("rk3399-gru-kevin.dtb");<br />
type = "flat_dt";<br />
arch = "arm64";<br />
compression = "none";<br />
hash@1{<br />
algo = "sha1";<br />
};<br />
};<br />
};<br />
configurations {<br />
default = "conf@1";<br />
conf@1{<br />
kernel = "kernel@1";<br />
fdt = "fdt@1";<br />
};<br />
};<br />
};<br />
</pre><br />
<br />
<pre># mkimage -f kernel.its kernel.itb</pre><br />
<br />
if you see the following error message, just ignore, it will still work<br />
<pre><br />
kernel.its:6.17-15.11: Warning (unit_address_vs_reg): /images/kernel@1: node has a unit name, but no reg or ranges property<br />
kernel.its:16.14-25.11: Warning (unit_address_vs_reg): /images/fdt@1: node has a unit name, but no reg or ranges property<br />
kernel.its:22.19-24.15: Warning (unit_address_vs_reg): /images/fdt@1/hash@1: node has a unit name, but no reg or ranges property<br />
kernel.its:29.15-32.11: Warning (unit_address_vs_reg): /configurations/conf@1: node has a unit name, but no reg or ranges property<br />
mkimage: verify_header failed for FIT Image support with exit code 1<br />
</pre><br />
<br />
and paste the following code into <code>pack_vboot.sh</code><br />
<br />
<pre><br />
futility --debug vbutil_kernel \<br />
--pack vmlinux.kpart \<br />
--version 1 \<br />
--vmlinuz kernel.itb \<br />
--arch aarch64 \<br />
--keyblock kernel.keyblock \<br />
--signprivate kernel_data_key.vbprivk \<br />
--config cmdline \<br />
--bootloader bootloader.bin<br />
</pre><br />
Now run the following commands:<br />
<pre><br />
# sh pack_vboot.sh<br />
# dd if=vmlinux.kpart of=/dev/sdX1<br />
# cd<br />
# umount $MOUNTPOINT<br />
</pre><br />
<br />
== Boot! ==<br />
<br />
<br />
it should boot up. login as root<br />
<br />
in order to update the system you will need some way to connect to the internet, i am using a usb-c ethernet adapter<br />
https://www.amazon.com/Nekteck-Ethernet-Compatible-Pixelbook-Thunderbolt/dp/B0749DCDRV/<br />
<br />
plug in the usb ethernet and dhcp should assign an ip<br />
<br />
then sync the time<br />
<pre><br />
# systemctl restart systemd-timesyncd.service<br />
# pacman -Sy<br />
# pacman -S archlinux-keyring archlinux32-keyring archlinuxarm-keyring parabola-keyring<br />
</pre><br />
it will fail because of keyring, but you downloaded it!<br />
<pre><br />
# pacman -U /var/cache/pacman/pkg/*-keyring-*<br />
# pacman -S archlinux-keyring archlinux32-keyring archlinuxarm-keyring parabola-keyring<br />
# pacman -S archlinux-keyring archlinux32-keyring archlinuxarm-keyring parabola-keyring<br />
</pre><br />
<br />
TODO: get <code>pacman-key --refresh</code> to work<br />
<br />
as an alternative temporary way around, we will just disable signature checking for this test environment.<br />
<br />
<pre><br />
sed -i '/^SigLevel.*/SigLevel = Never/' /etc/pacman.conf<br />
</pre><br />
<br />
<pre><br />
# pacman -S linux-libre-64 --overwrite '/*'<br />
# pacman -Su linux-libre-firmware acpi vim nano networkmanager<br />
</pre><br />
<br />
== Bonus extra info ==<br />
<br />
=== make your own debug port breakout ===<br />
I dont know where to get a servo board but the you can make your own debug header breakout to get serial console access / early boot logs etc<br />
<br />
the breakout https://www.amazon.com/Proto-Advantage-DR040D254P050-50-Pin-Connector-Adapter/dp/B097S2268V or https://www.ebay.com/itm/202502988342<br />
<br />
the connector https://www.digikey.com/en/products/detail/panasonic-electric-works/AXK850145WG/1986616<br />
<br />
usb <--> rs232 https://www.amazon.com/HiLetgo-CP2102-Converter-Adapter-Downloader/dp/B00LODGRV8 (get 2)<br />
<br />
servo connector pinout is described in this pdf (page 14) (V2 DEBUG HEADER)<br />
<br />
https://www.chromium.org/chromium-os/servo/810-10010-03_20120227_servo_SCH_0.pdf<br />
<br />
you can use a continuity meter to determine connector orientation but finding the corner pin that is ground<br />
<br />
<pre><br />
<br />
<br />
PIN-33 UART1_DUT_SERVO_TX --+ +-- PIN-17 UART2_DUT_SERVO_TX<br />
| |<br />
| |<br />
| |<br />
49 vG vG G 1<br />
|||||||||||||||||||||||||<br />
9753197531975319753197531<br />
1234567890123210987654321<br />
0864208642086420864208642<br />
|||||||||||||||||||||||||<br />
50 G G ^ G ^ G 2<br />
| |<br />
| |<br />
| |<br />
PIN-32 UART1_SERVO_DUT_TX --+ +-- PIN-16 UART2_SERVO_DUT_TX<br />
<br />
<br />
GND PINS = 1, 8, 15, 20, 31, 36, 42<br />
</pre><br />
<br />
=== set bios boot timeout to 2 seconds ===<br />
<br />
https://old.reddit.com/r/Crouton/comments/2szn59/how_to_shorten_os_verfication_warning_screen_on/<br />
<br />
=== blobless coreboot / etc ===<br />
https://gitlab.com/vicencb/kevinboot/</div>Maihttps://wiki.parabola.nu/index.php?title=User:Mai&diff=23586User:Mai2021-11-12T01:36:36Z<p>Mai: /* Boot! */</p>
<hr />
<div>{{stub}}<br />
== Status for Samsung Chromebook Plus v1 aka kevin aka gru-kevin aka xe513c24 ==<br />
=== Kernel ===<br />
{{pkg|linux-libre-64}} (armv7h) works but needs to be packed correctly to boot, the following is a rough guide on how i was able to boot this kernel on this hardware<br />
<br />
=== what does not work ===<br />
- onboard wifi<br />
- probably more stuff<br />
<br />
=== What you will need ===<br />
- this laptop :P<br />
- micro sd card at least 2GB, 8+GB reccomended<br />
- another computer that has a linux environment so we can download / extract / pack the kernel and install rootfs<br />
<br />
== Unlock external booting ==<br />
=== Switch to developer mode ===<br />
<br />
# Turn off the laptop.<br />
# To invoke Recovery mode, you hold down the ESC and Refresh keys and poke the Power button.<br />
# At the Recovery screen press Ctrl-D (there’s no prompt - you have to know to do it).<br />
# Confirm switching to developer mode by pressing enter, and the laptop will reboot and reset the system. This takes about 10-15 minutes.<br />
<br />
Note: After enabling developer mode, you will need to press Ctrl-D each time you boot, or wait 30 seconds to continue booting.<br />
=== Enable booting from external storage ===<br />
<br />
# After booting into developer mode, hold Ctrl and Alt and poke the F2 key. This will open up the developer console.<br />
# Type root to the login screen.<br />
# Then type this to enable USB booting:<br />
<br />
<code>$ enable_dev_usb_boot</code><br />
<br />
Reboot the system to allow the change to take effect.<br />
<br />
Source: https://chromebooks.readthedocs.io/en/latest/source/README.html#switch-to-developer-mode<br />
<br />
== Install packages ==<br />
<code>pacman -S {{pkg|vboot-utils}} {{pkg|uboot-tools}} {{pkg|gptfdisk}}</code><br />
<br />
== Gather files ==<br />
<br />
<pre><br />
$ mkdir parabola-armv7-64<br />
$ cd parabola-armv7-64<br />
<br />
$ wget -c https://redirector.parabola.nu/iso/armv7h-systemd-cli-2020.02/parabola-armv7h-systemd-cli-2020.02-tarball.tar.gz<br />
$ wget -c https://redirector.parabola.nu/iso/armv7h-systemd-cli-2020.02/parabola-armv7h-systemd-cli-2020.02-tarball.tar.gz.sig<br />
$ wget -c https://repomirror.parabola.nu/pool/parabola/linux-libre-64-5.11.11-3-armv7h.pkg.tar.xz<br />
$ wget -c https://repomirror.parabola.nu/pool/parabola/linux-libre-64-5.11.11-3-armv7h.pkg.tar.xz.sig<br />
$ wget -c https://git.parabola.nu/abslibre.git/plain/libre/linux-libre/kernel.keyblock<br />
$ wget -c https://git.parabola.nu/abslibre.git/plain/libre/linux-libre/kernel_data_key.vbprivk<br />
<br />
<br />
$ gpg --recv-keys FBCC5AD7421197B7ABA72853908710913E8C7778<br />
$ gpg --verify parabola-armv7h-systemd-cli-2020.02-tarball.tar.gz.sig<br />
$ gpg --recv-keys 782F9DDBE36BA7F3D4DE49065F5DFCC14177E263<br />
$ gpg --verify linux-libre-64-5.11.11-3-armv7h.pkg.tar.xz.sig<br />
</pre><br />
<br />
save the following code as <code>partition_vboot.sh</code><br />
<br />
<pre><br />
#!/bin/bash <br />
<br />
DISK="$1" <br />
<br />
# Make sure only root can run our script<br />
if [ "$(id -u)" != "0" ]; then<br />
echo "This script must be run as root" 1>&2<br />
exit 1 <br />
fi <br />
<br />
if [ x"$DISK" == 'x' ]; then<br />
echo "This script requires a base block device as its only arguement" 1>&2<br />
echo "example: $0 /dev/sdb"<br />
exit 1 <br />
fi <br />
<br />
DISK_DEVICE_NAME="$(echo $DISK | awk -F'/' '{print $NF}')"<br />
ROOT_PARTITION="$DISK"2<br />
SWAP_PARTITION="$DISK"3<br />
# TODO allow specify TOTAL_SECTORS<br />
TOTAL_SECTORS=$(cat /sys/block/$DISK_DEVICE_NAME/size)<br />
SECTOR_SIZE=$(cat /sys/block/$DISK_DEVICE_NAME/queue/hw_sector_size)<br />
<br />
# the following are in sectors, 1MB = 2048 sectors<br />
FIRST_GAP_SIZE=8192 # 2048 sectors * 4MB<br />
LAST_GAP_SIZE=2048 # 2048 sectors * 1MB<br />
SWAP_PART_SIZE=8388608 # 2048 sectors * 4096MB<br />
KERNEL_PART_SIZE=65536 # 2048 sectors * 32MB<br />
<br />
# layout arithmatic <br />
FIRST_GAP_START=0 <br />
FIRST_GAP_END=$(( $FIRST_GAP_SIZE - 1 ))<br />
KERNEL_PART_START=$(( $FIRST_GAP_END + 1 ))<br />
KERNEL_PART_END=$(( $FIRST_GAP_END + $KERNEL_PART_SIZE ))<br />
ROOTFS_PART_START=$(( $KERNEL_PART_END + 1 ))<br />
<br />
LAST_GAP_END=$(( $TOTAL_SECTORS - 1 ))<br />
LAST_GAP_START=$(( $LAST_GAP_END - $LAST_GAP_SIZE + 1 ))<br />
if [ $TOTAL_SECTORS -lt 10000000 ]; then # if size of disk is less than 5GB do not make swap<br />
MAKESWAP='false' <br />
ROOTFS_PART_END=$(( $LAST_GAP_START - 1 ))<br />
SWAP_PART_END=0<br />
SWAP_PART_START=0<br />
else<br />
MAKESWAP='true' <br />
SWAP_PART_END=$(( $LAST_GAP_START - 1 ))<br />
SWAP_PART_START=$(( $SWAP_PART_END - $SWAP_PART_SIZE + 1 ))<br />
ROOTFS_PART_END=$(( $SWAP_PART_START - 1 ))<br />
fi<br />
<br />
echo "TOTAL_SECTORS = $TOTAL_SECTORS"<br />
echo "SECTOR_SIZE = $SECTOR_SIZE"<br />
echo ""<br />
echo "FIRST_GAP_SIZE = $FIRST_GAP_SIZE"<br />
echo "LAST_GAP_SIZE = $LAST_GAP_SIZE"<br />
echo "SWAP_PART_SIZE = $SWAP_PART_SIZE"<br />
echo "KERNEL_PART_SIZE = $KERNEL_PART_SIZE"<br />
echo ""<br />
echo "FIRST_GAP_START = $FIRST_GAP_START $(( $FIRST_GAP_START / 2048 )) MB"<br />
echo "FIRST_GAP_END = $FIRST_GAP_END"<br />
echo "KERNEL_PART_START = $KERNEL_PART_START $(( $KERNEL_PART_START / 2048 )) MB"<br />
echo "KERNEL_PART_END = $KERNEL_PART_END"<br />
echo "ROOTFS_PART_START = $ROOTFS_PART_START $(( $ROOTFS_PART_START / 2048 )) MB"<br />
echo "ROOTFS_PART_END = $ROOTFS_PART_END"<br />
echo "SWAP_PART_START = $SWAP_PART_START $(( $SWAP_PART_START / 2048 )) MB"<br />
echo "SWAP_PART_END = $SWAP_PART_END"<br />
echo "LAST_GAP_START = $LAST_GAP_START $(( $LAST_GAP_START / 2048 )) MB"<br />
echo "LAST_GAP_END = $LAST_GAP_END"<br />
<br />
# use `sgdisk --list-types' to get all possible type codes<br />
KERNEL_PART_TYPE='7f00'<br />
ROOTFS_PART_TYPE='7f01'<br />
SWAP_PART_TYPE='8200'<br />
<br />
# wipe disk, and create new gpt partition table<br />
sgdisk --zap-all $DISK<br />
sgdisk -o $DISK<br />
<br />
# create the kernel partition<br />
sgdisk --new=1:$KERNEL_PART_START:$KERNEL_PART_END $DISK<br />
sgdisk --typecode=1:$KERNEL_PART_TYPE $DISK<br />
sgdisk --change-name=1:Kernel $DISK<br />
sgdisk --attributes=1:=:015A000000000000 $DISK<br />
<br />
# create the rootfs partition <br />
sgdisk --new=2:$ROOTFS_PART_START:$ROOTFS_PART_END $DISK<br />
sgdisk --typecode=2:$ROOTFS_PART_TYPE $DISK<br />
sgdisk --change-name=2:Root $DISK<br />
mkfs.ext4 $ROOT_PARTITION<br />
<br />
# create the swap partition<br />
if [ $MAKESWAP = 'true' ]; then<br />
sgdisk --new=3:$SWAP_PART_START:$SWAP_PART_END $DISK<br />
sgdisk --typecode=3:$SWAP_PART_TYPE $DISK<br />
sgdisk --change-name=3:Swap $DISK<br />
mkswap $SWAP_PARTITION<br />
fi<br />
<br />
sgdisk --print $DISK<br />
lsblk $DISK<br />
</pre><br />
<br />
== partition micro sd card & mount the rootfs partition ==<br />
<br />
<code>partition_vboot.sh</code> is a replacement for cgpt i made that uses sgdisk to create a compatible partition layout for depthcharge chromebooks (asus c201 & samsung chromebook plus v1). I have tested it with cards as small as 2GB, it will automatically make a 4GB swap partition if the size of the disk is detected to be above 4GB, the rest of the disk will be used for the rootfs partition<br />
<br />
<pre># sh partition_vboot.sh /dev/sdX</pre><br />
<br />
if you dont want to run this script you can follow the partitioning instructions on the archlinuxarm wiki page for this device<br />
https://archlinuxarm.org/platforms/armv8/rockchip/samsung-chromebook-plus<br />
<br />
<br />
after the rootfs partition is created and formated, mount it<br />
<pre><br />
# mkdir $MOUNTPOINT<br />
# mount /dev/sdX2 $MOUNTPOINT<br />
</pre><br />
<br />
== extract / copy files ==<br />
<pre><br />
# bsdtar -xf parabola-armv7h-systemd-cli-2020.02-tarball.tar.gz -C $MOUNTPOINT<br />
# bsdtar -xf linux-libre-64-5.11.11-3-armv7h.pkg.tar.xz -C $MOUNTPOINT<br />
# cp linux-libre-64-5.11.11-3-armv7h.pkg.tar.xz $MOUNTPOINT/var/cache/pacman/pkg/<br />
<br />
# echo > $MOUNTPOINT/etc/fstab<br />
<br />
# mkdir $MOUNTPOINT/boot/pack<br />
# cp kernel.keyblock $MOUNTPOINT/boot/pack<br />
# cp kernel_data_key.vbprivk $MOUNTPOINT/boot/pack<br />
# cp $MOUNTPOINT/usr/lib/modules/5.11.11-gnu-3-64-ARCH/vmlinuz $MOUNTPOINT/boot/pack<br />
# cp $MOUNTPOINT/boot/dtbs/linux-libre-64/rockchip/rk3399-gru-kevin.dtb $MOUNTPOINT/boot/pack<br />
<br />
# cd $MOUNTPOINT/boot/pack<br />
<br />
# lz4 -k vmlinuz<br />
# echo "console=tty0 console=ttyS2,115200n8 earlyprintk=ttyS2,115200n8 init=/sbin/init root=PARTUUID=%U/PARTNROFF=1 rootwait rw noinitrd" > cmdline<br />
# dd if=/dev/zero of=bootloader.bin bs=512 count=1<br />
</pre><br />
<br />
paste the following code into <code>kernel.its</code><br />
<br />
<pre><br />
/dts-v1/;<br />
<br />
/ {<br />
description = "Chrome OS kernel image with one or more FDT blobs";<br />
images {<br />
kernel@1{<br />
description = "kernel";<br />
data = /incbin/("vmlinuz.lz4");<br />
type = "kernel_noload";<br />
arch = "arm64";<br />
os = "linux";<br />
compression = "lz4";<br />
load = <0>;<br />
entry = <0>;<br />
};<br />
fdt@1{<br />
description = "rk3399-gru-kevin.dtb";<br />
data = /incbin/("rk3399-gru-kevin.dtb");<br />
type = "flat_dt";<br />
arch = "arm64";<br />
compression = "none";<br />
hash@1{<br />
algo = "sha1";<br />
};<br />
};<br />
};<br />
configurations {<br />
default = "conf@1";<br />
conf@1{<br />
kernel = "kernel@1";<br />
fdt = "fdt@1";<br />
};<br />
};<br />
};<br />
</pre><br />
<br />
<pre># mkimage -f kernel.its kernel.itb</pre><br />
<br />
if you see the following error message, just ignore, it will still work<br />
<pre><br />
kernel.its:6.17-15.11: Warning (unit_address_vs_reg): /images/kernel@1: node has a unit name, but no reg or ranges property<br />
kernel.its:16.14-25.11: Warning (unit_address_vs_reg): /images/fdt@1: node has a unit name, but no reg or ranges property<br />
kernel.its:22.19-24.15: Warning (unit_address_vs_reg): /images/fdt@1/hash@1: node has a unit name, but no reg or ranges property<br />
kernel.its:29.15-32.11: Warning (unit_address_vs_reg): /configurations/conf@1: node has a unit name, but no reg or ranges property<br />
mkimage: verify_header failed for FIT Image support with exit code 1<br />
</pre><br />
<br />
and paste the following code into <code>pack_vboot.sh</code><br />
<br />
<pre><br />
futility --debug vbutil_kernel \<br />
--pack vmlinux.kpart \<br />
--version 1 \<br />
--vmlinuz kernel.itb \<br />
--arch aarch64 \<br />
--keyblock kernel.keyblock \<br />
--signprivate kernel_data_key.vbprivk \<br />
--config cmdline \<br />
--bootloader bootloader.bin<br />
</pre><br />
Now run the following commands:<br />
<pre><br />
# sh pack_vboot.sh<br />
# dd if=vmlinux.kpart of=/dev/sdX1<br />
# cd<br />
# umount $MOUNTPOINT<br />
</pre><br />
<br />
== Boot! ==<br />
<br />
<br />
it should boot up. login as root<br />
<br />
in order to update the system you will need some way to connect to the internet, i am using a usb-c ethernet adapter<br />
https://www.amazon.com/Nekteck-Ethernet-Compatible-Pixelbook-Thunderbolt/dp/B0749DCDRV/<br />
<br />
plug in the usb ethernet and dhcp should assign an ip<br />
<br />
then sync the time<br />
<pre><br />
# systemctl restart systemd-timesyncd.service<br />
# pacman -Sy<br />
# pacman -S archlinux-keyring archlinux32-keyring archlinuxarm-keyring parabola-keyring<br />
</pre><br />
it will fail because of keyring, but you downloaded it!<br />
<pre><br />
# pacman -U /var/cache/pacman/pkg/*-keyring-*<br />
# pacman -S archlinux-keyring archlinux32-keyring archlinuxarm-keyring parabola-keyring<br />
# pacman -S archlinux-keyring archlinux32-keyring archlinuxarm-keyring parabola-keyring<br />
</pre><br />
<br />
TODO: get <code>pacman-key --refresh</code> to work<br />
<br />
as an alternative temporary way around, we will just disable signature checking for this test environment.<br />
<br />
<pre><br />
sed -i '/^SigLevel.*/SigLevel = Never/' /etc/pacman.conf<br />
</pre><br />
<br />
<pre><br />
# pacman -S linux-libre-64 --overwrite '/*'<br />
# pacman -Su linux-libre-firmware acpi vim nano networkmanager<br />
</pre><br />
<br />
== Bonus extra info ==<br />
<br />
=== make your own debug port breakout ===<br />
I dont know where to get a servo board but the you can make your own debug header breakout to get serial console access / early boot logs etc<br />
<br />
the breakout https://www.amazon.com/Proto-Advantage-DR040D254P050-50-Pin-Connector-Adapter/dp/B097S2268V<br />
<br />
the connector https://www.digikey.com/en/products/detail/panasonic-electric-works/AXK850145WG/1986616<br />
<br />
usb <--> rs232 https://www.amazon.com/HiLetgo-CP2102-Converter-Adapter-Downloader/dp/B00LODGRV8 (get 2)<br />
<br />
servo connector pinout is described in this pdf (page 14) (V2 DEBUG HEADER)<br />
<br />
https://www.chromium.org/chromium-os/servo/810-10010-03_20120227_servo_SCH_0.pdf<br />
<br />
you can use a continuity meter to determine connector orientation but finding the corner pin that is ground<br />
<br />
<pre><br />
<br />
<br />
PIN-33 UART1_DUT_SERVO_TX --+ +-- PIN-17 UART2_DUT_SERVO_TX<br />
| |<br />
| |<br />
| |<br />
49 vG vG G 1<br />
|||||||||||||||||||||||||<br />
9753197531975319753197531<br />
1234567890123210987654321<br />
0864208642086420864208642<br />
|||||||||||||||||||||||||<br />
50 G G ^ G ^ G 2<br />
| |<br />
| |<br />
| |<br />
PIN-32 UART1_SERVO_DUT_TX --+ +-- PIN-16 UART2_SERVO_DUT_TX<br />
<br />
<br />
GND PINS = 1, 8, 15, 20, 31, 36, 42<br />
</pre><br />
<br />
=== set bios boot timeout to 2 seconds ===<br />
<br />
https://old.reddit.com/r/Crouton/comments/2szn59/how_to_shorten_os_verfication_warning_screen_on/<br />
<br />
=== blobless coreboot / etc ===<br />
https://gitlab.com/vicencb/kevinboot/</div>Maihttps://wiki.parabola.nu/index.php?title=User:Mai&diff=23585User:Mai2021-11-12T01:29:24Z<p>Mai: /* what does not work */</p>
<hr />
<div>{{stub}}<br />
== Status for Samsung Chromebook Plus v1 aka kevin aka gru-kevin aka xe513c24 ==<br />
=== Kernel ===<br />
{{pkg|linux-libre-64}} (armv7h) works but needs to be packed correctly to boot, the following is a rough guide on how i was able to boot this kernel on this hardware<br />
<br />
=== what does not work ===<br />
- onboard wifi<br />
- probably more stuff<br />
<br />
=== What you will need ===<br />
- this laptop :P<br />
- micro sd card at least 2GB, 8+GB reccomended<br />
- another computer that has a linux environment so we can download / extract / pack the kernel and install rootfs<br />
<br />
== Unlock external booting ==<br />
=== Switch to developer mode ===<br />
<br />
# Turn off the laptop.<br />
# To invoke Recovery mode, you hold down the ESC and Refresh keys and poke the Power button.<br />
# At the Recovery screen press Ctrl-D (there’s no prompt - you have to know to do it).<br />
# Confirm switching to developer mode by pressing enter, and the laptop will reboot and reset the system. This takes about 10-15 minutes.<br />
<br />
Note: After enabling developer mode, you will need to press Ctrl-D each time you boot, or wait 30 seconds to continue booting.<br />
=== Enable booting from external storage ===<br />
<br />
# After booting into developer mode, hold Ctrl and Alt and poke the F2 key. This will open up the developer console.<br />
# Type root to the login screen.<br />
# Then type this to enable USB booting:<br />
<br />
<code>$ enable_dev_usb_boot</code><br />
<br />
Reboot the system to allow the change to take effect.<br />
<br />
Source: https://chromebooks.readthedocs.io/en/latest/source/README.html#switch-to-developer-mode<br />
<br />
== Install packages ==<br />
<code>pacman -S {{pkg|vboot-utils}} {{pkg|uboot-tools}} {{pkg|gptfdisk}}</code><br />
<br />
== Gather files ==<br />
<br />
<pre><br />
$ mkdir parabola-armv7-64<br />
$ cd parabola-armv7-64<br />
<br />
$ wget -c https://redirector.parabola.nu/iso/armv7h-systemd-cli-2020.02/parabola-armv7h-systemd-cli-2020.02-tarball.tar.gz<br />
$ wget -c https://redirector.parabola.nu/iso/armv7h-systemd-cli-2020.02/parabola-armv7h-systemd-cli-2020.02-tarball.tar.gz.sig<br />
$ wget -c https://repomirror.parabola.nu/pool/parabola/linux-libre-64-5.11.11-3-armv7h.pkg.tar.xz<br />
$ wget -c https://repomirror.parabola.nu/pool/parabola/linux-libre-64-5.11.11-3-armv7h.pkg.tar.xz.sig<br />
$ wget -c https://git.parabola.nu/abslibre.git/plain/libre/linux-libre/kernel.keyblock<br />
$ wget -c https://git.parabola.nu/abslibre.git/plain/libre/linux-libre/kernel_data_key.vbprivk<br />
<br />
<br />
$ gpg --recv-keys FBCC5AD7421197B7ABA72853908710913E8C7778<br />
$ gpg --verify parabola-armv7h-systemd-cli-2020.02-tarball.tar.gz.sig<br />
$ gpg --recv-keys 782F9DDBE36BA7F3D4DE49065F5DFCC14177E263<br />
$ gpg --verify linux-libre-64-5.11.11-3-armv7h.pkg.tar.xz.sig<br />
</pre><br />
<br />
save the following code as <code>partition_vboot.sh</code><br />
<br />
<pre><br />
#!/bin/bash <br />
<br />
DISK="$1" <br />
<br />
# Make sure only root can run our script<br />
if [ "$(id -u)" != "0" ]; then<br />
echo "This script must be run as root" 1>&2<br />
exit 1 <br />
fi <br />
<br />
if [ x"$DISK" == 'x' ]; then<br />
echo "This script requires a base block device as its only arguement" 1>&2<br />
echo "example: $0 /dev/sdb"<br />
exit 1 <br />
fi <br />
<br />
DISK_DEVICE_NAME="$(echo $DISK | awk -F'/' '{print $NF}')"<br />
ROOT_PARTITION="$DISK"2<br />
SWAP_PARTITION="$DISK"3<br />
# TODO allow specify TOTAL_SECTORS<br />
TOTAL_SECTORS=$(cat /sys/block/$DISK_DEVICE_NAME/size)<br />
SECTOR_SIZE=$(cat /sys/block/$DISK_DEVICE_NAME/queue/hw_sector_size)<br />
<br />
# the following are in sectors, 1MB = 2048 sectors<br />
FIRST_GAP_SIZE=8192 # 2048 sectors * 4MB<br />
LAST_GAP_SIZE=2048 # 2048 sectors * 1MB<br />
SWAP_PART_SIZE=8388608 # 2048 sectors * 4096MB<br />
KERNEL_PART_SIZE=65536 # 2048 sectors * 32MB<br />
<br />
# layout arithmatic <br />
FIRST_GAP_START=0 <br />
FIRST_GAP_END=$(( $FIRST_GAP_SIZE - 1 ))<br />
KERNEL_PART_START=$(( $FIRST_GAP_END + 1 ))<br />
KERNEL_PART_END=$(( $FIRST_GAP_END + $KERNEL_PART_SIZE ))<br />
ROOTFS_PART_START=$(( $KERNEL_PART_END + 1 ))<br />
<br />
LAST_GAP_END=$(( $TOTAL_SECTORS - 1 ))<br />
LAST_GAP_START=$(( $LAST_GAP_END - $LAST_GAP_SIZE + 1 ))<br />
if [ $TOTAL_SECTORS -lt 10000000 ]; then # if size of disk is less than 5GB do not make swap<br />
MAKESWAP='false' <br />
ROOTFS_PART_END=$(( $LAST_GAP_START - 1 ))<br />
SWAP_PART_END=0<br />
SWAP_PART_START=0<br />
else<br />
MAKESWAP='true' <br />
SWAP_PART_END=$(( $LAST_GAP_START - 1 ))<br />
SWAP_PART_START=$(( $SWAP_PART_END - $SWAP_PART_SIZE + 1 ))<br />
ROOTFS_PART_END=$(( $SWAP_PART_START - 1 ))<br />
fi<br />
<br />
echo "TOTAL_SECTORS = $TOTAL_SECTORS"<br />
echo "SECTOR_SIZE = $SECTOR_SIZE"<br />
echo ""<br />
echo "FIRST_GAP_SIZE = $FIRST_GAP_SIZE"<br />
echo "LAST_GAP_SIZE = $LAST_GAP_SIZE"<br />
echo "SWAP_PART_SIZE = $SWAP_PART_SIZE"<br />
echo "KERNEL_PART_SIZE = $KERNEL_PART_SIZE"<br />
echo ""<br />
echo "FIRST_GAP_START = $FIRST_GAP_START $(( $FIRST_GAP_START / 2048 )) MB"<br />
echo "FIRST_GAP_END = $FIRST_GAP_END"<br />
echo "KERNEL_PART_START = $KERNEL_PART_START $(( $KERNEL_PART_START / 2048 )) MB"<br />
echo "KERNEL_PART_END = $KERNEL_PART_END"<br />
echo "ROOTFS_PART_START = $ROOTFS_PART_START $(( $ROOTFS_PART_START / 2048 )) MB"<br />
echo "ROOTFS_PART_END = $ROOTFS_PART_END"<br />
echo "SWAP_PART_START = $SWAP_PART_START $(( $SWAP_PART_START / 2048 )) MB"<br />
echo "SWAP_PART_END = $SWAP_PART_END"<br />
echo "LAST_GAP_START = $LAST_GAP_START $(( $LAST_GAP_START / 2048 )) MB"<br />
echo "LAST_GAP_END = $LAST_GAP_END"<br />
<br />
# use `sgdisk --list-types' to get all possible type codes<br />
KERNEL_PART_TYPE='7f00'<br />
ROOTFS_PART_TYPE='7f01'<br />
SWAP_PART_TYPE='8200'<br />
<br />
# wipe disk, and create new gpt partition table<br />
sgdisk --zap-all $DISK<br />
sgdisk -o $DISK<br />
<br />
# create the kernel partition<br />
sgdisk --new=1:$KERNEL_PART_START:$KERNEL_PART_END $DISK<br />
sgdisk --typecode=1:$KERNEL_PART_TYPE $DISK<br />
sgdisk --change-name=1:Kernel $DISK<br />
sgdisk --attributes=1:=:015A000000000000 $DISK<br />
<br />
# create the rootfs partition <br />
sgdisk --new=2:$ROOTFS_PART_START:$ROOTFS_PART_END $DISK<br />
sgdisk --typecode=2:$ROOTFS_PART_TYPE $DISK<br />
sgdisk --change-name=2:Root $DISK<br />
mkfs.ext4 $ROOT_PARTITION<br />
<br />
# create the swap partition<br />
if [ $MAKESWAP = 'true' ]; then<br />
sgdisk --new=3:$SWAP_PART_START:$SWAP_PART_END $DISK<br />
sgdisk --typecode=3:$SWAP_PART_TYPE $DISK<br />
sgdisk --change-name=3:Swap $DISK<br />
mkswap $SWAP_PARTITION<br />
fi<br />
<br />
sgdisk --print $DISK<br />
lsblk $DISK<br />
</pre><br />
<br />
== partition micro sd card & mount the rootfs partition ==<br />
<br />
<code>partition_vboot.sh</code> is a replacement for cgpt i made that uses sgdisk to create a compatible partition layout for depthcharge chromebooks (asus c201 & samsung chromebook plus v1). I have tested it with cards as small as 2GB, it will automatically make a 4GB swap partition if the size of the disk is detected to be above 4GB, the rest of the disk will be used for the rootfs partition<br />
<br />
<pre># sh partition_vboot.sh /dev/sdX</pre><br />
<br />
if you dont want to run this script you can follow the partitioning instructions on the archlinuxarm wiki page for this device<br />
https://archlinuxarm.org/platforms/armv8/rockchip/samsung-chromebook-plus<br />
<br />
<br />
after the rootfs partition is created and formated, mount it<br />
<pre><br />
# mkdir $MOUNTPOINT<br />
# mount /dev/sdX2 $MOUNTPOINT<br />
</pre><br />
<br />
== extract / copy files ==<br />
<pre><br />
# bsdtar -xf parabola-armv7h-systemd-cli-2020.02-tarball.tar.gz -C $MOUNTPOINT<br />
# bsdtar -xf linux-libre-64-5.11.11-3-armv7h.pkg.tar.xz -C $MOUNTPOINT<br />
# cp linux-libre-64-5.11.11-3-armv7h.pkg.tar.xz $MOUNTPOINT/var/cache/pacman/pkg/<br />
<br />
# echo > $MOUNTPOINT/etc/fstab<br />
<br />
# mkdir $MOUNTPOINT/boot/pack<br />
# cp kernel.keyblock $MOUNTPOINT/boot/pack<br />
# cp kernel_data_key.vbprivk $MOUNTPOINT/boot/pack<br />
# cp $MOUNTPOINT/usr/lib/modules/5.11.11-gnu-3-64-ARCH/vmlinuz $MOUNTPOINT/boot/pack<br />
# cp $MOUNTPOINT/boot/dtbs/linux-libre-64/rockchip/rk3399-gru-kevin.dtb $MOUNTPOINT/boot/pack<br />
<br />
# cd $MOUNTPOINT/boot/pack<br />
<br />
# lz4 -k vmlinuz<br />
# echo "console=tty0 console=ttyS2,115200n8 earlyprintk=ttyS2,115200n8 init=/sbin/init root=PARTUUID=%U/PARTNROFF=1 rootwait rw noinitrd" > cmdline<br />
# dd if=/dev/zero of=bootloader.bin bs=512 count=1<br />
</pre><br />
<br />
paste the following code into <code>kernel.its</code><br />
<br />
<pre><br />
/dts-v1/;<br />
<br />
/ {<br />
description = "Chrome OS kernel image with one or more FDT blobs";<br />
images {<br />
kernel@1{<br />
description = "kernel";<br />
data = /incbin/("vmlinuz.lz4");<br />
type = "kernel_noload";<br />
arch = "arm64";<br />
os = "linux";<br />
compression = "lz4";<br />
load = <0>;<br />
entry = <0>;<br />
};<br />
fdt@1{<br />
description = "rk3399-gru-kevin.dtb";<br />
data = /incbin/("rk3399-gru-kevin.dtb");<br />
type = "flat_dt";<br />
arch = "arm64";<br />
compression = "none";<br />
hash@1{<br />
algo = "sha1";<br />
};<br />
};<br />
};<br />
configurations {<br />
default = "conf@1";<br />
conf@1{<br />
kernel = "kernel@1";<br />
fdt = "fdt@1";<br />
};<br />
};<br />
};<br />
</pre><br />
<br />
<pre># mkimage -f kernel.its kernel.itb</pre><br />
<br />
if you see the following error message, just ignore, it will still work<br />
<pre><br />
kernel.its:6.17-15.11: Warning (unit_address_vs_reg): /images/kernel@1: node has a unit name, but no reg or ranges property<br />
kernel.its:16.14-25.11: Warning (unit_address_vs_reg): /images/fdt@1: node has a unit name, but no reg or ranges property<br />
kernel.its:22.19-24.15: Warning (unit_address_vs_reg): /images/fdt@1/hash@1: node has a unit name, but no reg or ranges property<br />
kernel.its:29.15-32.11: Warning (unit_address_vs_reg): /configurations/conf@1: node has a unit name, but no reg or ranges property<br />
mkimage: verify_header failed for FIT Image support with exit code 1<br />
</pre><br />
<br />
and paste the following code into <code>pack_vboot.sh</code><br />
<br />
<pre><br />
futility --debug vbutil_kernel \<br />
--pack vmlinux.kpart \<br />
--version 1 \<br />
--vmlinuz kernel.itb \<br />
--arch aarch64 \<br />
--keyblock kernel.keyblock \<br />
--signprivate kernel_data_key.vbprivk \<br />
--config cmdline \<br />
--bootloader bootloader.bin<br />
</pre><br />
Now run the following commands:<br />
<pre><br />
# sh pack_vboot.sh<br />
# dd if=vmlinux.kpart of=/dev/sdX1<br />
# cd<br />
# umount $MOUNTPOINT<br />
</pre><br />
<br />
== Boot! ==<br />
<br />
<br />
it should boot up. login as root<br />
<br />
in order to update the system you will need some way to connect to the internet, i am using a usb-c ethernet adapter<br />
https://www.amazon.com/Nekteck-Ethernet-Compatible-Pixelbook-Thunderbolt/dp/B0749DCDRV/<br />
<br />
plug in the usb ethernet and dhcp should assign an ip<br />
<br />
then sync the time<br />
<pre><br />
# systemctl restart systemd-timesyncd.service<br />
# pacman -Sy<br />
# pacman -S archlinux-keyring archlinux32-keyring archlinuxarm-keyring parabola-keyring<br />
</pre><br />
it will fail because of keyring, but you downloaded it!<br />
<pre><br />
# pacman -U /var/cache/pacman/pkg/*-keyring-*<br />
# pacman -S archlinux-keyring archlinux32-keyring archlinuxarm-keyring parabola-keyring<br />
# pacman -S archlinux-keyring archlinux32-keyring archlinuxarm-keyring parabola-keyring<br />
</pre><br />
<br />
TODO: get <code>pacman-key --refresh</code> to work<br />
<br />
as an alternative temporary way around, we will just disable signature checking for this test environment.<br />
<br />
<pre><br />
sed -i '/^SigLevel*/SigLevel = Never/' /etc/pacman.conf<br />
</pre><br />
<br />
<pre><br />
# pacman -S linux-libre-64 --overwrite '/*'<br />
# pacman -Su linux-libre-firmware acpi vim nano networkmanager<br />
</pre><br />
<br />
== Bonus extra info ==<br />
<br />
=== make your own debug port breakout ===<br />
I dont know where to get a servo board but the you can make your own debug header breakout to get serial console access / early boot logs etc<br />
<br />
the breakout https://www.amazon.com/Proto-Advantage-DR040D254P050-50-Pin-Connector-Adapter/dp/B097S2268V<br />
<br />
the connector https://www.digikey.com/en/products/detail/panasonic-electric-works/AXK850145WG/1986616<br />
<br />
usb <--> rs232 https://www.amazon.com/HiLetgo-CP2102-Converter-Adapter-Downloader/dp/B00LODGRV8 (get 2)<br />
<br />
servo connector pinout is described in this pdf (page 14) (V2 DEBUG HEADER)<br />
<br />
https://www.chromium.org/chromium-os/servo/810-10010-03_20120227_servo_SCH_0.pdf<br />
<br />
you can use a continuity meter to determine connector orientation but finding the corner pin that is ground<br />
<br />
<pre><br />
<br />
<br />
PIN-33 UART1_DUT_SERVO_TX --+ +-- PIN-17 UART2_DUT_SERVO_TX<br />
| |<br />
| |<br />
| |<br />
49 vG vG G 1<br />
|||||||||||||||||||||||||<br />
9753197531975319753197531<br />
1234567890123210987654321<br />
0864208642086420864208642<br />
|||||||||||||||||||||||||<br />
50 G G ^ G ^ G 2<br />
| |<br />
| |<br />
| |<br />
PIN-32 UART1_SERVO_DUT_TX --+ +-- PIN-16 UART2_SERVO_DUT_TX<br />
<br />
<br />
GND PINS = 1, 8, 15, 20, 31, 36, 42<br />
</pre><br />
<br />
=== set bios boot timeout to 2 seconds ===<br />
<br />
https://old.reddit.com/r/Crouton/comments/2szn59/how_to_shorten_os_verfication_warning_screen_on/<br />
<br />
=== blobless coreboot / etc ===<br />
https://gitlab.com/vicencb/kevinboot/</div>Maihttps://wiki.parabola.nu/index.php?title=User:Mai&diff=23584User:Mai2021-11-12T01:24:06Z<p>Mai: /* make your own debug port breakout */</p>
<hr />
<div>{{stub}}<br />
== Status for Samsung Chromebook Plus v1 aka kevin aka gru-kevin aka xe513c24 ==<br />
=== Kernel ===<br />
{{pkg|linux-libre-64}} (armv7h) works but needs to be packed correctly to boot, the following is a rough guide on how i was able to boot this kernel on this hardware<br />
<br />
=== what does not work ===<br />
- wifi<br />
- probably more stuff<br />
<br />
=== What you will need ===<br />
- this laptop :P<br />
- micro sd card at least 2GB, 8+GB reccomended<br />
- another computer that has a linux environment so we can download / extract / pack the kernel and install rootfs<br />
<br />
== Unlock external booting ==<br />
=== Switch to developer mode ===<br />
<br />
# Turn off the laptop.<br />
# To invoke Recovery mode, you hold down the ESC and Refresh keys and poke the Power button.<br />
# At the Recovery screen press Ctrl-D (there’s no prompt - you have to know to do it).<br />
# Confirm switching to developer mode by pressing enter, and the laptop will reboot and reset the system. This takes about 10-15 minutes.<br />
<br />
Note: After enabling developer mode, you will need to press Ctrl-D each time you boot, or wait 30 seconds to continue booting.<br />
=== Enable booting from external storage ===<br />
<br />
# After booting into developer mode, hold Ctrl and Alt and poke the F2 key. This will open up the developer console.<br />
# Type root to the login screen.<br />
# Then type this to enable USB booting:<br />
<br />
<code>$ enable_dev_usb_boot</code><br />
<br />
Reboot the system to allow the change to take effect.<br />
<br />
Source: https://chromebooks.readthedocs.io/en/latest/source/README.html#switch-to-developer-mode<br />
<br />
== Install packages ==<br />
<code>pacman -S {{pkg|vboot-utils}} {{pkg|uboot-tools}} {{pkg|gptfdisk}}</code><br />
<br />
== Gather files ==<br />
<br />
<pre><br />
$ mkdir parabola-armv7-64<br />
$ cd parabola-armv7-64<br />
<br />
$ wget -c https://redirector.parabola.nu/iso/armv7h-systemd-cli-2020.02/parabola-armv7h-systemd-cli-2020.02-tarball.tar.gz<br />
$ wget -c https://redirector.parabola.nu/iso/armv7h-systemd-cli-2020.02/parabola-armv7h-systemd-cli-2020.02-tarball.tar.gz.sig<br />
$ wget -c https://repomirror.parabola.nu/pool/parabola/linux-libre-64-5.11.11-3-armv7h.pkg.tar.xz<br />
$ wget -c https://repomirror.parabola.nu/pool/parabola/linux-libre-64-5.11.11-3-armv7h.pkg.tar.xz.sig<br />
$ wget -c https://git.parabola.nu/abslibre.git/plain/libre/linux-libre/kernel.keyblock<br />
$ wget -c https://git.parabola.nu/abslibre.git/plain/libre/linux-libre/kernel_data_key.vbprivk<br />
<br />
<br />
$ gpg --recv-keys FBCC5AD7421197B7ABA72853908710913E8C7778<br />
$ gpg --verify parabola-armv7h-systemd-cli-2020.02-tarball.tar.gz.sig<br />
$ gpg --recv-keys 782F9DDBE36BA7F3D4DE49065F5DFCC14177E263<br />
$ gpg --verify linux-libre-64-5.11.11-3-armv7h.pkg.tar.xz.sig<br />
</pre><br />
<br />
save the following code as <code>partition_vboot.sh</code><br />
<br />
<pre><br />
#!/bin/bash <br />
<br />
DISK="$1" <br />
<br />
# Make sure only root can run our script<br />
if [ "$(id -u)" != "0" ]; then<br />
echo "This script must be run as root" 1>&2<br />
exit 1 <br />
fi <br />
<br />
if [ x"$DISK" == 'x' ]; then<br />
echo "This script requires a base block device as its only arguement" 1>&2<br />
echo "example: $0 /dev/sdb"<br />
exit 1 <br />
fi <br />
<br />
DISK_DEVICE_NAME="$(echo $DISK | awk -F'/' '{print $NF}')"<br />
ROOT_PARTITION="$DISK"2<br />
SWAP_PARTITION="$DISK"3<br />
# TODO allow specify TOTAL_SECTORS<br />
TOTAL_SECTORS=$(cat /sys/block/$DISK_DEVICE_NAME/size)<br />
SECTOR_SIZE=$(cat /sys/block/$DISK_DEVICE_NAME/queue/hw_sector_size)<br />
<br />
# the following are in sectors, 1MB = 2048 sectors<br />
FIRST_GAP_SIZE=8192 # 2048 sectors * 4MB<br />
LAST_GAP_SIZE=2048 # 2048 sectors * 1MB<br />
SWAP_PART_SIZE=8388608 # 2048 sectors * 4096MB<br />
KERNEL_PART_SIZE=65536 # 2048 sectors * 32MB<br />
<br />
# layout arithmatic <br />
FIRST_GAP_START=0 <br />
FIRST_GAP_END=$(( $FIRST_GAP_SIZE - 1 ))<br />
KERNEL_PART_START=$(( $FIRST_GAP_END + 1 ))<br />
KERNEL_PART_END=$(( $FIRST_GAP_END + $KERNEL_PART_SIZE ))<br />
ROOTFS_PART_START=$(( $KERNEL_PART_END + 1 ))<br />
<br />
LAST_GAP_END=$(( $TOTAL_SECTORS - 1 ))<br />
LAST_GAP_START=$(( $LAST_GAP_END - $LAST_GAP_SIZE + 1 ))<br />
if [ $TOTAL_SECTORS -lt 10000000 ]; then # if size of disk is less than 5GB do not make swap<br />
MAKESWAP='false' <br />
ROOTFS_PART_END=$(( $LAST_GAP_START - 1 ))<br />
SWAP_PART_END=0<br />
SWAP_PART_START=0<br />
else<br />
MAKESWAP='true' <br />
SWAP_PART_END=$(( $LAST_GAP_START - 1 ))<br />
SWAP_PART_START=$(( $SWAP_PART_END - $SWAP_PART_SIZE + 1 ))<br />
ROOTFS_PART_END=$(( $SWAP_PART_START - 1 ))<br />
fi<br />
<br />
echo "TOTAL_SECTORS = $TOTAL_SECTORS"<br />
echo "SECTOR_SIZE = $SECTOR_SIZE"<br />
echo ""<br />
echo "FIRST_GAP_SIZE = $FIRST_GAP_SIZE"<br />
echo "LAST_GAP_SIZE = $LAST_GAP_SIZE"<br />
echo "SWAP_PART_SIZE = $SWAP_PART_SIZE"<br />
echo "KERNEL_PART_SIZE = $KERNEL_PART_SIZE"<br />
echo ""<br />
echo "FIRST_GAP_START = $FIRST_GAP_START $(( $FIRST_GAP_START / 2048 )) MB"<br />
echo "FIRST_GAP_END = $FIRST_GAP_END"<br />
echo "KERNEL_PART_START = $KERNEL_PART_START $(( $KERNEL_PART_START / 2048 )) MB"<br />
echo "KERNEL_PART_END = $KERNEL_PART_END"<br />
echo "ROOTFS_PART_START = $ROOTFS_PART_START $(( $ROOTFS_PART_START / 2048 )) MB"<br />
echo "ROOTFS_PART_END = $ROOTFS_PART_END"<br />
echo "SWAP_PART_START = $SWAP_PART_START $(( $SWAP_PART_START / 2048 )) MB"<br />
echo "SWAP_PART_END = $SWAP_PART_END"<br />
echo "LAST_GAP_START = $LAST_GAP_START $(( $LAST_GAP_START / 2048 )) MB"<br />
echo "LAST_GAP_END = $LAST_GAP_END"<br />
<br />
# use `sgdisk --list-types' to get all possible type codes<br />
KERNEL_PART_TYPE='7f00'<br />
ROOTFS_PART_TYPE='7f01'<br />
SWAP_PART_TYPE='8200'<br />
<br />
# wipe disk, and create new gpt partition table<br />
sgdisk --zap-all $DISK<br />
sgdisk -o $DISK<br />
<br />
# create the kernel partition<br />
sgdisk --new=1:$KERNEL_PART_START:$KERNEL_PART_END $DISK<br />
sgdisk --typecode=1:$KERNEL_PART_TYPE $DISK<br />
sgdisk --change-name=1:Kernel $DISK<br />
sgdisk --attributes=1:=:015A000000000000 $DISK<br />
<br />
# create the rootfs partition <br />
sgdisk --new=2:$ROOTFS_PART_START:$ROOTFS_PART_END $DISK<br />
sgdisk --typecode=2:$ROOTFS_PART_TYPE $DISK<br />
sgdisk --change-name=2:Root $DISK<br />
mkfs.ext4 $ROOT_PARTITION<br />
<br />
# create the swap partition<br />
if [ $MAKESWAP = 'true' ]; then<br />
sgdisk --new=3:$SWAP_PART_START:$SWAP_PART_END $DISK<br />
sgdisk --typecode=3:$SWAP_PART_TYPE $DISK<br />
sgdisk --change-name=3:Swap $DISK<br />
mkswap $SWAP_PARTITION<br />
fi<br />
<br />
sgdisk --print $DISK<br />
lsblk $DISK<br />
</pre><br />
<br />
== partition micro sd card & mount the rootfs partition ==<br />
<br />
<code>partition_vboot.sh</code> is a replacement for cgpt i made that uses sgdisk to create a compatible partition layout for depthcharge chromebooks (asus c201 & samsung chromebook plus v1). I have tested it with cards as small as 2GB, it will automatically make a 4GB swap partition if the size of the disk is detected to be above 4GB, the rest of the disk will be used for the rootfs partition<br />
<br />
<pre># sh partition_vboot.sh /dev/sdX</pre><br />
<br />
if you dont want to run this script you can follow the partitioning instructions on the archlinuxarm wiki page for this device<br />
https://archlinuxarm.org/platforms/armv8/rockchip/samsung-chromebook-plus<br />
<br />
<br />
after the rootfs partition is created and formated, mount it<br />
<pre><br />
# mkdir $MOUNTPOINT<br />
# mount /dev/sdX2 $MOUNTPOINT<br />
</pre><br />
<br />
== extract / copy files ==<br />
<pre><br />
# bsdtar -xf parabola-armv7h-systemd-cli-2020.02-tarball.tar.gz -C $MOUNTPOINT<br />
# bsdtar -xf linux-libre-64-5.11.11-3-armv7h.pkg.tar.xz -C $MOUNTPOINT<br />
# cp linux-libre-64-5.11.11-3-armv7h.pkg.tar.xz $MOUNTPOINT/var/cache/pacman/pkg/<br />
<br />
# echo > $MOUNTPOINT/etc/fstab<br />
<br />
# mkdir $MOUNTPOINT/boot/pack<br />
# cp kernel.keyblock $MOUNTPOINT/boot/pack<br />
# cp kernel_data_key.vbprivk $MOUNTPOINT/boot/pack<br />
# cp $MOUNTPOINT/usr/lib/modules/5.11.11-gnu-3-64-ARCH/vmlinuz $MOUNTPOINT/boot/pack<br />
# cp $MOUNTPOINT/boot/dtbs/linux-libre-64/rockchip/rk3399-gru-kevin.dtb $MOUNTPOINT/boot/pack<br />
<br />
# cd $MOUNTPOINT/boot/pack<br />
<br />
# lz4 -k vmlinuz<br />
# echo "console=tty0 console=ttyS2,115200n8 earlyprintk=ttyS2,115200n8 init=/sbin/init root=PARTUUID=%U/PARTNROFF=1 rootwait rw noinitrd" > cmdline<br />
# dd if=/dev/zero of=bootloader.bin bs=512 count=1<br />
</pre><br />
<br />
paste the following code into <code>kernel.its</code><br />
<br />
<pre><br />
/dts-v1/;<br />
<br />
/ {<br />
description = "Chrome OS kernel image with one or more FDT blobs";<br />
images {<br />
kernel@1{<br />
description = "kernel";<br />
data = /incbin/("vmlinuz.lz4");<br />
type = "kernel_noload";<br />
arch = "arm64";<br />
os = "linux";<br />
compression = "lz4";<br />
load = <0>;<br />
entry = <0>;<br />
};<br />
fdt@1{<br />
description = "rk3399-gru-kevin.dtb";<br />
data = /incbin/("rk3399-gru-kevin.dtb");<br />
type = "flat_dt";<br />
arch = "arm64";<br />
compression = "none";<br />
hash@1{<br />
algo = "sha1";<br />
};<br />
};<br />
};<br />
configurations {<br />
default = "conf@1";<br />
conf@1{<br />
kernel = "kernel@1";<br />
fdt = "fdt@1";<br />
};<br />
};<br />
};<br />
</pre><br />
<br />
<pre># mkimage -f kernel.its kernel.itb</pre><br />
<br />
if you see the following error message, just ignore, it will still work<br />
<pre><br />
kernel.its:6.17-15.11: Warning (unit_address_vs_reg): /images/kernel@1: node has a unit name, but no reg or ranges property<br />
kernel.its:16.14-25.11: Warning (unit_address_vs_reg): /images/fdt@1: node has a unit name, but no reg or ranges property<br />
kernel.its:22.19-24.15: Warning (unit_address_vs_reg): /images/fdt@1/hash@1: node has a unit name, but no reg or ranges property<br />
kernel.its:29.15-32.11: Warning (unit_address_vs_reg): /configurations/conf@1: node has a unit name, but no reg or ranges property<br />
mkimage: verify_header failed for FIT Image support with exit code 1<br />
</pre><br />
<br />
and paste the following code into <code>pack_vboot.sh</code><br />
<br />
<pre><br />
futility --debug vbutil_kernel \<br />
--pack vmlinux.kpart \<br />
--version 1 \<br />
--vmlinuz kernel.itb \<br />
--arch aarch64 \<br />
--keyblock kernel.keyblock \<br />
--signprivate kernel_data_key.vbprivk \<br />
--config cmdline \<br />
--bootloader bootloader.bin<br />
</pre><br />
Now run the following commands:<br />
<pre><br />
# sh pack_vboot.sh<br />
# dd if=vmlinux.kpart of=/dev/sdX1<br />
# cd<br />
# umount $MOUNTPOINT<br />
</pre><br />
<br />
== Boot! ==<br />
<br />
<br />
it should boot up. login as root<br />
<br />
in order to update the system you will need some way to connect to the internet, i am using a usb-c ethernet adapter<br />
https://www.amazon.com/Nekteck-Ethernet-Compatible-Pixelbook-Thunderbolt/dp/B0749DCDRV/<br />
<br />
plug in the usb ethernet and dhcp should assign an ip<br />
<br />
then sync the time<br />
<pre><br />
# systemctl restart systemd-timesyncd.service<br />
# pacman -Sy<br />
# pacman -S archlinux-keyring archlinux32-keyring archlinuxarm-keyring parabola-keyring<br />
</pre><br />
it will fail because of keyring, but you downloaded it!<br />
<pre><br />
# pacman -U /var/cache/pacman/pkg/*-keyring-*<br />
# pacman -S archlinux-keyring archlinux32-keyring archlinuxarm-keyring parabola-keyring<br />
# pacman -S archlinux-keyring archlinux32-keyring archlinuxarm-keyring parabola-keyring<br />
</pre><br />
<br />
TODO: get <code>pacman-key --refresh</code> to work<br />
<br />
as an alternative temporary way around, we will just disable signature checking for this test environment.<br />
<br />
<pre><br />
sed -i '/^SigLevel*/SigLevel = Never/' /etc/pacman.conf<br />
</pre><br />
<br />
<pre><br />
# pacman -S linux-libre-64 --overwrite '/*'<br />
# pacman -Su linux-libre-firmware acpi vim nano networkmanager<br />
</pre><br />
<br />
== Bonus extra info ==<br />
<br />
=== make your own debug port breakout ===<br />
I dont know where to get a servo board but the you can make your own debug header breakout to get serial console access / early boot logs etc<br />
<br />
the breakout https://www.amazon.com/Proto-Advantage-DR040D254P050-50-Pin-Connector-Adapter/dp/B097S2268V<br />
<br />
the connector https://www.digikey.com/en/products/detail/panasonic-electric-works/AXK850145WG/1986616<br />
<br />
usb <--> rs232 https://www.amazon.com/HiLetgo-CP2102-Converter-Adapter-Downloader/dp/B00LODGRV8 (get 2)<br />
<br />
servo connector pinout is described in this pdf (page 14) (V2 DEBUG HEADER)<br />
<br />
https://www.chromium.org/chromium-os/servo/810-10010-03_20120227_servo_SCH_0.pdf<br />
<br />
you can use a continuity meter to determine connector orientation but finding the corner pin that is ground<br />
<br />
<pre><br />
<br />
<br />
PIN-33 UART1_DUT_SERVO_TX --+ +-- PIN-17 UART2_DUT_SERVO_TX<br />
| |<br />
| |<br />
| |<br />
49 vG vG G 1<br />
|||||||||||||||||||||||||<br />
9753197531975319753197531<br />
1234567890123210987654321<br />
0864208642086420864208642<br />
|||||||||||||||||||||||||<br />
50 G G ^ G ^ G 2<br />
| |<br />
| |<br />
| |<br />
PIN-32 UART1_SERVO_DUT_TX --+ +-- PIN-16 UART2_SERVO_DUT_TX<br />
<br />
<br />
GND PINS = 1, 8, 15, 20, 31, 36, 42<br />
</pre><br />
<br />
=== set bios boot timeout to 2 seconds ===<br />
<br />
https://old.reddit.com/r/Crouton/comments/2szn59/how_to_shorten_os_verfication_warning_screen_on/<br />
<br />
=== blobless coreboot / etc ===<br />
https://gitlab.com/vicencb/kevinboot/</div>Maihttps://wiki.parabola.nu/index.php?title=User:Mai&diff=23583User:Mai2021-11-10T23:00:50Z<p>Mai: /* Boot! */</p>
<hr />
<div>{{stub}}<br />
== Status for Samsung Chromebook Plus v1 aka kevin aka gru-kevin aka xe513c24 ==<br />
=== Kernel ===<br />
{{pkg|linux-libre-64}} (armv7h) works but needs to be packed correctly to boot, the following is a rough guide on how i was able to boot this kernel on this hardware<br />
<br />
=== what does not work ===<br />
- wifi<br />
- probably more stuff<br />
<br />
=== What you will need ===<br />
- this laptop :P<br />
- micro sd card at least 2GB, 8+GB reccomended<br />
- another computer that has a linux environment so we can download / extract / pack the kernel and install rootfs<br />
<br />
== Unlock external booting ==<br />
=== Switch to developer mode ===<br />
<br />
# Turn off the laptop.<br />
# To invoke Recovery mode, you hold down the ESC and Refresh keys and poke the Power button.<br />
# At the Recovery screen press Ctrl-D (there’s no prompt - you have to know to do it).<br />
# Confirm switching to developer mode by pressing enter, and the laptop will reboot and reset the system. This takes about 10-15 minutes.<br />
<br />
Note: After enabling developer mode, you will need to press Ctrl-D each time you boot, or wait 30 seconds to continue booting.<br />
=== Enable booting from external storage ===<br />
<br />
# After booting into developer mode, hold Ctrl and Alt and poke the F2 key. This will open up the developer console.<br />
# Type root to the login screen.<br />
# Then type this to enable USB booting:<br />
<br />
<code>$ enable_dev_usb_boot</code><br />
<br />
Reboot the system to allow the change to take effect.<br />
<br />
Source: https://chromebooks.readthedocs.io/en/latest/source/README.html#switch-to-developer-mode<br />
<br />
== Install packages ==<br />
<code>pacman -S {{pkg|vboot-utils}} {{pkg|uboot-tools}} {{pkg|gptfdisk}}</code><br />
<br />
== Gather files ==<br />
<br />
<pre><br />
$ mkdir parabola-armv7-64<br />
$ cd parabola-armv7-64<br />
<br />
$ wget -c https://redirector.parabola.nu/iso/armv7h-systemd-cli-2020.02/parabola-armv7h-systemd-cli-2020.02-tarball.tar.gz<br />
$ wget -c https://redirector.parabola.nu/iso/armv7h-systemd-cli-2020.02/parabola-armv7h-systemd-cli-2020.02-tarball.tar.gz.sig<br />
$ wget -c https://repomirror.parabola.nu/pool/parabola/linux-libre-64-5.11.11-3-armv7h.pkg.tar.xz<br />
$ wget -c https://repomirror.parabola.nu/pool/parabola/linux-libre-64-5.11.11-3-armv7h.pkg.tar.xz.sig<br />
$ wget -c https://git.parabola.nu/abslibre.git/plain/libre/linux-libre/kernel.keyblock<br />
$ wget -c https://git.parabola.nu/abslibre.git/plain/libre/linux-libre/kernel_data_key.vbprivk<br />
<br />
<br />
$ gpg --recv-keys FBCC5AD7421197B7ABA72853908710913E8C7778<br />
$ gpg --verify parabola-armv7h-systemd-cli-2020.02-tarball.tar.gz.sig<br />
$ gpg --recv-keys 782F9DDBE36BA7F3D4DE49065F5DFCC14177E263<br />
$ gpg --verify linux-libre-64-5.11.11-3-armv7h.pkg.tar.xz.sig<br />
</pre><br />
<br />
save the following code as <code>partition_vboot.sh</code><br />
<br />
<pre><br />
#!/bin/bash <br />
<br />
DISK="$1" <br />
<br />
# Make sure only root can run our script<br />
if [ "$(id -u)" != "0" ]; then<br />
echo "This script must be run as root" 1>&2<br />
exit 1 <br />
fi <br />
<br />
if [ x"$DISK" == 'x' ]; then<br />
echo "This script requires a base block device as its only arguement" 1>&2<br />
echo "example: $0 /dev/sdb"<br />
exit 1 <br />
fi <br />
<br />
DISK_DEVICE_NAME="$(echo $DISK | awk -F'/' '{print $NF}')"<br />
ROOT_PARTITION="$DISK"2<br />
SWAP_PARTITION="$DISK"3<br />
# TODO allow specify TOTAL_SECTORS<br />
TOTAL_SECTORS=$(cat /sys/block/$DISK_DEVICE_NAME/size)<br />
SECTOR_SIZE=$(cat /sys/block/$DISK_DEVICE_NAME/queue/hw_sector_size)<br />
<br />
# the following are in sectors, 1MB = 2048 sectors<br />
FIRST_GAP_SIZE=8192 # 2048 sectors * 4MB<br />
LAST_GAP_SIZE=2048 # 2048 sectors * 1MB<br />
SWAP_PART_SIZE=8388608 # 2048 sectors * 4096MB<br />
KERNEL_PART_SIZE=65536 # 2048 sectors * 32MB<br />
<br />
# layout arithmatic <br />
FIRST_GAP_START=0 <br />
FIRST_GAP_END=$(( $FIRST_GAP_SIZE - 1 ))<br />
KERNEL_PART_START=$(( $FIRST_GAP_END + 1 ))<br />
KERNEL_PART_END=$(( $FIRST_GAP_END + $KERNEL_PART_SIZE ))<br />
ROOTFS_PART_START=$(( $KERNEL_PART_END + 1 ))<br />
<br />
LAST_GAP_END=$(( $TOTAL_SECTORS - 1 ))<br />
LAST_GAP_START=$(( $LAST_GAP_END - $LAST_GAP_SIZE + 1 ))<br />
if [ $TOTAL_SECTORS -lt 10000000 ]; then # if size of disk is less than 5GB do not make swap<br />
MAKESWAP='false' <br />
ROOTFS_PART_END=$(( $LAST_GAP_START - 1 ))<br />
SWAP_PART_END=0<br />
SWAP_PART_START=0<br />
else<br />
MAKESWAP='true' <br />
SWAP_PART_END=$(( $LAST_GAP_START - 1 ))<br />
SWAP_PART_START=$(( $SWAP_PART_END - $SWAP_PART_SIZE + 1 ))<br />
ROOTFS_PART_END=$(( $SWAP_PART_START - 1 ))<br />
fi<br />
<br />
echo "TOTAL_SECTORS = $TOTAL_SECTORS"<br />
echo "SECTOR_SIZE = $SECTOR_SIZE"<br />
echo ""<br />
echo "FIRST_GAP_SIZE = $FIRST_GAP_SIZE"<br />
echo "LAST_GAP_SIZE = $LAST_GAP_SIZE"<br />
echo "SWAP_PART_SIZE = $SWAP_PART_SIZE"<br />
echo "KERNEL_PART_SIZE = $KERNEL_PART_SIZE"<br />
echo ""<br />
echo "FIRST_GAP_START = $FIRST_GAP_START $(( $FIRST_GAP_START / 2048 )) MB"<br />
echo "FIRST_GAP_END = $FIRST_GAP_END"<br />
echo "KERNEL_PART_START = $KERNEL_PART_START $(( $KERNEL_PART_START / 2048 )) MB"<br />
echo "KERNEL_PART_END = $KERNEL_PART_END"<br />
echo "ROOTFS_PART_START = $ROOTFS_PART_START $(( $ROOTFS_PART_START / 2048 )) MB"<br />
echo "ROOTFS_PART_END = $ROOTFS_PART_END"<br />
echo "SWAP_PART_START = $SWAP_PART_START $(( $SWAP_PART_START / 2048 )) MB"<br />
echo "SWAP_PART_END = $SWAP_PART_END"<br />
echo "LAST_GAP_START = $LAST_GAP_START $(( $LAST_GAP_START / 2048 )) MB"<br />
echo "LAST_GAP_END = $LAST_GAP_END"<br />
<br />
# use `sgdisk --list-types' to get all possible type codes<br />
KERNEL_PART_TYPE='7f00'<br />
ROOTFS_PART_TYPE='7f01'<br />
SWAP_PART_TYPE='8200'<br />
<br />
# wipe disk, and create new gpt partition table<br />
sgdisk --zap-all $DISK<br />
sgdisk -o $DISK<br />
<br />
# create the kernel partition<br />
sgdisk --new=1:$KERNEL_PART_START:$KERNEL_PART_END $DISK<br />
sgdisk --typecode=1:$KERNEL_PART_TYPE $DISK<br />
sgdisk --change-name=1:Kernel $DISK<br />
sgdisk --attributes=1:=:015A000000000000 $DISK<br />
<br />
# create the rootfs partition <br />
sgdisk --new=2:$ROOTFS_PART_START:$ROOTFS_PART_END $DISK<br />
sgdisk --typecode=2:$ROOTFS_PART_TYPE $DISK<br />
sgdisk --change-name=2:Root $DISK<br />
mkfs.ext4 $ROOT_PARTITION<br />
<br />
# create the swap partition<br />
if [ $MAKESWAP = 'true' ]; then<br />
sgdisk --new=3:$SWAP_PART_START:$SWAP_PART_END $DISK<br />
sgdisk --typecode=3:$SWAP_PART_TYPE $DISK<br />
sgdisk --change-name=3:Swap $DISK<br />
mkswap $SWAP_PARTITION<br />
fi<br />
<br />
sgdisk --print $DISK<br />
lsblk $DISK<br />
</pre><br />
<br />
== partition micro sd card & mount the rootfs partition ==<br />
<br />
<code>partition_vboot.sh</code> is a replacement for cgpt i made that uses sgdisk to create a compatible partition layout for depthcharge chromebooks (asus c201 & samsung chromebook plus v1). I have tested it with cards as small as 2GB, it will automatically make a 4GB swap partition if the size of the disk is detected to be above 4GB, the rest of the disk will be used for the rootfs partition<br />
<br />
<pre># sh partition_vboot.sh /dev/sdX</pre><br />
<br />
if you dont want to run this script you can follow the partitioning instructions on the archlinuxarm wiki page for this device<br />
https://archlinuxarm.org/platforms/armv8/rockchip/samsung-chromebook-plus<br />
<br />
<br />
after the rootfs partition is created and formated, mount it<br />
<pre><br />
# mkdir $MOUNTPOINT<br />
# mount /dev/sdX2 $MOUNTPOINT<br />
</pre><br />
<br />
== extract / copy files ==<br />
<pre><br />
# bsdtar -xf parabola-armv7h-systemd-cli-2020.02-tarball.tar.gz -C $MOUNTPOINT<br />
# bsdtar -xf linux-libre-64-5.11.11-3-armv7h.pkg.tar.xz -C $MOUNTPOINT<br />
# cp linux-libre-64-5.11.11-3-armv7h.pkg.tar.xz $MOUNTPOINT/var/cache/pacman/pkg/<br />
<br />
# echo > $MOUNTPOINT/etc/fstab<br />
<br />
# mkdir $MOUNTPOINT/boot/pack<br />
# cp kernel.keyblock $MOUNTPOINT/boot/pack<br />
# cp kernel_data_key.vbprivk $MOUNTPOINT/boot/pack<br />
# cp $MOUNTPOINT/usr/lib/modules/5.11.11-gnu-3-64-ARCH/vmlinuz $MOUNTPOINT/boot/pack<br />
# cp $MOUNTPOINT/boot/dtbs/linux-libre-64/rockchip/rk3399-gru-kevin.dtb $MOUNTPOINT/boot/pack<br />
<br />
# cd $MOUNTPOINT/boot/pack<br />
<br />
# lz4 -k vmlinuz<br />
# echo "console=tty0 console=ttyS2,115200n8 earlyprintk=ttyS2,115200n8 init=/sbin/init root=PARTUUID=%U/PARTNROFF=1 rootwait rw noinitrd" > cmdline<br />
# dd if=/dev/zero of=bootloader.bin bs=512 count=1<br />
</pre><br />
<br />
paste the following code into <code>kernel.its</code><br />
<br />
<pre><br />
/dts-v1/;<br />
<br />
/ {<br />
description = "Chrome OS kernel image with one or more FDT blobs";<br />
images {<br />
kernel@1{<br />
description = "kernel";<br />
data = /incbin/("vmlinuz.lz4");<br />
type = "kernel_noload";<br />
arch = "arm64";<br />
os = "linux";<br />
compression = "lz4";<br />
load = <0>;<br />
entry = <0>;<br />
};<br />
fdt@1{<br />
description = "rk3399-gru-kevin.dtb";<br />
data = /incbin/("rk3399-gru-kevin.dtb");<br />
type = "flat_dt";<br />
arch = "arm64";<br />
compression = "none";<br />
hash@1{<br />
algo = "sha1";<br />
};<br />
};<br />
};<br />
configurations {<br />
default = "conf@1";<br />
conf@1{<br />
kernel = "kernel@1";<br />
fdt = "fdt@1";<br />
};<br />
};<br />
};<br />
</pre><br />
<br />
<pre># mkimage -f kernel.its kernel.itb</pre><br />
<br />
if you see the following error message, just ignore, it will still work<br />
<pre><br />
kernel.its:6.17-15.11: Warning (unit_address_vs_reg): /images/kernel@1: node has a unit name, but no reg or ranges property<br />
kernel.its:16.14-25.11: Warning (unit_address_vs_reg): /images/fdt@1: node has a unit name, but no reg or ranges property<br />
kernel.its:22.19-24.15: Warning (unit_address_vs_reg): /images/fdt@1/hash@1: node has a unit name, but no reg or ranges property<br />
kernel.its:29.15-32.11: Warning (unit_address_vs_reg): /configurations/conf@1: node has a unit name, but no reg or ranges property<br />
mkimage: verify_header failed for FIT Image support with exit code 1<br />
</pre><br />
<br />
and paste the following code into <code>pack_vboot.sh</code><br />
<br />
<pre><br />
futility --debug vbutil_kernel \<br />
--pack vmlinux.kpart \<br />
--version 1 \<br />
--vmlinuz kernel.itb \<br />
--arch aarch64 \<br />
--keyblock kernel.keyblock \<br />
--signprivate kernel_data_key.vbprivk \<br />
--config cmdline \<br />
--bootloader bootloader.bin<br />
</pre><br />
Now run the following commands:<br />
<pre><br />
# sh pack_vboot.sh<br />
# dd if=vmlinux.kpart of=/dev/sdX1<br />
# cd<br />
# umount $MOUNTPOINT<br />
</pre><br />
<br />
== Boot! ==<br />
<br />
<br />
it should boot up. login as root<br />
<br />
in order to update the system you will need some way to connect to the internet, i am using a usb-c ethernet adapter<br />
https://www.amazon.com/Nekteck-Ethernet-Compatible-Pixelbook-Thunderbolt/dp/B0749DCDRV/<br />
<br />
plug in the usb ethernet and dhcp should assign an ip<br />
<br />
then sync the time<br />
<pre><br />
# systemctl restart systemd-timesyncd.service<br />
# pacman -Sy<br />
# pacman -S archlinux-keyring archlinux32-keyring archlinuxarm-keyring parabola-keyring<br />
</pre><br />
it will fail because of keyring, but you downloaded it!<br />
<pre><br />
# pacman -U /var/cache/pacman/pkg/*-keyring-*<br />
# pacman -S archlinux-keyring archlinux32-keyring archlinuxarm-keyring parabola-keyring<br />
# pacman -S archlinux-keyring archlinux32-keyring archlinuxarm-keyring parabola-keyring<br />
</pre><br />
<br />
TODO: get <code>pacman-key --refresh</code> to work<br />
<br />
as an alternative temporary way around, we will just disable signature checking for this test environment.<br />
<br />
<pre><br />
sed -i '/^SigLevel*/SigLevel = Never/' /etc/pacman.conf<br />
</pre><br />
<br />
<pre><br />
# pacman -S linux-libre-64 --overwrite '/*'<br />
# pacman -Su linux-libre-firmware acpi vim nano networkmanager<br />
</pre><br />
<br />
== Bonus extra info ==<br />
<br />
=== make your own debug port breakout ===<br />
I dont know where to get a servo board but the you can make your own debug header breakout to get serial console access / early boot logs etc<br />
<br />
the breakout https://www.amazon.com/Proto-Advantage-DR040D254P060-60-Pin-Connector-Adapter/dp/B097S2C53T<br />
<br />
the connector https://www.digikey.com/en/products/detail/panasonic-electric-works/AXK850145WG/1986616<br />
<br />
usb <--> rs232 https://www.amazon.com/HiLetgo-CP2102-Converter-Adapter-Downloader/dp/B00LODGRV8 (get 2)<br />
<br />
servo connector pinout is described in this pdf (page 14) (V2 DEBUG HEADER)<br />
<br />
https://www.chromium.org/chromium-os/servo/810-10010-03_20120227_servo_SCH_0.pdf<br />
<br />
you can use a continuity meter to determine connector orientation but finding the corner pin that is ground<br />
<br />
<pre><br />
<br />
<br />
PIN-33 UART1_DUT_SERVO_TX --+ +-- PIN-17 UART2_DUT_SERVO_TX<br />
| |<br />
| |<br />
| |<br />
49 vG vG G 1<br />
|||||||||||||||||||||||||<br />
9753197531975319753197531<br />
1234567890123210987654321<br />
0864208642086420864208642<br />
|||||||||||||||||||||||||<br />
50 G G ^ G ^ G 2<br />
| |<br />
| |<br />
| |<br />
PIN-32 UART1_SERVO_DUT_TX --+ +-- PIN-16 UART2_SERVO_DUT_TX<br />
<br />
<br />
GND PINS = 1, 8, 15, 20, 31, 36, 42<br />
</pre><br />
<br />
=== set bios boot timeout to 2 seconds ===<br />
<br />
https://old.reddit.com/r/Crouton/comments/2szn59/how_to_shorten_os_verfication_warning_screen_on/<br />
<br />
=== blobless coreboot / etc ===<br />
https://gitlab.com/vicencb/kevinboot/</div>Maihttps://wiki.parabola.nu/index.php?title=User:Mai&diff=23582User:Mai2021-11-10T22:26:12Z<p>Mai: /* extract / copy files */</p>
<hr />
<div>{{stub}}<br />
== Status for Samsung Chromebook Plus v1 aka kevin aka gru-kevin aka xe513c24 ==<br />
=== Kernel ===<br />
{{pkg|linux-libre-64}} (armv7h) works but needs to be packed correctly to boot, the following is a rough guide on how i was able to boot this kernel on this hardware<br />
<br />
=== what does not work ===<br />
- wifi<br />
- probably more stuff<br />
<br />
=== What you will need ===<br />
- this laptop :P<br />
- micro sd card at least 2GB, 8+GB reccomended<br />
- another computer that has a linux environment so we can download / extract / pack the kernel and install rootfs<br />
<br />
== Unlock external booting ==<br />
=== Switch to developer mode ===<br />
<br />
# Turn off the laptop.<br />
# To invoke Recovery mode, you hold down the ESC and Refresh keys and poke the Power button.<br />
# At the Recovery screen press Ctrl-D (there’s no prompt - you have to know to do it).<br />
# Confirm switching to developer mode by pressing enter, and the laptop will reboot and reset the system. This takes about 10-15 minutes.<br />
<br />
Note: After enabling developer mode, you will need to press Ctrl-D each time you boot, or wait 30 seconds to continue booting.<br />
=== Enable booting from external storage ===<br />
<br />
# After booting into developer mode, hold Ctrl and Alt and poke the F2 key. This will open up the developer console.<br />
# Type root to the login screen.<br />
# Then type this to enable USB booting:<br />
<br />
<code>$ enable_dev_usb_boot</code><br />
<br />
Reboot the system to allow the change to take effect.<br />
<br />
Source: https://chromebooks.readthedocs.io/en/latest/source/README.html#switch-to-developer-mode<br />
<br />
== Install packages ==<br />
<code>pacman -S {{pkg|vboot-utils}} {{pkg|uboot-tools}} {{pkg|gptfdisk}}</code><br />
<br />
== Gather files ==<br />
<br />
<pre><br />
$ mkdir parabola-armv7-64<br />
$ cd parabola-armv7-64<br />
<br />
$ wget -c https://redirector.parabola.nu/iso/armv7h-systemd-cli-2020.02/parabola-armv7h-systemd-cli-2020.02-tarball.tar.gz<br />
$ wget -c https://redirector.parabola.nu/iso/armv7h-systemd-cli-2020.02/parabola-armv7h-systemd-cli-2020.02-tarball.tar.gz.sig<br />
$ wget -c https://repomirror.parabola.nu/pool/parabola/linux-libre-64-5.11.11-3-armv7h.pkg.tar.xz<br />
$ wget -c https://repomirror.parabola.nu/pool/parabola/linux-libre-64-5.11.11-3-armv7h.pkg.tar.xz.sig<br />
$ wget -c https://git.parabola.nu/abslibre.git/plain/libre/linux-libre/kernel.keyblock<br />
$ wget -c https://git.parabola.nu/abslibre.git/plain/libre/linux-libre/kernel_data_key.vbprivk<br />
<br />
<br />
$ gpg --recv-keys FBCC5AD7421197B7ABA72853908710913E8C7778<br />
$ gpg --verify parabola-armv7h-systemd-cli-2020.02-tarball.tar.gz.sig<br />
$ gpg --recv-keys 782F9DDBE36BA7F3D4DE49065F5DFCC14177E263<br />
$ gpg --verify linux-libre-64-5.11.11-3-armv7h.pkg.tar.xz.sig<br />
</pre><br />
<br />
save the following code as <code>partition_vboot.sh</code><br />
<br />
<pre><br />
#!/bin/bash <br />
<br />
DISK="$1" <br />
<br />
# Make sure only root can run our script<br />
if [ "$(id -u)" != "0" ]; then<br />
echo "This script must be run as root" 1>&2<br />
exit 1 <br />
fi <br />
<br />
if [ x"$DISK" == 'x' ]; then<br />
echo "This script requires a base block device as its only arguement" 1>&2<br />
echo "example: $0 /dev/sdb"<br />
exit 1 <br />
fi <br />
<br />
DISK_DEVICE_NAME="$(echo $DISK | awk -F'/' '{print $NF}')"<br />
ROOT_PARTITION="$DISK"2<br />
SWAP_PARTITION="$DISK"3<br />
# TODO allow specify TOTAL_SECTORS<br />
TOTAL_SECTORS=$(cat /sys/block/$DISK_DEVICE_NAME/size)<br />
SECTOR_SIZE=$(cat /sys/block/$DISK_DEVICE_NAME/queue/hw_sector_size)<br />
<br />
# the following are in sectors, 1MB = 2048 sectors<br />
FIRST_GAP_SIZE=8192 # 2048 sectors * 4MB<br />
LAST_GAP_SIZE=2048 # 2048 sectors * 1MB<br />
SWAP_PART_SIZE=8388608 # 2048 sectors * 4096MB<br />
KERNEL_PART_SIZE=65536 # 2048 sectors * 32MB<br />
<br />
# layout arithmatic <br />
FIRST_GAP_START=0 <br />
FIRST_GAP_END=$(( $FIRST_GAP_SIZE - 1 ))<br />
KERNEL_PART_START=$(( $FIRST_GAP_END + 1 ))<br />
KERNEL_PART_END=$(( $FIRST_GAP_END + $KERNEL_PART_SIZE ))<br />
ROOTFS_PART_START=$(( $KERNEL_PART_END + 1 ))<br />
<br />
LAST_GAP_END=$(( $TOTAL_SECTORS - 1 ))<br />
LAST_GAP_START=$(( $LAST_GAP_END - $LAST_GAP_SIZE + 1 ))<br />
if [ $TOTAL_SECTORS -lt 10000000 ]; then # if size of disk is less than 5GB do not make swap<br />
MAKESWAP='false' <br />
ROOTFS_PART_END=$(( $LAST_GAP_START - 1 ))<br />
SWAP_PART_END=0<br />
SWAP_PART_START=0<br />
else<br />
MAKESWAP='true' <br />
SWAP_PART_END=$(( $LAST_GAP_START - 1 ))<br />
SWAP_PART_START=$(( $SWAP_PART_END - $SWAP_PART_SIZE + 1 ))<br />
ROOTFS_PART_END=$(( $SWAP_PART_START - 1 ))<br />
fi<br />
<br />
echo "TOTAL_SECTORS = $TOTAL_SECTORS"<br />
echo "SECTOR_SIZE = $SECTOR_SIZE"<br />
echo ""<br />
echo "FIRST_GAP_SIZE = $FIRST_GAP_SIZE"<br />
echo "LAST_GAP_SIZE = $LAST_GAP_SIZE"<br />
echo "SWAP_PART_SIZE = $SWAP_PART_SIZE"<br />
echo "KERNEL_PART_SIZE = $KERNEL_PART_SIZE"<br />
echo ""<br />
echo "FIRST_GAP_START = $FIRST_GAP_START $(( $FIRST_GAP_START / 2048 )) MB"<br />
echo "FIRST_GAP_END = $FIRST_GAP_END"<br />
echo "KERNEL_PART_START = $KERNEL_PART_START $(( $KERNEL_PART_START / 2048 )) MB"<br />
echo "KERNEL_PART_END = $KERNEL_PART_END"<br />
echo "ROOTFS_PART_START = $ROOTFS_PART_START $(( $ROOTFS_PART_START / 2048 )) MB"<br />
echo "ROOTFS_PART_END = $ROOTFS_PART_END"<br />
echo "SWAP_PART_START = $SWAP_PART_START $(( $SWAP_PART_START / 2048 )) MB"<br />
echo "SWAP_PART_END = $SWAP_PART_END"<br />
echo "LAST_GAP_START = $LAST_GAP_START $(( $LAST_GAP_START / 2048 )) MB"<br />
echo "LAST_GAP_END = $LAST_GAP_END"<br />
<br />
# use `sgdisk --list-types' to get all possible type codes<br />
KERNEL_PART_TYPE='7f00'<br />
ROOTFS_PART_TYPE='7f01'<br />
SWAP_PART_TYPE='8200'<br />
<br />
# wipe disk, and create new gpt partition table<br />
sgdisk --zap-all $DISK<br />
sgdisk -o $DISK<br />
<br />
# create the kernel partition<br />
sgdisk --new=1:$KERNEL_PART_START:$KERNEL_PART_END $DISK<br />
sgdisk --typecode=1:$KERNEL_PART_TYPE $DISK<br />
sgdisk --change-name=1:Kernel $DISK<br />
sgdisk --attributes=1:=:015A000000000000 $DISK<br />
<br />
# create the rootfs partition <br />
sgdisk --new=2:$ROOTFS_PART_START:$ROOTFS_PART_END $DISK<br />
sgdisk --typecode=2:$ROOTFS_PART_TYPE $DISK<br />
sgdisk --change-name=2:Root $DISK<br />
mkfs.ext4 $ROOT_PARTITION<br />
<br />
# create the swap partition<br />
if [ $MAKESWAP = 'true' ]; then<br />
sgdisk --new=3:$SWAP_PART_START:$SWAP_PART_END $DISK<br />
sgdisk --typecode=3:$SWAP_PART_TYPE $DISK<br />
sgdisk --change-name=3:Swap $DISK<br />
mkswap $SWAP_PARTITION<br />
fi<br />
<br />
sgdisk --print $DISK<br />
lsblk $DISK<br />
</pre><br />
<br />
== partition micro sd card & mount the rootfs partition ==<br />
<br />
<code>partition_vboot.sh</code> is a replacement for cgpt i made that uses sgdisk to create a compatible partition layout for depthcharge chromebooks (asus c201 & samsung chromebook plus v1). I have tested it with cards as small as 2GB, it will automatically make a 4GB swap partition if the size of the disk is detected to be above 4GB, the rest of the disk will be used for the rootfs partition<br />
<br />
<pre># sh partition_vboot.sh /dev/sdX</pre><br />
<br />
if you dont want to run this script you can follow the partitioning instructions on the archlinuxarm wiki page for this device<br />
https://archlinuxarm.org/platforms/armv8/rockchip/samsung-chromebook-plus<br />
<br />
<br />
after the rootfs partition is created and formated, mount it<br />
<pre><br />
# mkdir $MOUNTPOINT<br />
# mount /dev/sdX2 $MOUNTPOINT<br />
</pre><br />
<br />
== extract / copy files ==<br />
<pre><br />
# bsdtar -xf parabola-armv7h-systemd-cli-2020.02-tarball.tar.gz -C $MOUNTPOINT<br />
# bsdtar -xf linux-libre-64-5.11.11-3-armv7h.pkg.tar.xz -C $MOUNTPOINT<br />
# cp linux-libre-64-5.11.11-3-armv7h.pkg.tar.xz $MOUNTPOINT/var/cache/pacman/pkg/<br />
<br />
# echo > $MOUNTPOINT/etc/fstab<br />
<br />
# mkdir $MOUNTPOINT/boot/pack<br />
# cp kernel.keyblock $MOUNTPOINT/boot/pack<br />
# cp kernel_data_key.vbprivk $MOUNTPOINT/boot/pack<br />
# cp $MOUNTPOINT/usr/lib/modules/5.11.11-gnu-3-64-ARCH/vmlinuz $MOUNTPOINT/boot/pack<br />
# cp $MOUNTPOINT/boot/dtbs/linux-libre-64/rockchip/rk3399-gru-kevin.dtb $MOUNTPOINT/boot/pack<br />
<br />
# cd $MOUNTPOINT/boot/pack<br />
<br />
# lz4 -k vmlinuz<br />
# echo "console=tty0 console=ttyS2,115200n8 earlyprintk=ttyS2,115200n8 init=/sbin/init root=PARTUUID=%U/PARTNROFF=1 rootwait rw noinitrd" > cmdline<br />
# dd if=/dev/zero of=bootloader.bin bs=512 count=1<br />
</pre><br />
<br />
paste the following code into <code>kernel.its</code><br />
<br />
<pre><br />
/dts-v1/;<br />
<br />
/ {<br />
description = "Chrome OS kernel image with one or more FDT blobs";<br />
images {<br />
kernel@1{<br />
description = "kernel";<br />
data = /incbin/("vmlinuz.lz4");<br />
type = "kernel_noload";<br />
arch = "arm64";<br />
os = "linux";<br />
compression = "lz4";<br />
load = <0>;<br />
entry = <0>;<br />
};<br />
fdt@1{<br />
description = "rk3399-gru-kevin.dtb";<br />
data = /incbin/("rk3399-gru-kevin.dtb");<br />
type = "flat_dt";<br />
arch = "arm64";<br />
compression = "none";<br />
hash@1{<br />
algo = "sha1";<br />
};<br />
};<br />
};<br />
configurations {<br />
default = "conf@1";<br />
conf@1{<br />
kernel = "kernel@1";<br />
fdt = "fdt@1";<br />
};<br />
};<br />
};<br />
</pre><br />
<br />
<pre># mkimage -f kernel.its kernel.itb</pre><br />
<br />
if you see the following error message, just ignore, it will still work<br />
<pre><br />
kernel.its:6.17-15.11: Warning (unit_address_vs_reg): /images/kernel@1: node has a unit name, but no reg or ranges property<br />
kernel.its:16.14-25.11: Warning (unit_address_vs_reg): /images/fdt@1: node has a unit name, but no reg or ranges property<br />
kernel.its:22.19-24.15: Warning (unit_address_vs_reg): /images/fdt@1/hash@1: node has a unit name, but no reg or ranges property<br />
kernel.its:29.15-32.11: Warning (unit_address_vs_reg): /configurations/conf@1: node has a unit name, but no reg or ranges property<br />
mkimage: verify_header failed for FIT Image support with exit code 1<br />
</pre><br />
<br />
and paste the following code into <code>pack_vboot.sh</code><br />
<br />
<pre><br />
futility --debug vbutil_kernel \<br />
--pack vmlinux.kpart \<br />
--version 1 \<br />
--vmlinuz kernel.itb \<br />
--arch aarch64 \<br />
--keyblock kernel.keyblock \<br />
--signprivate kernel_data_key.vbprivk \<br />
--config cmdline \<br />
--bootloader bootloader.bin<br />
</pre><br />
Now run the following commands:<br />
<pre><br />
# sh pack_vboot.sh<br />
# dd if=vmlinux.kpart of=/dev/sdX1<br />
# cd<br />
# umount $MOUNTPOINT<br />
</pre><br />
<br />
== Boot! ==<br />
<br />
<br />
it should boot up. login as root<br />
<br />
in order to update the system you will need some way to connect to the internet, i am using a usb-c ethernet adapter<br />
https://www.amazon.com/Nekteck-Ethernet-Compatible-Pixelbook-Thunderbolt/dp/B0749DCDRV/<br />
<br />
plug in the usb ethernet and dhcp should assign an ip<br />
<br />
then sync the time<br />
<pre><br />
# systemctl restart systemd-timesyncd.service<br />
# pacman -Syu linux-libre-64 acpi<br />
</pre><br />
it will fail because of keyring, but you downloaded it!<br />
<pre><br />
# pacman -U /var/cache/pacman/pkg/parabola-keyring*<br />
# pacman -S parabola-keyring<br />
# pacman -Su linux-libre-64 acpi<br />
# pacman -S linux-libre-64 --overwrite '/*'<br />
# pacman -S linux-libre-firmware<br />
</pre><br />
<br />
== Bonus extra info ==<br />
<br />
=== make your own debug port breakout ===<br />
I dont know where to get a servo board but the you can make your own debug header breakout to get serial console access / early boot logs etc<br />
<br />
the breakout https://www.amazon.com/Proto-Advantage-DR040D254P060-60-Pin-Connector-Adapter/dp/B097S2C53T<br />
<br />
the connector https://www.digikey.com/en/products/detail/panasonic-electric-works/AXK850145WG/1986616<br />
<br />
usb <--> rs232 https://www.amazon.com/HiLetgo-CP2102-Converter-Adapter-Downloader/dp/B00LODGRV8 (get 2)<br />
<br />
servo connector pinout is described in this pdf (page 14) (V2 DEBUG HEADER)<br />
<br />
https://www.chromium.org/chromium-os/servo/810-10010-03_20120227_servo_SCH_0.pdf<br />
<br />
you can use a continuity meter to determine connector orientation but finding the corner pin that is ground<br />
<br />
<pre><br />
<br />
<br />
PIN-33 UART1_DUT_SERVO_TX --+ +-- PIN-17 UART2_DUT_SERVO_TX<br />
| |<br />
| |<br />
| |<br />
49 vG vG G 1<br />
|||||||||||||||||||||||||<br />
9753197531975319753197531<br />
1234567890123210987654321<br />
0864208642086420864208642<br />
|||||||||||||||||||||||||<br />
50 G G ^ G ^ G 2<br />
| |<br />
| |<br />
| |<br />
PIN-32 UART1_SERVO_DUT_TX --+ +-- PIN-16 UART2_SERVO_DUT_TX<br />
<br />
<br />
GND PINS = 1, 8, 15, 20, 31, 36, 42<br />
</pre><br />
<br />
=== set bios boot timeout to 2 seconds ===<br />
<br />
https://old.reddit.com/r/Crouton/comments/2szn59/how_to_shorten_os_verfication_warning_screen_on/<br />
<br />
=== blobless coreboot / etc ===<br />
https://gitlab.com/vicencb/kevinboot/</div>Maihttps://wiki.parabola.nu/index.php?title=User:Mai&diff=23581User:Mai2021-11-10T22:16:58Z<p>Mai: /* extract / copy files */</p>
<hr />
<div>{{stub}}<br />
== Status for Samsung Chromebook Plus v1 aka kevin aka gru-kevin aka xe513c24 ==<br />
=== Kernel ===<br />
{{pkg|linux-libre-64}} (armv7h) works but needs to be packed correctly to boot, the following is a rough guide on how i was able to boot this kernel on this hardware<br />
<br />
=== what does not work ===<br />
- wifi<br />
- probably more stuff<br />
<br />
=== What you will need ===<br />
- this laptop :P<br />
- micro sd card at least 2GB, 8+GB reccomended<br />
- another computer that has a linux environment so we can download / extract / pack the kernel and install rootfs<br />
<br />
== Unlock external booting ==<br />
=== Switch to developer mode ===<br />
<br />
# Turn off the laptop.<br />
# To invoke Recovery mode, you hold down the ESC and Refresh keys and poke the Power button.<br />
# At the Recovery screen press Ctrl-D (there’s no prompt - you have to know to do it).<br />
# Confirm switching to developer mode by pressing enter, and the laptop will reboot and reset the system. This takes about 10-15 minutes.<br />
<br />
Note: After enabling developer mode, you will need to press Ctrl-D each time you boot, or wait 30 seconds to continue booting.<br />
=== Enable booting from external storage ===<br />
<br />
# After booting into developer mode, hold Ctrl and Alt and poke the F2 key. This will open up the developer console.<br />
# Type root to the login screen.<br />
# Then type this to enable USB booting:<br />
<br />
<code>$ enable_dev_usb_boot</code><br />
<br />
Reboot the system to allow the change to take effect.<br />
<br />
Source: https://chromebooks.readthedocs.io/en/latest/source/README.html#switch-to-developer-mode<br />
<br />
== Install packages ==<br />
<code>pacman -S {{pkg|vboot-utils}} {{pkg|uboot-tools}} {{pkg|gptfdisk}}</code><br />
<br />
== Gather files ==<br />
<br />
<pre><br />
$ mkdir parabola-armv7-64<br />
$ cd parabola-armv7-64<br />
<br />
$ wget -c https://redirector.parabola.nu/iso/armv7h-systemd-cli-2020.02/parabola-armv7h-systemd-cli-2020.02-tarball.tar.gz<br />
$ wget -c https://redirector.parabola.nu/iso/armv7h-systemd-cli-2020.02/parabola-armv7h-systemd-cli-2020.02-tarball.tar.gz.sig<br />
$ wget -c https://repomirror.parabola.nu/pool/parabola/linux-libre-64-5.11.11-3-armv7h.pkg.tar.xz<br />
$ wget -c https://repomirror.parabola.nu/pool/parabola/linux-libre-64-5.11.11-3-armv7h.pkg.tar.xz.sig<br />
$ wget -c https://git.parabola.nu/abslibre.git/plain/libre/linux-libre/kernel.keyblock<br />
$ wget -c https://git.parabola.nu/abslibre.git/plain/libre/linux-libre/kernel_data_key.vbprivk<br />
<br />
<br />
$ gpg --recv-keys FBCC5AD7421197B7ABA72853908710913E8C7778<br />
$ gpg --verify parabola-armv7h-systemd-cli-2020.02-tarball.tar.gz.sig<br />
$ gpg --recv-keys 782F9DDBE36BA7F3D4DE49065F5DFCC14177E263<br />
$ gpg --verify linux-libre-64-5.11.11-3-armv7h.pkg.tar.xz.sig<br />
</pre><br />
<br />
save the following code as <code>partition_vboot.sh</code><br />
<br />
<pre><br />
#!/bin/bash <br />
<br />
DISK="$1" <br />
<br />
# Make sure only root can run our script<br />
if [ "$(id -u)" != "0" ]; then<br />
echo "This script must be run as root" 1>&2<br />
exit 1 <br />
fi <br />
<br />
if [ x"$DISK" == 'x' ]; then<br />
echo "This script requires a base block device as its only arguement" 1>&2<br />
echo "example: $0 /dev/sdb"<br />
exit 1 <br />
fi <br />
<br />
DISK_DEVICE_NAME="$(echo $DISK | awk -F'/' '{print $NF}')"<br />
ROOT_PARTITION="$DISK"2<br />
SWAP_PARTITION="$DISK"3<br />
# TODO allow specify TOTAL_SECTORS<br />
TOTAL_SECTORS=$(cat /sys/block/$DISK_DEVICE_NAME/size)<br />
SECTOR_SIZE=$(cat /sys/block/$DISK_DEVICE_NAME/queue/hw_sector_size)<br />
<br />
# the following are in sectors, 1MB = 2048 sectors<br />
FIRST_GAP_SIZE=8192 # 2048 sectors * 4MB<br />
LAST_GAP_SIZE=2048 # 2048 sectors * 1MB<br />
SWAP_PART_SIZE=8388608 # 2048 sectors * 4096MB<br />
KERNEL_PART_SIZE=65536 # 2048 sectors * 32MB<br />
<br />
# layout arithmatic <br />
FIRST_GAP_START=0 <br />
FIRST_GAP_END=$(( $FIRST_GAP_SIZE - 1 ))<br />
KERNEL_PART_START=$(( $FIRST_GAP_END + 1 ))<br />
KERNEL_PART_END=$(( $FIRST_GAP_END + $KERNEL_PART_SIZE ))<br />
ROOTFS_PART_START=$(( $KERNEL_PART_END + 1 ))<br />
<br />
LAST_GAP_END=$(( $TOTAL_SECTORS - 1 ))<br />
LAST_GAP_START=$(( $LAST_GAP_END - $LAST_GAP_SIZE + 1 ))<br />
if [ $TOTAL_SECTORS -lt 10000000 ]; then # if size of disk is less than 5GB do not make swap<br />
MAKESWAP='false' <br />
ROOTFS_PART_END=$(( $LAST_GAP_START - 1 ))<br />
SWAP_PART_END=0<br />
SWAP_PART_START=0<br />
else<br />
MAKESWAP='true' <br />
SWAP_PART_END=$(( $LAST_GAP_START - 1 ))<br />
SWAP_PART_START=$(( $SWAP_PART_END - $SWAP_PART_SIZE + 1 ))<br />
ROOTFS_PART_END=$(( $SWAP_PART_START - 1 ))<br />
fi<br />
<br />
echo "TOTAL_SECTORS = $TOTAL_SECTORS"<br />
echo "SECTOR_SIZE = $SECTOR_SIZE"<br />
echo ""<br />
echo "FIRST_GAP_SIZE = $FIRST_GAP_SIZE"<br />
echo "LAST_GAP_SIZE = $LAST_GAP_SIZE"<br />
echo "SWAP_PART_SIZE = $SWAP_PART_SIZE"<br />
echo "KERNEL_PART_SIZE = $KERNEL_PART_SIZE"<br />
echo ""<br />
echo "FIRST_GAP_START = $FIRST_GAP_START $(( $FIRST_GAP_START / 2048 )) MB"<br />
echo "FIRST_GAP_END = $FIRST_GAP_END"<br />
echo "KERNEL_PART_START = $KERNEL_PART_START $(( $KERNEL_PART_START / 2048 )) MB"<br />
echo "KERNEL_PART_END = $KERNEL_PART_END"<br />
echo "ROOTFS_PART_START = $ROOTFS_PART_START $(( $ROOTFS_PART_START / 2048 )) MB"<br />
echo "ROOTFS_PART_END = $ROOTFS_PART_END"<br />
echo "SWAP_PART_START = $SWAP_PART_START $(( $SWAP_PART_START / 2048 )) MB"<br />
echo "SWAP_PART_END = $SWAP_PART_END"<br />
echo "LAST_GAP_START = $LAST_GAP_START $(( $LAST_GAP_START / 2048 )) MB"<br />
echo "LAST_GAP_END = $LAST_GAP_END"<br />
<br />
# use `sgdisk --list-types' to get all possible type codes<br />
KERNEL_PART_TYPE='7f00'<br />
ROOTFS_PART_TYPE='7f01'<br />
SWAP_PART_TYPE='8200'<br />
<br />
# wipe disk, and create new gpt partition table<br />
sgdisk --zap-all $DISK<br />
sgdisk -o $DISK<br />
<br />
# create the kernel partition<br />
sgdisk --new=1:$KERNEL_PART_START:$KERNEL_PART_END $DISK<br />
sgdisk --typecode=1:$KERNEL_PART_TYPE $DISK<br />
sgdisk --change-name=1:Kernel $DISK<br />
sgdisk --attributes=1:=:015A000000000000 $DISK<br />
<br />
# create the rootfs partition <br />
sgdisk --new=2:$ROOTFS_PART_START:$ROOTFS_PART_END $DISK<br />
sgdisk --typecode=2:$ROOTFS_PART_TYPE $DISK<br />
sgdisk --change-name=2:Root $DISK<br />
mkfs.ext4 $ROOT_PARTITION<br />
<br />
# create the swap partition<br />
if [ $MAKESWAP = 'true' ]; then<br />
sgdisk --new=3:$SWAP_PART_START:$SWAP_PART_END $DISK<br />
sgdisk --typecode=3:$SWAP_PART_TYPE $DISK<br />
sgdisk --change-name=3:Swap $DISK<br />
mkswap $SWAP_PARTITION<br />
fi<br />
<br />
sgdisk --print $DISK<br />
lsblk $DISK<br />
</pre><br />
<br />
== partition micro sd card & mount the rootfs partition ==<br />
<br />
<code>partition_vboot.sh</code> is a replacement for cgpt i made that uses sgdisk to create a compatible partition layout for depthcharge chromebooks (asus c201 & samsung chromebook plus v1). I have tested it with cards as small as 2GB, it will automatically make a 4GB swap partition if the size of the disk is detected to be above 4GB, the rest of the disk will be used for the rootfs partition<br />
<br />
<pre># sh partition_vboot.sh /dev/sdX</pre><br />
<br />
if you dont want to run this script you can follow the partitioning instructions on the archlinuxarm wiki page for this device<br />
https://archlinuxarm.org/platforms/armv8/rockchip/samsung-chromebook-plus<br />
<br />
<br />
after the rootfs partition is created and formated, mount it<br />
<pre><br />
# mkdir $MOUNTPOINT<br />
# mount /dev/sdX2 $MOUNTPOINT<br />
</pre><br />
<br />
== extract / copy files ==<br />
<pre><br />
# bsdtar -xf parabola-armv7h-systemd-cli-2020.02-tarball.tar.gz -C $MOUNTPOINT<br />
# bsdtar -xf linux-libre-64-5.11.11-3-armv7h.pkg.tar.xz -C $MOUNTPOINT<br />
<br />
# echo > $MOUNTPOINT/etc/fstab<br />
<br />
# mkdir $MOUNTPOINT/boot/pack<br />
# cp kernel.keyblock $MOUNTPOINT/boot/pack<br />
# cp kernel_data_key.vbprivk $MOUNTPOINT/boot/pack<br />
# cp $MOUNTPOINT/usr/lib/modules/5.11.11-gnu-3-64-ARCH/vmlinuz $MOUNTPOINT/boot/pack<br />
# cp $MOUNTPOINT/boot/dtbs/linux-libre-64/rockchip/rk3399-gru-kevin.dtb $MOUNTPOINT/boot/pack<br />
<br />
# cd $MOUNTPOINT/boot/pack<br />
<br />
# lz4 -k vmlinuz<br />
# echo "console=tty0 console=ttyS2,115200n8 earlyprintk=ttyS2,115200n8 init=/sbin/init root=PARTUUID=%U/PARTNROFF=1 rootwait rw noinitrd" > cmdline<br />
# dd if=/dev/zero of=bootloader.bin bs=512 count=1<br />
</pre><br />
<br />
paste the following code into <code>kernel.its</code><br />
<br />
<pre><br />
/dts-v1/;<br />
<br />
/ {<br />
description = "Chrome OS kernel image with one or more FDT blobs";<br />
images {<br />
kernel@1{<br />
description = "kernel";<br />
data = /incbin/("vmlinuz.lz4");<br />
type = "kernel_noload";<br />
arch = "arm64";<br />
os = "linux";<br />
compression = "lz4";<br />
load = <0>;<br />
entry = <0>;<br />
};<br />
fdt@1{<br />
description = "rk3399-gru-kevin.dtb";<br />
data = /incbin/("rk3399-gru-kevin.dtb");<br />
type = "flat_dt";<br />
arch = "arm64";<br />
compression = "none";<br />
hash@1{<br />
algo = "sha1";<br />
};<br />
};<br />
};<br />
configurations {<br />
default = "conf@1";<br />
conf@1{<br />
kernel = "kernel@1";<br />
fdt = "fdt@1";<br />
};<br />
};<br />
};<br />
</pre><br />
<br />
<pre># mkimage -f kernel.its kernel.itb</pre><br />
<br />
if you see the following error message, just ignore, it will still work<br />
<pre><br />
kernel.its:6.17-15.11: Warning (unit_address_vs_reg): /images/kernel@1: node has a unit name, but no reg or ranges property<br />
kernel.its:16.14-25.11: Warning (unit_address_vs_reg): /images/fdt@1: node has a unit name, but no reg or ranges property<br />
kernel.its:22.19-24.15: Warning (unit_address_vs_reg): /images/fdt@1/hash@1: node has a unit name, but no reg or ranges property<br />
kernel.its:29.15-32.11: Warning (unit_address_vs_reg): /configurations/conf@1: node has a unit name, but no reg or ranges property<br />
mkimage: verify_header failed for FIT Image support with exit code 1<br />
</pre><br />
<br />
and paste the following code into <code>pack_vboot.sh</code><br />
<br />
<pre><br />
futility --debug vbutil_kernel \<br />
--pack vmlinux.kpart \<br />
--version 1 \<br />
--vmlinuz kernel.itb \<br />
--arch aarch64 \<br />
--keyblock kernel.keyblock \<br />
--signprivate kernel_data_key.vbprivk \<br />
--config cmdline \<br />
--bootloader bootloader.bin<br />
</pre><br />
Now run the following commands:<br />
<pre><br />
# sh pack_vboot.sh<br />
# dd if=vmlinux.kpart of=/dev/sdX1<br />
# cd<br />
# umount $MOUNTPOINT<br />
</pre><br />
<br />
== Boot! ==<br />
<br />
<br />
it should boot up. login as root<br />
<br />
in order to update the system you will need some way to connect to the internet, i am using a usb-c ethernet adapter<br />
https://www.amazon.com/Nekteck-Ethernet-Compatible-Pixelbook-Thunderbolt/dp/B0749DCDRV/<br />
<br />
plug in the usb ethernet and dhcp should assign an ip<br />
<br />
then sync the time<br />
<pre><br />
# systemctl restart systemd-timesyncd.service<br />
# pacman -Syu linux-libre-64 acpi<br />
</pre><br />
it will fail because of keyring, but you downloaded it!<br />
<pre><br />
# pacman -U /var/cache/pacman/pkg/parabola-keyring*<br />
# pacman -S parabola-keyring<br />
# pacman -Su linux-libre-64 acpi<br />
# pacman -S linux-libre-64 --overwrite '/*'<br />
# pacman -S linux-libre-firmware<br />
</pre><br />
<br />
== Bonus extra info ==<br />
<br />
=== make your own debug port breakout ===<br />
I dont know where to get a servo board but the you can make your own debug header breakout to get serial console access / early boot logs etc<br />
<br />
the breakout https://www.amazon.com/Proto-Advantage-DR040D254P060-60-Pin-Connector-Adapter/dp/B097S2C53T<br />
<br />
the connector https://www.digikey.com/en/products/detail/panasonic-electric-works/AXK850145WG/1986616<br />
<br />
usb <--> rs232 https://www.amazon.com/HiLetgo-CP2102-Converter-Adapter-Downloader/dp/B00LODGRV8 (get 2)<br />
<br />
servo connector pinout is described in this pdf (page 14) (V2 DEBUG HEADER)<br />
<br />
https://www.chromium.org/chromium-os/servo/810-10010-03_20120227_servo_SCH_0.pdf<br />
<br />
you can use a continuity meter to determine connector orientation but finding the corner pin that is ground<br />
<br />
<pre><br />
<br />
<br />
PIN-33 UART1_DUT_SERVO_TX --+ +-- PIN-17 UART2_DUT_SERVO_TX<br />
| |<br />
| |<br />
| |<br />
49 vG vG G 1<br />
|||||||||||||||||||||||||<br />
9753197531975319753197531<br />
1234567890123210987654321<br />
0864208642086420864208642<br />
|||||||||||||||||||||||||<br />
50 G G ^ G ^ G 2<br />
| |<br />
| |<br />
| |<br />
PIN-32 UART1_SERVO_DUT_TX --+ +-- PIN-16 UART2_SERVO_DUT_TX<br />
<br />
<br />
GND PINS = 1, 8, 15, 20, 31, 36, 42<br />
</pre><br />
<br />
=== set bios boot timeout to 2 seconds ===<br />
<br />
https://old.reddit.com/r/Crouton/comments/2szn59/how_to_shorten_os_verfication_warning_screen_on/<br />
<br />
=== blobless coreboot / etc ===<br />
https://gitlab.com/vicencb/kevinboot/</div>Maihttps://wiki.parabola.nu/index.php?title=User:Mai&diff=23580User:Mai2021-11-10T21:38:44Z<p>Mai: /* Boot! */</p>
<hr />
<div>{{stub}}<br />
== Status for Samsung Chromebook Plus v1 aka kevin aka gru-kevin aka xe513c24 ==<br />
=== Kernel ===<br />
{{pkg|linux-libre-64}} (armv7h) works but needs to be packed correctly to boot, the following is a rough guide on how i was able to boot this kernel on this hardware<br />
<br />
=== what does not work ===<br />
- wifi<br />
- probably more stuff<br />
<br />
=== What you will need ===<br />
- this laptop :P<br />
- micro sd card at least 2GB, 8+GB reccomended<br />
- another computer that has a linux environment so we can download / extract / pack the kernel and install rootfs<br />
<br />
== Unlock external booting ==<br />
=== Switch to developer mode ===<br />
<br />
# Turn off the laptop.<br />
# To invoke Recovery mode, you hold down the ESC and Refresh keys and poke the Power button.<br />
# At the Recovery screen press Ctrl-D (there’s no prompt - you have to know to do it).<br />
# Confirm switching to developer mode by pressing enter, and the laptop will reboot and reset the system. This takes about 10-15 minutes.<br />
<br />
Note: After enabling developer mode, you will need to press Ctrl-D each time you boot, or wait 30 seconds to continue booting.<br />
=== Enable booting from external storage ===<br />
<br />
# After booting into developer mode, hold Ctrl and Alt and poke the F2 key. This will open up the developer console.<br />
# Type root to the login screen.<br />
# Then type this to enable USB booting:<br />
<br />
<code>$ enable_dev_usb_boot</code><br />
<br />
Reboot the system to allow the change to take effect.<br />
<br />
Source: https://chromebooks.readthedocs.io/en/latest/source/README.html#switch-to-developer-mode<br />
<br />
== Install packages ==<br />
<code>pacman -S {{pkg|vboot-utils}} {{pkg|uboot-tools}} {{pkg|gptfdisk}}</code><br />
<br />
== Gather files ==<br />
<br />
<pre><br />
$ mkdir parabola-armv7-64<br />
$ cd parabola-armv7-64<br />
<br />
$ wget -c https://redirector.parabola.nu/iso/armv7h-systemd-cli-2020.02/parabola-armv7h-systemd-cli-2020.02-tarball.tar.gz<br />
$ wget -c https://redirector.parabola.nu/iso/armv7h-systemd-cli-2020.02/parabola-armv7h-systemd-cli-2020.02-tarball.tar.gz.sig<br />
$ wget -c https://repomirror.parabola.nu/pool/parabola/linux-libre-64-5.11.11-3-armv7h.pkg.tar.xz<br />
$ wget -c https://repomirror.parabola.nu/pool/parabola/linux-libre-64-5.11.11-3-armv7h.pkg.tar.xz.sig<br />
$ wget -c https://git.parabola.nu/abslibre.git/plain/libre/linux-libre/kernel.keyblock<br />
$ wget -c https://git.parabola.nu/abslibre.git/plain/libre/linux-libre/kernel_data_key.vbprivk<br />
<br />
<br />
$ gpg --recv-keys FBCC5AD7421197B7ABA72853908710913E8C7778<br />
$ gpg --verify parabola-armv7h-systemd-cli-2020.02-tarball.tar.gz.sig<br />
$ gpg --recv-keys 782F9DDBE36BA7F3D4DE49065F5DFCC14177E263<br />
$ gpg --verify linux-libre-64-5.11.11-3-armv7h.pkg.tar.xz.sig<br />
</pre><br />
<br />
save the following code as <code>partition_vboot.sh</code><br />
<br />
<pre><br />
#!/bin/bash <br />
<br />
DISK="$1" <br />
<br />
# Make sure only root can run our script<br />
if [ "$(id -u)" != "0" ]; then<br />
echo "This script must be run as root" 1>&2<br />
exit 1 <br />
fi <br />
<br />
if [ x"$DISK" == 'x' ]; then<br />
echo "This script requires a base block device as its only arguement" 1>&2<br />
echo "example: $0 /dev/sdb"<br />
exit 1 <br />
fi <br />
<br />
DISK_DEVICE_NAME="$(echo $DISK | awk -F'/' '{print $NF}')"<br />
ROOT_PARTITION="$DISK"2<br />
SWAP_PARTITION="$DISK"3<br />
# TODO allow specify TOTAL_SECTORS<br />
TOTAL_SECTORS=$(cat /sys/block/$DISK_DEVICE_NAME/size)<br />
SECTOR_SIZE=$(cat /sys/block/$DISK_DEVICE_NAME/queue/hw_sector_size)<br />
<br />
# the following are in sectors, 1MB = 2048 sectors<br />
FIRST_GAP_SIZE=8192 # 2048 sectors * 4MB<br />
LAST_GAP_SIZE=2048 # 2048 sectors * 1MB<br />
SWAP_PART_SIZE=8388608 # 2048 sectors * 4096MB<br />
KERNEL_PART_SIZE=65536 # 2048 sectors * 32MB<br />
<br />
# layout arithmatic <br />
FIRST_GAP_START=0 <br />
FIRST_GAP_END=$(( $FIRST_GAP_SIZE - 1 ))<br />
KERNEL_PART_START=$(( $FIRST_GAP_END + 1 ))<br />
KERNEL_PART_END=$(( $FIRST_GAP_END + $KERNEL_PART_SIZE ))<br />
ROOTFS_PART_START=$(( $KERNEL_PART_END + 1 ))<br />
<br />
LAST_GAP_END=$(( $TOTAL_SECTORS - 1 ))<br />
LAST_GAP_START=$(( $LAST_GAP_END - $LAST_GAP_SIZE + 1 ))<br />
if [ $TOTAL_SECTORS -lt 10000000 ]; then # if size of disk is less than 5GB do not make swap<br />
MAKESWAP='false' <br />
ROOTFS_PART_END=$(( $LAST_GAP_START - 1 ))<br />
SWAP_PART_END=0<br />
SWAP_PART_START=0<br />
else<br />
MAKESWAP='true' <br />
SWAP_PART_END=$(( $LAST_GAP_START - 1 ))<br />
SWAP_PART_START=$(( $SWAP_PART_END - $SWAP_PART_SIZE + 1 ))<br />
ROOTFS_PART_END=$(( $SWAP_PART_START - 1 ))<br />
fi<br />
<br />
echo "TOTAL_SECTORS = $TOTAL_SECTORS"<br />
echo "SECTOR_SIZE = $SECTOR_SIZE"<br />
echo ""<br />
echo "FIRST_GAP_SIZE = $FIRST_GAP_SIZE"<br />
echo "LAST_GAP_SIZE = $LAST_GAP_SIZE"<br />
echo "SWAP_PART_SIZE = $SWAP_PART_SIZE"<br />
echo "KERNEL_PART_SIZE = $KERNEL_PART_SIZE"<br />
echo ""<br />
echo "FIRST_GAP_START = $FIRST_GAP_START $(( $FIRST_GAP_START / 2048 )) MB"<br />
echo "FIRST_GAP_END = $FIRST_GAP_END"<br />
echo "KERNEL_PART_START = $KERNEL_PART_START $(( $KERNEL_PART_START / 2048 )) MB"<br />
echo "KERNEL_PART_END = $KERNEL_PART_END"<br />
echo "ROOTFS_PART_START = $ROOTFS_PART_START $(( $ROOTFS_PART_START / 2048 )) MB"<br />
echo "ROOTFS_PART_END = $ROOTFS_PART_END"<br />
echo "SWAP_PART_START = $SWAP_PART_START $(( $SWAP_PART_START / 2048 )) MB"<br />
echo "SWAP_PART_END = $SWAP_PART_END"<br />
echo "LAST_GAP_START = $LAST_GAP_START $(( $LAST_GAP_START / 2048 )) MB"<br />
echo "LAST_GAP_END = $LAST_GAP_END"<br />
<br />
# use `sgdisk --list-types' to get all possible type codes<br />
KERNEL_PART_TYPE='7f00'<br />
ROOTFS_PART_TYPE='7f01'<br />
SWAP_PART_TYPE='8200'<br />
<br />
# wipe disk, and create new gpt partition table<br />
sgdisk --zap-all $DISK<br />
sgdisk -o $DISK<br />
<br />
# create the kernel partition<br />
sgdisk --new=1:$KERNEL_PART_START:$KERNEL_PART_END $DISK<br />
sgdisk --typecode=1:$KERNEL_PART_TYPE $DISK<br />
sgdisk --change-name=1:Kernel $DISK<br />
sgdisk --attributes=1:=:015A000000000000 $DISK<br />
<br />
# create the rootfs partition <br />
sgdisk --new=2:$ROOTFS_PART_START:$ROOTFS_PART_END $DISK<br />
sgdisk --typecode=2:$ROOTFS_PART_TYPE $DISK<br />
sgdisk --change-name=2:Root $DISK<br />
mkfs.ext4 $ROOT_PARTITION<br />
<br />
# create the swap partition<br />
if [ $MAKESWAP = 'true' ]; then<br />
sgdisk --new=3:$SWAP_PART_START:$SWAP_PART_END $DISK<br />
sgdisk --typecode=3:$SWAP_PART_TYPE $DISK<br />
sgdisk --change-name=3:Swap $DISK<br />
mkswap $SWAP_PARTITION<br />
fi<br />
<br />
sgdisk --print $DISK<br />
lsblk $DISK<br />
</pre><br />
<br />
== partition micro sd card & mount the rootfs partition ==<br />
<br />
<code>partition_vboot.sh</code> is a replacement for cgpt i made that uses sgdisk to create a compatible partition layout for depthcharge chromebooks (asus c201 & samsung chromebook plus v1). I have tested it with cards as small as 2GB, it will automatically make a 4GB swap partition if the size of the disk is detected to be above 4GB, the rest of the disk will be used for the rootfs partition<br />
<br />
<pre># sh partition_vboot.sh /dev/sdX</pre><br />
<br />
if you dont want to run this script you can follow the partitioning instructions on the archlinuxarm wiki page for this device<br />
https://archlinuxarm.org/platforms/armv8/rockchip/samsung-chromebook-plus<br />
<br />
<br />
after the rootfs partition is created and formated, mount it<br />
<pre><br />
# mkdir $MOUNTPOINT<br />
# mount /dev/sdX2 $MOUNTPOINT<br />
</pre><br />
<br />
== extract / copy files ==<br />
<pre><br />
# bsdtar -xf parabola-armv7h-systemd-cli-2020.02-tarball.tar.gz -C $MOUNTPOINT<br />
# bsdtar -xf linux-libre-64-5.11.11-3-armv7h.pkg.tar.xz -C $MOUNTPOINT<br />
<br />
# echo > $MOUNTPOINT/etc/fstab<br />
<br />
# mkdir $MOUNTPOINT/boot/pack<br />
# cp kernel.keyblock $MOUNTPOINT/boot/pack<br />
# cp kernel_data_key.vbprivk $MOUNTPOINT/boot/pack<br />
# cp $MOUNTPOINT/usr/lib/modules/5.11.11-gnu-3-64-ARCH/vmlinuz $MOUNTPOINT/boot/pack<br />
# cp $MOUNTPOINT/boot/dtbs/linux-libre-64/rockchip/rk3399-gru-kevin.dtb $MOUNTPOINT/boot/pack<br />
<br />
# cd $MOUNTPOINT/boot/pack<br />
<br />
# lz4 -k vmlinuz<br />
# echo "console=tty0 console=ttyS2,115200n8 earlyprintk=ttyS2,115200n8 init=/sbin/init root=PARTUUID=%U/PARTNROFF=1 rootwait rw noinitrd" > cmdline<br />
# dd if=/dev/zero of=bootloader.bin bs=512 count=1<br />
</pre><br />
<br />
paste the following code into <code>kernel.its</code><br />
<br />
<pre><br />
/dts-v1/;<br />
<br />
/ {<br />
description = "Chrome OS kernel image with one or more FDT blobs";<br />
images {<br />
kernel@1{<br />
description = "kernel";<br />
data = /incbin/("vmlinuz.lz4");<br />
type = "kernel_noload";<br />
arch = "arm64";<br />
os = "linux";<br />
compression = "lz4";<br />
load = <0>;<br />
entry = <0>;<br />
};<br />
fdt@1{<br />
description = "rk3399-gru-kevin.dtb";<br />
data = /incbin/("rk3399-gru-kevin.dtb");<br />
type = "flat_dt";<br />
arch = "arm64";<br />
compression = "none";<br />
hash@1{<br />
algo = "sha1";<br />
};<br />
};<br />
};<br />
configurations {<br />
default = "conf@1";<br />
conf@1{<br />
kernel = "kernel@1";<br />
fdt = "fdt@1";<br />
};<br />
};<br />
};<br />
</pre><br />
<br />
<pre># mkimage -f kernel.its kernel.itb</pre><br />
<br />
and paste the following code into <code>pack_vboot.sh</code><br />
<br />
<pre><br />
futility --debug vbutil_kernel \<br />
--pack vmlinux.kpart \<br />
--version 1 \<br />
--vmlinuz kernel.itb \<br />
--arch aarch64 \<br />
--keyblock kernel.keyblock \<br />
--signprivate kernel_data_key.vbprivk \<br />
--config cmdline \<br />
--bootloader bootloader.bin<br />
</pre><br />
Now run the following commands:<br />
<pre><br />
# sh pack_vboot.sh<br />
# dd if=vmlinux.kpart of=/dev/sdX1<br />
# cd<br />
# umount $MOUNTPOINT<br />
</pre><br />
<br />
== Boot! ==<br />
<br />
<br />
it should boot up. login as root<br />
<br />
in order to update the system you will need some way to connect to the internet, i am using a usb-c ethernet adapter<br />
https://www.amazon.com/Nekteck-Ethernet-Compatible-Pixelbook-Thunderbolt/dp/B0749DCDRV/<br />
<br />
plug in the usb ethernet and dhcp should assign an ip<br />
<br />
then sync the time<br />
<pre><br />
# systemctl restart systemd-timesyncd.service<br />
# pacman -Syu linux-libre-64 acpi<br />
</pre><br />
it will fail because of keyring, but you downloaded it!<br />
<pre><br />
# pacman -U /var/cache/pacman/pkg/parabola-keyring*<br />
# pacman -S parabola-keyring<br />
# pacman -Su linux-libre-64 acpi<br />
# pacman -S linux-libre-64 --overwrite '/*'<br />
# pacman -S linux-libre-firmware<br />
</pre><br />
<br />
== Bonus extra info ==<br />
<br />
=== make your own debug port breakout ===<br />
I dont know where to get a servo board but the you can make your own debug header breakout to get serial console access / early boot logs etc<br />
<br />
the breakout https://www.amazon.com/Proto-Advantage-DR040D254P060-60-Pin-Connector-Adapter/dp/B097S2C53T<br />
<br />
the connector https://www.digikey.com/en/products/detail/panasonic-electric-works/AXK850145WG/1986616<br />
<br />
usb <--> rs232 https://www.amazon.com/HiLetgo-CP2102-Converter-Adapter-Downloader/dp/B00LODGRV8 (get 2)<br />
<br />
servo connector pinout is described in this pdf (page 14) (V2 DEBUG HEADER)<br />
<br />
https://www.chromium.org/chromium-os/servo/810-10010-03_20120227_servo_SCH_0.pdf<br />
<br />
you can use a continuity meter to determine connector orientation but finding the corner pin that is ground<br />
<br />
<pre><br />
<br />
<br />
PIN-33 UART1_DUT_SERVO_TX --+ +-- PIN-17 UART2_DUT_SERVO_TX<br />
| |<br />
| |<br />
| |<br />
49 vG vG G 1<br />
|||||||||||||||||||||||||<br />
9753197531975319753197531<br />
1234567890123210987654321<br />
0864208642086420864208642<br />
|||||||||||||||||||||||||<br />
50 G G ^ G ^ G 2<br />
| |<br />
| |<br />
| |<br />
PIN-32 UART1_SERVO_DUT_TX --+ +-- PIN-16 UART2_SERVO_DUT_TX<br />
<br />
<br />
GND PINS = 1, 8, 15, 20, 31, 36, 42<br />
</pre><br />
<br />
=== set bios boot timeout to 2 seconds ===<br />
<br />
https://old.reddit.com/r/Crouton/comments/2szn59/how_to_shorten_os_verfication_warning_screen_on/<br />
<br />
=== blobless coreboot / etc ===<br />
https://gitlab.com/vicencb/kevinboot/</div>Maihttps://wiki.parabola.nu/index.php?title=User:Mai&diff=23579User:Mai2021-11-10T21:36:45Z<p>Mai: /* extract / copy files */</p>
<hr />
<div>{{stub}}<br />
== Status for Samsung Chromebook Plus v1 aka kevin aka gru-kevin aka xe513c24 ==<br />
=== Kernel ===<br />
{{pkg|linux-libre-64}} (armv7h) works but needs to be packed correctly to boot, the following is a rough guide on how i was able to boot this kernel on this hardware<br />
<br />
=== what does not work ===<br />
- wifi<br />
- probably more stuff<br />
<br />
=== What you will need ===<br />
- this laptop :P<br />
- micro sd card at least 2GB, 8+GB reccomended<br />
- another computer that has a linux environment so we can download / extract / pack the kernel and install rootfs<br />
<br />
== Unlock external booting ==<br />
=== Switch to developer mode ===<br />
<br />
# Turn off the laptop.<br />
# To invoke Recovery mode, you hold down the ESC and Refresh keys and poke the Power button.<br />
# At the Recovery screen press Ctrl-D (there’s no prompt - you have to know to do it).<br />
# Confirm switching to developer mode by pressing enter, and the laptop will reboot and reset the system. This takes about 10-15 minutes.<br />
<br />
Note: After enabling developer mode, you will need to press Ctrl-D each time you boot, or wait 30 seconds to continue booting.<br />
=== Enable booting from external storage ===<br />
<br />
# After booting into developer mode, hold Ctrl and Alt and poke the F2 key. This will open up the developer console.<br />
# Type root to the login screen.<br />
# Then type this to enable USB booting:<br />
<br />
<code>$ enable_dev_usb_boot</code><br />
<br />
Reboot the system to allow the change to take effect.<br />
<br />
Source: https://chromebooks.readthedocs.io/en/latest/source/README.html#switch-to-developer-mode<br />
<br />
== Install packages ==<br />
<code>pacman -S {{pkg|vboot-utils}} {{pkg|uboot-tools}} {{pkg|gptfdisk}}</code><br />
<br />
== Gather files ==<br />
<br />
<pre><br />
$ mkdir parabola-armv7-64<br />
$ cd parabola-armv7-64<br />
<br />
$ wget -c https://redirector.parabola.nu/iso/armv7h-systemd-cli-2020.02/parabola-armv7h-systemd-cli-2020.02-tarball.tar.gz<br />
$ wget -c https://redirector.parabola.nu/iso/armv7h-systemd-cli-2020.02/parabola-armv7h-systemd-cli-2020.02-tarball.tar.gz.sig<br />
$ wget -c https://repomirror.parabola.nu/pool/parabola/linux-libre-64-5.11.11-3-armv7h.pkg.tar.xz<br />
$ wget -c https://repomirror.parabola.nu/pool/parabola/linux-libre-64-5.11.11-3-armv7h.pkg.tar.xz.sig<br />
$ wget -c https://git.parabola.nu/abslibre.git/plain/libre/linux-libre/kernel.keyblock<br />
$ wget -c https://git.parabola.nu/abslibre.git/plain/libre/linux-libre/kernel_data_key.vbprivk<br />
<br />
<br />
$ gpg --recv-keys FBCC5AD7421197B7ABA72853908710913E8C7778<br />
$ gpg --verify parabola-armv7h-systemd-cli-2020.02-tarball.tar.gz.sig<br />
$ gpg --recv-keys 782F9DDBE36BA7F3D4DE49065F5DFCC14177E263<br />
$ gpg --verify linux-libre-64-5.11.11-3-armv7h.pkg.tar.xz.sig<br />
</pre><br />
<br />
save the following code as <code>partition_vboot.sh</code><br />
<br />
<pre><br />
#!/bin/bash <br />
<br />
DISK="$1" <br />
<br />
# Make sure only root can run our script<br />
if [ "$(id -u)" != "0" ]; then<br />
echo "This script must be run as root" 1>&2<br />
exit 1 <br />
fi <br />
<br />
if [ x"$DISK" == 'x' ]; then<br />
echo "This script requires a base block device as its only arguement" 1>&2<br />
echo "example: $0 /dev/sdb"<br />
exit 1 <br />
fi <br />
<br />
DISK_DEVICE_NAME="$(echo $DISK | awk -F'/' '{print $NF}')"<br />
ROOT_PARTITION="$DISK"2<br />
SWAP_PARTITION="$DISK"3<br />
# TODO allow specify TOTAL_SECTORS<br />
TOTAL_SECTORS=$(cat /sys/block/$DISK_DEVICE_NAME/size)<br />
SECTOR_SIZE=$(cat /sys/block/$DISK_DEVICE_NAME/queue/hw_sector_size)<br />
<br />
# the following are in sectors, 1MB = 2048 sectors<br />
FIRST_GAP_SIZE=8192 # 2048 sectors * 4MB<br />
LAST_GAP_SIZE=2048 # 2048 sectors * 1MB<br />
SWAP_PART_SIZE=8388608 # 2048 sectors * 4096MB<br />
KERNEL_PART_SIZE=65536 # 2048 sectors * 32MB<br />
<br />
# layout arithmatic <br />
FIRST_GAP_START=0 <br />
FIRST_GAP_END=$(( $FIRST_GAP_SIZE - 1 ))<br />
KERNEL_PART_START=$(( $FIRST_GAP_END + 1 ))<br />
KERNEL_PART_END=$(( $FIRST_GAP_END + $KERNEL_PART_SIZE ))<br />
ROOTFS_PART_START=$(( $KERNEL_PART_END + 1 ))<br />
<br />
LAST_GAP_END=$(( $TOTAL_SECTORS - 1 ))<br />
LAST_GAP_START=$(( $LAST_GAP_END - $LAST_GAP_SIZE + 1 ))<br />
if [ $TOTAL_SECTORS -lt 10000000 ]; then # if size of disk is less than 5GB do not make swap<br />
MAKESWAP='false' <br />
ROOTFS_PART_END=$(( $LAST_GAP_START - 1 ))<br />
SWAP_PART_END=0<br />
SWAP_PART_START=0<br />
else<br />
MAKESWAP='true' <br />
SWAP_PART_END=$(( $LAST_GAP_START - 1 ))<br />
SWAP_PART_START=$(( $SWAP_PART_END - $SWAP_PART_SIZE + 1 ))<br />
ROOTFS_PART_END=$(( $SWAP_PART_START - 1 ))<br />
fi<br />
<br />
echo "TOTAL_SECTORS = $TOTAL_SECTORS"<br />
echo "SECTOR_SIZE = $SECTOR_SIZE"<br />
echo ""<br />
echo "FIRST_GAP_SIZE = $FIRST_GAP_SIZE"<br />
echo "LAST_GAP_SIZE = $LAST_GAP_SIZE"<br />
echo "SWAP_PART_SIZE = $SWAP_PART_SIZE"<br />
echo "KERNEL_PART_SIZE = $KERNEL_PART_SIZE"<br />
echo ""<br />
echo "FIRST_GAP_START = $FIRST_GAP_START $(( $FIRST_GAP_START / 2048 )) MB"<br />
echo "FIRST_GAP_END = $FIRST_GAP_END"<br />
echo "KERNEL_PART_START = $KERNEL_PART_START $(( $KERNEL_PART_START / 2048 )) MB"<br />
echo "KERNEL_PART_END = $KERNEL_PART_END"<br />
echo "ROOTFS_PART_START = $ROOTFS_PART_START $(( $ROOTFS_PART_START / 2048 )) MB"<br />
echo "ROOTFS_PART_END = $ROOTFS_PART_END"<br />
echo "SWAP_PART_START = $SWAP_PART_START $(( $SWAP_PART_START / 2048 )) MB"<br />
echo "SWAP_PART_END = $SWAP_PART_END"<br />
echo "LAST_GAP_START = $LAST_GAP_START $(( $LAST_GAP_START / 2048 )) MB"<br />
echo "LAST_GAP_END = $LAST_GAP_END"<br />
<br />
# use `sgdisk --list-types' to get all possible type codes<br />
KERNEL_PART_TYPE='7f00'<br />
ROOTFS_PART_TYPE='7f01'<br />
SWAP_PART_TYPE='8200'<br />
<br />
# wipe disk, and create new gpt partition table<br />
sgdisk --zap-all $DISK<br />
sgdisk -o $DISK<br />
<br />
# create the kernel partition<br />
sgdisk --new=1:$KERNEL_PART_START:$KERNEL_PART_END $DISK<br />
sgdisk --typecode=1:$KERNEL_PART_TYPE $DISK<br />
sgdisk --change-name=1:Kernel $DISK<br />
sgdisk --attributes=1:=:015A000000000000 $DISK<br />
<br />
# create the rootfs partition <br />
sgdisk --new=2:$ROOTFS_PART_START:$ROOTFS_PART_END $DISK<br />
sgdisk --typecode=2:$ROOTFS_PART_TYPE $DISK<br />
sgdisk --change-name=2:Root $DISK<br />
mkfs.ext4 $ROOT_PARTITION<br />
<br />
# create the swap partition<br />
if [ $MAKESWAP = 'true' ]; then<br />
sgdisk --new=3:$SWAP_PART_START:$SWAP_PART_END $DISK<br />
sgdisk --typecode=3:$SWAP_PART_TYPE $DISK<br />
sgdisk --change-name=3:Swap $DISK<br />
mkswap $SWAP_PARTITION<br />
fi<br />
<br />
sgdisk --print $DISK<br />
lsblk $DISK<br />
</pre><br />
<br />
== partition micro sd card & mount the rootfs partition ==<br />
<br />
<code>partition_vboot.sh</code> is a replacement for cgpt i made that uses sgdisk to create a compatible partition layout for depthcharge chromebooks (asus c201 & samsung chromebook plus v1). I have tested it with cards as small as 2GB, it will automatically make a 4GB swap partition if the size of the disk is detected to be above 4GB, the rest of the disk will be used for the rootfs partition<br />
<br />
<pre># sh partition_vboot.sh /dev/sdX</pre><br />
<br />
if you dont want to run this script you can follow the partitioning instructions on the archlinuxarm wiki page for this device<br />
https://archlinuxarm.org/platforms/armv8/rockchip/samsung-chromebook-plus<br />
<br />
<br />
after the rootfs partition is created and formated, mount it<br />
<pre><br />
# mkdir $MOUNTPOINT<br />
# mount /dev/sdX2 $MOUNTPOINT<br />
</pre><br />
<br />
== extract / copy files ==<br />
<pre><br />
# bsdtar -xf parabola-armv7h-systemd-cli-2020.02-tarball.tar.gz -C $MOUNTPOINT<br />
# bsdtar -xf linux-libre-64-5.11.11-3-armv7h.pkg.tar.xz -C $MOUNTPOINT<br />
<br />
# echo > $MOUNTPOINT/etc/fstab<br />
<br />
# mkdir $MOUNTPOINT/boot/pack<br />
# cp kernel.keyblock $MOUNTPOINT/boot/pack<br />
# cp kernel_data_key.vbprivk $MOUNTPOINT/boot/pack<br />
# cp $MOUNTPOINT/usr/lib/modules/5.11.11-gnu-3-64-ARCH/vmlinuz $MOUNTPOINT/boot/pack<br />
# cp $MOUNTPOINT/boot/dtbs/linux-libre-64/rockchip/rk3399-gru-kevin.dtb $MOUNTPOINT/boot/pack<br />
<br />
# cd $MOUNTPOINT/boot/pack<br />
<br />
# lz4 -k vmlinuz<br />
# echo "console=tty0 console=ttyS2,115200n8 earlyprintk=ttyS2,115200n8 init=/sbin/init root=PARTUUID=%U/PARTNROFF=1 rootwait rw noinitrd" > cmdline<br />
# dd if=/dev/zero of=bootloader.bin bs=512 count=1<br />
</pre><br />
<br />
paste the following code into <code>kernel.its</code><br />
<br />
<pre><br />
/dts-v1/;<br />
<br />
/ {<br />
description = "Chrome OS kernel image with one or more FDT blobs";<br />
images {<br />
kernel@1{<br />
description = "kernel";<br />
data = /incbin/("vmlinuz.lz4");<br />
type = "kernel_noload";<br />
arch = "arm64";<br />
os = "linux";<br />
compression = "lz4";<br />
load = <0>;<br />
entry = <0>;<br />
};<br />
fdt@1{<br />
description = "rk3399-gru-kevin.dtb";<br />
data = /incbin/("rk3399-gru-kevin.dtb");<br />
type = "flat_dt";<br />
arch = "arm64";<br />
compression = "none";<br />
hash@1{<br />
algo = "sha1";<br />
};<br />
};<br />
};<br />
configurations {<br />
default = "conf@1";<br />
conf@1{<br />
kernel = "kernel@1";<br />
fdt = "fdt@1";<br />
};<br />
};<br />
};<br />
</pre><br />
<br />
<pre># mkimage -f kernel.its kernel.itb</pre><br />
<br />
and paste the following code into <code>pack_vboot.sh</code><br />
<br />
<pre><br />
futility --debug vbutil_kernel \<br />
--pack vmlinux.kpart \<br />
--version 1 \<br />
--vmlinuz kernel.itb \<br />
--arch aarch64 \<br />
--keyblock kernel.keyblock \<br />
--signprivate kernel_data_key.vbprivk \<br />
--config cmdline \<br />
--bootloader bootloader.bin<br />
</pre><br />
Now run the following commands:<br />
<pre><br />
# sh pack_vboot.sh<br />
# dd if=vmlinux.kpart of=/dev/sdX1<br />
# cd<br />
# umount $MOUNTPOINT<br />
</pre><br />
<br />
== Boot! ==<br />
<br />
<br />
it should boot up. login as root<br />
<br />
in order to update the system you will need some way to connect to the internet, i am using a usb-c ethernet adapter<br />
https://www.amazon.com/Nekteck-Ethernet-Compatible-Pixelbook-Thunderbolt/dp/B0749DCDRV/<br />
<br />
plug in the usb ethernet and dhcp should assign an ip<br />
<br />
then sync the time<br />
<pre><br />
# systemctl restart systemd-timesyncd.service<br />
# pacman -Syu linux-libre-64 acpi<br />
</pre><br />
it will fail because of keyring, but you downloaded it!<br />
<pre><br />
# pacman -U /var/cache/pacman/pkg/parabola-keyring*<br />
# pacman -S parabola-keyring<br />
# pacman -Su linux-libre-64 acpi<br />
# pacman -S linux-libre-64 --overwrite '/*'<br />
</pre><br />
<br />
== Bonus extra info ==<br />
<br />
=== make your own debug port breakout ===<br />
I dont know where to get a servo board but the you can make your own debug header breakout to get serial console access / early boot logs etc<br />
<br />
the breakout https://www.amazon.com/Proto-Advantage-DR040D254P060-60-Pin-Connector-Adapter/dp/B097S2C53T<br />
<br />
the connector https://www.digikey.com/en/products/detail/panasonic-electric-works/AXK850145WG/1986616<br />
<br />
usb <--> rs232 https://www.amazon.com/HiLetgo-CP2102-Converter-Adapter-Downloader/dp/B00LODGRV8 (get 2)<br />
<br />
servo connector pinout is described in this pdf (page 14) (V2 DEBUG HEADER)<br />
<br />
https://www.chromium.org/chromium-os/servo/810-10010-03_20120227_servo_SCH_0.pdf<br />
<br />
you can use a continuity meter to determine connector orientation but finding the corner pin that is ground<br />
<br />
<pre><br />
<br />
<br />
PIN-33 UART1_DUT_SERVO_TX --+ +-- PIN-17 UART2_DUT_SERVO_TX<br />
| |<br />
| |<br />
| |<br />
49 vG vG G 1<br />
|||||||||||||||||||||||||<br />
9753197531975319753197531<br />
1234567890123210987654321<br />
0864208642086420864208642<br />
|||||||||||||||||||||||||<br />
50 G G ^ G ^ G 2<br />
| |<br />
| |<br />
| |<br />
PIN-32 UART1_SERVO_DUT_TX --+ +-- PIN-16 UART2_SERVO_DUT_TX<br />
<br />
<br />
GND PINS = 1, 8, 15, 20, 31, 36, 42<br />
</pre><br />
<br />
=== set bios boot timeout to 2 seconds ===<br />
<br />
https://old.reddit.com/r/Crouton/comments/2szn59/how_to_shorten_os_verfication_warning_screen_on/<br />
<br />
=== blobless coreboot / etc ===<br />
https://gitlab.com/vicencb/kevinboot/</div>Maihttps://wiki.parabola.nu/index.php?title=User:Mai&diff=23578User:Mai2021-11-10T21:35:37Z<p>Mai: /* extract / copy files */</p>
<hr />
<div>{{stub}}<br />
== Status for Samsung Chromebook Plus v1 aka kevin aka gru-kevin aka xe513c24 ==<br />
=== Kernel ===<br />
{{pkg|linux-libre-64}} (armv7h) works but needs to be packed correctly to boot, the following is a rough guide on how i was able to boot this kernel on this hardware<br />
<br />
=== what does not work ===<br />
- wifi<br />
- probably more stuff<br />
<br />
=== What you will need ===<br />
- this laptop :P<br />
- micro sd card at least 2GB, 8+GB reccomended<br />
- another computer that has a linux environment so we can download / extract / pack the kernel and install rootfs<br />
<br />
== Unlock external booting ==<br />
=== Switch to developer mode ===<br />
<br />
# Turn off the laptop.<br />
# To invoke Recovery mode, you hold down the ESC and Refresh keys and poke the Power button.<br />
# At the Recovery screen press Ctrl-D (there’s no prompt - you have to know to do it).<br />
# Confirm switching to developer mode by pressing enter, and the laptop will reboot and reset the system. This takes about 10-15 minutes.<br />
<br />
Note: After enabling developer mode, you will need to press Ctrl-D each time you boot, or wait 30 seconds to continue booting.<br />
=== Enable booting from external storage ===<br />
<br />
# After booting into developer mode, hold Ctrl and Alt and poke the F2 key. This will open up the developer console.<br />
# Type root to the login screen.<br />
# Then type this to enable USB booting:<br />
<br />
<code>$ enable_dev_usb_boot</code><br />
<br />
Reboot the system to allow the change to take effect.<br />
<br />
Source: https://chromebooks.readthedocs.io/en/latest/source/README.html#switch-to-developer-mode<br />
<br />
== Install packages ==<br />
<code>pacman -S {{pkg|vboot-utils}} {{pkg|uboot-tools}} {{pkg|gptfdisk}}</code><br />
<br />
== Gather files ==<br />
<br />
<pre><br />
$ mkdir parabola-armv7-64<br />
$ cd parabola-armv7-64<br />
<br />
$ wget -c https://redirector.parabola.nu/iso/armv7h-systemd-cli-2020.02/parabola-armv7h-systemd-cli-2020.02-tarball.tar.gz<br />
$ wget -c https://redirector.parabola.nu/iso/armv7h-systemd-cli-2020.02/parabola-armv7h-systemd-cli-2020.02-tarball.tar.gz.sig<br />
$ wget -c https://repomirror.parabola.nu/pool/parabola/linux-libre-64-5.11.11-3-armv7h.pkg.tar.xz<br />
$ wget -c https://repomirror.parabola.nu/pool/parabola/linux-libre-64-5.11.11-3-armv7h.pkg.tar.xz.sig<br />
$ wget -c https://git.parabola.nu/abslibre.git/plain/libre/linux-libre/kernel.keyblock<br />
$ wget -c https://git.parabola.nu/abslibre.git/plain/libre/linux-libre/kernel_data_key.vbprivk<br />
<br />
<br />
$ gpg --recv-keys FBCC5AD7421197B7ABA72853908710913E8C7778<br />
$ gpg --verify parabola-armv7h-systemd-cli-2020.02-tarball.tar.gz.sig<br />
$ gpg --recv-keys 782F9DDBE36BA7F3D4DE49065F5DFCC14177E263<br />
$ gpg --verify linux-libre-64-5.11.11-3-armv7h.pkg.tar.xz.sig<br />
</pre><br />
<br />
save the following code as <code>partition_vboot.sh</code><br />
<br />
<pre><br />
#!/bin/bash <br />
<br />
DISK="$1" <br />
<br />
# Make sure only root can run our script<br />
if [ "$(id -u)" != "0" ]; then<br />
echo "This script must be run as root" 1>&2<br />
exit 1 <br />
fi <br />
<br />
if [ x"$DISK" == 'x' ]; then<br />
echo "This script requires a base block device as its only arguement" 1>&2<br />
echo "example: $0 /dev/sdb"<br />
exit 1 <br />
fi <br />
<br />
DISK_DEVICE_NAME="$(echo $DISK | awk -F'/' '{print $NF}')"<br />
ROOT_PARTITION="$DISK"2<br />
SWAP_PARTITION="$DISK"3<br />
# TODO allow specify TOTAL_SECTORS<br />
TOTAL_SECTORS=$(cat /sys/block/$DISK_DEVICE_NAME/size)<br />
SECTOR_SIZE=$(cat /sys/block/$DISK_DEVICE_NAME/queue/hw_sector_size)<br />
<br />
# the following are in sectors, 1MB = 2048 sectors<br />
FIRST_GAP_SIZE=8192 # 2048 sectors * 4MB<br />
LAST_GAP_SIZE=2048 # 2048 sectors * 1MB<br />
SWAP_PART_SIZE=8388608 # 2048 sectors * 4096MB<br />
KERNEL_PART_SIZE=65536 # 2048 sectors * 32MB<br />
<br />
# layout arithmatic <br />
FIRST_GAP_START=0 <br />
FIRST_GAP_END=$(( $FIRST_GAP_SIZE - 1 ))<br />
KERNEL_PART_START=$(( $FIRST_GAP_END + 1 ))<br />
KERNEL_PART_END=$(( $FIRST_GAP_END + $KERNEL_PART_SIZE ))<br />
ROOTFS_PART_START=$(( $KERNEL_PART_END + 1 ))<br />
<br />
LAST_GAP_END=$(( $TOTAL_SECTORS - 1 ))<br />
LAST_GAP_START=$(( $LAST_GAP_END - $LAST_GAP_SIZE + 1 ))<br />
if [ $TOTAL_SECTORS -lt 10000000 ]; then # if size of disk is less than 5GB do not make swap<br />
MAKESWAP='false' <br />
ROOTFS_PART_END=$(( $LAST_GAP_START - 1 ))<br />
SWAP_PART_END=0<br />
SWAP_PART_START=0<br />
else<br />
MAKESWAP='true' <br />
SWAP_PART_END=$(( $LAST_GAP_START - 1 ))<br />
SWAP_PART_START=$(( $SWAP_PART_END - $SWAP_PART_SIZE + 1 ))<br />
ROOTFS_PART_END=$(( $SWAP_PART_START - 1 ))<br />
fi<br />
<br />
echo "TOTAL_SECTORS = $TOTAL_SECTORS"<br />
echo "SECTOR_SIZE = $SECTOR_SIZE"<br />
echo ""<br />
echo "FIRST_GAP_SIZE = $FIRST_GAP_SIZE"<br />
echo "LAST_GAP_SIZE = $LAST_GAP_SIZE"<br />
echo "SWAP_PART_SIZE = $SWAP_PART_SIZE"<br />
echo "KERNEL_PART_SIZE = $KERNEL_PART_SIZE"<br />
echo ""<br />
echo "FIRST_GAP_START = $FIRST_GAP_START $(( $FIRST_GAP_START / 2048 )) MB"<br />
echo "FIRST_GAP_END = $FIRST_GAP_END"<br />
echo "KERNEL_PART_START = $KERNEL_PART_START $(( $KERNEL_PART_START / 2048 )) MB"<br />
echo "KERNEL_PART_END = $KERNEL_PART_END"<br />
echo "ROOTFS_PART_START = $ROOTFS_PART_START $(( $ROOTFS_PART_START / 2048 )) MB"<br />
echo "ROOTFS_PART_END = $ROOTFS_PART_END"<br />
echo "SWAP_PART_START = $SWAP_PART_START $(( $SWAP_PART_START / 2048 )) MB"<br />
echo "SWAP_PART_END = $SWAP_PART_END"<br />
echo "LAST_GAP_START = $LAST_GAP_START $(( $LAST_GAP_START / 2048 )) MB"<br />
echo "LAST_GAP_END = $LAST_GAP_END"<br />
<br />
# use `sgdisk --list-types' to get all possible type codes<br />
KERNEL_PART_TYPE='7f00'<br />
ROOTFS_PART_TYPE='7f01'<br />
SWAP_PART_TYPE='8200'<br />
<br />
# wipe disk, and create new gpt partition table<br />
sgdisk --zap-all $DISK<br />
sgdisk -o $DISK<br />
<br />
# create the kernel partition<br />
sgdisk --new=1:$KERNEL_PART_START:$KERNEL_PART_END $DISK<br />
sgdisk --typecode=1:$KERNEL_PART_TYPE $DISK<br />
sgdisk --change-name=1:Kernel $DISK<br />
sgdisk --attributes=1:=:015A000000000000 $DISK<br />
<br />
# create the rootfs partition <br />
sgdisk --new=2:$ROOTFS_PART_START:$ROOTFS_PART_END $DISK<br />
sgdisk --typecode=2:$ROOTFS_PART_TYPE $DISK<br />
sgdisk --change-name=2:Root $DISK<br />
mkfs.ext4 $ROOT_PARTITION<br />
<br />
# create the swap partition<br />
if [ $MAKESWAP = 'true' ]; then<br />
sgdisk --new=3:$SWAP_PART_START:$SWAP_PART_END $DISK<br />
sgdisk --typecode=3:$SWAP_PART_TYPE $DISK<br />
sgdisk --change-name=3:Swap $DISK<br />
mkswap $SWAP_PARTITION<br />
fi<br />
<br />
sgdisk --print $DISK<br />
lsblk $DISK<br />
</pre><br />
<br />
== partition micro sd card & mount the rootfs partition ==<br />
<br />
<code>partition_vboot.sh</code> is a replacement for cgpt i made that uses sgdisk to create a compatible partition layout for depthcharge chromebooks (asus c201 & samsung chromebook plus v1). I have tested it with cards as small as 2GB, it will automatically make a 4GB swap partition if the size of the disk is detected to be above 4GB, the rest of the disk will be used for the rootfs partition<br />
<br />
<pre># sh partition_vboot.sh /dev/sdX</pre><br />
<br />
if you dont want to run this script you can follow the partitioning instructions on the archlinuxarm wiki page for this device<br />
https://archlinuxarm.org/platforms/armv8/rockchip/samsung-chromebook-plus<br />
<br />
<br />
after the rootfs partition is created and formated, mount it<br />
<pre><br />
# mkdir $MOUNTPOINT<br />
# mount /dev/sdX2 $MOUNTPOINT<br />
</pre><br />
<br />
== extract / copy files ==<br />
<pre><br />
# bsdtar -xf parabola-armv7h-systemd-cli-2020.02-tarball.tar.gz -C $MOUNTPOINT<br />
# bsdtar -xf linux-libre-64-5.11.11-3-armv7h.pkg.tar.xz -C $MOUNTPOINT<br />
<br />
# echo > $MOUNTPOINT/etc/fstab<br />
<br />
# mkdir $MOUNTPOINT/boot/pack<br />
# cp kernel.keyblock $MOUNTPOINT/boot/pack<br />
# cp kernel_data_key.vbprivk $MOUNTPOINT/boot/pack<br />
<br />
# cd $MOUNTPOINT/boot/pack<br />
# cp /usr/lib/modules/5.11.11-gnu-3-64-ARCH/vmlinuz .<br />
# cp /boot/dtbs/linux-libre-64/rockchip/rk3399-gru-kevin.dtb .<br />
<br />
<br />
# lz4 -k vmlinuz<br />
# echo "console=tty0 console=ttyS2,115200n8 earlyprintk=ttyS2,115200n8 init=/sbin/init root=PARTUUID=%U/PARTNROFF=1 rootwait rw noinitrd" > cmdline<br />
# dd if=/dev/zero of=bootloader.bin bs=512 count=1<br />
</pre><br />
<br />
paste the following code into <code>kernel.its</code><br />
<br />
<pre><br />
/dts-v1/;<br />
<br />
/ {<br />
description = "Chrome OS kernel image with one or more FDT blobs";<br />
images {<br />
kernel@1{<br />
description = "kernel";<br />
data = /incbin/("vmlinuz.lz4");<br />
type = "kernel_noload";<br />
arch = "arm64";<br />
os = "linux";<br />
compression = "lz4";<br />
load = <0>;<br />
entry = <0>;<br />
};<br />
fdt@1{<br />
description = "rk3399-gru-kevin.dtb";<br />
data = /incbin/("rk3399-gru-kevin.dtb");<br />
type = "flat_dt";<br />
arch = "arm64";<br />
compression = "none";<br />
hash@1{<br />
algo = "sha1";<br />
};<br />
};<br />
};<br />
configurations {<br />
default = "conf@1";<br />
conf@1{<br />
kernel = "kernel@1";<br />
fdt = "fdt@1";<br />
};<br />
};<br />
};<br />
</pre><br />
<br />
<pre># mkimage -f kernel.its kernel.itb</pre><br />
<br />
and paste the following code into <code>pack_vboot.sh</code><br />
<br />
<pre><br />
futility --debug vbutil_kernel \<br />
--pack vmlinux.kpart \<br />
--version 1 \<br />
--vmlinuz kernel.itb \<br />
--arch aarch64 \<br />
--keyblock kernel.keyblock \<br />
--signprivate kernel_data_key.vbprivk \<br />
--config cmdline \<br />
--bootloader bootloader.bin<br />
</pre><br />
Now run the following commands:<br />
<pre><br />
# sh pack_vboot.sh<br />
# dd if=vmlinux.kpart of=/dev/sdX1<br />
# cd<br />
# umount $MOUNTPOINT<br />
</pre><br />
<br />
== Boot! ==<br />
<br />
<br />
it should boot up. login as root<br />
<br />
in order to update the system you will need some way to connect to the internet, i am using a usb-c ethernet adapter<br />
https://www.amazon.com/Nekteck-Ethernet-Compatible-Pixelbook-Thunderbolt/dp/B0749DCDRV/<br />
<br />
plug in the usb ethernet and dhcp should assign an ip<br />
<br />
then sync the time<br />
<pre><br />
# systemctl restart systemd-timesyncd.service<br />
# pacman -Syu linux-libre-64 acpi<br />
</pre><br />
it will fail because of keyring, but you downloaded it!<br />
<pre><br />
# pacman -U /var/cache/pacman/pkg/parabola-keyring*<br />
# pacman -S parabola-keyring<br />
# pacman -Su linux-libre-64 acpi<br />
# pacman -S linux-libre-64 --overwrite '/*'<br />
</pre><br />
<br />
== Bonus extra info ==<br />
<br />
=== make your own debug port breakout ===<br />
I dont know where to get a servo board but the you can make your own debug header breakout to get serial console access / early boot logs etc<br />
<br />
the breakout https://www.amazon.com/Proto-Advantage-DR040D254P060-60-Pin-Connector-Adapter/dp/B097S2C53T<br />
<br />
the connector https://www.digikey.com/en/products/detail/panasonic-electric-works/AXK850145WG/1986616<br />
<br />
usb <--> rs232 https://www.amazon.com/HiLetgo-CP2102-Converter-Adapter-Downloader/dp/B00LODGRV8 (get 2)<br />
<br />
servo connector pinout is described in this pdf (page 14) (V2 DEBUG HEADER)<br />
<br />
https://www.chromium.org/chromium-os/servo/810-10010-03_20120227_servo_SCH_0.pdf<br />
<br />
you can use a continuity meter to determine connector orientation but finding the corner pin that is ground<br />
<br />
<pre><br />
<br />
<br />
PIN-33 UART1_DUT_SERVO_TX --+ +-- PIN-17 UART2_DUT_SERVO_TX<br />
| |<br />
| |<br />
| |<br />
49 vG vG G 1<br />
|||||||||||||||||||||||||<br />
9753197531975319753197531<br />
1234567890123210987654321<br />
0864208642086420864208642<br />
|||||||||||||||||||||||||<br />
50 G G ^ G ^ G 2<br />
| |<br />
| |<br />
| |<br />
PIN-32 UART1_SERVO_DUT_TX --+ +-- PIN-16 UART2_SERVO_DUT_TX<br />
<br />
<br />
GND PINS = 1, 8, 15, 20, 31, 36, 42<br />
</pre><br />
<br />
=== set bios boot timeout to 2 seconds ===<br />
<br />
https://old.reddit.com/r/Crouton/comments/2szn59/how_to_shorten_os_verfication_warning_screen_on/<br />
<br />
=== blobless coreboot / etc ===<br />
https://gitlab.com/vicencb/kevinboot/</div>Maihttps://wiki.parabola.nu/index.php?title=User:Mai&diff=23577User:Mai2021-11-10T21:35:11Z<p>Mai: /* extract / copy files */</p>
<hr />
<div>{{stub}}<br />
== Status for Samsung Chromebook Plus v1 aka kevin aka gru-kevin aka xe513c24 ==<br />
=== Kernel ===<br />
{{pkg|linux-libre-64}} (armv7h) works but needs to be packed correctly to boot, the following is a rough guide on how i was able to boot this kernel on this hardware<br />
<br />
=== what does not work ===<br />
- wifi<br />
- probably more stuff<br />
<br />
=== What you will need ===<br />
- this laptop :P<br />
- micro sd card at least 2GB, 8+GB reccomended<br />
- another computer that has a linux environment so we can download / extract / pack the kernel and install rootfs<br />
<br />
== Unlock external booting ==<br />
=== Switch to developer mode ===<br />
<br />
# Turn off the laptop.<br />
# To invoke Recovery mode, you hold down the ESC and Refresh keys and poke the Power button.<br />
# At the Recovery screen press Ctrl-D (there’s no prompt - you have to know to do it).<br />
# Confirm switching to developer mode by pressing enter, and the laptop will reboot and reset the system. This takes about 10-15 minutes.<br />
<br />
Note: After enabling developer mode, you will need to press Ctrl-D each time you boot, or wait 30 seconds to continue booting.<br />
=== Enable booting from external storage ===<br />
<br />
# After booting into developer mode, hold Ctrl and Alt and poke the F2 key. This will open up the developer console.<br />
# Type root to the login screen.<br />
# Then type this to enable USB booting:<br />
<br />
<code>$ enable_dev_usb_boot</code><br />
<br />
Reboot the system to allow the change to take effect.<br />
<br />
Source: https://chromebooks.readthedocs.io/en/latest/source/README.html#switch-to-developer-mode<br />
<br />
== Install packages ==<br />
<code>pacman -S {{pkg|vboot-utils}} {{pkg|uboot-tools}} {{pkg|gptfdisk}}</code><br />
<br />
== Gather files ==<br />
<br />
<pre><br />
$ mkdir parabola-armv7-64<br />
$ cd parabola-armv7-64<br />
<br />
$ wget -c https://redirector.parabola.nu/iso/armv7h-systemd-cli-2020.02/parabola-armv7h-systemd-cli-2020.02-tarball.tar.gz<br />
$ wget -c https://redirector.parabola.nu/iso/armv7h-systemd-cli-2020.02/parabola-armv7h-systemd-cli-2020.02-tarball.tar.gz.sig<br />
$ wget -c https://repomirror.parabola.nu/pool/parabola/linux-libre-64-5.11.11-3-armv7h.pkg.tar.xz<br />
$ wget -c https://repomirror.parabola.nu/pool/parabola/linux-libre-64-5.11.11-3-armv7h.pkg.tar.xz.sig<br />
$ wget -c https://git.parabola.nu/abslibre.git/plain/libre/linux-libre/kernel.keyblock<br />
$ wget -c https://git.parabola.nu/abslibre.git/plain/libre/linux-libre/kernel_data_key.vbprivk<br />
<br />
<br />
$ gpg --recv-keys FBCC5AD7421197B7ABA72853908710913E8C7778<br />
$ gpg --verify parabola-armv7h-systemd-cli-2020.02-tarball.tar.gz.sig<br />
$ gpg --recv-keys 782F9DDBE36BA7F3D4DE49065F5DFCC14177E263<br />
$ gpg --verify linux-libre-64-5.11.11-3-armv7h.pkg.tar.xz.sig<br />
</pre><br />
<br />
save the following code as <code>partition_vboot.sh</code><br />
<br />
<pre><br />
#!/bin/bash <br />
<br />
DISK="$1" <br />
<br />
# Make sure only root can run our script<br />
if [ "$(id -u)" != "0" ]; then<br />
echo "This script must be run as root" 1>&2<br />
exit 1 <br />
fi <br />
<br />
if [ x"$DISK" == 'x' ]; then<br />
echo "This script requires a base block device as its only arguement" 1>&2<br />
echo "example: $0 /dev/sdb"<br />
exit 1 <br />
fi <br />
<br />
DISK_DEVICE_NAME="$(echo $DISK | awk -F'/' '{print $NF}')"<br />
ROOT_PARTITION="$DISK"2<br />
SWAP_PARTITION="$DISK"3<br />
# TODO allow specify TOTAL_SECTORS<br />
TOTAL_SECTORS=$(cat /sys/block/$DISK_DEVICE_NAME/size)<br />
SECTOR_SIZE=$(cat /sys/block/$DISK_DEVICE_NAME/queue/hw_sector_size)<br />
<br />
# the following are in sectors, 1MB = 2048 sectors<br />
FIRST_GAP_SIZE=8192 # 2048 sectors * 4MB<br />
LAST_GAP_SIZE=2048 # 2048 sectors * 1MB<br />
SWAP_PART_SIZE=8388608 # 2048 sectors * 4096MB<br />
KERNEL_PART_SIZE=65536 # 2048 sectors * 32MB<br />
<br />
# layout arithmatic <br />
FIRST_GAP_START=0 <br />
FIRST_GAP_END=$(( $FIRST_GAP_SIZE - 1 ))<br />
KERNEL_PART_START=$(( $FIRST_GAP_END + 1 ))<br />
KERNEL_PART_END=$(( $FIRST_GAP_END + $KERNEL_PART_SIZE ))<br />
ROOTFS_PART_START=$(( $KERNEL_PART_END + 1 ))<br />
<br />
LAST_GAP_END=$(( $TOTAL_SECTORS - 1 ))<br />
LAST_GAP_START=$(( $LAST_GAP_END - $LAST_GAP_SIZE + 1 ))<br />
if [ $TOTAL_SECTORS -lt 10000000 ]; then # if size of disk is less than 5GB do not make swap<br />
MAKESWAP='false' <br />
ROOTFS_PART_END=$(( $LAST_GAP_START - 1 ))<br />
SWAP_PART_END=0<br />
SWAP_PART_START=0<br />
else<br />
MAKESWAP='true' <br />
SWAP_PART_END=$(( $LAST_GAP_START - 1 ))<br />
SWAP_PART_START=$(( $SWAP_PART_END - $SWAP_PART_SIZE + 1 ))<br />
ROOTFS_PART_END=$(( $SWAP_PART_START - 1 ))<br />
fi<br />
<br />
echo "TOTAL_SECTORS = $TOTAL_SECTORS"<br />
echo "SECTOR_SIZE = $SECTOR_SIZE"<br />
echo ""<br />
echo "FIRST_GAP_SIZE = $FIRST_GAP_SIZE"<br />
echo "LAST_GAP_SIZE = $LAST_GAP_SIZE"<br />
echo "SWAP_PART_SIZE = $SWAP_PART_SIZE"<br />
echo "KERNEL_PART_SIZE = $KERNEL_PART_SIZE"<br />
echo ""<br />
echo "FIRST_GAP_START = $FIRST_GAP_START $(( $FIRST_GAP_START / 2048 )) MB"<br />
echo "FIRST_GAP_END = $FIRST_GAP_END"<br />
echo "KERNEL_PART_START = $KERNEL_PART_START $(( $KERNEL_PART_START / 2048 )) MB"<br />
echo "KERNEL_PART_END = $KERNEL_PART_END"<br />
echo "ROOTFS_PART_START = $ROOTFS_PART_START $(( $ROOTFS_PART_START / 2048 )) MB"<br />
echo "ROOTFS_PART_END = $ROOTFS_PART_END"<br />
echo "SWAP_PART_START = $SWAP_PART_START $(( $SWAP_PART_START / 2048 )) MB"<br />
echo "SWAP_PART_END = $SWAP_PART_END"<br />
echo "LAST_GAP_START = $LAST_GAP_START $(( $LAST_GAP_START / 2048 )) MB"<br />
echo "LAST_GAP_END = $LAST_GAP_END"<br />
<br />
# use `sgdisk --list-types' to get all possible type codes<br />
KERNEL_PART_TYPE='7f00'<br />
ROOTFS_PART_TYPE='7f01'<br />
SWAP_PART_TYPE='8200'<br />
<br />
# wipe disk, and create new gpt partition table<br />
sgdisk --zap-all $DISK<br />
sgdisk -o $DISK<br />
<br />
# create the kernel partition<br />
sgdisk --new=1:$KERNEL_PART_START:$KERNEL_PART_END $DISK<br />
sgdisk --typecode=1:$KERNEL_PART_TYPE $DISK<br />
sgdisk --change-name=1:Kernel $DISK<br />
sgdisk --attributes=1:=:015A000000000000 $DISK<br />
<br />
# create the rootfs partition <br />
sgdisk --new=2:$ROOTFS_PART_START:$ROOTFS_PART_END $DISK<br />
sgdisk --typecode=2:$ROOTFS_PART_TYPE $DISK<br />
sgdisk --change-name=2:Root $DISK<br />
mkfs.ext4 $ROOT_PARTITION<br />
<br />
# create the swap partition<br />
if [ $MAKESWAP = 'true' ]; then<br />
sgdisk --new=3:$SWAP_PART_START:$SWAP_PART_END $DISK<br />
sgdisk --typecode=3:$SWAP_PART_TYPE $DISK<br />
sgdisk --change-name=3:Swap $DISK<br />
mkswap $SWAP_PARTITION<br />
fi<br />
<br />
sgdisk --print $DISK<br />
lsblk $DISK<br />
</pre><br />
<br />
== partition micro sd card & mount the rootfs partition ==<br />
<br />
<code>partition_vboot.sh</code> is a replacement for cgpt i made that uses sgdisk to create a compatible partition layout for depthcharge chromebooks (asus c201 & samsung chromebook plus v1). I have tested it with cards as small as 2GB, it will automatically make a 4GB swap partition if the size of the disk is detected to be above 4GB, the rest of the disk will be used for the rootfs partition<br />
<br />
<pre># sh partition_vboot.sh /dev/sdX</pre><br />
<br />
if you dont want to run this script you can follow the partitioning instructions on the archlinuxarm wiki page for this device<br />
https://archlinuxarm.org/platforms/armv8/rockchip/samsung-chromebook-plus<br />
<br />
<br />
after the rootfs partition is created and formated, mount it<br />
<pre><br />
# mkdir $MOUNTPOINT<br />
# mount /dev/sdX2 $MOUNTPOINT<br />
</pre><br />
<br />
== extract / copy files ==<br />
<pre><br />
# bsdtar -xf parabola-armv7h-systemd-cli-2020.02-tarball.tar.gz -C $MOUNTPOINT<br />
# bsdtar -xf linux-libre-64-5.11.11-3-armv7h.pkg.tar.xz -C $MOUNTPOINT<br />
<br />
# echo > $MOUNTPOINT/etc/fstab<br />
<br />
# mkdir $MOUNTPOINT/boot/pack<br />
# cp kernel.keyblock $MOUNTPOINT/boot/pack<br />
# cp kernel_data_key.vbprivk $MOUNTPOINT/boot/pack<br />
<br />
# cd $MOUNTPOINT/boot/pack<br />
# cp /usr/lib/modules/5.11.11-gnu-3-64-ARCH/vmlinuz .<br />
# cp /boot/dtbs/linux-libre-64/rockchip/rk3399-gru-kevin.dtb<br />
<br />
<br />
# lz4 -k vmlinuz<br />
# echo "console=tty0 console=ttyS2,115200n8 earlyprintk=ttyS2,115200n8 init=/sbin/init root=PARTUUID=%U/PARTNROFF=1 rootwait rw noinitrd" > cmdline<br />
# dd if=/dev/zero of=bootloader.bin bs=512 count=1<br />
</pre><br />
<br />
paste the following code into <code>kernel.its</code><br />
<br />
<pre><br />
/dts-v1/;<br />
<br />
/ {<br />
description = "Chrome OS kernel image with one or more FDT blobs";<br />
images {<br />
kernel@1{<br />
description = "kernel";<br />
data = /incbin/("vmlinuz.lz4");<br />
type = "kernel_noload";<br />
arch = "arm64";<br />
os = "linux";<br />
compression = "lz4";<br />
load = <0>;<br />
entry = <0>;<br />
};<br />
fdt@1{<br />
description = "rk3399-gru-kevin.dtb";<br />
data = /incbin/("rk3399-gru-kevin.dtb");<br />
type = "flat_dt";<br />
arch = "arm64";<br />
compression = "none";<br />
hash@1{<br />
algo = "sha1";<br />
};<br />
};<br />
};<br />
configurations {<br />
default = "conf@1";<br />
conf@1{<br />
kernel = "kernel@1";<br />
fdt = "fdt@1";<br />
};<br />
};<br />
};<br />
</pre><br />
<br />
<pre># mkimage -f kernel.its kernel.itb</pre><br />
<br />
and paste the following code into <code>pack_vboot.sh</code><br />
<br />
<pre><br />
futility --debug vbutil_kernel \<br />
--pack vmlinux.kpart \<br />
--version 1 \<br />
--vmlinuz kernel.itb \<br />
--arch aarch64 \<br />
--keyblock kernel.keyblock \<br />
--signprivate kernel_data_key.vbprivk \<br />
--config cmdline \<br />
--bootloader bootloader.bin<br />
</pre><br />
Now run the following commands:<br />
<pre><br />
# sh pack_vboot.sh<br />
# dd if=vmlinux.kpart of=/dev/sdX1<br />
# cd<br />
# umount $MOUNTPOINT<br />
</pre><br />
<br />
== Boot! ==<br />
<br />
<br />
it should boot up. login as root<br />
<br />
in order to update the system you will need some way to connect to the internet, i am using a usb-c ethernet adapter<br />
https://www.amazon.com/Nekteck-Ethernet-Compatible-Pixelbook-Thunderbolt/dp/B0749DCDRV/<br />
<br />
plug in the usb ethernet and dhcp should assign an ip<br />
<br />
then sync the time<br />
<pre><br />
# systemctl restart systemd-timesyncd.service<br />
# pacman -Syu linux-libre-64 acpi<br />
</pre><br />
it will fail because of keyring, but you downloaded it!<br />
<pre><br />
# pacman -U /var/cache/pacman/pkg/parabola-keyring*<br />
# pacman -S parabola-keyring<br />
# pacman -Su linux-libre-64 acpi<br />
# pacman -S linux-libre-64 --overwrite '/*'<br />
</pre><br />
<br />
== Bonus extra info ==<br />
<br />
=== make your own debug port breakout ===<br />
I dont know where to get a servo board but the you can make your own debug header breakout to get serial console access / early boot logs etc<br />
<br />
the breakout https://www.amazon.com/Proto-Advantage-DR040D254P060-60-Pin-Connector-Adapter/dp/B097S2C53T<br />
<br />
the connector https://www.digikey.com/en/products/detail/panasonic-electric-works/AXK850145WG/1986616<br />
<br />
usb <--> rs232 https://www.amazon.com/HiLetgo-CP2102-Converter-Adapter-Downloader/dp/B00LODGRV8 (get 2)<br />
<br />
servo connector pinout is described in this pdf (page 14) (V2 DEBUG HEADER)<br />
<br />
https://www.chromium.org/chromium-os/servo/810-10010-03_20120227_servo_SCH_0.pdf<br />
<br />
you can use a continuity meter to determine connector orientation but finding the corner pin that is ground<br />
<br />
<pre><br />
<br />
<br />
PIN-33 UART1_DUT_SERVO_TX --+ +-- PIN-17 UART2_DUT_SERVO_TX<br />
| |<br />
| |<br />
| |<br />
49 vG vG G 1<br />
|||||||||||||||||||||||||<br />
9753197531975319753197531<br />
1234567890123210987654321<br />
0864208642086420864208642<br />
|||||||||||||||||||||||||<br />
50 G G ^ G ^ G 2<br />
| |<br />
| |<br />
| |<br />
PIN-32 UART1_SERVO_DUT_TX --+ +-- PIN-16 UART2_SERVO_DUT_TX<br />
<br />
<br />
GND PINS = 1, 8, 15, 20, 31, 36, 42<br />
</pre><br />
<br />
=== set bios boot timeout to 2 seconds ===<br />
<br />
https://old.reddit.com/r/Crouton/comments/2szn59/how_to_shorten_os_verfication_warning_screen_on/<br />
<br />
=== blobless coreboot / etc ===<br />
https://gitlab.com/vicencb/kevinboot/</div>Maihttps://wiki.parabola.nu/index.php?title=User:Mai&diff=23576User:Mai2021-11-10T21:34:00Z<p>Mai: /* partition micro sd card & mount the rootfs partition */</p>
<hr />
<div>{{stub}}<br />
== Status for Samsung Chromebook Plus v1 aka kevin aka gru-kevin aka xe513c24 ==<br />
=== Kernel ===<br />
{{pkg|linux-libre-64}} (armv7h) works but needs to be packed correctly to boot, the following is a rough guide on how i was able to boot this kernel on this hardware<br />
<br />
=== what does not work ===<br />
- wifi<br />
- probably more stuff<br />
<br />
=== What you will need ===<br />
- this laptop :P<br />
- micro sd card at least 2GB, 8+GB reccomended<br />
- another computer that has a linux environment so we can download / extract / pack the kernel and install rootfs<br />
<br />
== Unlock external booting ==<br />
=== Switch to developer mode ===<br />
<br />
# Turn off the laptop.<br />
# To invoke Recovery mode, you hold down the ESC and Refresh keys and poke the Power button.<br />
# At the Recovery screen press Ctrl-D (there’s no prompt - you have to know to do it).<br />
# Confirm switching to developer mode by pressing enter, and the laptop will reboot and reset the system. This takes about 10-15 minutes.<br />
<br />
Note: After enabling developer mode, you will need to press Ctrl-D each time you boot, or wait 30 seconds to continue booting.<br />
=== Enable booting from external storage ===<br />
<br />
# After booting into developer mode, hold Ctrl and Alt and poke the F2 key. This will open up the developer console.<br />
# Type root to the login screen.<br />
# Then type this to enable USB booting:<br />
<br />
<code>$ enable_dev_usb_boot</code><br />
<br />
Reboot the system to allow the change to take effect.<br />
<br />
Source: https://chromebooks.readthedocs.io/en/latest/source/README.html#switch-to-developer-mode<br />
<br />
== Install packages ==<br />
<code>pacman -S {{pkg|vboot-utils}} {{pkg|uboot-tools}} {{pkg|gptfdisk}}</code><br />
<br />
== Gather files ==<br />
<br />
<pre><br />
$ mkdir parabola-armv7-64<br />
$ cd parabola-armv7-64<br />
<br />
$ wget -c https://redirector.parabola.nu/iso/armv7h-systemd-cli-2020.02/parabola-armv7h-systemd-cli-2020.02-tarball.tar.gz<br />
$ wget -c https://redirector.parabola.nu/iso/armv7h-systemd-cli-2020.02/parabola-armv7h-systemd-cli-2020.02-tarball.tar.gz.sig<br />
$ wget -c https://repomirror.parabola.nu/pool/parabola/linux-libre-64-5.11.11-3-armv7h.pkg.tar.xz<br />
$ wget -c https://repomirror.parabola.nu/pool/parabola/linux-libre-64-5.11.11-3-armv7h.pkg.tar.xz.sig<br />
$ wget -c https://git.parabola.nu/abslibre.git/plain/libre/linux-libre/kernel.keyblock<br />
$ wget -c https://git.parabola.nu/abslibre.git/plain/libre/linux-libre/kernel_data_key.vbprivk<br />
<br />
<br />
$ gpg --recv-keys FBCC5AD7421197B7ABA72853908710913E8C7778<br />
$ gpg --verify parabola-armv7h-systemd-cli-2020.02-tarball.tar.gz.sig<br />
$ gpg --recv-keys 782F9DDBE36BA7F3D4DE49065F5DFCC14177E263<br />
$ gpg --verify linux-libre-64-5.11.11-3-armv7h.pkg.tar.xz.sig<br />
</pre><br />
<br />
save the following code as <code>partition_vboot.sh</code><br />
<br />
<pre><br />
#!/bin/bash <br />
<br />
DISK="$1" <br />
<br />
# Make sure only root can run our script<br />
if [ "$(id -u)" != "0" ]; then<br />
echo "This script must be run as root" 1>&2<br />
exit 1 <br />
fi <br />
<br />
if [ x"$DISK" == 'x' ]; then<br />
echo "This script requires a base block device as its only arguement" 1>&2<br />
echo "example: $0 /dev/sdb"<br />
exit 1 <br />
fi <br />
<br />
DISK_DEVICE_NAME="$(echo $DISK | awk -F'/' '{print $NF}')"<br />
ROOT_PARTITION="$DISK"2<br />
SWAP_PARTITION="$DISK"3<br />
# TODO allow specify TOTAL_SECTORS<br />
TOTAL_SECTORS=$(cat /sys/block/$DISK_DEVICE_NAME/size)<br />
SECTOR_SIZE=$(cat /sys/block/$DISK_DEVICE_NAME/queue/hw_sector_size)<br />
<br />
# the following are in sectors, 1MB = 2048 sectors<br />
FIRST_GAP_SIZE=8192 # 2048 sectors * 4MB<br />
LAST_GAP_SIZE=2048 # 2048 sectors * 1MB<br />
SWAP_PART_SIZE=8388608 # 2048 sectors * 4096MB<br />
KERNEL_PART_SIZE=65536 # 2048 sectors * 32MB<br />
<br />
# layout arithmatic <br />
FIRST_GAP_START=0 <br />
FIRST_GAP_END=$(( $FIRST_GAP_SIZE - 1 ))<br />
KERNEL_PART_START=$(( $FIRST_GAP_END + 1 ))<br />
KERNEL_PART_END=$(( $FIRST_GAP_END + $KERNEL_PART_SIZE ))<br />
ROOTFS_PART_START=$(( $KERNEL_PART_END + 1 ))<br />
<br />
LAST_GAP_END=$(( $TOTAL_SECTORS - 1 ))<br />
LAST_GAP_START=$(( $LAST_GAP_END - $LAST_GAP_SIZE + 1 ))<br />
if [ $TOTAL_SECTORS -lt 10000000 ]; then # if size of disk is less than 5GB do not make swap<br />
MAKESWAP='false' <br />
ROOTFS_PART_END=$(( $LAST_GAP_START - 1 ))<br />
SWAP_PART_END=0<br />
SWAP_PART_START=0<br />
else<br />
MAKESWAP='true' <br />
SWAP_PART_END=$(( $LAST_GAP_START - 1 ))<br />
SWAP_PART_START=$(( $SWAP_PART_END - $SWAP_PART_SIZE + 1 ))<br />
ROOTFS_PART_END=$(( $SWAP_PART_START - 1 ))<br />
fi<br />
<br />
echo "TOTAL_SECTORS = $TOTAL_SECTORS"<br />
echo "SECTOR_SIZE = $SECTOR_SIZE"<br />
echo ""<br />
echo "FIRST_GAP_SIZE = $FIRST_GAP_SIZE"<br />
echo "LAST_GAP_SIZE = $LAST_GAP_SIZE"<br />
echo "SWAP_PART_SIZE = $SWAP_PART_SIZE"<br />
echo "KERNEL_PART_SIZE = $KERNEL_PART_SIZE"<br />
echo ""<br />
echo "FIRST_GAP_START = $FIRST_GAP_START $(( $FIRST_GAP_START / 2048 )) MB"<br />
echo "FIRST_GAP_END = $FIRST_GAP_END"<br />
echo "KERNEL_PART_START = $KERNEL_PART_START $(( $KERNEL_PART_START / 2048 )) MB"<br />
echo "KERNEL_PART_END = $KERNEL_PART_END"<br />
echo "ROOTFS_PART_START = $ROOTFS_PART_START $(( $ROOTFS_PART_START / 2048 )) MB"<br />
echo "ROOTFS_PART_END = $ROOTFS_PART_END"<br />
echo "SWAP_PART_START = $SWAP_PART_START $(( $SWAP_PART_START / 2048 )) MB"<br />
echo "SWAP_PART_END = $SWAP_PART_END"<br />
echo "LAST_GAP_START = $LAST_GAP_START $(( $LAST_GAP_START / 2048 )) MB"<br />
echo "LAST_GAP_END = $LAST_GAP_END"<br />
<br />
# use `sgdisk --list-types' to get all possible type codes<br />
KERNEL_PART_TYPE='7f00'<br />
ROOTFS_PART_TYPE='7f01'<br />
SWAP_PART_TYPE='8200'<br />
<br />
# wipe disk, and create new gpt partition table<br />
sgdisk --zap-all $DISK<br />
sgdisk -o $DISK<br />
<br />
# create the kernel partition<br />
sgdisk --new=1:$KERNEL_PART_START:$KERNEL_PART_END $DISK<br />
sgdisk --typecode=1:$KERNEL_PART_TYPE $DISK<br />
sgdisk --change-name=1:Kernel $DISK<br />
sgdisk --attributes=1:=:015A000000000000 $DISK<br />
<br />
# create the rootfs partition <br />
sgdisk --new=2:$ROOTFS_PART_START:$ROOTFS_PART_END $DISK<br />
sgdisk --typecode=2:$ROOTFS_PART_TYPE $DISK<br />
sgdisk --change-name=2:Root $DISK<br />
mkfs.ext4 $ROOT_PARTITION<br />
<br />
# create the swap partition<br />
if [ $MAKESWAP = 'true' ]; then<br />
sgdisk --new=3:$SWAP_PART_START:$SWAP_PART_END $DISK<br />
sgdisk --typecode=3:$SWAP_PART_TYPE $DISK<br />
sgdisk --change-name=3:Swap $DISK<br />
mkswap $SWAP_PARTITION<br />
fi<br />
<br />
sgdisk --print $DISK<br />
lsblk $DISK<br />
</pre><br />
<br />
== partition micro sd card & mount the rootfs partition ==<br />
<br />
<code>partition_vboot.sh</code> is a replacement for cgpt i made that uses sgdisk to create a compatible partition layout for depthcharge chromebooks (asus c201 & samsung chromebook plus v1). I have tested it with cards as small as 2GB, it will automatically make a 4GB swap partition if the size of the disk is detected to be above 4GB, the rest of the disk will be used for the rootfs partition<br />
<br />
<pre># sh partition_vboot.sh /dev/sdX</pre><br />
<br />
if you dont want to run this script you can follow the partitioning instructions on the archlinuxarm wiki page for this device<br />
https://archlinuxarm.org/platforms/armv8/rockchip/samsung-chromebook-plus<br />
<br />
<br />
after the rootfs partition is created and formated, mount it<br />
<pre><br />
# mkdir $MOUNTPOINT<br />
# mount /dev/sdX2 $MOUNTPOINT<br />
</pre><br />
<br />
== extract / copy files ==<br />
<pre><br />
# bsdtar -xf parabola-armv7h-systemd-cli-2020.02-tarball.tar.gz -C $MOUNTPOINT<br />
# bsdtar -xf linux-libre-64-5.11.11-3-armv7h.pkg.tar.xz -C $MOUNTPOINT<br />
<br />
# echo > /etc/fstab<br />
<br />
# mkdir $MOUNTPOINT/boot/pack<br />
# cp kernel.keyblock $MOUNTPOINT/boot/pack<br />
# cp kernel_data_key.vbprivk $MOUNTPOINT/boot/pack<br />
<br />
# cd $MOUNTPOINT/boot/pack<br />
# cp /usr/lib/modules/5.11.11-gnu-3-64-ARCH/vmlinuz .<br />
# cp /boot/dtbs/linux-libre-64/rockchip/rk3399-gru-kevin.dtb<br />
<br />
<br />
# lz4 -k vmlinuz<br />
# echo "console=tty0 console=ttyS2,115200n8 earlyprintk=ttyS2,115200n8 init=/sbin/init root=PARTUUID=%U/PARTNROFF=1 rootwait rw noinitrd" > cmdline<br />
# dd if=/dev/zero of=bootloader.bin bs=512 count=1<br />
</pre><br />
<br />
paste the following code into <code>kernel.its</code><br />
<br />
<pre><br />
/dts-v1/;<br />
<br />
/ {<br />
description = "Chrome OS kernel image with one or more FDT blobs";<br />
images {<br />
kernel@1{<br />
description = "kernel";<br />
data = /incbin/("vmlinuz.lz4");<br />
type = "kernel_noload";<br />
arch = "arm64";<br />
os = "linux";<br />
compression = "lz4";<br />
load = <0>;<br />
entry = <0>;<br />
};<br />
fdt@1{<br />
description = "rk3399-gru-kevin.dtb";<br />
data = /incbin/("rk3399-gru-kevin.dtb");<br />
type = "flat_dt";<br />
arch = "arm64";<br />
compression = "none";<br />
hash@1{<br />
algo = "sha1";<br />
};<br />
};<br />
};<br />
configurations {<br />
default = "conf@1";<br />
conf@1{<br />
kernel = "kernel@1";<br />
fdt = "fdt@1";<br />
};<br />
};<br />
};<br />
</pre><br />
<br />
<pre># mkimage -f kernel.its kernel.itb</pre><br />
<br />
and paste the following code into <code>pack_vboot.sh</code><br />
<br />
<pre><br />
futility --debug vbutil_kernel \<br />
--pack vmlinux.kpart \<br />
--version 1 \<br />
--vmlinuz kernel.itb \<br />
--arch aarch64 \<br />
--keyblock kernel.keyblock \<br />
--signprivate kernel_data_key.vbprivk \<br />
--config cmdline \<br />
--bootloader bootloader.bin<br />
</pre><br />
Now run the following commands:<br />
<pre><br />
# sh pack_vboot.sh<br />
# dd if=vmlinux.kpart of=/dev/sdX1<br />
# cd<br />
# umount $MOUNTPOINT<br />
</pre><br />
== Boot! ==<br />
<br />
<br />
it should boot up. login as root<br />
<br />
in order to update the system you will need some way to connect to the internet, i am using a usb-c ethernet adapter<br />
https://www.amazon.com/Nekteck-Ethernet-Compatible-Pixelbook-Thunderbolt/dp/B0749DCDRV/<br />
<br />
plug in the usb ethernet and dhcp should assign an ip<br />
<br />
then sync the time<br />
<pre><br />
# systemctl restart systemd-timesyncd.service<br />
# pacman -Syu linux-libre-64 acpi<br />
</pre><br />
it will fail because of keyring, but you downloaded it!<br />
<pre><br />
# pacman -U /var/cache/pacman/pkg/parabola-keyring*<br />
# pacman -S parabola-keyring<br />
# pacman -Su linux-libre-64 acpi<br />
# pacman -S linux-libre-64 --overwrite '/*'<br />
</pre><br />
<br />
== Bonus extra info ==<br />
<br />
=== make your own debug port breakout ===<br />
I dont know where to get a servo board but the you can make your own debug header breakout to get serial console access / early boot logs etc<br />
<br />
the breakout https://www.amazon.com/Proto-Advantage-DR040D254P060-60-Pin-Connector-Adapter/dp/B097S2C53T<br />
<br />
the connector https://www.digikey.com/en/products/detail/panasonic-electric-works/AXK850145WG/1986616<br />
<br />
usb <--> rs232 https://www.amazon.com/HiLetgo-CP2102-Converter-Adapter-Downloader/dp/B00LODGRV8 (get 2)<br />
<br />
servo connector pinout is described in this pdf (page 14) (V2 DEBUG HEADER)<br />
<br />
https://www.chromium.org/chromium-os/servo/810-10010-03_20120227_servo_SCH_0.pdf<br />
<br />
you can use a continuity meter to determine connector orientation but finding the corner pin that is ground<br />
<br />
<pre><br />
<br />
<br />
PIN-33 UART1_DUT_SERVO_TX --+ +-- PIN-17 UART2_DUT_SERVO_TX<br />
| |<br />
| |<br />
| |<br />
49 vG vG G 1<br />
|||||||||||||||||||||||||<br />
9753197531975319753197531<br />
1234567890123210987654321<br />
0864208642086420864208642<br />
|||||||||||||||||||||||||<br />
50 G G ^ G ^ G 2<br />
| |<br />
| |<br />
| |<br />
PIN-32 UART1_SERVO_DUT_TX --+ +-- PIN-16 UART2_SERVO_DUT_TX<br />
<br />
<br />
GND PINS = 1, 8, 15, 20, 31, 36, 42<br />
</pre><br />
<br />
=== set bios boot timeout to 2 seconds ===<br />
<br />
https://old.reddit.com/r/Crouton/comments/2szn59/how_to_shorten_os_verfication_warning_screen_on/<br />
<br />
=== blobless coreboot / etc ===<br />
https://gitlab.com/vicencb/kevinboot/</div>Maihttps://wiki.parabola.nu/index.php?title=User:Mai&diff=23575User:Mai2021-11-10T21:29:07Z<p>Mai: /* Gather files */</p>
<hr />
<div>{{stub}}<br />
== Status for Samsung Chromebook Plus v1 aka kevin aka gru-kevin aka xe513c24 ==<br />
=== Kernel ===<br />
{{pkg|linux-libre-64}} (armv7h) works but needs to be packed correctly to boot, the following is a rough guide on how i was able to boot this kernel on this hardware<br />
<br />
=== what does not work ===<br />
- wifi<br />
- probably more stuff<br />
<br />
=== What you will need ===<br />
- this laptop :P<br />
- micro sd card at least 2GB, 8+GB reccomended<br />
- another computer that has a linux environment so we can download / extract / pack the kernel and install rootfs<br />
<br />
== Unlock external booting ==<br />
=== Switch to developer mode ===<br />
<br />
# Turn off the laptop.<br />
# To invoke Recovery mode, you hold down the ESC and Refresh keys and poke the Power button.<br />
# At the Recovery screen press Ctrl-D (there’s no prompt - you have to know to do it).<br />
# Confirm switching to developer mode by pressing enter, and the laptop will reboot and reset the system. This takes about 10-15 minutes.<br />
<br />
Note: After enabling developer mode, you will need to press Ctrl-D each time you boot, or wait 30 seconds to continue booting.<br />
=== Enable booting from external storage ===<br />
<br />
# After booting into developer mode, hold Ctrl and Alt and poke the F2 key. This will open up the developer console.<br />
# Type root to the login screen.<br />
# Then type this to enable USB booting:<br />
<br />
<code>$ enable_dev_usb_boot</code><br />
<br />
Reboot the system to allow the change to take effect.<br />
<br />
Source: https://chromebooks.readthedocs.io/en/latest/source/README.html#switch-to-developer-mode<br />
<br />
== Install packages ==<br />
<code>pacman -S {{pkg|vboot-utils}} {{pkg|uboot-tools}} {{pkg|gptfdisk}}</code><br />
<br />
== Gather files ==<br />
<br />
<pre><br />
$ mkdir parabola-armv7-64<br />
$ cd parabola-armv7-64<br />
<br />
$ wget -c https://redirector.parabola.nu/iso/armv7h-systemd-cli-2020.02/parabola-armv7h-systemd-cli-2020.02-tarball.tar.gz<br />
$ wget -c https://redirector.parabola.nu/iso/armv7h-systemd-cli-2020.02/parabola-armv7h-systemd-cli-2020.02-tarball.tar.gz.sig<br />
$ wget -c https://repomirror.parabola.nu/pool/parabola/linux-libre-64-5.11.11-3-armv7h.pkg.tar.xz<br />
$ wget -c https://repomirror.parabola.nu/pool/parabola/linux-libre-64-5.11.11-3-armv7h.pkg.tar.xz.sig<br />
$ wget -c https://git.parabola.nu/abslibre.git/plain/libre/linux-libre/kernel.keyblock<br />
$ wget -c https://git.parabola.nu/abslibre.git/plain/libre/linux-libre/kernel_data_key.vbprivk<br />
<br />
<br />
$ gpg --recv-keys FBCC5AD7421197B7ABA72853908710913E8C7778<br />
$ gpg --verify parabola-armv7h-systemd-cli-2020.02-tarball.tar.gz.sig<br />
$ gpg --recv-keys 782F9DDBE36BA7F3D4DE49065F5DFCC14177E263<br />
$ gpg --verify linux-libre-64-5.11.11-3-armv7h.pkg.tar.xz.sig<br />
</pre><br />
<br />
save the following code as <code>partition_vboot.sh</code><br />
<br />
<pre><br />
#!/bin/bash <br />
<br />
DISK="$1" <br />
<br />
# Make sure only root can run our script<br />
if [ "$(id -u)" != "0" ]; then<br />
echo "This script must be run as root" 1>&2<br />
exit 1 <br />
fi <br />
<br />
if [ x"$DISK" == 'x' ]; then<br />
echo "This script requires a base block device as its only arguement" 1>&2<br />
echo "example: $0 /dev/sdb"<br />
exit 1 <br />
fi <br />
<br />
DISK_DEVICE_NAME="$(echo $DISK | awk -F'/' '{print $NF}')"<br />
ROOT_PARTITION="$DISK"2<br />
SWAP_PARTITION="$DISK"3<br />
# TODO allow specify TOTAL_SECTORS<br />
TOTAL_SECTORS=$(cat /sys/block/$DISK_DEVICE_NAME/size)<br />
SECTOR_SIZE=$(cat /sys/block/$DISK_DEVICE_NAME/queue/hw_sector_size)<br />
<br />
# the following are in sectors, 1MB = 2048 sectors<br />
FIRST_GAP_SIZE=8192 # 2048 sectors * 4MB<br />
LAST_GAP_SIZE=2048 # 2048 sectors * 1MB<br />
SWAP_PART_SIZE=8388608 # 2048 sectors * 4096MB<br />
KERNEL_PART_SIZE=65536 # 2048 sectors * 32MB<br />
<br />
# layout arithmatic <br />
FIRST_GAP_START=0 <br />
FIRST_GAP_END=$(( $FIRST_GAP_SIZE - 1 ))<br />
KERNEL_PART_START=$(( $FIRST_GAP_END + 1 ))<br />
KERNEL_PART_END=$(( $FIRST_GAP_END + $KERNEL_PART_SIZE ))<br />
ROOTFS_PART_START=$(( $KERNEL_PART_END + 1 ))<br />
<br />
LAST_GAP_END=$(( $TOTAL_SECTORS - 1 ))<br />
LAST_GAP_START=$(( $LAST_GAP_END - $LAST_GAP_SIZE + 1 ))<br />
if [ $TOTAL_SECTORS -lt 10000000 ]; then # if size of disk is less than 5GB do not make swap<br />
MAKESWAP='false' <br />
ROOTFS_PART_END=$(( $LAST_GAP_START - 1 ))<br />
SWAP_PART_END=0<br />
SWAP_PART_START=0<br />
else<br />
MAKESWAP='true' <br />
SWAP_PART_END=$(( $LAST_GAP_START - 1 ))<br />
SWAP_PART_START=$(( $SWAP_PART_END - $SWAP_PART_SIZE + 1 ))<br />
ROOTFS_PART_END=$(( $SWAP_PART_START - 1 ))<br />
fi<br />
<br />
echo "TOTAL_SECTORS = $TOTAL_SECTORS"<br />
echo "SECTOR_SIZE = $SECTOR_SIZE"<br />
echo ""<br />
echo "FIRST_GAP_SIZE = $FIRST_GAP_SIZE"<br />
echo "LAST_GAP_SIZE = $LAST_GAP_SIZE"<br />
echo "SWAP_PART_SIZE = $SWAP_PART_SIZE"<br />
echo "KERNEL_PART_SIZE = $KERNEL_PART_SIZE"<br />
echo ""<br />
echo "FIRST_GAP_START = $FIRST_GAP_START $(( $FIRST_GAP_START / 2048 )) MB"<br />
echo "FIRST_GAP_END = $FIRST_GAP_END"<br />
echo "KERNEL_PART_START = $KERNEL_PART_START $(( $KERNEL_PART_START / 2048 )) MB"<br />
echo "KERNEL_PART_END = $KERNEL_PART_END"<br />
echo "ROOTFS_PART_START = $ROOTFS_PART_START $(( $ROOTFS_PART_START / 2048 )) MB"<br />
echo "ROOTFS_PART_END = $ROOTFS_PART_END"<br />
echo "SWAP_PART_START = $SWAP_PART_START $(( $SWAP_PART_START / 2048 )) MB"<br />
echo "SWAP_PART_END = $SWAP_PART_END"<br />
echo "LAST_GAP_START = $LAST_GAP_START $(( $LAST_GAP_START / 2048 )) MB"<br />
echo "LAST_GAP_END = $LAST_GAP_END"<br />
<br />
# use `sgdisk --list-types' to get all possible type codes<br />
KERNEL_PART_TYPE='7f00'<br />
ROOTFS_PART_TYPE='7f01'<br />
SWAP_PART_TYPE='8200'<br />
<br />
# wipe disk, and create new gpt partition table<br />
sgdisk --zap-all $DISK<br />
sgdisk -o $DISK<br />
<br />
# create the kernel partition<br />
sgdisk --new=1:$KERNEL_PART_START:$KERNEL_PART_END $DISK<br />
sgdisk --typecode=1:$KERNEL_PART_TYPE $DISK<br />
sgdisk --change-name=1:Kernel $DISK<br />
sgdisk --attributes=1:=:015A000000000000 $DISK<br />
<br />
# create the rootfs partition <br />
sgdisk --new=2:$ROOTFS_PART_START:$ROOTFS_PART_END $DISK<br />
sgdisk --typecode=2:$ROOTFS_PART_TYPE $DISK<br />
sgdisk --change-name=2:Root $DISK<br />
mkfs.ext4 $ROOT_PARTITION<br />
<br />
# create the swap partition<br />
if [ $MAKESWAP = 'true' ]; then<br />
sgdisk --new=3:$SWAP_PART_START:$SWAP_PART_END $DISK<br />
sgdisk --typecode=3:$SWAP_PART_TYPE $DISK<br />
sgdisk --change-name=3:Swap $DISK<br />
mkswap $SWAP_PARTITION<br />
fi<br />
<br />
sgdisk --print $DISK<br />
lsblk $DISK<br />
</pre><br />
<br />
== partition micro sd card & mount the rootfs partition ==<br />
<br />
<code>partition_usb.sh</code> is a replacement for cgpt i made that uses sgdisk to create a compatible partition layout for depthcharge chromebooks (asus c201 & samsung chromebook plus v1). I have tested it with cards as small as 2GB, it will automatically make a 4GB swap partition if the size of the disk is detected to be above 4GB, the rest of the disk will be used for the rootfs partition<br />
<br />
<pre># sh partition_vboot.sh /dev/sdX</pre><br />
<br />
if you dont want to run this script you can follow the partitioning instructions on the archlinuxarm wiki page for this device<br />
https://archlinuxarm.org/platforms/armv8/rockchip/samsung-chromebook-plus<br />
<br />
<br />
after the rootfs partition is created and formated, mount it<br />
<pre><br />
# mkdir $MOUNTPOINT<br />
# mount /dev/sdX2 $MOUNTPOINT<br />
</pre><br />
== extract / copy files ==<br />
<pre><br />
# bsdtar -xf parabola-armv7h-systemd-cli-2020.02-tarball.tar.gz -C $MOUNTPOINT<br />
# bsdtar -xf linux-libre-64-5.11.11-3-armv7h.pkg.tar.xz -C $MOUNTPOINT<br />
<br />
# echo > /etc/fstab<br />
<br />
# mkdir $MOUNTPOINT/boot/pack<br />
# cp kernel.keyblock $MOUNTPOINT/boot/pack<br />
# cp kernel_data_key.vbprivk $MOUNTPOINT/boot/pack<br />
<br />
# cd $MOUNTPOINT/boot/pack<br />
# cp /usr/lib/modules/5.11.11-gnu-3-64-ARCH/vmlinuz .<br />
# cp /boot/dtbs/linux-libre-64/rockchip/rk3399-gru-kevin.dtb<br />
<br />
<br />
# lz4 -k vmlinuz<br />
# echo "console=tty0 console=ttyS2,115200n8 earlyprintk=ttyS2,115200n8 init=/sbin/init root=PARTUUID=%U/PARTNROFF=1 rootwait rw noinitrd" > cmdline<br />
# dd if=/dev/zero of=bootloader.bin bs=512 count=1<br />
</pre><br />
<br />
paste the following code into <code>kernel.its</code><br />
<br />
<pre><br />
/dts-v1/;<br />
<br />
/ {<br />
description = "Chrome OS kernel image with one or more FDT blobs";<br />
images {<br />
kernel@1{<br />
description = "kernel";<br />
data = /incbin/("vmlinuz.lz4");<br />
type = "kernel_noload";<br />
arch = "arm64";<br />
os = "linux";<br />
compression = "lz4";<br />
load = <0>;<br />
entry = <0>;<br />
};<br />
fdt@1{<br />
description = "rk3399-gru-kevin.dtb";<br />
data = /incbin/("rk3399-gru-kevin.dtb");<br />
type = "flat_dt";<br />
arch = "arm64";<br />
compression = "none";<br />
hash@1{<br />
algo = "sha1";<br />
};<br />
};<br />
};<br />
configurations {<br />
default = "conf@1";<br />
conf@1{<br />
kernel = "kernel@1";<br />
fdt = "fdt@1";<br />
};<br />
};<br />
};<br />
</pre><br />
<br />
<pre># mkimage -f kernel.its kernel.itb</pre><br />
<br />
and paste the following code into <code>pack_vboot.sh</code><br />
<br />
<pre><br />
futility --debug vbutil_kernel \<br />
--pack vmlinux.kpart \<br />
--version 1 \<br />
--vmlinuz kernel.itb \<br />
--arch aarch64 \<br />
--keyblock kernel.keyblock \<br />
--signprivate kernel_data_key.vbprivk \<br />
--config cmdline \<br />
--bootloader bootloader.bin<br />
</pre><br />
Now run the following commands:<br />
<pre><br />
# sh pack_vboot.sh<br />
# dd if=vmlinux.kpart of=/dev/sdX1<br />
# cd<br />
# umount $MOUNTPOINT<br />
</pre><br />
== Boot! ==<br />
<br />
<br />
it should boot up. login as root<br />
<br />
in order to update the system you will need some way to connect to the internet, i am using a usb-c ethernet adapter<br />
https://www.amazon.com/Nekteck-Ethernet-Compatible-Pixelbook-Thunderbolt/dp/B0749DCDRV/<br />
<br />
plug in the usb ethernet and dhcp should assign an ip<br />
<br />
then sync the time<br />
<pre><br />
# systemctl restart systemd-timesyncd.service<br />
# pacman -Syu linux-libre-64 acpi<br />
</pre><br />
it will fail because of keyring, but you downloaded it!<br />
<pre><br />
# pacman -U /var/cache/pacman/pkg/parabola-keyring*<br />
# pacman -S parabola-keyring<br />
# pacman -Su linux-libre-64 acpi<br />
# pacman -S linux-libre-64 --overwrite '/*'<br />
</pre><br />
<br />
== Bonus extra info ==<br />
<br />
=== make your own debug port breakout ===<br />
I dont know where to get a servo board but the you can make your own debug header breakout to get serial console access / early boot logs etc<br />
<br />
the breakout https://www.amazon.com/Proto-Advantage-DR040D254P060-60-Pin-Connector-Adapter/dp/B097S2C53T<br />
<br />
the connector https://www.digikey.com/en/products/detail/panasonic-electric-works/AXK850145WG/1986616<br />
<br />
usb <--> rs232 https://www.amazon.com/HiLetgo-CP2102-Converter-Adapter-Downloader/dp/B00LODGRV8 (get 2)<br />
<br />
servo connector pinout is described in this pdf (page 14) (V2 DEBUG HEADER)<br />
<br />
https://www.chromium.org/chromium-os/servo/810-10010-03_20120227_servo_SCH_0.pdf<br />
<br />
you can use a continuity meter to determine connector orientation but finding the corner pin that is ground<br />
<br />
<pre><br />
<br />
<br />
PIN-33 UART1_DUT_SERVO_TX --+ +-- PIN-17 UART2_DUT_SERVO_TX<br />
| |<br />
| |<br />
| |<br />
49 vG vG G 1<br />
|||||||||||||||||||||||||<br />
9753197531975319753197531<br />
1234567890123210987654321<br />
0864208642086420864208642<br />
|||||||||||||||||||||||||<br />
50 G G ^ G ^ G 2<br />
| |<br />
| |<br />
| |<br />
PIN-32 UART1_SERVO_DUT_TX --+ +-- PIN-16 UART2_SERVO_DUT_TX<br />
<br />
<br />
GND PINS = 1, 8, 15, 20, 31, 36, 42<br />
</pre><br />
<br />
=== set bios boot timeout to 2 seconds ===<br />
<br />
https://old.reddit.com/r/Crouton/comments/2szn59/how_to_shorten_os_verfication_warning_screen_on/<br />
<br />
=== blobless coreboot / etc ===<br />
https://gitlab.com/vicencb/kevinboot/</div>Maihttps://wiki.parabola.nu/index.php?title=User:Mai&diff=23564User:Mai2021-11-10T18:35:57Z<p>Mai: /* Enable booting from external storage */</p>
<hr />
<div>{{stub}}<br />
== Status for Samsung Chromebook Plus v1 aka kevin aka gru-kevin aka xe513c24 ==<br />
=== Kernel ===<br />
{{pkg|linux-libre-64}} (armv7h) works but needs to be packed correctly to boot, the following is a rough guide on how i was able to boot this kernel on this hardware<br />
<br />
=== what does not work ===<br />
- wifi<br />
- probably more stuff<br />
<br />
=== What you will need ===<br />
- this laptop :P<br />
- micro sd card at least 2GB, 8+GB reccomended<br />
- another computer that has a linux environment so we can download / extract / pack the kernel and install rootfs<br />
<br />
== Unlock external booting ==<br />
=== Switch to developer mode ===<br />
<br />
# Turn off the laptop.<br />
# To invoke Recovery mode, you hold down the ESC and Refresh keys and poke the Power button.<br />
# At the Recovery screen press Ctrl-D (there’s no prompt - you have to know to do it).<br />
# Confirm switching to developer mode by pressing enter, and the laptop will reboot and reset the system. This takes about 10-15 minutes.<br />
<br />
Note: After enabling developer mode, you will need to press Ctrl-D each time you boot, or wait 30 seconds to continue booting.<br />
=== Enable booting from external storage ===<br />
<br />
# After booting into developer mode, hold Ctrl and Alt and poke the F2 key. This will open up the developer console.<br />
# Type root to the login screen.<br />
# Then type this to enable USB booting:<br />
<br />
<code>$ enable_dev_usb_boot</code><br />
<br />
Reboot the system to allow the change to take effect.<br />
<br />
Source: https://chromebooks.readthedocs.io/en/latest/source/README.html#switch-to-developer-mode<br />
<br />
== Install packages ==<br />
<code>pacman -S {{pkg|vboot-utils}} {{pkg|uboot-tools}} {{pkg|gptfdisk}}</code><br />
<br />
== Gather files ==<br />
<br />
<pre><br />
$ mkdir parabola-armv7-64<br />
$ cd parabola-armv7-64 tar -zxvf config.tar.gz etc/default/sysstat<br />
<br />
$ wget -c https://redirector.parabola.nu/iso/armv7h-systemd-cli-2020.02/parabola-armv7h-systemd-cli-2020.02-tarball.tar.gz<br />
$ wget -c https://redirector.parabola.nu/iso/armv7h-systemd-cli-2020.02/parabola-armv7h-systemd-cli-2020.02-tarball.tar.gz.sig<br />
$ wget -c https://repomirror.parabola.nu/pool/parabola/linux-libre-64-5.11.11-3-armv7h.pkg.tar.xz<br />
$ wget -c https://repomirror.parabola.nu/pool/parabola/linux-libre-64-5.11.11-3-armv7h.pkg.tar.xz.sig<br />
$ wget -c https://git.parabola.nu/abslibre.git/plain/libre/linux-libre/kernel.keyblock<br />
$ wget -c https://git.parabola.nu/abslibre.git/plain/libre/linux-libre/kernel_data_key.vbprivk<br />
<br />
<br />
$ gpg --recv-keys FBCC5AD7421197B7ABA72853908710913E8C7778<br />
$ gpg --verify parabola-armv7h-systemd-cli-2020.02-tarball.tar.gz.sig<br />
$ gpg --recv-keys 782F9DDBE36BA7F3D4DE49065F5DFCC14177E263<br />
$ gpg --verify linux-libre-64-5.11.11-3-armv7h.pkg.tar.xz.sig<br />
</pre><br />
<br />
save the following code as <code>partition_vboot.sh</code><br />
<br />
<pre><br />
#!/bin/bash <br />
<br />
DISK="$1" <br />
<br />
# Make sure only root can run our script<br />
if [ "$(id -u)" != "0" ]; then<br />
echo "This script must be run as root" 1>&2<br />
exit 1 <br />
fi <br />
<br />
if [ x"$DISK" == 'x' ]; then<br />
echo "This script requires a base block device as its only arguement" 1>&2<br />
echo "example: $0 /dev/sdb"<br />
exit 1 <br />
fi <br />
<br />
DISK_DEVICE_NAME="$(echo $DISK | awk -F'/' '{print $NF}')"<br />
ROOT_PARTITION="$DISK"2<br />
SWAP_PARTITION="$DISK"3<br />
# TODO allow specify TOTAL_SECTORS<br />
TOTAL_SECTORS=$(cat /sys/block/$DISK_DEVICE_NAME/size)<br />
SECTOR_SIZE=$(cat /sys/block/$DISK_DEVICE_NAME/queue/hw_sector_size)<br />
<br />
# the following are in sectors, 1MB = 2048 sectors<br />
FIRST_GAP_SIZE=8192 # 2048 sectors * 4MB<br />
LAST_GAP_SIZE=2048 # 2048 sectors * 1MB<br />
SWAP_PART_SIZE=8388608 # 2048 sectors * 4096MB<br />
KERNEL_PART_SIZE=65536 # 2048 sectors * 32MB<br />
<br />
# layout arithmatic <br />
FIRST_GAP_START=0 <br />
FIRST_GAP_END=$(( $FIRST_GAP_SIZE - 1 ))<br />
KERNEL_PART_START=$(( $FIRST_GAP_END + 1 ))<br />
KERNEL_PART_END=$(( $FIRST_GAP_END + $KERNEL_PART_SIZE ))<br />
ROOTFS_PART_START=$(( $KERNEL_PART_END + 1 ))<br />
<br />
LAST_GAP_END=$(( $TOTAL_SECTORS - 1 ))<br />
LAST_GAP_START=$(( $LAST_GAP_END - $LAST_GAP_SIZE + 1 ))<br />
if [ $TOTAL_SECTORS -lt 10000000 ]; then # if size of disk is less than 5GB do not make swap<br />
MAKESWAP='false' <br />
ROOTFS_PART_END=$(( $LAST_GAP_START - 1 ))<br />
SWAP_PART_END=0<br />
SWAP_PART_START=0<br />
else<br />
MAKESWAP='true' <br />
SWAP_PART_END=$(( $LAST_GAP_START - 1 ))<br />
SWAP_PART_START=$(( $SWAP_PART_END - $SWAP_PART_SIZE + 1 ))<br />
ROOTFS_PART_END=$(( $SWAP_PART_START - 1 ))<br />
fi<br />
<br />
echo "TOTAL_SECTORS = $TOTAL_SECTORS"<br />
echo "SECTOR_SIZE = $SECTOR_SIZE"<br />
echo ""<br />
echo "FIRST_GAP_SIZE = $FIRST_GAP_SIZE"<br />
echo "LAST_GAP_SIZE = $LAST_GAP_SIZE"<br />
echo "SWAP_PART_SIZE = $SWAP_PART_SIZE"<br />
echo "KERNEL_PART_SIZE = $KERNEL_PART_SIZE"<br />
echo ""<br />
echo "FIRST_GAP_START = $FIRST_GAP_START $(( $FIRST_GAP_START / 2048 )) MB"<br />
echo "FIRST_GAP_END = $FIRST_GAP_END"<br />
echo "KERNEL_PART_START = $KERNEL_PART_START $(( $KERNEL_PART_START / 2048 )) MB"<br />
echo "KERNEL_PART_END = $KERNEL_PART_END"<br />
echo "ROOTFS_PART_START = $ROOTFS_PART_START $(( $ROOTFS_PART_START / 2048 )) MB"<br />
echo "ROOTFS_PART_END = $ROOTFS_PART_END"<br />
echo "SWAP_PART_START = $SWAP_PART_START $(( $SWAP_PART_START / 2048 )) MB"<br />
echo "SWAP_PART_END = $SWAP_PART_END"<br />
echo "LAST_GAP_START = $LAST_GAP_START $(( $LAST_GAP_START / 2048 )) MB"<br />
echo "LAST_GAP_END = $LAST_GAP_END"<br />
<br />
# use `sgdisk --list-types' to get all possible type codes<br />
KERNEL_PART_TYPE='7f00'<br />
ROOTFS_PART_TYPE='7f01'<br />
SWAP_PART_TYPE='8200'<br />
<br />
# wipe disk, and create new gpt partition table<br />
sgdisk --zap-all $DISK<br />
sgdisk -o $DISK<br />
<br />
# create the kernel partition<br />
sgdisk --new=1:$KERNEL_PART_START:$KERNEL_PART_END $DISK<br />
sgdisk --typecode=1:$KERNEL_PART_TYPE $DISK<br />
sgdisk --change-name=1:Kernel $DISK<br />
sgdisk --attributes=1:=:015A000000000000 $DISK<br />
<br />
# create the rootfs partition <br />
sgdisk --new=2:$ROOTFS_PART_START:$ROOTFS_PART_END $DISK<br />
sgdisk --typecode=2:$ROOTFS_PART_TYPE $DISK<br />
sgdisk --change-name=2:Root $DISK<br />
mkfs.ext4 $ROOT_PARTITION<br />
<br />
# create the swap partition<br />
if [ $MAKESWAP = 'true' ]; then<br />
sgdisk --new=3:$SWAP_PART_START:$SWAP_PART_END $DISK<br />
sgdisk --typecode=3:$SWAP_PART_TYPE $DISK<br />
sgdisk --change-name=3:Swap $DISK<br />
mkswap $SWAP_PARTITION<br />
fi<br />
<br />
sgdisk --print $DISK<br />
lsblk $DISK<br />
</pre><br />
<br />
== partition micro sd card & mount the rootfs partition ==<br />
<br />
<code>partition_usb.sh</code> is a replacement for cgpt i made that uses sgdisk to create a compatible partition layout for depthcharge chromebooks (asus c201 & samsung chromebook plus v1). I have tested it with cards as small as 2GB, it will automatically make a 4GB swap partition if the size of the disk is detected to be above 4GB, the rest of the disk will be used for the rootfs partition<br />
<br />
<pre># sh partition_vboot.sh /dev/sdX</pre><br />
<br />
if you dont want to run this script you can follow the partitioning instructions on the archlinuxarm wiki page for this device<br />
https://archlinuxarm.org/platforms/armv8/rockchip/samsung-chromebook-plus<br />
<br />
<br />
after the rootfs partition is created and formated, mount it<br />
<pre><br />
# mkdir $MOUNTPOINT<br />
# mount /dev/sdX2 $MOUNTPOINT<br />
</pre><br />
== extract / copy files ==<br />
<pre><br />
# bsdtar -xf parabola-armv7h-systemd-cli-2020.02-tarball.tar.gz -C $MOUNTPOINT<br />
# bsdtar -xf linux-libre-64-5.11.11-3-armv7h.pkg.tar.xz -C $MOUNTPOINT<br />
<br />
# echo > /etc/fstab<br />
<br />
# mkdir $MOUNTPOINT/boot/pack<br />
# cp kernel.keyblock $MOUNTPOINT/boot/pack<br />
# cp kernel_data_key.vbprivk $MOUNTPOINT/boot/pack<br />
<br />
# cd $MOUNTPOINT/boot/pack<br />
# cp /usr/lib/modules/5.11.11-gnu-3-64-ARCH/vmlinuz .<br />
# cp /boot/dtbs/linux-libre-64/rockchip/rk3399-gru-kevin.dtb<br />
<br />
<br />
# lz4 -k vmlinuz<br />
# echo "console=tty0 console=ttyS2,115200n8 earlyprintk=ttyS2,115200n8 init=/sbin/init root=PARTUUID=%U/PARTNROFF=1 rootwait rw noinitrd" > cmdline<br />
# dd if=/dev/zero of=bootloader.bin bs=512 count=1<br />
</pre><br />
<br />
paste the following code into <code>kernel.its</code><br />
<br />
<pre><br />
/dts-v1/;<br />
<br />
/ {<br />
description = "Chrome OS kernel image with one or more FDT blobs";<br />
images {<br />
kernel@1{<br />
description = "kernel";<br />
data = /incbin/("vmlinuz.lz4");<br />
type = "kernel_noload";<br />
arch = "arm64";<br />
os = "linux";<br />
compression = "lz4";<br />
load = <0>;<br />
entry = <0>;<br />
};<br />
fdt@1{<br />
description = "rk3399-gru-kevin.dtb";<br />
data = /incbin/("rk3399-gru-kevin.dtb");<br />
type = "flat_dt";<br />
arch = "arm64";<br />
compression = "none";<br />
hash@1{<br />
algo = "sha1";<br />
};<br />
};<br />
};<br />
configurations {<br />
default = "conf@1";<br />
conf@1{<br />
kernel = "kernel@1";<br />
fdt = "fdt@1";<br />
};<br />
};<br />
};<br />
</pre><br />
<br />
<pre># mkimage -f kernel.its kernel.itb</pre><br />
<br />
and paste the following code into <code>pack_vboot.sh</code><br />
<br />
<pre><br />
futility --debug vbutil_kernel \<br />
--pack vmlinux.kpart \<br />
--version 1 \<br />
--vmlinuz kernel.itb \<br />
--arch aarch64 \<br />
--keyblock kernel.keyblock \<br />
--signprivate kernel_data_key.vbprivk \<br />
--config cmdline \<br />
--bootloader bootloader.bin<br />
</pre><br />
Now run the following commands:<br />
<pre><br />
# sh pack_vboot.sh<br />
# dd if=vmlinux.kpart of=/dev/sdX1<br />
# cd<br />
# umount $MOUNTPOINT<br />
</pre><br />
== Boot! ==<br />
<br />
<br />
it should boot up. login as root<br />
<br />
in order to update the system you will need some way to connect to the internet, i am using a usb-c ethernet adapter<br />
https://www.amazon.com/Nekteck-Ethernet-Compatible-Pixelbook-Thunderbolt/dp/B0749DCDRV/<br />
<br />
plug in the usb ethernet and dhcp should assign an ip<br />
<br />
then sync the time<br />
<pre><br />
# systemctl restart systemd-timesyncd.service<br />
# pacman -Syu linux-libre-64 acpi<br />
</pre><br />
it will fail because of keyring, but you downloaded it!<br />
<pre><br />
# pacman -U /var/cache/pacman/pkg/parabola-keyring*<br />
# pacman -S parabola-keyring<br />
# pacman -Su linux-libre-64 acpi<br />
# pacman -S linux-libre-64 --overwrite '/*'<br />
</pre><br />
<br />
== Bonus extra info ==<br />
<br />
=== make your own debug port breakout ===<br />
I dont know where to get a servo board but the you can make your own debug header breakout to get serial console access / early boot logs etc<br />
<br />
the breakout https://www.amazon.com/Proto-Advantage-DR040D254P060-60-Pin-Connector-Adapter/dp/B097S2C53T<br />
<br />
the connector https://www.digikey.com/en/products/detail/panasonic-electric-works/AXK850145WG/1986616<br />
<br />
usb <--> rs232 https://www.amazon.com/HiLetgo-CP2102-Converter-Adapter-Downloader/dp/B00LODGRV8 (get 2)<br />
<br />
servo connector pinout is described in this pdf (page 14) (V2 DEBUG HEADER)<br />
<br />
https://www.chromium.org/chromium-os/servo/810-10010-03_20120227_servo_SCH_0.pdf<br />
<br />
you can use a continuity meter to determine connector orientation but finding the corner pin that is ground<br />
<br />
<pre><br />
<br />
<br />
PIN-33 UART1_DUT_SERVO_TX --+ +-- PIN-17 UART2_DUT_SERVO_TX<br />
| |<br />
| |<br />
| |<br />
49 vG vG G 1<br />
|||||||||||||||||||||||||<br />
9753197531975319753197531<br />
1234567890123210987654321<br />
0864208642086420864208642<br />
|||||||||||||||||||||||||<br />
50 G G ^ G ^ G 2<br />
| |<br />
| |<br />
| |<br />
PIN-32 UART1_SERVO_DUT_TX --+ +-- PIN-16 UART2_SERVO_DUT_TX<br />
<br />
<br />
GND PINS = 1, 8, 15, 20, 31, 36, 42<br />
</pre><br />
<br />
=== set bios boot timeout to 2 seconds ===<br />
<br />
https://old.reddit.com/r/Crouton/comments/2szn59/how_to_shorten_os_verfication_warning_screen_on/<br />
<br />
=== blobless coreboot / etc ===<br />
https://gitlab.com/vicencb/kevinboot/</div>Maihttps://wiki.parabola.nu/index.php?title=User:Mai&diff=23563User:Mai2021-11-10T18:35:37Z<p>Mai: </p>
<hr />
<div>{{stub}}<br />
== Status for Samsung Chromebook Plus v1 aka kevin aka gru-kevin aka xe513c24 ==<br />
=== Kernel ===<br />
{{pkg|linux-libre-64}} (armv7h) works but needs to be packed correctly to boot, the following is a rough guide on how i was able to boot this kernel on this hardware<br />
<br />
=== what does not work ===<br />
- wifi<br />
- probably more stuff<br />
<br />
=== What you will need ===<br />
- this laptop :P<br />
- micro sd card at least 2GB, 8+GB reccomended<br />
- another computer that has a linux environment so we can download / extract / pack the kernel and install rootfs<br />
<br />
== Unlock external booting ==<br />
=== Switch to developer mode ===<br />
<br />
# Turn off the laptop.<br />
# To invoke Recovery mode, you hold down the ESC and Refresh keys and poke the Power button.<br />
# At the Recovery screen press Ctrl-D (there’s no prompt - you have to know to do it).<br />
# Confirm switching to developer mode by pressing enter, and the laptop will reboot and reset the system. This takes about 10-15 minutes.<br />
<br />
Note: After enabling developer mode, you will need to press Ctrl-D each time you boot, or wait 30 seconds to continue booting.<br />
== Enable booting from external storage ==<br />
<br />
# After booting into developer mode, hold Ctrl and Alt and poke the F2 key. This will open up the developer console.<br />
# Type root to the login screen.<br />
# Then type this to enable USB booting:<br />
<br />
<code>$ enable_dev_usb_boot</code><br />
<br />
Reboot the system to allow the change to take effect.<br />
<br />
Source: https://chromebooks.readthedocs.io/en/latest/source/README.html#switch-to-developer-mode<br />
<br />
== Install packages ==<br />
<code>pacman -S {{pkg|vboot-utils}} {{pkg|uboot-tools}} {{pkg|gptfdisk}}</code><br />
<br />
== Gather files ==<br />
<br />
<pre><br />
$ mkdir parabola-armv7-64<br />
$ cd parabola-armv7-64 tar -zxvf config.tar.gz etc/default/sysstat<br />
<br />
$ wget -c https://redirector.parabola.nu/iso/armv7h-systemd-cli-2020.02/parabola-armv7h-systemd-cli-2020.02-tarball.tar.gz<br />
$ wget -c https://redirector.parabola.nu/iso/armv7h-systemd-cli-2020.02/parabola-armv7h-systemd-cli-2020.02-tarball.tar.gz.sig<br />
$ wget -c https://repomirror.parabola.nu/pool/parabola/linux-libre-64-5.11.11-3-armv7h.pkg.tar.xz<br />
$ wget -c https://repomirror.parabola.nu/pool/parabola/linux-libre-64-5.11.11-3-armv7h.pkg.tar.xz.sig<br />
$ wget -c https://git.parabola.nu/abslibre.git/plain/libre/linux-libre/kernel.keyblock<br />
$ wget -c https://git.parabola.nu/abslibre.git/plain/libre/linux-libre/kernel_data_key.vbprivk<br />
<br />
<br />
$ gpg --recv-keys FBCC5AD7421197B7ABA72853908710913E8C7778<br />
$ gpg --verify parabola-armv7h-systemd-cli-2020.02-tarball.tar.gz.sig<br />
$ gpg --recv-keys 782F9DDBE36BA7F3D4DE49065F5DFCC14177E263<br />
$ gpg --verify linux-libre-64-5.11.11-3-armv7h.pkg.tar.xz.sig<br />
</pre><br />
<br />
save the following code as <code>partition_vboot.sh</code><br />
<br />
<pre><br />
#!/bin/bash <br />
<br />
DISK="$1" <br />
<br />
# Make sure only root can run our script<br />
if [ "$(id -u)" != "0" ]; then<br />
echo "This script must be run as root" 1>&2<br />
exit 1 <br />
fi <br />
<br />
if [ x"$DISK" == 'x' ]; then<br />
echo "This script requires a base block device as its only arguement" 1>&2<br />
echo "example: $0 /dev/sdb"<br />
exit 1 <br />
fi <br />
<br />
DISK_DEVICE_NAME="$(echo $DISK | awk -F'/' '{print $NF}')"<br />
ROOT_PARTITION="$DISK"2<br />
SWAP_PARTITION="$DISK"3<br />
# TODO allow specify TOTAL_SECTORS<br />
TOTAL_SECTORS=$(cat /sys/block/$DISK_DEVICE_NAME/size)<br />
SECTOR_SIZE=$(cat /sys/block/$DISK_DEVICE_NAME/queue/hw_sector_size)<br />
<br />
# the following are in sectors, 1MB = 2048 sectors<br />
FIRST_GAP_SIZE=8192 # 2048 sectors * 4MB<br />
LAST_GAP_SIZE=2048 # 2048 sectors * 1MB<br />
SWAP_PART_SIZE=8388608 # 2048 sectors * 4096MB<br />
KERNEL_PART_SIZE=65536 # 2048 sectors * 32MB<br />
<br />
# layout arithmatic <br />
FIRST_GAP_START=0 <br />
FIRST_GAP_END=$(( $FIRST_GAP_SIZE - 1 ))<br />
KERNEL_PART_START=$(( $FIRST_GAP_END + 1 ))<br />
KERNEL_PART_END=$(( $FIRST_GAP_END + $KERNEL_PART_SIZE ))<br />
ROOTFS_PART_START=$(( $KERNEL_PART_END + 1 ))<br />
<br />
LAST_GAP_END=$(( $TOTAL_SECTORS - 1 ))<br />
LAST_GAP_START=$(( $LAST_GAP_END - $LAST_GAP_SIZE + 1 ))<br />
if [ $TOTAL_SECTORS -lt 10000000 ]; then # if size of disk is less than 5GB do not make swap<br />
MAKESWAP='false' <br />
ROOTFS_PART_END=$(( $LAST_GAP_START - 1 ))<br />
SWAP_PART_END=0<br />
SWAP_PART_START=0<br />
else<br />
MAKESWAP='true' <br />
SWAP_PART_END=$(( $LAST_GAP_START - 1 ))<br />
SWAP_PART_START=$(( $SWAP_PART_END - $SWAP_PART_SIZE + 1 ))<br />
ROOTFS_PART_END=$(( $SWAP_PART_START - 1 ))<br />
fi<br />
<br />
echo "TOTAL_SECTORS = $TOTAL_SECTORS"<br />
echo "SECTOR_SIZE = $SECTOR_SIZE"<br />
echo ""<br />
echo "FIRST_GAP_SIZE = $FIRST_GAP_SIZE"<br />
echo "LAST_GAP_SIZE = $LAST_GAP_SIZE"<br />
echo "SWAP_PART_SIZE = $SWAP_PART_SIZE"<br />
echo "KERNEL_PART_SIZE = $KERNEL_PART_SIZE"<br />
echo ""<br />
echo "FIRST_GAP_START = $FIRST_GAP_START $(( $FIRST_GAP_START / 2048 )) MB"<br />
echo "FIRST_GAP_END = $FIRST_GAP_END"<br />
echo "KERNEL_PART_START = $KERNEL_PART_START $(( $KERNEL_PART_START / 2048 )) MB"<br />
echo "KERNEL_PART_END = $KERNEL_PART_END"<br />
echo "ROOTFS_PART_START = $ROOTFS_PART_START $(( $ROOTFS_PART_START / 2048 )) MB"<br />
echo "ROOTFS_PART_END = $ROOTFS_PART_END"<br />
echo "SWAP_PART_START = $SWAP_PART_START $(( $SWAP_PART_START / 2048 )) MB"<br />
echo "SWAP_PART_END = $SWAP_PART_END"<br />
echo "LAST_GAP_START = $LAST_GAP_START $(( $LAST_GAP_START / 2048 )) MB"<br />
echo "LAST_GAP_END = $LAST_GAP_END"<br />
<br />
# use `sgdisk --list-types' to get all possible type codes<br />
KERNEL_PART_TYPE='7f00'<br />
ROOTFS_PART_TYPE='7f01'<br />
SWAP_PART_TYPE='8200'<br />
<br />
# wipe disk, and create new gpt partition table<br />
sgdisk --zap-all $DISK<br />
sgdisk -o $DISK<br />
<br />
# create the kernel partition<br />
sgdisk --new=1:$KERNEL_PART_START:$KERNEL_PART_END $DISK<br />
sgdisk --typecode=1:$KERNEL_PART_TYPE $DISK<br />
sgdisk --change-name=1:Kernel $DISK<br />
sgdisk --attributes=1:=:015A000000000000 $DISK<br />
<br />
# create the rootfs partition <br />
sgdisk --new=2:$ROOTFS_PART_START:$ROOTFS_PART_END $DISK<br />
sgdisk --typecode=2:$ROOTFS_PART_TYPE $DISK<br />
sgdisk --change-name=2:Root $DISK<br />
mkfs.ext4 $ROOT_PARTITION<br />
<br />
# create the swap partition<br />
if [ $MAKESWAP = 'true' ]; then<br />
sgdisk --new=3:$SWAP_PART_START:$SWAP_PART_END $DISK<br />
sgdisk --typecode=3:$SWAP_PART_TYPE $DISK<br />
sgdisk --change-name=3:Swap $DISK<br />
mkswap $SWAP_PARTITION<br />
fi<br />
<br />
sgdisk --print $DISK<br />
lsblk $DISK<br />
</pre><br />
<br />
== partition micro sd card & mount the rootfs partition ==<br />
<br />
<code>partition_usb.sh</code> is a replacement for cgpt i made that uses sgdisk to create a compatible partition layout for depthcharge chromebooks (asus c201 & samsung chromebook plus v1). I have tested it with cards as small as 2GB, it will automatically make a 4GB swap partition if the size of the disk is detected to be above 4GB, the rest of the disk will be used for the rootfs partition<br />
<br />
<pre># sh partition_vboot.sh /dev/sdX</pre><br />
<br />
if you dont want to run this script you can follow the partitioning instructions on the archlinuxarm wiki page for this device<br />
https://archlinuxarm.org/platforms/armv8/rockchip/samsung-chromebook-plus<br />
<br />
<br />
after the rootfs partition is created and formated, mount it<br />
<pre><br />
# mkdir $MOUNTPOINT<br />
# mount /dev/sdX2 $MOUNTPOINT<br />
</pre><br />
== extract / copy files ==<br />
<pre><br />
# bsdtar -xf parabola-armv7h-systemd-cli-2020.02-tarball.tar.gz -C $MOUNTPOINT<br />
# bsdtar -xf linux-libre-64-5.11.11-3-armv7h.pkg.tar.xz -C $MOUNTPOINT<br />
<br />
# echo > /etc/fstab<br />
<br />
# mkdir $MOUNTPOINT/boot/pack<br />
# cp kernel.keyblock $MOUNTPOINT/boot/pack<br />
# cp kernel_data_key.vbprivk $MOUNTPOINT/boot/pack<br />
<br />
# cd $MOUNTPOINT/boot/pack<br />
# cp /usr/lib/modules/5.11.11-gnu-3-64-ARCH/vmlinuz .<br />
# cp /boot/dtbs/linux-libre-64/rockchip/rk3399-gru-kevin.dtb<br />
<br />
<br />
# lz4 -k vmlinuz<br />
# echo "console=tty0 console=ttyS2,115200n8 earlyprintk=ttyS2,115200n8 init=/sbin/init root=PARTUUID=%U/PARTNROFF=1 rootwait rw noinitrd" > cmdline<br />
# dd if=/dev/zero of=bootloader.bin bs=512 count=1<br />
</pre><br />
<br />
paste the following code into <code>kernel.its</code><br />
<br />
<pre><br />
/dts-v1/;<br />
<br />
/ {<br />
description = "Chrome OS kernel image with one or more FDT blobs";<br />
images {<br />
kernel@1{<br />
description = "kernel";<br />
data = /incbin/("vmlinuz.lz4");<br />
type = "kernel_noload";<br />
arch = "arm64";<br />
os = "linux";<br />
compression = "lz4";<br />
load = <0>;<br />
entry = <0>;<br />
};<br />
fdt@1{<br />
description = "rk3399-gru-kevin.dtb";<br />
data = /incbin/("rk3399-gru-kevin.dtb");<br />
type = "flat_dt";<br />
arch = "arm64";<br />
compression = "none";<br />
hash@1{<br />
algo = "sha1";<br />
};<br />
};<br />
};<br />
configurations {<br />
default = "conf@1";<br />
conf@1{<br />
kernel = "kernel@1";<br />
fdt = "fdt@1";<br />
};<br />
};<br />
};<br />
</pre><br />
<br />
<pre># mkimage -f kernel.its kernel.itb</pre><br />
<br />
and paste the following code into <code>pack_vboot.sh</code><br />
<br />
<pre><br />
futility --debug vbutil_kernel \<br />
--pack vmlinux.kpart \<br />
--version 1 \<br />
--vmlinuz kernel.itb \<br />
--arch aarch64 \<br />
--keyblock kernel.keyblock \<br />
--signprivate kernel_data_key.vbprivk \<br />
--config cmdline \<br />
--bootloader bootloader.bin<br />
</pre><br />
Now run the following commands:<br />
<pre><br />
# sh pack_vboot.sh<br />
# dd if=vmlinux.kpart of=/dev/sdX1<br />
# cd<br />
# umount $MOUNTPOINT<br />
</pre><br />
== Boot! ==<br />
<br />
<br />
it should boot up. login as root<br />
<br />
in order to update the system you will need some way to connect to the internet, i am using a usb-c ethernet adapter<br />
https://www.amazon.com/Nekteck-Ethernet-Compatible-Pixelbook-Thunderbolt/dp/B0749DCDRV/<br />
<br />
plug in the usb ethernet and dhcp should assign an ip<br />
<br />
then sync the time<br />
<pre><br />
# systemctl restart systemd-timesyncd.service<br />
# pacman -Syu linux-libre-64 acpi<br />
</pre><br />
it will fail because of keyring, but you downloaded it!<br />
<pre><br />
# pacman -U /var/cache/pacman/pkg/parabola-keyring*<br />
# pacman -S parabola-keyring<br />
# pacman -Su linux-libre-64 acpi<br />
# pacman -S linux-libre-64 --overwrite '/*'<br />
</pre><br />
<br />
== Bonus extra info ==<br />
<br />
=== make your own debug port breakout ===<br />
I dont know where to get a servo board but the you can make your own debug header breakout to get serial console access / early boot logs etc<br />
<br />
the breakout https://www.amazon.com/Proto-Advantage-DR040D254P060-60-Pin-Connector-Adapter/dp/B097S2C53T<br />
<br />
the connector https://www.digikey.com/en/products/detail/panasonic-electric-works/AXK850145WG/1986616<br />
<br />
usb <--> rs232 https://www.amazon.com/HiLetgo-CP2102-Converter-Adapter-Downloader/dp/B00LODGRV8 (get 2)<br />
<br />
servo connector pinout is described in this pdf (page 14) (V2 DEBUG HEADER)<br />
<br />
https://www.chromium.org/chromium-os/servo/810-10010-03_20120227_servo_SCH_0.pdf<br />
<br />
you can use a continuity meter to determine connector orientation but finding the corner pin that is ground<br />
<br />
<pre><br />
<br />
<br />
PIN-33 UART1_DUT_SERVO_TX --+ +-- PIN-17 UART2_DUT_SERVO_TX<br />
| |<br />
| |<br />
| |<br />
49 vG vG G 1<br />
|||||||||||||||||||||||||<br />
9753197531975319753197531<br />
1234567890123210987654321<br />
0864208642086420864208642<br />
|||||||||||||||||||||||||<br />
50 G G ^ G ^ G 2<br />
| |<br />
| |<br />
| |<br />
PIN-32 UART1_SERVO_DUT_TX --+ +-- PIN-16 UART2_SERVO_DUT_TX<br />
<br />
<br />
GND PINS = 1, 8, 15, 20, 31, 36, 42<br />
</pre><br />
<br />
=== set bios boot timeout to 2 seconds ===<br />
<br />
https://old.reddit.com/r/Crouton/comments/2szn59/how_to_shorten_os_verfication_warning_screen_on/<br />
<br />
=== blobless coreboot / etc ===<br />
https://gitlab.com/vicencb/kevinboot/</div>Maihttps://wiki.parabola.nu/index.php?title=User:Mai&diff=23562User:Mai2021-11-10T18:26:55Z<p>Mai: </p>
<hr />
<div>{{stub}}<br />
== Status for Samsung Chromebook Plus v1 aka kevin aka gru-kevin aka xe513c24 ==<br />
=== Kernel ===<br />
{{pkg|linux-libre-64}} (armv7h) works but needs to be packed correctly to boot, the following is a rough guide on how i was able to boot this kernel on this hardware<br />
<br />
=== what does not work ===<br />
- wifi<br />
- probably more stuff<br />
<br />
=== What you will need ===<br />
- this laptop :P<br />
- micro sd card at least 2GB, 8+GB reccomended<br />
- another computer that has a linux environment so we can download / extract / pack the kernel and install rootfs<br />
<br />
== Unlock external booting ==<br />
=== Switch to developer mode ===<br />
<br />
# Turn off the laptop.<br />
# To invoke Recovery mode, you hold down the ESC and Refresh keys and poke the Power button.<br />
# At the Recovery screen press Ctrl-D (there’s no prompt - you have to know to do it).<br />
# Confirm switching to developer mode by pressing enter, and the laptop will reboot and reset the system. This takes about 10-15 minutes.<br />
<br />
Note: After enabling developer mode, you will need to press Ctrl-D each time you boot, or wait 30 seconds to continue booting.<br />
Enable booting from external storage<br />
<br />
# After booting into developer mode, hold Ctrl and Alt and poke the F2 key. This will open up the developer console.<br />
# Type root to the login screen.<br />
# Then type this to enable USB booting:<br />
<br />
<code>$ enable_dev_usb_boot</code><br />
<br />
Reboot the system to allow the change to take effect.<br />
<br />
Source: https://chromebooks.readthedocs.io/en/latest/source/README.html#switch-to-developer-mode<br />
<br />
== Install packages ==<br />
<code>pacman -S {{pkg|vboot-utils}} {{pkg|uboot-tools}} {{pkg|gptfdisk}}</code><br />
<br />
== Gather files ==<br />
<br />
<pre><br />
$ mkdir parabola-armv7-64<br />
$ cd parabola-armv7-64 tar -zxvf config.tar.gz etc/default/sysstat<br />
<br />
$ wget -c https://redirector.parabola.nu/iso/armv7h-systemd-cli-2020.02/parabola-armv7h-systemd-cli-2020.02-tarball.tar.gz<br />
$ wget -c https://redirector.parabola.nu/iso/armv7h-systemd-cli-2020.02/parabola-armv7h-systemd-cli-2020.02-tarball.tar.gz.sig<br />
$ wget -c https://repomirror.parabola.nu/pool/parabola/linux-libre-64-5.11.11-3-armv7h.pkg.tar.xz<br />
$ wget -c https://repomirror.parabola.nu/pool/parabola/linux-libre-64-5.11.11-3-armv7h.pkg.tar.xz.sig<br />
$ wget -c https://git.parabola.nu/abslibre.git/plain/libre/linux-libre/kernel.keyblock<br />
$ wget -c https://git.parabola.nu/abslibre.git/plain/libre/linux-libre/kernel_data_key.vbprivk<br />
<br />
<br />
$ gpg --recv-keys FBCC5AD7421197B7ABA72853908710913E8C7778<br />
$ gpg --verify parabola-armv7h-systemd-cli-2020.02-tarball.tar.gz.sig<br />
$ gpg --recv-keys 782F9DDBE36BA7F3D4DE49065F5DFCC14177E263<br />
$ gpg --verify linux-libre-64-5.11.11-3-armv7h.pkg.tar.xz.sig<br />
</pre><br />
<br />
save the following code as <code>partition_vboot.sh</code><br />
<br />
<pre><br />
#!/bin/bash <br />
<br />
DISK="$1" <br />
<br />
# Make sure only root can run our script<br />
if [ "$(id -u)" != "0" ]; then<br />
echo "This script must be run as root" 1>&2<br />
exit 1 <br />
fi <br />
<br />
if [ x"$DISK" == 'x' ]; then<br />
echo "This script requires a base block device as its only arguement" 1>&2<br />
echo "example: $0 /dev/sdb"<br />
exit 1 <br />
fi <br />
<br />
DISK_DEVICE_NAME="$(echo $DISK | awk -F'/' '{print $NF}')"<br />
ROOT_PARTITION="$DISK"2<br />
SWAP_PARTITION="$DISK"3<br />
# TODO allow specify TOTAL_SECTORS<br />
TOTAL_SECTORS=$(cat /sys/block/$DISK_DEVICE_NAME/size)<br />
SECTOR_SIZE=$(cat /sys/block/$DISK_DEVICE_NAME/queue/hw_sector_size)<br />
<br />
# the following are in sectors, 1MB = 2048 sectors<br />
FIRST_GAP_SIZE=8192 # 2048 sectors * 4MB<br />
LAST_GAP_SIZE=2048 # 2048 sectors * 1MB<br />
SWAP_PART_SIZE=8388608 # 2048 sectors * 4096MB<br />
KERNEL_PART_SIZE=65536 # 2048 sectors * 32MB<br />
<br />
# layout arithmatic <br />
FIRST_GAP_START=0 <br />
FIRST_GAP_END=$(( $FIRST_GAP_SIZE - 1 ))<br />
KERNEL_PART_START=$(( $FIRST_GAP_END + 1 ))<br />
KERNEL_PART_END=$(( $FIRST_GAP_END + $KERNEL_PART_SIZE ))<br />
ROOTFS_PART_START=$(( $KERNEL_PART_END + 1 ))<br />
<br />
LAST_GAP_END=$(( $TOTAL_SECTORS - 1 ))<br />
LAST_GAP_START=$(( $LAST_GAP_END - $LAST_GAP_SIZE + 1 ))<br />
if [ $TOTAL_SECTORS -lt 10000000 ]; then # if size of disk is less than 5GB do not make swap<br />
MAKESWAP='false' <br />
ROOTFS_PART_END=$(( $LAST_GAP_START - 1 ))<br />
SWAP_PART_END=0<br />
SWAP_PART_START=0<br />
else<br />
MAKESWAP='true' <br />
SWAP_PART_END=$(( $LAST_GAP_START - 1 ))<br />
SWAP_PART_START=$(( $SWAP_PART_END - $SWAP_PART_SIZE + 1 ))<br />
ROOTFS_PART_END=$(( $SWAP_PART_START - 1 ))<br />
fi<br />
<br />
echo "TOTAL_SECTORS = $TOTAL_SECTORS"<br />
echo "SECTOR_SIZE = $SECTOR_SIZE"<br />
echo ""<br />
echo "FIRST_GAP_SIZE = $FIRST_GAP_SIZE"<br />
echo "LAST_GAP_SIZE = $LAST_GAP_SIZE"<br />
echo "SWAP_PART_SIZE = $SWAP_PART_SIZE"<br />
echo "KERNEL_PART_SIZE = $KERNEL_PART_SIZE"<br />
echo ""<br />
echo "FIRST_GAP_START = $FIRST_GAP_START $(( $FIRST_GAP_START / 2048 )) MB"<br />
echo "FIRST_GAP_END = $FIRST_GAP_END"<br />
echo "KERNEL_PART_START = $KERNEL_PART_START $(( $KERNEL_PART_START / 2048 )) MB"<br />
echo "KERNEL_PART_END = $KERNEL_PART_END"<br />
echo "ROOTFS_PART_START = $ROOTFS_PART_START $(( $ROOTFS_PART_START / 2048 )) MB"<br />
echo "ROOTFS_PART_END = $ROOTFS_PART_END"<br />
echo "SWAP_PART_START = $SWAP_PART_START $(( $SWAP_PART_START / 2048 )) MB"<br />
echo "SWAP_PART_END = $SWAP_PART_END"<br />
echo "LAST_GAP_START = $LAST_GAP_START $(( $LAST_GAP_START / 2048 )) MB"<br />
echo "LAST_GAP_END = $LAST_GAP_END"<br />
<br />
# use `sgdisk --list-types' to get all possible type codes<br />
KERNEL_PART_TYPE='7f00'<br />
ROOTFS_PART_TYPE='7f01'<br />
SWAP_PART_TYPE='8200'<br />
<br />
# wipe disk, and create new gpt partition table<br />
sgdisk --zap-all $DISK<br />
sgdisk -o $DISK<br />
<br />
# create the kernel partition<br />
sgdisk --new=1:$KERNEL_PART_START:$KERNEL_PART_END $DISK<br />
sgdisk --typecode=1:$KERNEL_PART_TYPE $DISK<br />
sgdisk --change-name=1:Kernel $DISK<br />
sgdisk --attributes=1:=:015A000000000000 $DISK<br />
<br />
# create the rootfs partition <br />
sgdisk --new=2:$ROOTFS_PART_START:$ROOTFS_PART_END $DISK<br />
sgdisk --typecode=2:$ROOTFS_PART_TYPE $DISK<br />
sgdisk --change-name=2:Root $DISK<br />
mkfs.ext4 $ROOT_PARTITION<br />
<br />
# create the swap partition<br />
if [ $MAKESWAP = 'true' ]; then<br />
sgdisk --new=3:$SWAP_PART_START:$SWAP_PART_END $DISK<br />
sgdisk --typecode=3:$SWAP_PART_TYPE $DISK<br />
sgdisk --change-name=3:Swap $DISK<br />
mkswap $SWAP_PARTITION<br />
fi<br />
<br />
sgdisk --print $DISK<br />
lsblk $DISK<br />
</pre><br />
<br />
== partition micro sd card & mount the rootfs partition ==<br />
<br />
<code>partition_usb.sh</code> is a replacement for cgpt i made that uses sgdisk to create a compatible partition layout for depthcharge chromebooks (asus c201 & samsung chromebook plus v1). I have tested it with cards as small as 2GB, it will automatically make a 4GB swap partition if the size of the disk is detected to be above 4GB, the rest of the disk will be used for the rootfs partition<br />
<br />
<pre># sh partition_vboot.sh /dev/sdX</pre><br />
<br />
if you dont want to run this script you can follow the partitioning instructions on the archlinuxarm wiki page for this device<br />
https://archlinuxarm.org/platforms/armv8/rockchip/samsung-chromebook-plus<br />
<br />
<br />
after the rootfs partition is created and formated, mount it<br />
<pre><br />
# mkdir $MOUNTPOINT<br />
# mount /dev/sdX2 $MOUNTPOINT<br />
</pre><br />
== extract / copy files ==<br />
<pre><br />
# bsdtar -xf parabola-armv7h-systemd-cli-2020.02-tarball.tar.gz -C $MOUNTPOINT<br />
# bsdtar -xf linux-libre-64-5.11.11-3-armv7h.pkg.tar.xz -C $MOUNTPOINT<br />
<br />
# echo > /etc/fstab<br />
<br />
# mkdir $MOUNTPOINT/boot/pack<br />
# cp kernel.keyblock $MOUNTPOINT/boot/pack<br />
# cp kernel_data_key.vbprivk $MOUNTPOINT/boot/pack<br />
<br />
# cd $MOUNTPOINT/boot/pack<br />
# cp /usr/lib/modules/5.11.11-gnu-3-64-ARCH/vmlinuz .<br />
# cp /boot/dtbs/linux-libre-64/rockchip/rk3399-gru-kevin.dtb<br />
<br />
<br />
# lz4 -k vmlinuz<br />
# echo "console=tty0 console=ttyS2,115200n8 earlyprintk=ttyS2,115200n8 init=/sbin/init root=PARTUUID=%U/PARTNROFF=1 rootwait rw noinitrd" > cmdline<br />
# dd if=/dev/zero of=bootloader.bin bs=512 count=1<br />
</pre><br />
<br />
paste the following code into <code>kernel.its</code><br />
<br />
<pre><br />
/dts-v1/;<br />
<br />
/ {<br />
description = "Chrome OS kernel image with one or more FDT blobs";<br />
images {<br />
kernel@1{<br />
description = "kernel";<br />
data = /incbin/("vmlinuz.lz4");<br />
type = "kernel_noload";<br />
arch = "arm64";<br />
os = "linux";<br />
compression = "lz4";<br />
load = <0>;<br />
entry = <0>;<br />
};<br />
fdt@1{<br />
description = "rk3399-gru-kevin.dtb";<br />
data = /incbin/("rk3399-gru-kevin.dtb");<br />
type = "flat_dt";<br />
arch = "arm64";<br />
compression = "none";<br />
hash@1{<br />
algo = "sha1";<br />
};<br />
};<br />
};<br />
configurations {<br />
default = "conf@1";<br />
conf@1{<br />
kernel = "kernel@1";<br />
fdt = "fdt@1";<br />
};<br />
};<br />
};<br />
</pre><br />
<br />
<pre># mkimage -f kernel.its kernel.itb</pre><br />
<br />
and paste the following code into <code>pack_vboot.sh</code><br />
<br />
<pre><br />
futility --debug vbutil_kernel \<br />
--pack vmlinux.kpart \<br />
--version 1 \<br />
--vmlinuz kernel.itb \<br />
--arch aarch64 \<br />
--keyblock kernel.keyblock \<br />
--signprivate kernel_data_key.vbprivk \<br />
--config cmdline \<br />
--bootloader bootloader.bin<br />
</pre><br />
Now run the following commands:<br />
<pre><br />
# sh pack_vboot.sh<br />
# dd if=vmlinux.kpart of=/dev/sdX1<br />
# cd<br />
# umount $MOUNTPOINT<br />
</pre><br />
== Boot! ==<br />
<br />
<br />
it should boot up. login as root<br />
<br />
in order to update the system you will need some way to connect to the internet, i am using a usb-c ethernet adapter<br />
https://www.amazon.com/Nekteck-Ethernet-Compatible-Pixelbook-Thunderbolt/dp/B0749DCDRV/<br />
<br />
plug in the usb ethernet and dhcp should assign an ip<br />
<br />
then sync the time<br />
<pre><br />
# systemctl restart systemd-timesyncd.service<br />
# pacman -Syu linux-libre-64 acpi<br />
</pre><br />
it will fail because of keyring, but you downloaded it!<br />
<pre><br />
# pacman -U /var/cache/pacman/pkg/parabola-keyring*<br />
# pacman -S parabola-keyring<br />
# pacman -Su linux-libre-64 acpi<br />
# pacman -S linux-libre-64 --overwrite '/*'<br />
</pre><br />
<br />
== Bonus extra info ==<br />
<br />
=== make your own debug port breakout ===<br />
I dont know where to get a servo board but the you can make your own debug header breakout to get serial console access / early boot logs etc<br />
<br />
the breakout https://www.amazon.com/Proto-Advantage-DR040D254P060-60-Pin-Connector-Adapter/dp/B097S2C53T<br />
<br />
the connector https://www.digikey.com/en/products/detail/panasonic-electric-works/AXK850145WG/1986616<br />
<br />
usb <--> rs232 https://www.amazon.com/HiLetgo-CP2102-Converter-Adapter-Downloader/dp/B00LODGRV8 (get 2)<br />
<br />
servo connector pinout is described in this pdf (page 14) (V2 DEBUG HEADER)<br />
<br />
https://www.chromium.org/chromium-os/servo/810-10010-03_20120227_servo_SCH_0.pdf<br />
<br />
you can use a continuity meter to determine connector orientation but finding the corner pin that is ground<br />
<br />
<pre><br />
<br />
<br />
PIN-33 UART1_DUT_SERVO_TX --+ +-- PIN-17 UART2_DUT_SERVO_TX<br />
| |<br />
| |<br />
| |<br />
49 vG vG G 1<br />
|||||||||||||||||||||||||<br />
9753197531975319753197531<br />
1234567890123210987654321<br />
0864208642086420864208642<br />
|||||||||||||||||||||||||<br />
50 G G ^ G ^ G 2<br />
| |<br />
| |<br />
| |<br />
PIN-32 UART1_SERVO_DUT_TX --+ +-- PIN-16 UART2_SERVO_DUT_TX<br />
<br />
<br />
GND PINS = 1, 8, 15, 20, 31, 36, 42<br />
</pre><br />
<br />
=== set bios boot timeout to 2 seconds ===<br />
<br />
https://old.reddit.com/r/Crouton/comments/2szn59/how_to_shorten_os_verfication_warning_screen_on/<br />
<br />
=== blobless coreboot / etc ===<br />
https://gitlab.com/vicencb/kevinboot/</div>Maihttps://wiki.parabola.nu/index.php?title=User:Mai&diff=23102User:Mai2021-01-07T20:06:48Z<p>Mai: Created page with "<pre> coreboot-3ba8246-dirty Wed Sep 7 20:49:58 UTC 2016 bootblock starting... Exception handlers installed. Configuring PLL at ff760030 with NF = 99, NR = 2 and NO = 2 (VCO..."</p>
<hr />
<div><pre><br />
<br />
coreboot-3ba8246-dirty Wed Sep 7 20:49:58 UTC 2016 bootblock starting...<br />
Exception handlers installed.<br />
Configuring PLL at ff760030 with NF = 99, NR = 2 and NO = 2 (VCO = 1188000KHz, output = 594000KHz)<br />
Configuring PLL at ff760020 with NF = 32, NR = 1 and NO = 2 (VCO = 768000KHz, output = 384000KHz)<br />
Translation table is @ ff700000<br />
Mapping address range [0x00000000:0x00000000) as uncached<br />
Creating new subtable @ff716c00 for [0xff700000:0xff800000)<br />
Mapping address range [0xff700000:0xff718000) as writethrough<br />
Configuring PLL at ff760000 with NF = 75, NR = 1 and NO = 1 (VCO = 1800000KHz, output = 1800000KHz)<br />
SF: Detected GD25Q32(B) with sector size 0x1000, total 0x400000<br />
CBFS @ 20000 size e0000<br />
CBFS: 'Master Header Locator' located CBFS at [20000:100000)<br />
CBFS: Locating 'fallback/romstage'<br />
CBFS: Found @ offset 80 size 59e4<br />
<br />
<br />
coreboot-3ba8246-dirty Wed Sep 7 20:49:58 UTC 2016 romstage starting...<br />
RAM Config: 11.<br />
Starting SDRAM initialization...<br />
Configuring PLL at ff760010 with NF = 400, NR = 9 and NO = 2 (VCO = 1066666KHz, output = 533333KHz)<br />
Finish SDRAM initialization...<br />
Mapping address range [0x00000000:0xff000000) as writeback<br />
Mapping address range [0x10000000:0x10200000) as uncached<br />
CBMEM:<br />
IMD: root @ fefff000 254 entries.<br />
IMD: root @ feffec00 62 entries.<br />
SF: Detected GD25Q32(B) with sector size 0x1000, total 0x400000<br />
CBFS @ 20000 size e0000<br />
CBFS: 'Master Header Locator' located CBFS at [20000:100000)<br />
CBFS: Locating 'fallback/ramstage'<br />
CBFS: Found @ offset 5ac0 size 10f0c<br />
<br />
<br />
coreboot-3ba8246-dirty Wed Sep 7 20:49:58 UTC 2016 ramstage starting...<br />
SF: Detected GD25Q32(B) with sector size 0x1000, total 0x400000<br />
FMAP: Found "FMAP" version 1.0 at 100000.<br />
FMAP: base = 0 size = 400000 #areas = 22<br />
FMAP: area RO_VPD found<br />
FMAP: offset: 1f0000<br />
FMAP: size: 65536 bytes<br />
FMAP: Found "FMAP" version 1.0 at 100000.<br />
FMAP: base = 0 size = 400000 #areas = 22<br />
FMAP: area RW_VPD found<br />
FMAP: offset: 2f8000<br />
FMAP: size: 32768 bytes<br />
FMAP: Found "FMAP" version 1.0 at 100000.<br />
FMAP: base = 0 size = 400000 #areas = 22<br />
FMAP: area RO_VPD found<br />
FMAP: offset: 1f0000<br />
FMAP: size: 65536 bytes<br />
FMAP: Found "FMAP" version 1.0 at 100000.<br />
FMAP: base = 0 size = 400000 #areas = 22<br />
FMAP: area RW_VPD found<br />
FMAP: offset: 2f8000<br />
FMAP: size: 32768 bytes<br />
Exception handlers installed.<br />
BS: BS_PRE_DEVICE times (us): entry 1 run 2 exit 2<br />
BS: BS_DEV_INIT_CHIPS times (us): entry 2 run 3 exit 2<br />
Enumerating buses...<br />
Show all devs... Before device enumeration.<br />
Root Device: enabled 1<br />
CPU_CLUSTER: 0: enabled 1<br />
Compare with tree...<br />
Root Device: enabled 1<br />
CPU_CLUSTER: 0: enabled 1<br />
Root Device scanning...<br />
root_dev_scan_bus for Root Device<br />
CPU_CLUSTER: 0 enabled<br />
root_dev_scan_bus for Root Device done<br />
scan_bus: scanning of bus Root Device took 10792 usecs<br />
done<br />
BS: BS_DEV_ENUMERATE times (us): entry 2 run 32903 exit 2<br />
Allocating resources...<br />
Reading resources...<br />
Root Device read_resources bus 0 link: 0<br />
Root Device read_resources bus 0 link: 0 done<br />
Done reading resources.<br />
Show resources in subtree (Root Device)...After reading.<br />
Root Device child on link 0 CPU_CLUSTER: 0<br />
CPU_CLUSTER: 0<br />
Setting resources...<br />
Root Device assign_resources, bus 0 link: 0<br />
Root Device assign_resources, bus 0 link: 0<br />
Done setting resources.<br />
Show resources in subtree (Root Device)...After assigning values.<br />
Root Device child on link 0 CPU_CLUSTER: 0<br />
CPU_CLUSTER: 0<br />
Done allocating resources.<br />
BS: BS_DEV_RESOURCES times (us): entry 2 run 50235 exit 1<br />
Enabling resources...<br />
done.<br />
BS: BS_DEV_ENABLE times (us): entry 1 run 2622 exit 1<br />
Initializing devices...<br />
Root Device init ...<br />
SF: Detected GD25Q32(B) with sector size 0x1000, total 0x400000<br />
FMAP: Found "FMAP" version 1.0 at 100000.<br />
FMAP: base = 0 size = 400000 #areas = 22<br />
FMAP: area RW_ELOG found<br />
FMAP: offset: 27c000<br />
FMAP: size: 16384 bytes<br />
ELOG: FLASH @0x00215798 [SPI 0x0027c000]<br />
ELOG: area is 4096 bytes, full threshold 3834, shrink size 1024<br />
ELOG: Event(17) added with size 13<br />
out: cmd=0x87: 03 6b 87 00 00 00 04 00 07 00 00 00 <br />
in-header: 03 d5 00 00 04 00 00 00 <br />
in-data: 04 20 00 00 <br />
out: cmd=0x17: 03 08 17 00 01 00 14 00 00 00 00 00 00 00 00 00 05 00 00 00 04 40 70 ff 75 7c 20 00 <br />
in-header: 03 d1 00 00 10 00 00 00 <br />
in-data: 70 00 00 00 15 00 00 00 00 00 00 00 00 ff 7f 19 <br />
elog_add_boot_reason: Normal mode boot, nothing interesting to log<br />
Root Device init finished in 74550 usecs<br />
CPU_CLUSTER: 0 init ...<br />
LCD framebuffer @10800000<br />
Mapping address range [0x10800000:0x11000000) as uncached<br />
Attempting to setup EDP display.<br />
do not get hpd single, force hpd<br />
Extracted contents:<br />
header: 00 ff ff ff ff ff ff 00<br />
serial number: 09 e5 6b 06 00 00 00 00 01 19<br />
version: 01 04<br />
basic params: 95 1a 0e 78 02<br />
chroma info: 5d 40 94 5b 57 94 29 1c 50 54<br />
established: 00 00 00<br />
standard: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01<br />
descriptor 1: 3e 1c 56 a0 50 00 16 30 30 20 36 00 00 90 10 00 00 1a<br />
descriptor 2: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 1a<br />
descriptor 3: 00 00 00 fe 00 42 4f 45 20 44 54 0a 20 20 20 20 20 20<br />
descriptor 4: 00 00 00 fe 00 4e 54 31 31 36 57 48 4d 2d 4e 32 33 0a<br />
extensions: 00<br />
checksum: 3d<br />
<br />
Manufacturer: BOE Model 66b Serial Number 0<br />
Made week 1 of 2015<br />
EDID version: 1.4<br />
Digital display<br />
6 bits per primary color channel<br />
DisplayPort interface<br />
Maximum image size: 26 cm x 14 cm<br />
Gamma: 220%<br />
Check DPMS levels<br />
Supported color formats: RGB 4:4:4<br />
First detailed timing is preferred timing<br />
Established timings supported:<br />
Standard timings supported:<br />
Detailed timings<br />
Hex of detail: 3e1c56a0500016303020360000901000001a<br />
Detailed mode (IN HEX): Clock 72300 KHz, 100 mm x 90 mm<br />
0556 0586 05a6 05f6 hborder 0<br />
0300 0303 0309 0316 vborder 0<br />
+hsync -vsync <br />
Did detailed timing<br />
Hex of detail: 00000000000000000000000000000000001a<br />
Manufacturer-specified data, tag 0<br />
Hex of detail: 000000fe00424f452044540a202020202020<br />
ASCII string: BOE DT<br />
Hex of detail: 000000fe004e5431313657484d2d4e32330a<br />
ASCII string: NT116WHM-N23<br />
Checksum<br />
Checksum: 0x3d (valid)<br />
Configuring PLL at ff760040 with NF = 241, NR = 10 and NO = 8 (VCO = 578400KHz, output = 72300KHz)<br />
clock recovery at voltage 0 pre-emphasis 0<br />
channel eq at voltage 0 pre-emphasis 0<br />
CPU_CLUSTER: 0 init finished in 513214 usecs<br />
Devices initialized<br />
Show all devs... After init.<br />
Root Device: enabled 1<br />
CPU_CLUSTER: 0: enabled 1<br />
BS: BS_DEV_INIT times (us): entry 2 run 606474 exit 2<br />
Finalize devices...<br />
Devices finalized<br />
BS: BS_POST_DEVICE times (us): entry 1 run 3489 exit 2<br />
BS: BS_OS_RESUME_CHECK times (us): entry 1 run 4 exit 1<br />
Writing coreboot table at 0xfefdc000<br />
rom_table_end = 0xfefdc000<br />
... aligned to 0xfefe0000<br />
0. 0000000000000000-00000000fefdbfff: RAM<br />
1. 00000000fefdc000-00000000feffffff: CONFIGURATION TABLES<br />
out: cmd=0x87: 03 72 87 00 00 00 04 00 00 00 00 00 <br />
in-header: 03 d5 00 00 04 00 00 00 <br />
in-data: 04 20 00 00 <br />
Added 9 GPIOS size 264<br />
Board ID: 6.<br />
RAM Config: 11.<br />
CBFS @ 20000 size e0000<br />
CBFS: 'Master Header Locator' located CBFS at [20000:100000)<br />
FMAP: Found "FMAP" version 1.0 at 100000.<br />
FMAP: base = 0 size = 400000 #areas = 22<br />
Wrote coreboot table at: fefdc000, 0x308 bytes, checksum e5a7<br />
coreboot table: 800 bytes.<br />
IMD ROOT 0. fefff000 00001000<br />
IMD SMALL 1. feffe000 00001000<br />
CONSOLE 2. fefde000 00020000<br />
COREBOOT 3. fefdc000 00002000<br />
IMD small region:<br />
IMD ROOT 0. feffec00 00000400<br />
TIME STAMP 1. feffe920 000002e0<br />
VPD 2. feffe760 000001be<br />
BS: BS_WRITE_TABLES times (us): entry 1 run 78642 exit 2<br />
CBFS @ 20000 size e0000<br />
CBFS: 'Master Header Locator' located CBFS at [20000:100000)<br />
CBFS: Locating 'fallback/payload'<br />
CBFS: Found @ offset 16a40 size 12185<br />
Loading segment from rom address 0x01000000<br />
code (compression=1)<br />
New segment dstaddr 0x43104040 memsize 0x104d900 srcaddr 0x1000038 filesize 0x1214d<br />
Loading segment from rom address 0x0100001c<br />
Entry Point 0x43104041<br />
Bounce Buffer at fefa9000, 208688 bytes<br />
Loading Segment: addr: 0x0000000043104040 memsz: 0x000000000104d900 filesz: 0x000000000001214d<br />
lb: [0x0000000000200000, 0x0000000000219798)<br />
Post relocation: addr: 0x0000000043104040 memsz: 0x000000000104d900 filesz: 0x000000000001214d<br />
using LZMA<br />
[ 0x43104040, 431251ec, 0x44151940) <- 01000038<br />
Clearing Segment: addr: 0x00000000431251ec memsz: 0x000000000102c754<br />
dest 43104040, end 44151940, bouncebuffer fefa9000<br />
Loaded segments<br />
BS: BS_PAYLOAD_LOAD times (us): entry 2 run 212394 exit 1<br />
Jumping to boot code at 43104041(fefdc000)<br />
CPU0: stack: ff717580 - ff718000, lowest used address ff717b50, stack used: 1200 bytes<br />
<br />
<br />
<br />
Starting depthcharge on veyron_speedy...<br />
<br />
The GBB signature is at 0x43004020 and is: 24 47 42 42<br />
<br />
vboot handoff pointer is NULL<br />
<br />
vboot_init:68 dev 0, rec 0, wp 1, lid 1, oprom 0<br />
<br />
Calling VbInit().<br />
<br />
VbInit() input flags 0x1264 gbb flags 0x0<br />
<br />
cros_ec_init: CrosEC protocol v3 supported (544, 544)<br />
<br />
Google ChromeOS EC driver ready, id 'speedy_v1.1.2712-242f6bd'<br />
<br />
Clearing the recovery request.<br />
<br />
VbSharedDataInit, 16384 bytes, header 1096 bytes<br />
<br />
VbInit sees recovery request = 0<br />
<br />
VbInit now sets shared->recovery_reason = 0<br />
<br />
TPM: Call RollbackFirmwareSetup(r0, d0)<br />
<br />
TPM: Startup<br />
<br />
1.2 TPM (chip type slb9645tt device-id 0x1A)<br />
<br />
TPM: command 0x99 returned 0x0<br />
<br />
TPM: Asserting physical presence<br />
<br />
TPM: command 0x4000000a returned 0x0<br />
<br />
TPM: command 0x65 returned 0x0<br />
<br />
TPM: Got flags disable=0, deactivated=0, nvlocked=1<br />
<br />
TPM: TlclRead(0x1007, 10)<br />
<br />
TPM: command 0xcf returned 0x0<br />
<br />
TPM: Firmware space sv2 f3 v20003<br />
<br />
TPM: SetupTPM() succeeded<br />
<br />
TPM: RollbackFirmwareSetup 20003<br />
<br />
VbInit() output flags 0xce<br />
<br />
VbInit() returning 0x0<br />
<br />
Wipe memory regions:<br />
<br />
[0x00000000000000, 0x00000002000000)<br />
<br />
[0x00000002000200, 0x00000031f00000)<br />
<br />
[0x00000032000000, 0x00000043000000)<br />
<br />
[0x00000044151940, 0x000000fefdc000)<br />
<br />
Initializing DWC2 USB controller at 0xff580000.<br />
<br />
Initializing DWC2 USB controller at 0xff540000.<br />
<br />
Added USB disk 1.<br />
<br />
Calling VbSelectFirmware().<br />
<br />
LoadFirmware started...<br />
<br />
Checking key block signature...<br />
<br />
- sig_size=512, expecting 512 for algorithm 8<br />
<br />
Verifying preamble.<br />
<br />
- sig_size=512, expecting 512 for algorithm 7<br />
<br />
Preamble flags 0x0<br />
<br />
Firmware 0 is valid.<br />
<br />
Saving kernel subkey to shared data: size 512, algo 8<br />
<br />
VbSharedDataReserve 1032 bytes at 1096<br />
<br />
Will boot firmware index 0<br />
<br />
TPM: Set global lock<br />
<br />
TPM: TlclWrite(0x0, 0)<br />
<br />
TPM: command 0xcd returned 0x0<br />
<br />
TPM: command 0x14 returned 0x0<br />
<br />
TPM: SetTPMBootModeState boot mode PCR0 result 0<br />
<br />
TPM: command 0x14 returned 0x0<br />
<br />
TPM: SetTPMBootModeState HWID PCR1 result 0<br />
<br />
Calling VbSelectAndLoadKernel().<br />
<br />
VbEcSoftwareSync(devidx=0)<br />
<br />
VbEcSoftwareSync() check for RW update.<br />
<br />
EcUpdateImage() - Check for RW update<br />
<br />
EC-RW hash:35e04e84ca847cebcb21819b112e56340adc8c345c39c770d469ba0adf197e46<br />
<br />
EC-RW hash address, size are 0x4335b9e0, 32.<br />
<br />
Hash = 35e04e84ca847cebcb21819b112e56340adc8c345c39c770d469ba0adf197e46<br />
<br />
Expected hash:35e04e84ca847cebcb21819b112e56340adc8c345c39c770d469ba0adf197e46<br />
<br />
EcUpdateImage() in EC-RW and it matches<br />
<br />
PARAM_LIMIT_POWER not supported by EC.<br />
<br />
TPM: TlclRead(0x1008, 13)<br />
<br />
TPM: command 0xcf returned 0x0<br />
<br />
TPM: command 0x65 returned 0x0<br />
<br />
TPM: RollbackKernelRead 30002<br />
<br />
Entering VbBootDeveloper()<br />
<br />
backlight_update called but not implemented.<br />
<br />
VbAudioOpen() - ticks_per_msec is 1000<br />
<br />
VbAudioOpen() - VbExBeep() is limited<br />
<br />
VbGetDevMusicNotes: use_short is 0, hdr is 0x0, maxsize is 0<br />
<br />
VbGetDevMusicNotes: using 1 default notes<br />
<br />
VbAudioOpen() - note count 1<br />
<br />
VbTryLoadKernel() start, get_info_flags=0x1<br />
<br />
VbTryLoadKernel() found 1 disks<br />
<br />
VbTryLoadKernel() trying disk 0<br />
<br />
GptNextKernelEntry looking at new prio partition 1<br />
<br />
GptNextKernelEntry s1 t0 p1<br />
<br />
GptNextKernelEntry likes partition 1<br />
<br />
Found kernel entry at 2048 size 65536<br />
<br />
Checking key block signature...<br />
<br />
- sig_size=512, expecting 512 for algorithm 8<br />
<br />
In RSAVerify(): Padding check failed!<br />
<br />
In RSAVerify(): Hash check failed!<br />
<br />
Invalid key block signature.<br />
<br />
Verifying key block signature failed.<br />
<br />
Checking key block hash only...<br />
<br />
Key version too old.<br />
<br />
- sig_size=256, expecting 256 for algorithm 4<br />
<br />
Kernel preamble is good.<br />
<br />
Key block valid: 0<br />
<br />
Combined version: 65537<br />
<br />
- sig_size=256, expecting 256 for algorithm 4<br />
<br />
Partition is good.<br />
<br />
In recovery mode or dev-signed kernel<br />
<br />
Good_partition >= 0<br />
<br />
VbTryLoadKernel() LoadKernel() = 0<br />
<br />
VbBootDeveloper() - booting USB<br />
<br />
backlight_update called but not implemented.<br />
<br />
TPM: Lock physical presence<br />
<br />
TPM: command 0x4000000a returned 0x0<br />
<br />
VbSelectAndLoadKernel() returning 0<br />
<br />
Boot policy: Match for type 0 with cmdline 1<br />
<br />
Loading FIT.<br />
<br />
Image fdt@14 has 71426 bytes.<br />
<br />
Image fdt@13 has 97544 bytes.<br />
<br />
Image fdt@12 has 65138 bytes.<br />
<br />
Image fdt@11 has 62023 bytes.<br />
<br />
Image fdt@10 has 66631 bytes.<br />
<br />
Image fdt@9 has 57937 bytes.<br />
<br />
Image fdt@8 has 67690 bytes.<br />
<br />
Image fdt@7 has 65036 bytes.<br />
<br />
Image fdt@6 has 55091 bytes.<br />
<br />
Image fdt@5 has 82661 bytes.<br />
<br />
Image fdt@4 has 83243 bytes.<br />
<br />
Image fdt@3 has 60154 bytes.<br />
<br />
Image fdt@2 has 64184 bytes.<br />
<br />
Image fdt@1 has 64147 bytes.<br />
<br />
Image kernel@1 has 7212432 bytes.<br />
<br />
Compat preference: google,veyron-speedy-rev6<br />
<br />
Config conf@14, kernel kernel@1, fdt fdt@14, compat google,nyan-blaze-rev10 google,nyan-blaze-rev9 google,nyan-blaze-rev8 google,nyan-blaze-rev7 google,nyan-blaze-rev6 google,nyan-blaze-rev5 google,nyan-blaze-rev4 google,nyan-blaze-rev3 google,nyan-blaze-rev2 google,nyan-blaze-rev1 google,nyan-blaze-rev0 google,nyan-blaze google,nyan nvidia,tegra124<br />
<br />
Config conf@13, kernel kernel@1, fdt fdt@13, compat google,nyan-big-rev7 google,nyan-big-rev6 google,nyan-big-rev5 google,nyan-big-rev4 google,nyan-big-rev3 google,nyan-big-rev2 google,nyan-big-rev1 google,nyan-big-rev0 google,nyan-big google,nyan nvidia,tegra124<br />
<br />
Config conf@12, kernel kernel@1, fdt fdt@12, compat google,veyron-speedy-rev9 google,veyron-speedy-rev8 google,veyron-speedy-rev7 google,veyron-speedy-rev6 (match) google,veyron-speedy-rev5 google,veyron-speedy-rev4 google,veyron-speedy-rev3 google,veyron-speedy-rev2 google,veyron-speedy google,veyron rockchip,rk3288<br />
<br />
Config conf@11, kernel kernel@1, fdt fdt@11, compat google,veyron-pinky-rev2 google,veyron-pinky google,veyron rockchip,rk3288<br />
<br />
Config conf@10, kernel kernel@1, fdt fdt@10, compat google,veyron-minnie-rev4 google,veyron-minnie-rev3 google,veyron-minnie-rev2 google,veyron-minnie-rev1 google,veyron-minnie-rev0 google,veyron-minnie google,veyron rockchip,rk3288<br />
<br />
Config conf@9, kernel kernel@1, fdt fdt@9, compat google,veyron-mickey-rev8 google,veyron-mickey-rev7 google,veyron-mickey-rev6 google,veyron-mickey-rev5 google,veyron-mickey-rev4 google,veyron-mickey-rev3 google,veyron-mickey-rev2 google,veyron-mickey-rev1 google,veyron-mickey-rev0 google,veyron-mickey google,veyron rockchip,rk3288<br />
<br />
Config conf@8, kernel kernel@1, fdt fdt@8, compat google,veyron-jerry-rev15 google,veyron-jerry-rev14 google,veyron-jerry-rev13 google,veyron-jerry-rev12 google,veyron-jerry-rev11 google,veyron-jerry-rev10 google,veyron-jerry-rev7 google,veyron-jerry-rev6 google,veyron-jerry-rev5 google,veyron-jerry-rev4 google,veyron-jerry-rev3 google,veyron-jerry google,veyron rockchip,rk3288<br />
<br />
Config conf@7, kernel kernel@1, fdt fdt@7, compat google,veyron-jaq-rev5 google,veyron-jaq-rev4 google,veyron-jaq-rev3 google,veyron-jaq-rev2 google,veyron-jaq-rev1 google,veyron-jaq google,veyron rockchip,rk3288<br />
<br />
Config conf@6, kernel kernel@1, fdt fdt@6, compat google,veyron-brain-rev0 google,veyron-brain google,veyron rockchip,rk3288<br />
<br />
Config conf@5, kernel kernel@1, fdt fdt@5, compat google,pit-rev16 google,pit-rev15 google,pit-rev14 google,pit-rev13 google,pit-rev12 google,pit-rev11 google,pit-rev10 google,pit-rev9 google,pit-rev8 google,pit-rev7 google,pit-rev6 google,pit google,peach samsung,exynos5420 samsung,exynos5<br />
<br />
Config conf@4, kernel kernel@1, fdt fdt@4, compat google,pi-rev16 google,pi-rev15 google,pi-rev14 google,pi-rev13 google,pi-rev12 google,pi-rev11 google,pi-rev10 google,pi google,peach samsung,exynos5800 samsung,exynos5<br />
<br />
Config conf@3, kernel kernel@1, fdt fdt@3, compat google,spring samsung,exynos5250 samsung,exynos5<br />
<br />
Config conf@2, kernel kernel@1, fdt fdt@2, compat google,snow-rev5 samsung,exynos5250 samsung,exynos5<br />
<br />
Config conf@1 (default), kernel kernel@1, fdt fdt@1, compat google,snow-rev4 google,snow samsung,exynos5250 samsung,exynos5<br />
<br />
Choosing best match conf@12.<br />
<br />
Shutting down all USB controllers.<br />
<br />
Removed USB disk 1.<br />
<br />
Exiting depthcharge with code 4 at timestamp: 6966908<br />
<br />
[ 0.000000] Booting Linux on physical CPU 0x500<br />
[ 0.000000] Linux version 5.8.13-gnu-1 (linux-libre@parabola) (gcc (GCC) 10.2.0, GNU ld (GNU Binutils) 2.35) #1 SMP PREEMPT Sat, 03 Oct 2020 01:33:45 +0000<br />
[ 0.000000] CPU: ARMv7 Processor [410fc0d1] revision 1 (ARMv7), cr=10c5387d<br />
[ 0.000000] CPU: div instructions available: patching division code<br />
[ 0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache<br />
[ 0.000000] OF: fdt: Machine model: Google Speedy<br />
[ 0.000000] Memory policy: Data cache writealloc<br />
[ 0.000000] cma: Reserved 64 MiB at 0xfa000000<br />
[ 0.000000] Zone ranges:<br />
[ 0.000000] DMA [mem 0x0000000000000000-0x000000002fffffff]<br />
[ 0.000000] Normal empty<br />
[ 0.000000] HighMem [mem 0x0000000030000000-0x00000000feefffff]<br />
[ 0.000000] Movable zone start for each node<br />
[ 0.000000] Early memory node ranges<br />
[ 0.000000] node 0: [mem 0x0000000000000000-0x00000000feefffff]<br />
[ 0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x00000000feefffff]<br />
[ 0.000000] percpu: Embedded 16 pages/cpu s34764 r8192 d22580 u65536<br />
[ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 1042496<br />
[ 0.000000] Kernel command line: cros_secure console=ttyS2,115200n8 earlyprintk=ttyS2,115200n8 init=/sbin/init root=PARTUUID=c82cb259-3dc7-4b4e-87f1-33fb2fee3618/PARTNROFF=1 rootwait rw noinitrd <br />
[ 0.000000] Dentry cache hash table entries: 131072 (order: 7, 524288 bytes, linear)<br />
[ 0.000000] Inode-cache hash table entries: 65536 (order: 6, 262144 bytes, linear)<br />
[ 0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off<br />
[ 0.000000] Memory: 4031432K/4176896K available (14336K kernel code, 1055K rwdata, 5956K rodata, 2048K init, 881K bss, 79928K reserved, 65536K cma-reserved, 3308544K highmem)<br />
[ 0.000000] random: get_random_u32 called from __kmem_cache_create+0x28/0x3b4 with crng_init=0<br />
[ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1<br />
[ 0.000000] rcu: Preemptible hierarchical RCU implementation.<br />
[ 0.000000] rcu: RCU restricting CPUs from NR_CPUS=8 to nr_cpu_ids=4.<br />
[ 0.000000] Trampoline variant of Tasks RCU enabled.<br />
[ 0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 25 jiffies.<br />
[ 0.000000] rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=4<br />
[ 0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16<br />
[ 0.000000] arch_timer: cp15 timer(s) running at 24.00MHz (phys).<br />
[ 0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x588fe9dc0, max_idle_ns: 440795202592 ns<br />
[ 0.000002] sched_clock: 56 bits at 24MHz, resolution 41ns, wraps every 4398046511097ns<br />
[ 0.000007] Switching to timer-based delay loop, resolution 41ns<br />
[ 0.001887] Console: colour dummy device 80x30<br />
[ 0.001913] Calibrating delay loop (skipped), value calculated using timer frequency.. 48.00 BogoMIPS (lpj=96000)<br />
[ 0.001919] pid_max: default: 32768 minimum: 301<br />
[ 0.001997] LSM: Security Framework initializing<br />
[ 0.002050] Smack: Initializing.<br />
[ 0.002053] Smack: IPv6 port labeling enabled.<br />
[ 0.002117] Mount-cache hash table entries: 2048 (order: 1, 8192 bytes, linear)<br />
[ 0.002125] Mountpoint-cache hash table entries: 2048 (order: 1, 8192 bytes, linear)<br />
[ 0.002573] CPU: Testing write buffer coherency: ok<br />
[ 0.002589] CPU0: Spectre v2: using BPIALL workaround<br />
[ 0.002708] CPU0: thread -1, cpu 0, socket 5, mpidr 80000500<br />
[ 0.003033] Setting up static identity map for 0x300000 - 0x3000ac<br />
[ 0.003756] rcu: Hierarchical SRCU implementation.<br />
[ 0.004617] smp: Bringing up secondary CPUs ...<br />
[ 0.005946] CPU1: thread -1, cpu 1, socket 5, mpidr 80000501<br />
[ 0.005949] CPU1: Spectre v2: using BPIALL workaround<br />
[ 0.007308] CPU2: thread -1, cpu 2, socket 5, mpidr 80000502<br />
[ 0.007311] CPU2: Spectre v2: using BPIALL workaround<br />
[ 0.008648] CPU3: thread -1, cpu 3, socket 5, mpidr 80000503<br />
[ 0.008650] CPU3: Spectre v2: using BPIALL workaround<br />
[ 0.008701] smp: Brought up 1 node, 4 CPUs<br />
[ 0.008706] SMP: Total of 4 processors activated (192.00 BogoMIPS).<br />
[ 0.008708] CPU: All CPU(s) started in SVC mode.<br />
[ 0.009051] devtmpfs: initialized<br />
[ 0.013507] VFP support v0.3: implementor 41 architecture 3 part 30 variant d rev 0<br />
[ 0.013737] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns<br />
[ 0.013747] futex hash table entries: 1024 (order: 4, 65536 bytes, linear)<br />
[ 0.014529] xor: measuring software checksum speed<br />
[ 0.052088] arm4regs : 3782.000 MB/sec<br />
[ 0.092114] 8regs : 2909.000 MB/sec<br />
[ 0.132140] 32regs : 2906.000 MB/sec<br />
[ 0.172165] neon : 4986.000 MB/sec<br />
[ 0.172169] xor: using function: neon (4986.000 MB/sec)<br />
[ 0.172196] pinctrl core: initialized pinctrl subsystem<br />
[ 0.172774] thermal_sys: Registered thermal governor 'fair_share'<br />
[ 0.172776] thermal_sys: Registered thermal governor 'bang_bang'<br />
[ 0.172780] thermal_sys: Registered thermal governor 'step_wise'<br />
[ 0.172783] thermal_sys: Registered thermal governor 'user_space'<br />
[ 0.173207] NET: Registered protocol family 16<br />
[ 0.174034] DMA: preallocated 256 KiB pool for atomic coherent allocations<br />
[ 0.174377] audit: initializing netlink subsys (disabled)<br />
[ 0.174478] audit: type=2000 audit(0.172:1): state=initialized audit_enabled=0 res=1<br />
[ 0.174949] cpuidle: using governor menu<br />
[ 0.175211] No ATAGs?<br />
[ 0.175263] hw-breakpoint: found 5 (+1 reserved) breakpoint and 4 watchpoint registers.<br />
[ 0.175267] hw-breakpoint: maximum watchpoint size is 4 bytes.<br />
[ 0.175763] Serial: AMBA PL011 UART driver<br />
[ 0.268305] raid6: neonx8 gen() 2749 MB/s<br />
[ 0.336341] raid6: neonx8 xor() 1918 MB/s<br />
[ 0.404405] raid6: neonx4 gen() 4494 MB/s<br />
[ 0.472432] raid6: neonx4 xor() 2889 MB/s<br />
[ 0.540471] raid6: neonx2 gen() 4003 MB/s<br />
[ 0.608506] raid6: neonx2 xor() 3104 MB/s<br />
[ 0.676545] raid6: neonx1 gen() 2833 MB/s<br />
[ 0.744580] raid6: neonx1 xor() 2572 MB/s<br />
[ 0.812639] raid6: int32x8 gen() 866 MB/s<br />
[ 0.880658] raid6: int32x8 xor() 508 MB/s<br />
[ 0.948711] raid6: int32x4 gen() 939 MB/s<br />
[ 1.016738] raid6: int32x4 xor() 500 MB/s<br />
[ 1.084767] raid6: int32x2 gen() 1046 MB/s<br />
[ 1.152821] raid6: int32x2 xor() 424 MB/s<br />
[ 1.220847] raid6: int32x1 gen() 948 MB/s<br />
[ 1.288882] raid6: int32x1 xor() 374 MB/s<br />
[ 1.288886] raid6: using algorithm neonx4 gen() 4494 MB/s<br />
[ 1.288888] raid6: .... xor() 2889 MB/s, rmw enabled<br />
[ 1.288891] raid6: using neon recovery algorithm<br />
[ 1.291532] vcc_5v: supplied by vccsys<br />
[ 1.291566] vcc33_sys: supplied by vccsys<br />
[ 1.291588] vcc50_hdmi: supplied by vcc_5v<br />
[ 1.291608] backlight_regulator: supplied by vcc33_sys<br />
[ 1.291628] panel_regulator: supplied by vcc33_sys<br />
[ 1.292994] iommu: Default domain type: Translated <br />
[ 1.294429] vgaarb: loaded<br />
[ 1.294726] SCSI subsystem initialized<br />
[ 1.294890] usbcore: registered new interface driver usbfs<br />
[ 1.294912] usbcore: registered new interface driver hub<br />
[ 1.294935] usbcore: registered new device driver usb<br />
[ 1.295538] mc: Linux media interface: v0.10<br />
[ 1.295550] videodev: Linux video capture interface: v2.00<br />
[ 1.295582] pps_core: LinuxPPS API ver. 1 registered<br />
[ 1.295585] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it><br />
[ 1.295592] PTP clock support registered<br />
[ 1.295608] EDAC MC: Ver: 3.0.0<br />
[ 1.296171] Advanced Linux Sound Architecture Driver Initialized.<br />
[ 1.296386] NetLabel: Initializing<br />
[ 1.296390] NetLabel: domain hash size = 128<br />
[ 1.296392] NetLabel: protocols = UNLABELED CIPSOv4 CALIPSO<br />
[ 1.296416] NetLabel: unlabeled traffic allowed by default<br />
[ 1.296587] clocksource: Switched to clocksource arch_sys_counter<br />
[ 1.296701] VFS: Disk quotas dquot_6.6.0<br />
[ 1.296731] VFS: Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)<br />
[ 1.300205] NET: Registered protocol family 2<br />
[ 1.300503] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 6144 bytes, linear)<br />
[ 1.300519] TCP established hash table entries: 8192 (order: 3, 32768 bytes, linear)<br />
[ 1.300546] TCP bind hash table entries: 8192 (order: 4, 65536 bytes, linear)<br />
[ 1.300611] TCP: Hash tables configured (established 8192 bind 8192)<br />
[ 1.300781] UDP hash table entries: 512 (order: 2, 16384 bytes, linear)<br />
[ 1.300799] UDP-Lite hash table entries: 512 (order: 2, 16384 bytes, linear)<br />
[ 1.300890] NET: Registered protocol family 1<br />
[ 1.301085] RPC: Registered named UNIX socket transport module.<br />
[ 1.301089] RPC: Registered udp transport module.<br />
[ 1.301092] RPC: Registered tcp transport module.<br />
[ 1.301094] RPC: Registered tcp NFSv4.1 backchannel transport module.<br />
[ 1.301099] NET: Registered protocol family 44<br />
[ 1.301106] PCI: CLS 0 bytes, default 64<br />
[ 1.301610] hw perfevents: enabled with armv7_cortex_a12 PMU driver, 7 counters available<br />
[ 1.302308] Initialise system trusted keyrings<br />
[ 1.302373] workingset: timestamp_bits=14 max_order=20 bucket_order=6<br />
[ 1.304068] zbud: loaded<br />
[ 1.304806] NFS: Registering the id_resolver key type<br />
[ 1.304820] Key type id_resolver registered<br />
[ 1.304823] Key type id_legacy registered<br />
[ 1.304830] nfs4filelayout_init: NFSv4 File Layout Driver Registering...<br />
[ 1.345128] Key type asymmetric registered<br />
[ 1.345133] Asymmetric key parser 'x509' registered<br />
[ 1.345155] bounce: pool size: 64 pages<br />
[ 1.345175] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 246)<br />
[ 1.345237] io scheduler mq-deadline registered<br />
[ 1.345241] io scheduler kyber registered<br />
[ 1.345312] io scheduler bfq registered<br />
[ 1.355240] dma-pl330 ff250000.dma-controller: Loaded driver for PL330 DMAC-241330<br />
[ 1.355248] dma-pl330 ff250000.dma-controller: DBUFF-128x8bytes Num_Chans-8 Num_Peri-20 Num_Events-16<br />
[ 1.355502] dma-pl330 ffb20000.dma-controller: Loaded driver for PL330 DMAC-241330<br />
[ 1.355508] dma-pl330 ffb20000.dma-controller: DBUFF-64x8bytes Num_Chans-5 Num_Peri-6 Num_Events-10<br />
[ 1.358589] Serial: 8250/16550 driver, 6 ports, IRQ sharing enabled<br />
[ 1.359756] ff180000.serial: ttyS0 at MMIO 0xff180000 (irq = 37, base_baud = 1500000) is a 16550A<br />
[ 1.359819] serial serial0: tty port ttyS0 registered<br />
[ 1.360057] ff190000.serial: ttyS1 at MMIO 0xff190000 (irq = 38, base_baud = 1500000) is a 16550A<br />
[ 1.360394] ff690000.serial: ttyS2 at MMIO 0xff690000 (irq = 39, base_baud = 1500000) is a 16550A<br />
[ 2.402452] printk: console [ttyS2] enabled<br />
[ 2.407747] Serial: AMBA driver<br />
[ 2.412551] sdhci: Secure Digital Host Controller Interface driver<br />
[ 2.419466] sdhci: Copyright(c) Pierre Ossman<br />
[ 2.424784] Synopsys Designware Multimedia Card Interface Driver<br />
[ 2.432104] dwmmc_rockchip ff0c0000.mmc: IDMAC supports 32-bit address mode.<br />
[ 2.440015] dwmmc_rockchip ff0c0000.mmc: Using internal DMA controller.<br />
[ 2.447413] dwmmc_rockchip ff0c0000.mmc: Version ID is 270a<br />
[ 2.453658] dwmmc_rockchip ff0c0000.mmc: DW MMC controller at irq 30,32 bit host data width,256 deep fifo<br />
[ 2.464623] dwmmc_rockchip ff0d0000.mmc: IDMAC supports 32-bit address mode.<br />
[ 2.472532] dwmmc_rockchip ff0d0000.mmc: Using internal DMA controller.<br />
[ 2.479928] dwmmc_rockchip ff0d0000.mmc: Version ID is 270a<br />
[ 2.486172] dwmmc_rockchip ff0d0000.mmc: DW MMC controller at irq 31,32 bit host data width,256 deep fifo<br />
[ 2.497207] dwmmc_rockchip ff0f0000.mmc: IDMAC supports 32-bit address mode.<br />
[ 2.505124] dwmmc_rockchip ff0f0000.mmc: Using internal DMA controller.<br />
[ 2.512521] dwmmc_rockchip ff0f0000.mmc: Version ID is 270a<br />
[ 2.518767] dwmmc_rockchip ff0f0000.mmc: DW MMC controller at irq 32,32 bit host data width,256 deep fifo<br />
[ 2.529515] dwmmc_rockchip ff0f0000.mmc: allocated mmc-pwrseq<br />
[ 2.535942] mmc_host mmc0: card is non-removable.<br />
[ 2.553805] mmc_host mmc0: Bus speed (slot 0) = 400000Hz (slot req 400000Hz, actual 400000HZ div = 0)<br />
[ 2.577003] VUB300 Driver rom wait states = 1C irqpoll timeout = 0400<br />
[ 2.577180] usbcore: registered new interface driver vub300<br />
[ 2.590637] usbcore: registered new interface driver ushc<br />
[ 2.597034] sdhci-pltfm: SDHCI platform and OF driver helper<br />
[ 2.610940] loop: module loaded<br />
[ 2.615177] Loading iSCSI transport class v2.0-870.<br />
[ 2.620902] iscsi: registered transport (tcp)<br />
[ 2.629008] spi-nor spi2.0: gd25q32 (4096 Kbytes)<br />
[ 2.637901] libphy: Fixed MDIO Bus: probed<br />
[ 2.644167] dwc2 ff540000.usb: supply vusb_d not found, using dummy regulator<br />
[ 2.652252] dwc2 ff540000.usb: supply vusb_a not found, using dummy regulator<br />
[ 2.716747] dwc2 ff540000.usb: DWC OTG Controller<br />
[ 2.722029] dwc2 ff540000.usb: new USB bus registered, assigned bus number 1<br />
[ 2.729932] dwc2 ff540000.usb: irq 42, io mem 0xff540000<br />
[ 2.730254] mmc_host mmc0: Bus speed (slot 0) = 148500000Hz (slot req 150000000Hz, actual 148500000HZ div = 0)<br />
[ 2.735959] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 5.08<br />
[ 2.751739] random: fast init done<br />
[ 2.756282] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1<br />
[ 2.768130] usb usb1: Product: DWC OTG Controller<br />
[ 2.773385] usb usb1: Manufacturer: Linux 5.8.13-gnu-1 dwc2_hsotg<br />
[ 2.780192] usb usb1: SerialNumber: ff540000.usb<br />
[ 2.785576] hub 1-0:1.0: USB hub found<br />
[ 2.789787] hub 1-0:1.0: 1 port detected<br />
[ 2.794453] dwc2 ff580000.usb: supply vusb_d not found, using dummy regulator<br />
[ 2.802468] dwc2 ff580000.usb: supply vusb_a not found, using dummy regulator<br />
[ 2.820654] dwc2 ff580000.usb: DWC OTG Controller<br />
[ 2.825919] dwc2 ff580000.usb: new USB bus registered, assigned bus number 2<br />
[ 2.833804] dwc2 ff580000.usb: irq 43, io mem 0xff580000<br />
[ 2.839812] usb usb2: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 5.08<br />
[ 2.849052] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1<br />
[ 2.857126] usb usb2: Product: DWC OTG Controller<br />
[ 2.862381] usb usb2: Manufacturer: Linux 5.8.13-gnu-1 dwc2_hsotg<br />
[ 2.869188] usb usb2: SerialNumber: ff580000.usb<br />
[ 2.874536] hub 2-0:1.0: USB hub found<br />
[ 2.878740] hub 2-0:1.0: 1 port detected<br />
[ 2.883653] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver<br />
[ 2.890953] ehci-pci: EHCI PCI platform driver<br />
[ 2.895930] ehci-platform: EHCI generic platform driver<br />
[ 2.901905] ehci-platform ff500000.usb: EHCI Host Controller<br />
[ 2.908239] ehci-platform ff500000.usb: new USB bus registered, assigned bus number 3<br />
[ 2.917055] ehci-platform ff500000.usb: irq 41, io mem 0xff500000<br />
[ 2.936594] ehci-platform ff500000.usb: USB 2.0 started, EHCI 1.00<br />
[ 2.943557] usb usb3: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 5.08<br />
[ 2.952797] usb usb3: New USB device strings: Mfr=3, Product=2, SerialNumber=1<br />
[ 2.960869] usb usb3: Product: EHCI Host Controller<br />
[ 2.966317] usb usb3: Manufacturer: Linux 5.8.13-gnu-1 ehci_hcd<br />
[ 2.972931] usb usb3: SerialNumber: ff500000.usb<br />
[ 2.978274] hub 3-0:1.0: USB hub found<br />
[ 2.982475] hub 3-0:1.0: 1 port detected<br />
[ 2.987098] ehci-mxc: Freescale On-Chip EHCI Host driver<br />
[ 2.993085] ehci-omap: OMAP-EHCI Host Controller driver<br />
[ 2.998984] ehci-orion: EHCI orion driver<br />
[ 3.003532] ehci-exynos: EHCI Exynos driver<br />
[ 3.008304] tegra-ehci: Tegra EHCI driver<br />
[ 3.012858] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver<br />
[ 3.019773] ohci-pci: OHCI PCI platform driver<br />
[ 3.024757] ohci-platform: OHCI generic platform driver<br />
[ 3.030677] ohci-exynos: OHCI Exynos driver<br />
[ 3.035711] usbcore: registered new interface driver uas<br />
[ 3.041682] usbcore: registered new interface driver usb-storage<br />
[ 3.048407] usbcore: registered new interface driver ums-cypress<br />
[ 3.055122] usbcore: registered new interface driver ums_eneub6250<br />
[ 3.062039] usbcore: registered new interface driver ums-freecom<br />
[ 3.068782] usbcore: registered new interface driver ums-isd200<br />
[ 3.075409] usbcore: registered new interface driver ums-usbat<br />
[ 3.084687] i2c /dev entries driver<br />
[ 3.092620] rk808 0-001b: chip id: 0x0<br />
[ 3.099420] rk808-regulator rk808-regulator: there is no dvs0 gpio<br />
[ 3.106345] rk808-regulator rk808-regulator: there is no dvs1 gpio<br />
[ 3.113277] DCDC_REG1: supplied by vcc33_sys<br />
[ 3.118700] DCDC_REG2: supplied by vcc33_sys<br />
[ 3.123870] DCDC_REG3: supplied by vcc33_sys<br />
[ 3.128747] DCDC_REG4: supplied by vcc33_sys<br />
[ 3.133849] LDO_REG1: supplied by vcc_5v<br />
[ 3.139442] LDO_REG2: supplied by vcc_5v<br />
[ 3.144042] LDO_REG3: supplied by vcc33_sys<br />
[ 3.149648] LDO_REG4: supplied by vcc_5v<br />
[ 3.154346] LDO_REG5: supplied by vcc_5v<br />
[ 3.159034] LDO_REG6: supplied by vcc33_sys<br />
[ 3.164524] LDO_REG7: supplied by vcc33_sys<br />
[ 3.170012] LDO_REG8: supplied by vcc_5v<br />
[ 3.174540] vcc33_ccd: Bringing 1800000uV into 3300000-3300000uV<br />
[ 3.182102] SWITCH_REG1: supplied by vcc33_sys<br />
[ 3.187246] SWITCH_REG2: supplied by vcc_18<br />
[ 3.194461] rk808-rtc rk808-rtc: registered as rtc0<br />
[ 3.199927] usb 1-1: new high-speed USB device number 2 using dwc2<br />
[ 3.207302] rk808-rtc rk808-rtc: setting system clock to 2013-01-18T09:27:26 UTC (1358501246)<br />
[ 3.222421] energy_model: pd0: hertz/watts ratio non-monotonically decreasing: em_cap_state 3 >= em_cap_state2<br />
[ 3.234620] ledtrig-cpu: registered to indicate activity on CPUs<br />
[ 3.241701] hid: raw HID events driver (C) Jiri Kosina<br />
[ 3.247568] usbcore: registered new interface driver usbhid<br />
[ 3.253803] usbhid: USB HID core driver<br />
[ 3.258417] spi_master spi0: will run message pump with realtime priority<br />
[ 3.264622] dwmmc_rockchip ff0f0000.mmc: Successfully tuned phase to 178<br />
[ 3.270554] cros-ec-dev cros-ec-dev.1.auto: cannot get EC features: -71/1<br />
[ 3.277808] mmc0: new HS200 MMC card at address 0001<br />
[ 3.283958] input: cros_ec as /devices/platform/ff110000.spi/spi_master/spi0/spi0.0/ff110000.spi:ec@0:keyboard-controller/input/input0<br />
[ 3.287004] mmcblk0: mmc0:0001 HAG2e� 14.7 GiB <br />
[ 3.302245] cros-ec-spi spi0.0: Chrome EC device registered<br />
[ 3.305438] mmcblk0boot0: mmc0:0001 HAG2e� partition 1 4.00 MiB<br />
[ 3.314571] NET: Registered protocol family 10<br />
[ 3.318314] mmcblk0boot1: mmc0:0001 HAG2e� partition 2 4.00 MiB<br />
[ 3.324061] Segment Routing with IPv6<br />
[ 3.329751] mmcblk0rpmb: mmc0:0001 HAG2e� partition 3 4.00 MiB, chardev (242:0)<br />
[ 3.333776] mip6: Mobile IPv6<br />
[ 3.345235] NET: Registered protocol family 17<br />
[ 3.345858] Primary GPT is being ignored, using alternate GPT.<br />
[ 3.350297] Key type dns_resolver registered<br />
[ 3.356745] mmcblk0: p1 p2<br />
[ 3.361611] ThumbEE CPU extension supported.<br />
[ 3.369379] Registering SWP/SWPB emulation handler<br />
[ 3.374862] registered taskstats version 1<br />
[ 3.379461] Loading compiled-in X.509 certificates<br />
[ 3.384882] zswap: loaded using pool lzo/zbud<br />
[ 3.389997] Key type ._fscrypt registered<br />
[ 3.394489] Key type .fscrypt registered<br />
[ 3.398870] Key type fscrypt-provisioning registered<br />
[ 3.405578] Btrfs loaded, crc32c=crc32c-generic<br />
[ 3.416000] usb 1-1: New USB device found, idVendor=05e3, idProduct=0751, bcdDevice=14.04<br />
[ 3.423993] dwmmc_rockchip ff0c0000.mmc: IDMAC supports 32-bit address mode.<br />
[ 3.425156] usb 1-1: New USB device strings: Mfr=3, Product=4, SerialNumber=0<br />
[ 3.433114] dwmmc_rockchip ff0c0000.mmc: Using internal DMA controller.<br />
[ 3.441001] usb 1-1: Product: USB Storage<br />
[ 3.441003] usb 1-1: Manufacturer: USB Storage<br />
[ 3.441710] usb-storage 1-1:1.0: USB Mass Storage device detected<br />
[ 3.448401] dwmmc_rockchip ff0c0000.mmc: Version ID is 270a<br />
[ 3.448417] dwmmc_rockchip ff0c0000.mmc: DW MMC controller at irq 30,32 bit host data width,256 deep fifo<br />
[ 3.453086] scsi host0: usb-storage 1-1:1.0<br />
[ 3.457962] dwmmc_rockchip ff0c0000.mmc: Got CD GPIO<br />
[ 3.504423] mmc_host mmc1: Bus speed (slot 0) = 400000Hz (slot req 400000Hz, actual 400000HZ div = 0)<br />
[ 3.528037] dwmmc_rockchip ff0d0000.mmc: IDMAC supports 32-bit address mode.<br />
[ 3.535986] dwmmc_rockchip ff0d0000.mmc: Using internal DMA controller.<br />
[ 3.543392] dwmmc_rockchip ff0d0000.mmc: Version ID is 270a<br />
[ 3.549635] dwmmc_rockchip ff0d0000.mmc: DW MMC controller at irq 31,32 bit host data width,256 deep fifo<br />
[ 3.560463] dwmmc_rockchip ff0d0000.mmc: allocated mmc-pwrseq<br />
[ 3.566890] mmc_host mmc2: card is non-removable.<br />
[ 3.584975] mmc_host mmc2: Bus speed (slot 0) = 400000Hz (slot req 400000Hz, actual 400000HZ div = 0)<br />
[ 3.612003] input: power-button as /devices/platform/power-button/input/input1<br />
[ 3.621928] input: lid-switch as /devices/platform/lid-switch/input/input2<br />
[ 3.631762] ALSA device list:<br />
[ 3.635122] No soundcards found.<br />
[ 3.639045] dw-apb-uart ff690000.serial: forbid DMA for kernel console<br />
[ 3.663069] mmc2: queuing unknown CIS tuple 0x80 (2 bytes)<br />
[ 3.670701] mmc2: queuing unknown CIS tuple 0x80 (3 bytes)<br />
[ 3.678326] mmc2: queuing unknown CIS tuple 0x80 (3 bytes)<br />
[ 3.687139] mmc2: queuing unknown CIS tuple 0x80 (7 bytes)<br />
[ 3.726011] elan_i2c 4-0015: Elan Touchpad: Module ID: 0x0061, Firmware: 0x0001, Sample: 0x0002, IAP: 0x0009<br />
[ 3.737190] input: Elan Touchpad as /devices/platform/ff160000.i2c/i2c-4/4-0015/input/input3<br />
[ 3.747318] Waiting for root device PARTUUID=c82cb259-3dc7-4b4e-87f1-33fb2fee3618/PARTNROFF=1...<br />
[ 3.766653] mmc_host mmc2: Bus speed (slot 0) = 148500000Hz (slot req 150000000Hz, actual 148500000HZ div = 0)<br />
[ 4.048603] dwmmc_rockchip ff0d0000.mmc: Successfully tuned phase to 203<br />
[ 4.057661] mmc2: new ultra high speed SDR104 SDIO card at address 0001<br />
[ 4.485756] scsi 0:0:0:0: Direct-Access Generic STORAGE DEVICE 1404 PQ: 0 ANSI: 6<br />
[ 4.495014] sd 0:0:0:0: Attached scsi generic sg0 type 0<br />
[ 4.660001] sd 0:0:0:0: [sda] 7716864 512-byte logical blocks: (3.95 GB/3.68 GiB)<br />
[ 4.669415] sd 0:0:0:0: [sda] Write Protect is off<br />
[ 4.675812] sd 0:0:0:0: [sda] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA<br />
[ 4.709154] sda: sda1 sda2<br />
[ 4.715760] sd 0:0:0:0: [sda] Attached SCSI removable disk<br />
[ 4.760879] EXT4-fs (sda2): mounted filesystem with ordered data mode. Opts: (null)<br />
[ 4.769477] VFS: Mounted root (ext4 filesystem) on device 8:2.<br />
[ 4.784878] devtmpfs: mounted<br />
[ 4.789150] Freeing unused kernel memory: 2048K<br />
[ 4.794332] Run /sbin/init as init process<br />
[ 5.441309] systemd[1]: System time before build time, advancing clock.<br />
[ 5.496138] systemd[1]: systemd 243.162-2.parabola1-parabola running in system mode. (+PAM +AUDIT -SELINUX -IMA -APPARMOR +SMACK -SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ +LZ4 +SECCOMP +BLKID +ELFUTILS +KMOD +IDN2 -IDN +PCRE2 default-hierarchy=hybrid)<br />
[ 5.522791] systemd[1]: Detected architecture arm.<br />
<br />
Welcome to �[1;35mParabola GNU/Linux-libre�[0m!<br />
<br />
[ 5.574241] systemd[1]: Set hostname to <parabola>.<br />
[ 6.182199] random: systemd: uninitialized urandom read (16 bytes read)<br />
[ 6.191456] systemd[1]: Created slice system-getty.slice.<br />
[�[0;32m OK �[0m] Created slice �[0;1;39msystem-getty.slice�[0m.<br />
[ 6.208663] random: systemd: uninitialized urandom read (16 bytes read)<br />
[ 6.216681] systemd[1]: Created slice system-serial\x2dgetty.slice.<br />
[�[0;32m OK �[0m] Created slice �[0;1;39msystem-serial\x2dgetty.slice�[0m.<br />
[ 6.236645] random: systemd: uninitialized urandom read (16 bytes read)<br />
[ 6.244532] systemd[1]: Created slice User and Session Slice.<br />
[�[0;32m OK �[0m] Created slice �[0;1;39mUser and Session Slice�[0m.<br />
[ 6.264785] systemd[1]: Started Dispatch Password Requests to Console Directory Watch.<br />
[�[0;32m OK �[0m] Started �[0;1;39mDispatch Password …ts to Console Directory Watch�[0m.<br />
[ 6.292745] systemd[1]: Started Forward Password Requests to Wall Directory Watch.<br />
[�[0;32m OK �[0m] Started �[0;1;39mForward Password R…uests to Wall Directory Watch�[0m.<br />
[ 6.321041] systemd[1]: Set up automount Arbitrary Executable File Formats File System Automount Point.<br />
[�[0;32m OK �[0m] Set up automount �[0;1;39mArbitrary…s File System Automount Point�[0m.<br />
[ 6.348722] systemd[1]: Reached target Local Encrypted Volumes.<br />
[�[0;32m OK �[0m] Reached target �[0;1;39mLocal Encrypted Volumes�[0m.<br />
[�[0;32m OK �[0m] Reached target �[0;1;39mPaths�[0m.<br />
[�[0;32m OK �[0m] Reached target �[0;1;39mRemote File Systems�[0m.<br />
[�[0;32m OK �[0m] Reached target �[0;1;39mSlices�[0m.<br />
[�[0;32m OK �[0m] Reached target �[0;1;39mSwap�[0m.<br />
[�[0;32m OK �[0m] Listening on �[0;1;39mDevice-mapper event daemon FIFOs�[0m.<br />
[�[0;32m OK �[0m] Listening on �[0;1;39mProcess Core Dump Socket�[0m.<br />
[�[0;32m OK �[0m] Listening on �[0;1;39minitctl Compatibility Named Pipe�[0m.<br />
[�[0;32m OK �[0m] Listening on �[0;1;39mJournal Socket (/dev/log)�[0m.<br />
[�[0;32m OK �[0m] Listening on �[0;1;39mJournal Socket�[0m.<br />
[�[0;32m OK �[0m] Listening on �[0;1;39mNetwork Service Netlink Socket�[0m.<br />
[�[0;32m OK �[0m] Listening on �[0;1;39mudev Control Socket�[0m.<br />
[�[0;32m OK �[0m] Listening on �[0;1;39mudev Kernel Socket�[0m.<br />
Mounting �[0;1;39mPOSIX Message Queue File System�[0m...<br />
Mounting �[0;1;39mKernel Debug File System�[0m...<br />
Mounting �[0;1;39mTemporary Directory (/tmp)�[0m...<br />
Mounting �[0;1;39mKernel Configuration File System�[0m...<br />
Starting �[0;1;39mRemount Root and Kernel File Systems�[0m...<br />
Starting �[0;1;39mApply Kernel Variables�[0m...<br />
Starting �[0;1;39mudev Coldplug all Devices�[0m...<br />
[�[0;32m OK �[0m] Mounted �[0;1;39mPOSIX Message Queue File System�[0m.<br />
[�[0;32m OK �[0m] Mounted �[0;1;39mKernel Debug File System�[0m.<br />
[�[0;32m OK �[0m] Mounted �[0;1;39mTemporary Directory (/tmp)�[0m.<br />
[�[0;32m OK �[0m] Mounted �[0;1;39mKernel Configuration File System�[0m.<br />
[�[0;32m OK �[0m] Started �[0;1;39mApply Kernel Variables�[0m.<br />
[ 6.813421] EXT4-fs (sda2): re-mounted. Opts: data=ordered<br />
[�[0;32m OK �[0m] Started �[0;1;39mRemount Root and Kernel File Systems�[0m.<br />
Starting �[0;1;39mLoad/Save Random Seed�[0m...<br />
Starting �[0;1;39mCreate Static Device Nodes in /dev�[0m...<br />
[�[0;32m OK �[0m] Started �[0;1;39mudev Coldplug all Devices�[0m.<br />
[�[0;32m OK �[0m] Started �[0;1;39mCreate Static Device Nodes in /dev�[0m.<br />
[�[0;32m OK �[0m] Reached target �[0;1;39mLocal File Systems (Pre)�[0m.<br />
[�[0;32m OK �[0m] Reached target �[0;1;39mLocal File Systems�[0m.<br />
[�[0;32m OK �[0m] Started �[0;1;39mEntropy Daemon based on the HAVEGE algorithm�[0m.<br />
Starting �[0;1;39mJournal Service�[0m...<br />
Starting �[0;1;39mudev Kernel Device Manager�[0m...<br />
[�[0;32m OK �[0m] Started �[0;1;39mJournal Service�[0m.<br />
Starting �[0;1;39mFlush Journal to Persistent Storage�[0m...<br />
[ 7.210795] systemd-journald[182]: Received client request to flush runtime journal.<br />
[�[0;32m OK �[0m] Started �[0;1;39mudev Kernel Device Manager�[0m.<br />
[ 7.230994] systemd-journald[182]: File /var/log/journal/b593800e2c954b08aeeaf1e6ae11dc5c/system.journal corrupted or uncleanly shut down, renaming and replacing.<br />
Starting �[0;1;39mNetwork Service�[0m...<br />
[ 8.116221] random: crng init done<br />
[ 8.120056] random: 7 urandom warning(s) missed due to ratelimiting<br />
[�[0;32m OK �[0m] Found device �[0;1;39m/dev/ttyS2�[0m.<br />
[�[0;32m OK �[0m] Started �[0;1;39mLoad/Save Random Seed�[0m.<br />
[�[0;32m OK �[0m] Started �[0;1;39mFlush Journal to Persistent Storage�[0m.<br />
Starting �[0;1;39mCreate Volatile Files and Directories�[0m...<br />
[�[0;32m OK �[0m] Started �[0;1;39mNetwork Service�[0m.<br />
[�[0;32m OK �[0m] Started �[0;1;39mCreate Volatile Files and Directories�[0m.<br />
Starting �[0;1;39mNetwork Name Resolution�[0m...<br />
Starting �[0;1;39mUpdate UTMP about System Boot/Shutdown�[0m...<br />
[�[0;32m OK �[0m] Started �[0;1;39mUpdate UTMP about System Boot/Shutdown�[0m.<br />
[�[0;32m OK �[0m] Reached target �[0;1;39mSystem Initialization�[0m.<br />
[�[0;32m OK �[0m] Started �[0;1;39mDaily verification of password and group files�[0m.<br />
[�[0;32m OK �[0m] Started �[0;1;39mDaily Cleanup of Temporary Directories�[0m.<br />
[�[0;32m OK �[0m] Reached target �[0;1;39mTimers�[0m.<br />
[�[0;32m OK �[0m] Listening on �[0;1;39mD-Bus System Message Bus Socket�[0m.<br />
[�[0;32m OK �[0m] Reached target �[0;1;39mSockets�[0m.<br />
[�[0;32m OK �[0m] Reached target �[0;1;39mBasic System�[0m.<br />
[�[0;32m OK �[0m] Started �[0;1;39mD-Bus System Message Bus�[0m.<br />
Starting �[0;1;39mLogin Service�[0m...<br />
[�[0;32m OK �[0m] Started �[0;1;39mLogin Service�[0m.<br />
[�[0;32m OK �[0m] Started �[0;1;39mNetwork Name Resolution�[0m.<br />
[�[0;32m OK �[0m] Reached target �[0;1;39mNetwork�[0m.<br />
[�[0;32m OK �[0m] Reached target �[0;1;39mHost and Network Name Lookups�[0m.<br />
Starting �[0;1;39mPermit User Sessions�[0m...<br />
[�[0;32m OK �[0m] Started �[0;1;39mPermit User Sessions�[0m.<br />
[�[0;32m OK �[0m] Started �[0;1;39mGetty on tty1�[0m.<br />
[�[0;32m OK �[0m] Started �[0;1;39mSerial Getty on ttyS2�[0m.<br />
[�[0;32m OK �[0m] Reached target �[0;1;39mLogin Prompts�[0m.<br />
[�[0;32m OK �[0m] Reached target �[0;1;39mMulti-User System�[0m.<br />
[�[0;32m OK �[0m] Reached target �[0;1;39mGraphical Interface�[0m.<br />
<br />
<br />
<br />
Parabola GNU/Linux-libre 5.8.13-gnu-1 (ttyS2)<br />
<br />
parabola login: [ 33.764620] vcc18_lcd: supplied by vcc_18<br />
[ 33.769163] backlight_regulator: disabling<br />
[ 33.773746] panel_regulator: disabling<br />
</pre></div>Maihttps://wiki.parabola.nu/index.php?title=Computers/Asus_Chromebook_C201&diff=23101Computers/Asus Chromebook C2012021-01-07T16:57:05Z<p>Mai: /* Asus Chromebook C201 partitioning requirements */</p>
<hr />
<div>{{stub}}<br />
== Status ==<br />
See [https://www.parabola.nu/news/parabola-officially-supports-librebooted-asus-chromebook-c201/ This news] for more details<br />
<br />
Since then we need to check how to get WiFi working on it ([https://labs.parabola.nu/issues/2261 Bug 2261]), and we need to check if it still works as it used some kernel patches.<br />
<br />
== Asus Chromebook C201 partitioning requirements ==<br />
<br />
* the emmc / micro sd / usb drive must be GPT<br />
* make the first partition large enough to fit the kernel. 32M is ok.<br />
* set the typecode for this partition to 66 (ChromeOS kernel) (type code 7f00 in gdisk)<br />
* some attribute bits for this partition must be set for it to boot. you can do this with fdisk, gdisk, parted, sfdisk, or sgdisk. here is one way:<br />
<br />
# sgdisk -A 1:set:48 -A 1:set:56 /dev/sdX<br />
<br />
you can read more about these bits on the [https://www.chromium.org/chromium-os/chromiumos-design-docs/disk-format#TOC-Selecting-the-kernel chromium-os wiki ]<br />
<br />
== Bootloader ==<br />
Bootloader functionality is provided by depthcharge, which is included with libreboot (and the stock bios).<br />
<br />
the kernel must be flashed to the first partition. if you installed linux-libre-chromebook with pacstrap, you can manually reflash it:<br />
<br />
# dd if=/boot/vmlinux.kpart of=/dev/<KERNEL_PARTITION><br />
<br />
if you want to change the kernel command line parameters you can use futility which is provided by {{pkg|vboot-utils}}<br />
<br />
to see information about how the kernel is packed (including the parameters):<br />
<br />
# futility show vmlinux.kpart<br />
<br />
to change the parameters, you will need to unpack and repack the kernel. the following example shows how to add serial console output during boot<br />
<br />
# cd /boot<br />
# mkdir tmp_unpack<br />
# cd tmp_unpack<br />
# futility --debug vbutil_kernel --get-vmlinuz ../vmlinux.kpart --vmlinuz-out vmlinuz<br />
# echo "console=ttyS2,115200n8 earlyprintk=ttyS2,115200n8 init=/sbin/init root=PARTUUID=%U/PARTNROFF=1 rootwait rw noinitrd" > cmdline<br />
# dd if=/dev/zero of=bootloader.bin bs=512 count=1<br />
# wget https://git.parabola.nu/abslibre.git/plain/libre/linux-libre/kernel.keyblock<br />
# wget https://git.parabola.nu/abslibre.git/plain/libre/linux-libre/kernel_data_key.vbprivk<br />
# futility --debug vbutil_kernel \<br />
--pack vmlinux.kpart \<br />
--version 1 \<br />
--vmlinuz vmlinuz \<br />
--arch arm \<br />
--keyblock kernel.keyblock \<br />
--signprivate kernel_data_key.vbprivk \<br />
--config cmdline \<br />
--bootloader bootloader.bin</div>Maihttps://wiki.parabola.nu/index.php?title=ARM_Installation_Guide&diff=22631ARM Installation Guide2020-02-06T03:53:08Z<p>Mai: /* Already present: Asus Chromebook C201 */</p>
<hr />
<div>{{i18n|Parabola ARM installation}}<br />
<br />
{{Warning| SBCs normally run the GNU/Linux system, but that doesn't mean that all is well for software freedom on these boards. Therefore, there's no support for hardware that doesn't work without running a nonfree program, such as Raspberry Pi, ODROID (models using the Samsung Exynos SoC), Arndale, Intel Edison boards and probably others. See the [https://www.fsf.org/resources/hw/single-board-computers FSF article] for more info.}}<br />
<br />
<br />
The Installation Guide for ARM computers is intended to assist experienced GNU/Linux users in installing Parabola official tarball image. This page assumes a high-level of experience with GNU/Linux systems and utilities, especially the command line. Note that dealing with ARM computers is more complicated than common x86 computers because you will need to lean some some hardware specific knowledge.<br />
<br />
Before beginning, we recommend you view the [[a:Frequently_asked_questions| Arch Linux FAQ]], and employ the {{ic|man ''command''}} to read the [[man page]] of any command they are not familiar with. The Parabola wiki, as well as the [https://wiki.archlinux.org/ Arch Linux wiki], should be the primary source of information and your first resource during trouble-shooting.<br />
<br />
=== Warning ===<br />
{{Warning|Theses new instructions are experimental and have not been tested yet. Remove this warning and/or contact Parabola any parabola contributor to remove this warning if they worked for you.}}<br />
<br />
=== ARM devices status ===<br />
<br />
==== Freedom status ====<br />
<br />
* Many ARM computers can be used with 100% free software. This however doesn't mean that every hardware component is fully supported by free software. It's better to plan ahead and choose your hardware accordingly.<br />
<br />
* See the [https://www.fsf.org/resources/hw/single-board-computers Article on the single-board-computers at the FSF] for more details on the topic. Beware that the article on the single-board-computers at the FSF also covers devices that do not have an ARM CPU, and that are not supported by Parabola because of that.<br />
<br />
* Parabola doesn't support ARM devices that don't even boot without nonfree software. This has several advantages:<br />
** If an ARM device is supported by Parabola, we can be sure that it can boot with free software<br />
** As the boot interface between the bootloader and the distribution evolves, we can update every components of it (this installation manual, the bootloader, the distribution configuration) to work well together.<br />
<br />
* Some ARM devices have integrated nonfree bootloaders. While they could technically run Parabola, they are not supported for the reasons stated above.<br />
<br />
==== 64bit ARM ====<br />
While there are no aarch64 (ARM 64bit) version of Parabola yet, it's still possible to use Parabola on some devices that have 64bit ARM CPU.<br />
<br />
To do that you will need to use the linux-libre-aarch64 kernel with the armv7h version of Parabola.<br />
<br />
A special kernel is needed because 32bit ARM kernels dont't work as-is because:<br />
* The device tree for 64bit devices are not present in the 32bit kernel packages<br />
* Many drivers and hardware support for 64bit ARM hardware are probably be missing in the 32bit kernel configurations, so they are probably missing in the 32bit kernel packages as well.<br />
<br />
To install linux-libre-aarch64 you need to enable the following repository in /etc/pacman.conf:<br />
[kernels]<br />
Include = /etc/pacman.d/mirrorlist<br />
<br />
Then you need to install linux-libre-aarch64. That can be done with the following command<br />
pacman -Sy linux-libre-aarch64<br />
<br />
However there are still some limitations:<br />
* This can only work for devices with CPU that support 32bit mode. Some arm64 CPUs don't support that mode.<br />
* We also need to package bootloaders for aarch64 devices.<br />
<br />
At the time of writing, this is not done yet, and the aarch64 support was tested on a single board computer that had an integrated u-boot bootloader.<br />
<br />
Once the kernel was installed, the following configuration file in /boot/extlinux/extlinux.conf was used to boot the hardware:<br />
timeout 1<br />
default linux-libre-aarch64<br />
label linux-libre-aarch64<br />
kernel /boot/vmlinuz-linux-libre-aarch64<br />
append loglevel=8 systemd.show_status=false rw root=/dev/mmcblk0p1<br />
fdtdir /boot/dtbs/linux-libre-aarch64<br />
initrd /boot/initramfs-linux-libre-aarch64.img<br />
<br />
==== Linux ====<br />
You should take into account the state of the software support in upstream projects before getting ARM devices.<br />
The project that has the biggest impact on hardware support is Linux, as it is required to make your hardware work:<br />
* For allwinner there is some generic information on the topic here: https://linux-sunxi.org/Linux_mainlining_effort and more specific information on the devices pages: https://linux-sunxi.org/Table_of_Allwinner_based_boards<br />
<br />
Devices vendor typically ship an old version of the Linux kernel that is modified by them to support their hardware. The Free and Open source software communities are working actively to add support for many ARM devices in Linux.<br />
<br />
If the device you want to get is not supported upstream (and that you don't intend to add such support yourself) you should rather look for another device. If your device requires a kernel version that is way older than the one used in your GNU/Linux distribution, it is almost unusable: it will be almost impossible to use because several software will not run with older kernels. For instance you won't be able to boot your device with systemd if your kernel is too old. If the vendor kernel is not too old yet, it will become too old years later as it will not be (indefinitely) updated by the device vendor.<br />
<br />
==== Bootloaders ====<br />
Bootloaders are less a concern, as you might be able to workaround the lack of support of modern filesystems and partitions. However finding why your device does not boot can be painful, so it's strongly advised to get devices which are support in upstream Free and Open source bootloader projects.<br />
<br />
=== Know your hardware ===<br />
ARM devices can be very different, and this has implications on the way you will install Parabola.<br />
<br />
More specifically you will need to know:<br />
* From which storage device your device can boot. Most supported devices can boot from a microSD. Knowing the order in which it tries to boot on the storage devices can also be useful as it can help you understand what is going on if your device is not booting. Knowing the partitioning/filesystem boot requirements can also be handy in that case, if they are not mentioned in this installation guide. In that case it would be nice to add them in this guide.<br />
* How to get some feedback on what is going on:<br />
** Not all devices can be connected to a display, and when they can, the display is not necessarily available early at boot.<br />
** Some devices have an easily accessible serial port that can act as a display + keyboard replacement.<br />
* The state of the software support for your device:<br />
** What parts of the hardware works and what doesn't in Linux<br />
** The limitations of the bootloader (version) you are using<br />
<br />
Here are some links to such information:<br />
* For devices with an AllWinner "CPU": https://linux-sunxi.org/Table_of_Allwinner_based_boards<br />
<br />
=== Some hardware and booting background ===<br />
==== System on a chip ====<br />
In most of the ARM computers, the CPU and many peripherals are inside the same chip. This chip is called 'System On A chip' (often abreviated as SOC). Beside the CPU, it often also contains:<br />
* A GPU<br />
* A display controller<br />
* One or more USB host controllers<br />
* An USB OTG/Device controller<br />
* A SD card controller<br />
* A serial port controller<br />
* Many other periperals<br />
<br />
==== Bootrom and booting ====<br />
Most of such System on a chip have ARM code in a ROM (hardwired inside the chip) that is executed at startup.<br />
This is called a bootrom.<br />
<br />
The bootrom is responsible for doing some hardware initialization and fetching the bootloader from a storage device. Often it is also possible to load a bootloader from USB or a serial port.<br />
<br />
The bootloader then do some more (device specific) hardware initialization and loads the operating system.<br />
<br />
In practice, on most hardware, after initializing some hardware, the bootrom will try to locate the bootloader from an external storage device. The external storage device has to be supported by the bootrom. For instance in the bootrom of Allwinner System on a chip, the bootrom doesn't support booting from SATA storage devices, but supports booting from uSD/SD cards, eMMC, SPI flash chips, etc.<br />
<br />
The kind of storage devices the bootrom tries to find a bootloader on, and the order in which it tries them can often be configured by hardware and/or software.<br />
<br />
==== Bootloaders and their limitations ====<br />
===== u-boot =====<br />
u-boot supports the ext2, ext4, and ext4 filesystem, however, at the time of writing, the versions used in Parabola doesn't support all 'extensions' of the ext4 filesystem.<br />
<br />
If you use unsupported extensions you would usually be able to list the filesystem content with ext4ls or similar commands, but you usually won't be able to read some files. When this is the case u-boot will output some errors at boot and booting will fail.<br />
<br />
To make sure it doesn't happen, you can format the ext4 filesystem your kernel and initramfs resides on like that:<br />
mkfs.ext4 -F -O ^metadata_csum,^64bit /dev/CARD1<br />
<br />
In the commands above and below, replace /dev/CARD1 by the path of the SD-card, which could be /dev/mmcblk0 if you use a 'native' SD reader, or /dev/sdb1 for instance if you have an 'usb mass storage' SD reader. <br />
<br />
To see which extensions you have, you can use the following command:<br />
tune2fs -l /dev/CARD1<br />
<br />
TODO: Check the commands below to remove unnecessary fsck<br />
<br />
Ext4 filesystems can also be converted to remove metadata_csum like that:<br />
fsck.ext4 -C 0 -f /dev/CARD1<br />
tune2fs -O ^metadata_csum /dev/CARD1<br />
fsck.ext4 -C 0 -f /dev/CARD1<br />
And for removing 64bit:<br />
fsck.ext4 -C 0 -f /dev/CARD1<br />
resize2fs -s /dev/CARD1<br />
fsck.ext4 -C 0 -f /dev/CARD1<br />
<br />
=== Device-specific informations ===<br />
==== GTA04 A3 ====<br />
Parabola then boots and you are supposed to see the boot log on the serial console.<br />
At the time of writing the kernel lacks the GTA04 display driver, this is [https://labs.parabola.nu/issues/857 bug #587]<br />
<br />
==== BeagleBone Black ====<br />
Scripts for installing Parabola on the internal 4GB EMMC can be found at the [https://notabug.org/isengaara/knochenreiter knochenreiter] repository.<br />
<br />
The BeagleBone Black can also be bought with Parabola already install on it at [https://shop.phreedom2600.net/ Phreedom2600].<br />
<br />
==== Asus Chromebook C201 with Libreboot ====<br />
<br />
See [https://www.parabola.nu/news/parabola-officially-supports-librebooted-asus-chromebook-c201/ This news] for more details<br />
<br />
==== TBS2910 Matrix ARM mini PC ====<br />
<br />
See [https://libreplanet.org/wiki/Group:Hardware/research/sbc/TBS2910_Matrix_ARM_mini_PC The Libreplanet research article] for more details on booting.<br />
<br />
=== Releases tarballs ===<br />
Download and verify the [https://wiki.parabola.nu/Get_Parabola#Parabola_GNU.2FLinux-libre_release_tarballs_for_armv7h_architecture official Release tarball]<br />
<br />
* The release tarballs are signed and it is highly recommend to verify their signature before use. On Parabola GNU/Linux-libre, this can be done by using {{ic|pacman-key -v <tarball-file>.sig}}. On other systems: {{ic|gpg --verify <tarball-file>.sig}}. You may have to import the key from a keyserver with {{ic|gpg --recv-keys <0x key ID>}}.<br />
* Checksums are also provided in the accompanying {{ic|SHA512SUMS}} and {{ic|WHIRLPOOLSUMS}} files. They can be verified with: {{ic|sha512sum -c SHA512SUMS}} and {{ic|whirlpool-hash -c WHIRLPOOLSUMS}}.<br />
<br />
=== Partition disks ===<br />
<br />
See [[partitioning]] for details.<br />
<br />
Remember to create any stacked block devices like [[LVM]], [[dm-crypt|LUKS]], or [[RAID|RAID]].<br />
<br />
If you use such stacked block devices, remember to generate an initramfs and configure the bootloader to use it.<br />
<br />
==== Asus Chromebook C201 partitioning requirements ====<br />
<br />
* the emmc / micro sd / usb drive must be GPT<br />
* make the first partition large enough to fit the kernel. 32M is ok.<br />
* set the typecode for this partition to 66 (ChromeOS kernel)<br />
* some attribute bits for this partition must be set for it to boot. you can do this with fdisk, gdisk, parted, sfdisk, or sgdisk. here is one way:<br />
<br />
# sgdisk -A 1:set:48 -A 1:set:56 /dev/sdX<br />
<br />
you can read more about these bits on the [https://www.chromium.org/chromium-os/chromiumos-design-docs/disk-format#TOC-Selecting-the-kernel chromium-os wiki ]<br />
<br />
=== Format the partitions ===<br />
<br />
See [[File systems]] for details.<br />
<br />
You will most likely need to use a filesystem supported by your bootloader, without using any features it does not support, for the files in /boot.<br />
<br />
Some System on a chip may also require the bootloader to reside on a specific partition.<br />
<br />
=== Mount the partitions ===<br />
<br />
We now must mount the root partition on {{ic|/mnt}}. You should also create directories for and mount any other partitions ({{ic|/mnt/boot}}, {{ic|/mnt/home}}, ...) and mount your [[a:Swap|swap]] partition if you want them to be detected by {{ic|genfstab}}.<br />
<br />
=== Enable executing arm code on x86 ===<br />
<br />
If you are installing from an x86 computer, you will need to enable running non-x86 binaries transparently. This can be done by telling the Linux kernel to use automatically qemu to do that.<br />
<br />
If the computer you use to do the installation already runs Parabola, you can do it with:<br />
# pacman -S qemu-user-static-binfmt<br />
# systemctl start systemd-binfmt.service<br />
<br />
You will then need to copy qemu-arm-static to the target rootfs.<br />
If the target rootfs is mounted in /mnt, you will then need to do that:<br />
# mkdir -p /mnt/usr/bin/<br />
# cp /usr/bin/qemu-arm-static /mnt/usr/bin/<br />
<br />
The [[Building_armv7h_packages_on_a_x86_system]] page also have more background information on that.<br />
<br />
Once this is done, you will be able to use as chroot, arch-chroot, and pacstrap transparently.<br />
<br />
=== rootfs installation ===<br />
You can either install the rootfs:<br />
* from the released tarball<br />
* directly with pacstrap<br />
<br />
==== From the released tarball ====<br />
<br />
After mounting the filesystem in /mnt, extract Parabola in the rootfs partition:<br />
$ sudo tar xpf parabola-systemd-cli-armv7h-tarball-YYYY-MM-DD.tar.gz -C /mnt/ --numeric-owner<br />
<br />
Here --numeric-owner is used to make sure that everything is still fine if user and group ids differs between the tarball and the computer you're using to run the tar command above. This also enables you to run that command from another GNU/Linux distribution than Parabola (like Trisquel for instance).<br />
<br />
==== With pacstrap ====<br />
First we need to install arch-install-scripts to be able to use the {{ic|pacstrap}} command<br />
pacman -S --needed arch-install-scripts<br />
<br />
Before installing, you may want to edit {{ic|/etc/pacman.d/mirrorlist}} such that your preferred mirror is first. This copy of the mirrorlist will be installed on your new system by {{ic|pacstrap}} as well, so it's worth getting it right.<br />
<br />
Import, trust and install the archlinuxarm keyring. When possible, Parabola leverages free packages that originally came from Arch ARM.<br />
<br />
# pacman -S --needed archlinuxarm-keyring<br />
<br />
Install the base system using {{ic|pacstrap}}:<br />
# mkdir -p /mnt/usr/bin<br />
# cp /usr/bin/qemu-arm-static /mnt/usr/bin<br />
# pacstrap -C /usr/share/pacman/defaults/pacman.conf.armv7h /mnt/ base<br />
<br />
You can install additional packages passing {{ic|base}} and the names of these packages as arguments after the root directory of the new installation (all packages from the {{ic|base}} group are installed if no package is specified).<br />
<br />
{{Note|<br />
To use [[OpenRC]] instead of systemd, run the following command (instead of {{ic|# pacstrap /mnt}}):<br />
# pacstrap -C /usr/share/pacman/defaults/pacman.conf.armv7h /mnt base-openrc<br />
{{warning|Some of the installation steps, such as setting the hostname and keymap, will be different. Please refer to the [[OpenRC]] page.}}<br />
}}<br />
<br />
If you have a btrfs root, you probably want to install also {{ic|btrfs-progs}}.<br />
<br />
{{Note|<br />
If you face GPG errors when running {{ic|# pacstrap /mnt}}, you can try to fix them with:<br />
# pacman -Sfy archlinux-keyring<br />
}}<br />
<br />
Generate an [[fstab]] with the following command (if you prefer to use UUIDs or labels, add the {{ic|-U}} or {{ic|-L}} option, respectively):<br />
# genfstab -p /mnt >> /mnt/etc/fstab<br />
Next we [[Change Root|chroot]] into our newly installed system:<br />
# arch-chroot /mnt<br />
<br />
=== Configure the system ===<br />
<br />
* Write your hostname to {{ic|/etc/hostname}}<br />
* Symlink {{ic|/etc/localtime}} to {{ic|/usr/share/zoneinfo/Zone/SubZone}}. Replace {{ic|Zone}} and {{ic|Subzone}} to your liking. For example:<br />
<br />
# ln -s /usr/share/zoneinfo/Europe/Athens /etc/localtime<br />
<br />
* Set [[Locale#Setting system-wide locale|locale]] preferences in {{ic|/etc/locale.conf}}<br />
* Add [[KEYMAP|console keymap and font]] preferences in {{ic|/etc/vconsole.conf}}<br />
* Uncomment the selected locale in {{ic|/etc/locale.gen}} and generate it with {{ic|locale-gen}}<br />
* Configure {{ic|/etc/mkinitcpio.conf}} as needed (see [[mkinitcpio]]) and create an initial RAM disk with:<br />
<br />
# mkinitcpio -p linux-libre<br />
<br />
* Configure the network. See [[a:Network configuration]] and [[Wireless Setup]].<br />
<br />
Add your user to the relevant [[Users and groups|group]] such as:<br />
<br />
# gpasswd -a YourActualUserName video<br />
<br />
{{Note | You can visit [[Beginners' Guide#Chroot and configure the base system]] to learn about further configuration options.}}<br />
<br />
=== Change or set the root password ===<br />
The current release tarball has a password set, so if you use it, you will need to change the root password, else you won't be able to log into the installation. This step will probably be un-necessary in future tarball releases.<br />
<br />
If you don't use the release tarball, you might also want to set a root password. <br />
<br />
Setting or changing the root password be done by running the {{ic|passwd}} command inside the chroot.<br />
<br />
=== Installing the bootloader ===<br />
==== Bootloader provided by parabola ====<br />
<br />
Parabola provides bootloaders for many devices.<br />
If parabola has one for your ARM computer, you can simply chroot and install it:<br />
# arch-chroot /mnt<br />
# pacman -S uboot4extlinux-a20-olinuxino-lime2<br />
resolving dependencies...<br />
looking for conflicting packages...<br />
<br />
Packages (1) uboot4extlinux-a20-olinuxino-lime2-2017.01-1.1<br />
<br />
Total Download Size: 0.20 MiB<br />
Total Installed Size: 0.53 MiB<br />
<br />
:: Proceed with installation? [Y/n] <br />
[...]<br />
However merely installing the package isn't sufficent to make the device boot from that bootloader. You then need to put the bootloader in a special location so it's picked up by the hardware.<br />
At the end of the package installation, you will be asked if you want to do that:<br />
A new U-Boot version needs to be flashed onto /dev/mmcblk0.<br />
Do you want to do this now? [y|N]<br />
Double check that /dev/mmcblk0 correspond to the storage device you're installing Parabola on and not the install computer storage or something else.<br />
<br />
If it matches and that you say yes, it will install it:<br />
526+1 records in<br />
526+1 records out<br />
539287 bytes (539 kB, 527 KiB) copied, 0.165519 s, 3.3 MB/s<br />
==> WARNING: Remember to set up your kernels in /boot/extlinux/extlinux.conf<br />
<br />
As the warning says, you will also need to edit /boot/extlinux/extlinux.conf to make it boot.<br />
<br />
Several bootloaders are available in Parabola.<br />
<br />
===== U-Boot4Extlinux =====<br />
<br />
{{Note|{{pkg|uboot4extlinux-am335x_bone}} is available from {{ic | [libre]}} since it's reported to work reliably on coadde's Beaglebone Black. For other uboot4extlinux packages we need more ARMv7 boards for porting and testing before moving them to {{ic | [libre]}}.}}<br />
<br />
Extlinux is one of the many spinoffs of Syslinux -- the bootloader used for live CDs and many other applications. It's not as commonly used as a bootloader for desktops and laptops, but it's perfectly capable of that and U-Boot supports it. This allows for interactive multi-boot and multiple kernels. uboot4extlinux packages are under development yet for U-Boot with Extlinux support. At the moment, we have [https://www.parabola.nu/packages/?sort=&q=uboot4extlinux some packages] for testing and debugging from {{ic | [libre-testing]}}.<br />
<br />
{{Note| 1 = If you wish to use this repo add the following lines to {{ic | /etc/pacman.conf}}:<br />
{{bc | 1 =<br />
[libre-testing]<br />
Include = /etc/pacman.d/mirrorlist}}<br />
}}<br />
<br />
===== U-Boot =====<br />
<br />
{{warning | 1 = Standalone uboot packages only work for a single kernel: {{pkg|linux-libre}}. If you use other or multiples kernels you should look for one of [[#U-Boot4Extlinux]] or [[#U-Boot4GRUB]] instead.}}<br />
<br />
Installing the [https://www.parabola.nu/packages/?q=uboot-&repo=Libre appropriate U-Boot] package will copy the bootloader to your storage device's boot sector. Manual intervention shouldn't be necessary.<br />
<br />
Once installed, you will need to run the following command to configure it:<br />
# cd /boot && ./mkscr<br />
<br />
===== U-Boot4GRUB =====<br />
<br />
uboot4grub packages are under development yet for U-Boot with GRUB support. At the moment, we have [https://www.parabola.nu/packages/?sort=&q=uboot4grub some packages] for testing and debugging from {{ic | [libre-testing]}}.<br />
<br />
{{Note| 1 = If you wish to use this repo add the following lines to {{ic | /etc/pacman.conf}}:<br />
{{bc | 1 =<br />
[libre-testing]<br />
Include = /etc/pacman.d/mirrorlist}}<br />
}}<br />
<br />
===== GRUB =====<br />
<br />
{{pkg|grub}} claims some support for ARMv7 machines with EFI support ([[GRUB#UEFI_systems]]). Parabola hackers are investigating using this.<br />
<br />
{{Note| By default {{pkg|grub}} is built for systems which have RAM at address 0x08000000. However SBC boards which we are targeting have RAM starting from different values (eg. BeagleBone and BeagleBone Black are 0x82000000) so we need to adjust GRUB_KERNEL_ARM_UBOOT_LINK_ADDR to make sure it matches U-Boot load_addr. Therefore, we are creating grub packages with specific suffix for it (eg. {{pkg | grub-am335x_bone}} for BeagleBone and BeagleBone Black)}}<br />
<br />
<br />
===== Which bootloader package to use for which device? =====<br />
<br />
Here's a list of devices with their corresponding bootloaders packages:<br />
{| class="wikitable sortable"<br />
|----<br />
! Computer(s) (vendor, product)<br />
! Bootloader(s) packages<br />
! Bootrom constraints<br />
|-<br />
| <br />
* Banana Pi<br />
|<br />
* {{pkg|uboot4extlinux-bananapi}}<br />
* {{pkg|uboot-bananapi}}<br />
|-<br />
|<br />
* BeagleBoard<br />
* BeagleBoard-xM<br />
| <br />
* {{pkg|uboot4extlinux-omap3_beagle}}<br />
|<br />
|-<br />
| <br />
* BeagleBone<br />
* BeagleBone Black<br />
| <br />
* {{pkg|uboot4extlinux-am335x_bone}}<br />
|<br />
|-<br />
| <br />
* [https://linux-sunxi.org/Olimex_A20-OLinuXino-Lime Olimex A20 OLinuXino Lime]<br />
| <br />
* {{pkg|uboot4extlinux-a20-olinuxino-lime}}<br />
|<br />
|-<br />
| <br />
* [https://linux-sunxi.org/Olimex_A20-OLinuXino-Lime2 Olimex A20 OLinuXino Lime2]<br />
| <br />
* {{pkg|uboot4extlinux-a20-olinuxino-lime2}}<br />
|<br />
|-<br />
| <br />
* [https://www.olimex.com/Products/OLinuXino/A20/A20-OLinuXino-LIME2 Olimex A20 OLinuXino Lime2 eMMC]<br />
| <br />
* {{pkg|uboot4extlinux-a20-olinuxino-lime2-emmc}}<br />
|<br />
|-<br />
|}<br />
<br />
There are many more devices supported, [https://www.parabola.nu/packages/?q=uboot a quick search in Parabola's packages] shows many more bootloaders<br />
<br />
===== Bootloader configurations =====<br />
<br />
Our kernel images use custom names (eg. /boot/vmlinuz-linux-libre-grsec) to allow for various kernels to coexist via a multi-boot bootloader like GRUB or Extlinux. You really need to verify that your bootloader is configured to look for the right kernel name.<br />
<br />
{{Note| We don't have uImage packages available in Parabola since we are adapting our kernels for GRUB and Extlinux compatibility. However, if you won't use them, we suggest you use [https://projects.parabola.nu/abslibre.git/plain/libre/mkuimage/mkuimage.sh our script] to create a new one based on the kernel that you want.}}<br />
<br />
Also remember to configure the bootloader to use an initramfs if you use any stacked block devices like [[LVM]], [[dm-crypt|LUKS]], or [[RAID|RAID]].<br />
<br />
For instance for extlinux, it can be done by adding an {{ic|initrd}} line, which would meake an entry look like that:<br />
label Parabola GNU/Linux-libre, linux-libre kernel<br />
kernel /boot/vmlinuz-linux-libre<br />
initrd /boot/initramfs-linux-libre.img<br />
append console=ttyS0,115200n8 quiet rw root=/dev/mapper/vg-rootfs<br />
fdtdir /boot/dtbs/linux-libre/<br />
<br />
==== Bootloader not provided by parabola ====<br />
===== Barebox =====<br />
* See [[Barebox]]<br />
<br />
===== Already present: Goldelico GTA04 =====<br />
The GTA04 typically has its bootloader in NAND. So there is no need to install a bootloader, however we might need to adjust the boot parameters/cmdline given to the kernel and the uboot environment to fit your partioning scheme. It is strongly advised to have a serial console working to do that as otherwise you won't be able to see why the device is not booting.<br />
Its uboot also expects an uImage in /boot/uImage. It can be created like that:<br />
# pacman -S --needed uboot-tools<br />
# cat /boot/vmlinuz-linux-libre /boot/dtbs/linux-libre/omap3-gta04a3.dtb > /tmp/zImage.dtb<br />
# mkimage -A arm -O linux -T kernel -C none -a 0x82000000 -e 0x82000000 -d /tmp/zImage.dtb /boot/uImage<br />
<br />
===== Already present: TBS2910 Matrix ARM mini PC =====<br />
There are several versions of the board.<br />
<br />
On the version that has "TBS-2910V23" written on it, the bootloader is already present in an eMMC partition.<br />
<br />
It should already be free software as it's u-boot though:<br />
* We need to find the source code. It's probably on the manufacturer website.<br />
* We might want to update it to a new version as the version that I had didn't support using syslinux config files.<br />
<br />
If you have a serial cable, you can then type the following:<br />
ums 0 mmc 2<br />
<br />
This will export the eMMC hardware partition that contain the OS (but not the bootloader).<br />
<br />
It's then possible to just repartition the eMMC and install Parabola in there.<br />
<br />
Once the Parabola rootfs is installed on the first partition, it's possible to load Parabola by creating a /uEnv.txt file with the following content:<br />
mmcroot=/dev/mmcblk2p1 rw rootwait<br />
optargs= loglevel=8 systemd.show_status=true<br />
zImage=/boot/vmlinuz-linux-libre<br />
fdt_file=/boot/dtbs/linux-libre/imx6q-tbs2910.dtb<br />
<br />
===== Already present: Asus Chromebook C201 =====<br />
Bootloader functionality is provided by depthcharge, which is included with libreboot (and the stock bios).<br />
<br />
the kernel must be flashed to the first partition. if you installed linux-libre-chromebook with pacstrap, you can manually reflash it:<br />
<br />
# dd if=/boot/vmlinux.kpart of=/dev/<KERNEL_PARTITION><br />
<br />
if you want to change the kernel command line parameters you can use futility which is provided by {{pkg|vboot-utils}}<br />
<br />
to see information about how the kernel is packed (including the parameters):<br />
<br />
# futility show vmlinux.kpart<br />
<br />
to change the parameters, you will need to unpack and repack the kernel. the following example shows how to add serial console output during boot<br />
<br />
# cd /boot<br />
# mkdir tmp_unpack<br />
# cd tmp_unpack<br />
# futility --debug vbutil_kernel --get-vmlinuz ../vmlinux.kpart --vmlinuz-out vmlinuz<br />
# echo "console=ttyS2,115200n8 earlyprintk=ttyS2,115200n8 init=/sbin/init root=PARTUUID=%U/PARTNROFF=1 rootwait rw noinitrd" > cmdline<br />
# dd if=/dev/zero of=bootloader.bin bs=512 count=1<br />
# wget https://git.parabola.nu/abslibre.git/plain/libre/linux-libre/kernel.keyblock<br />
# wget https://git.parabola.nu/abslibre.git/plain/libre/linux-libre/kernel_data_key.vbprivk<br />
# futility --debug vbutil_kernel \<br />
--pack vmlinux.kpart \<br />
--version 1 \<br />
--vmlinuz vmlinuz \<br />
--arch arm \<br />
--keyblock kernel.keyblock \<br />
--signprivate kernel_data_key.vbprivk \<br />
--config cmdline \<br />
--bootloader bootloader.bin<br />
<br />
=== Unmount and reboot ===<br />
<br />
If you are still in the chroot environment type {{ic|exit}} or press {{keypress|Ctrl}}+{{keypress|D}} in order to exit.<br />
Earlier we mounted the partitions under {{ic|/mnt}}. In this step we will unmount them:<br />
# umount /mnt/{boot,home,}<br />
<br />
Now you can boot the ARM computer and then login with the root account.<br />
<br />
=== Configure pacman ===<br />
<br />
Edit {{ic|/etc/pacman.conf}} and configure pacman's options, also enabling the repositories you need.<br />
<br />
See [[Pacman]] and [[Official Repositories]] for details.<br />
<br />
Also consider using [[Pacman2pacman]], a peer to peer package system, in order to reduce load on official Parabola servers.<br />
<br />
=== Update the system ===<br />
<br />
At this point you should update your system.<br />
<br />
See [[a:Pacman#Upgrading packages|Upgrading packages]] for instructions.<br />
<br />
=== Add a user ===<br />
<br />
Finally, add a normal user as described in [[a:Users and groups#User management|User management]].<br />
<br />
=== Service management ===<br />
<br />
Parabola GNU/Linux-libre uses [[a:systemd]] as init, which is a system and service manager for Linux. For maintaining your Parabola GNU/Linux-libre installation, it is a good idea to learn the basics about it. Interaction with systemd is done through the {{ic|systemctl}} command. Read [[a:systemd#Basic systemctl usage]] for more information.<br />
<br />
=== Conclusion ===<br />
<br />
Your new Parabola GNU/Linux-libre base system is now a functional GNU/Linux environment.<br />
<br />
You can now continue [[Parabola_MATE_desktop_ISO#Steps_after_basic_installation|here]].<br />
<br />
=== See also ===<br />
<br />
* [[Installation Guide|x86 Installation Guide]]<br />
* [[MIPS Installation|MIPS Installation Guide]]<br />
<br />
=== Troubleshooting ===<br />
<br />
==== Mkinitcpio ====<br />
<br />
===== WARNING: No modules were added to the image. This is probably not what you want. =====<br />
<br />
If when creating the initramfs image with {{Pkg|mkinitcpio}}, you get the message<br />
==> WARNING: No modules were added to the image. This is probably not what you want.<br />
Just ignore, you should be able to boot anyways.<br />
<br />
===== ERROR: kernel version extraction from image not supported for `armv7' architecture =====<br />
<br />
If when running mkinitcpio you get the message<br />
ERROR: kernel version extraction from image not supported for `armv7' architecture<br />
Or similar (like armv7h, armv7l, etc) edit {{ic|/bin/mkinitcpio}} and where it says {{ic|$arch}} leave it as<br />
<nowiki>if [[ $arch != @(i?86|x86_64|armv7?) ]]; then<br />
error "kernel version extraction from image not supported for \`%s' architecture" "$arch"</nowiki><br />
<br />
===== ERROR: invalid kernel specified: '/boot/vmlinuz-linux-libre' =====<br />
<br />
In this case edit {{ic|/etc/mkinitcpio.d/linux-libre-xxx.preset}} and where it says {{ic|<nowiki>ALL_kver="/boot/vmlinuz-linux-libre-xxx"</nowiki>}} change {{ic|/boot/vmlinuz-linux-libre-xxx}} with the kernel release, which should be the output of {{ic|uname -r}}, if you are using that kernel. You can see them with<br />
$ ls /lib/modules<br />
{{Note|The {{ic|xxx}} stands for the kernel special name.}}<br />
<br />
==== Iceweasel ====<br />
<br />
===== Error code: NS_ERROR_NET_INADEQUATE_SECURITY =====<br />
<br />
If some websites give you this error on Iceweasel (an probably on Icecat) with a message like:<br />
<br />
Your connection is not secure<br />
<br />
The website tried to negotiate an inadequate level of security.<br />
<br />
www.example.com uses security technology that is outdated and vulnerable to attack. An attacker could easily reveal information which you thought to be safe. The website administrator will need to fix the server first before you can visit the site.<br />
<br />
Error code: NS_ERROR_NET_INADEQUATE_SECURITY<br />
<br />
Then open a new tab and write about:config, then search {{ic|spd}} and disable {{ic|network.http.spdy.enabled}}<br />
<br />
=== Acknowledgement ===<br />
<br />
<div>This wiki article is based on the [[Installation Guide]] which is itself based on the [https://wiki.archlinux.org/ ArchWiki], with non-[https://www.gnu.org/philosophy/free-system-distribution-guidelines.html FSDG] bits that may have been removed from it.</div><br />
<br />
<br />
[[Category:Installation]]<br />
[[Category:ARM]]</div>Maihttps://wiki.parabola.nu/index.php?title=ARM_Installation_Guide&diff=22630ARM Installation Guide2020-02-06T02:59:19Z<p>Mai: /* Already present: Asus Chromebook C201 */</p>
<hr />
<div>{{i18n|Parabola ARM installation}}<br />
<br />
{{Warning| SBCs normally run the GNU/Linux system, but that doesn't mean that all is well for software freedom on these boards. Therefore, there's no support for hardware that doesn't work without running a nonfree program, such as Raspberry Pi, ODROID (models using the Samsung Exynos SoC), Arndale, Intel Edison boards and probably others. See the [https://www.fsf.org/resources/hw/single-board-computers FSF article] for more info.}}<br />
<br />
<br />
The Installation Guide for ARM computers is intended to assist experienced GNU/Linux users in installing Parabola official tarball image. This page assumes a high-level of experience with GNU/Linux systems and utilities, especially the command line. Note that dealing with ARM computers is more complicated than common x86 computers because you will need to lean some some hardware specific knowledge.<br />
<br />
Before beginning, we recommend you view the [[a:Frequently_asked_questions| Arch Linux FAQ]], and employ the {{ic|man ''command''}} to read the [[man page]] of any command they are not familiar with. The Parabola wiki, as well as the [https://wiki.archlinux.org/ Arch Linux wiki], should be the primary source of information and your first resource during trouble-shooting.<br />
<br />
=== Warning ===<br />
{{Warning|Theses new instructions are experimental and have not been tested yet. Remove this warning and/or contact Parabola any parabola contributor to remove this warning if they worked for you.}}<br />
<br />
=== ARM devices status ===<br />
<br />
==== Freedom status ====<br />
<br />
* Many ARM computers can be used with 100% free software. This however doesn't mean that every hardware component is fully supported by free software. It's better to plan ahead and choose your hardware accordingly.<br />
<br />
* See the [https://www.fsf.org/resources/hw/single-board-computers Article on the single-board-computers at the FSF] for more details on the topic. Beware that the article on the single-board-computers at the FSF also covers devices that do not have an ARM CPU, and that are not supported by Parabola because of that.<br />
<br />
* Parabola doesn't support ARM devices that don't even boot without nonfree software. This has several advantages:<br />
** If an ARM device is supported by Parabola, we can be sure that it can boot with free software<br />
** As the boot interface between the bootloader and the distribution evolves, we can update every components of it (this installation manual, the bootloader, the distribution configuration) to work well together.<br />
<br />
* Some ARM devices have integrated nonfree bootloaders. While they could technically run Parabola, they are not supported for the reasons stated above.<br />
<br />
==== 64bit ARM ====<br />
While there are no aarch64 (ARM 64bit) version of Parabola yet, it's still possible to use Parabola on some devices that have 64bit ARM CPU.<br />
<br />
To do that you will need to use the linux-libre-aarch64 kernel with the armv7h version of Parabola.<br />
<br />
A special kernel is needed because 32bit ARM kernels dont't work as-is because:<br />
* The device tree for 64bit devices are not present in the 32bit kernel packages<br />
* Many drivers and hardware support for 64bit ARM hardware are probably be missing in the 32bit kernel configurations, so they are probably missing in the 32bit kernel packages as well.<br />
<br />
To install linux-libre-aarch64 you need to enable the following repository in /etc/pacman.conf:<br />
[kernels]<br />
Include = /etc/pacman.d/mirrorlist<br />
<br />
Then you need to install linux-libre-aarch64. That can be done with the following command<br />
pacman -Sy linux-libre-aarch64<br />
<br />
However there are still some limitations:<br />
* This can only work for devices with CPU that support 32bit mode. Some arm64 CPUs don't support that mode.<br />
* We also need to package bootloaders for aarch64 devices.<br />
<br />
At the time of writing, this is not done yet, and the aarch64 support was tested on a single board computer that had an integrated u-boot bootloader.<br />
<br />
Once the kernel was installed, the following configuration file in /boot/extlinux/extlinux.conf was used to boot the hardware:<br />
timeout 1<br />
default linux-libre-aarch64<br />
label linux-libre-aarch64<br />
kernel /boot/vmlinuz-linux-libre-aarch64<br />
append loglevel=8 systemd.show_status=false rw root=/dev/mmcblk0p1<br />
fdtdir /boot/dtbs/linux-libre-aarch64<br />
initrd /boot/initramfs-linux-libre-aarch64.img<br />
<br />
==== Linux ====<br />
You should take into account the state of the software support in upstream projects before getting ARM devices.<br />
The project that has the biggest impact on hardware support is Linux, as it is required to make your hardware work:<br />
* For allwinner there is some generic information on the topic here: https://linux-sunxi.org/Linux_mainlining_effort and more specific information on the devices pages: https://linux-sunxi.org/Table_of_Allwinner_based_boards<br />
<br />
Devices vendor typically ship an old version of the Linux kernel that is modified by them to support their hardware. The Free and Open source software communities are working actively to add support for many ARM devices in Linux.<br />
<br />
If the device you want to get is not supported upstream (and that you don't intend to add such support yourself) you should rather look for another device. If your device requires a kernel version that is way older than the one used in your GNU/Linux distribution, it is almost unusable: it will be almost impossible to use because several software will not run with older kernels. For instance you won't be able to boot your device with systemd if your kernel is too old. If the vendor kernel is not too old yet, it will become too old years later as it will not be (indefinitely) updated by the device vendor.<br />
<br />
==== Bootloaders ====<br />
Bootloaders are less a concern, as you might be able to workaround the lack of support of modern filesystems and partitions. However finding why your device does not boot can be painful, so it's strongly advised to get devices which are support in upstream Free and Open source bootloader projects.<br />
<br />
=== Know your hardware ===<br />
ARM devices can be very different, and this has implications on the way you will install Parabola.<br />
<br />
More specifically you will need to know:<br />
* From which storage device your device can boot. Most supported devices can boot from a microSD. Knowing the order in which it tries to boot on the storage devices can also be useful as it can help you understand what is going on if your device is not booting. Knowing the partitioning/filesystem boot requirements can also be handy in that case, if they are not mentioned in this installation guide. In that case it would be nice to add them in this guide.<br />
* How to get some feedback on what is going on:<br />
** Not all devices can be connected to a display, and when they can, the display is not necessarily available early at boot.<br />
** Some devices have an easily accessible serial port that can act as a display + keyboard replacement.<br />
* The state of the software support for your device:<br />
** What parts of the hardware works and what doesn't in Linux<br />
** The limitations of the bootloader (version) you are using<br />
<br />
Here are some links to such information:<br />
* For devices with an AllWinner "CPU": https://linux-sunxi.org/Table_of_Allwinner_based_boards<br />
<br />
=== Some hardware and booting background ===<br />
==== System on a chip ====<br />
In most of the ARM computers, the CPU and many peripherals are inside the same chip. This chip is called 'System On A chip' (often abreviated as SOC). Beside the CPU, it often also contains:<br />
* A GPU<br />
* A display controller<br />
* One or more USB host controllers<br />
* An USB OTG/Device controller<br />
* A SD card controller<br />
* A serial port controller<br />
* Many other periperals<br />
<br />
==== Bootrom and booting ====<br />
Most of such System on a chip have ARM code in a ROM (hardwired inside the chip) that is executed at startup.<br />
This is called a bootrom.<br />
<br />
The bootrom is responsible for doing some hardware initialization and fetching the bootloader from a storage device. Often it is also possible to load a bootloader from USB or a serial port.<br />
<br />
The bootloader then do some more (device specific) hardware initialization and loads the operating system.<br />
<br />
In practice, on most hardware, after initializing some hardware, the bootrom will try to locate the bootloader from an external storage device. The external storage device has to be supported by the bootrom. For instance in the bootrom of Allwinner System on a chip, the bootrom doesn't support booting from SATA storage devices, but supports booting from uSD/SD cards, eMMC, SPI flash chips, etc.<br />
<br />
The kind of storage devices the bootrom tries to find a bootloader on, and the order in which it tries them can often be configured by hardware and/or software.<br />
<br />
==== Bootloaders and their limitations ====<br />
===== u-boot =====<br />
u-boot supports the ext2, ext4, and ext4 filesystem, however, at the time of writing, the versions used in Parabola doesn't support all 'extensions' of the ext4 filesystem.<br />
<br />
If you use unsupported extensions you would usually be able to list the filesystem content with ext4ls or similar commands, but you usually won't be able to read some files. When this is the case u-boot will output some errors at boot and booting will fail.<br />
<br />
To make sure it doesn't happen, you can format the ext4 filesystem your kernel and initramfs resides on like that:<br />
mkfs.ext4 -F -O ^metadata_csum,^64bit /dev/CARD1<br />
<br />
In the commands above and below, replace /dev/CARD1 by the path of the SD-card, which could be /dev/mmcblk0 if you use a 'native' SD reader, or /dev/sdb1 for instance if you have an 'usb mass storage' SD reader. <br />
<br />
To see which extensions you have, you can use the following command:<br />
tune2fs -l /dev/CARD1<br />
<br />
TODO: Check the commands below to remove unnecessary fsck<br />
<br />
Ext4 filesystems can also be converted to remove metadata_csum like that:<br />
fsck.ext4 -C 0 -f /dev/CARD1<br />
tune2fs -O ^metadata_csum /dev/CARD1<br />
fsck.ext4 -C 0 -f /dev/CARD1<br />
And for removing 64bit:<br />
fsck.ext4 -C 0 -f /dev/CARD1<br />
resize2fs -s /dev/CARD1<br />
fsck.ext4 -C 0 -f /dev/CARD1<br />
<br />
=== Device-specific informations ===<br />
==== GTA04 A3 ====<br />
Parabola then boots and you are supposed to see the boot log on the serial console.<br />
At the time of writing the kernel lacks the GTA04 display driver, this is [https://labs.parabola.nu/issues/857 bug #587]<br />
<br />
==== BeagleBone Black ====<br />
Scripts for installing Parabola on the internal 4GB EMMC can be found at the [https://notabug.org/isengaara/knochenreiter knochenreiter] repository.<br />
<br />
The BeagleBone Black can also be bought with Parabola already install on it at [https://shop.phreedom2600.net/ Phreedom2600].<br />
<br />
==== Asus Chromebook C201 with Libreboot ====<br />
<br />
See [https://www.parabola.nu/news/parabola-officially-supports-librebooted-asus-chromebook-c201/ This news] for more details<br />
<br />
==== TBS2910 Matrix ARM mini PC ====<br />
<br />
See [https://libreplanet.org/wiki/Group:Hardware/research/sbc/TBS2910_Matrix_ARM_mini_PC The Libreplanet research article] for more details on booting.<br />
<br />
=== Releases tarballs ===<br />
Download and verify the [https://wiki.parabola.nu/Get_Parabola#Parabola_GNU.2FLinux-libre_release_tarballs_for_armv7h_architecture official Release tarball]<br />
<br />
* The release tarballs are signed and it is highly recommend to verify their signature before use. On Parabola GNU/Linux-libre, this can be done by using {{ic|pacman-key -v <tarball-file>.sig}}. On other systems: {{ic|gpg --verify <tarball-file>.sig}}. You may have to import the key from a keyserver with {{ic|gpg --recv-keys <0x key ID>}}.<br />
* Checksums are also provided in the accompanying {{ic|SHA512SUMS}} and {{ic|WHIRLPOOLSUMS}} files. They can be verified with: {{ic|sha512sum -c SHA512SUMS}} and {{ic|whirlpool-hash -c WHIRLPOOLSUMS}}.<br />
<br />
=== Partition disks ===<br />
<br />
See [[partitioning]] for details.<br />
<br />
Remember to create any stacked block devices like [[LVM]], [[dm-crypt|LUKS]], or [[RAID|RAID]].<br />
<br />
If you use such stacked block devices, remember to generate an initramfs and configure the bootloader to use it.<br />
<br />
==== Asus Chromebook C201 partitioning requirements ====<br />
<br />
* the emmc / micro sd / usb drive must be GPT<br />
* make the first partition large enough to fit the kernel. 32M is ok.<br />
* set the typecode for this partition to 66 (ChromeOS kernel)<br />
* some attribute bits for this partition must be set for it to boot. you can do this with fdisk, gdisk, parted, sfdisk, or sgdisk. here is one way:<br />
<br />
# sgdisk -A 1:set:48 -A 1:set:56 /dev/sdX<br />
<br />
you can read more about these bits on the [https://www.chromium.org/chromium-os/chromiumos-design-docs/disk-format#TOC-Selecting-the-kernel chromium-os wiki ]<br />
<br />
=== Format the partitions ===<br />
<br />
See [[File systems]] for details.<br />
<br />
You will most likely need to use a filesystem supported by your bootloader, without using any features it does not support, for the files in /boot.<br />
<br />
Some System on a chip may also require the bootloader to reside on a specific partition.<br />
<br />
=== Mount the partitions ===<br />
<br />
We now must mount the root partition on {{ic|/mnt}}. You should also create directories for and mount any other partitions ({{ic|/mnt/boot}}, {{ic|/mnt/home}}, ...) and mount your [[a:Swap|swap]] partition if you want them to be detected by {{ic|genfstab}}.<br />
<br />
=== Enable executing arm code on x86 ===<br />
<br />
If you are installing from an x86 computer, you will need to enable running non-x86 binaries transparently. This can be done by telling the Linux kernel to use automatically qemu to do that.<br />
<br />
If the computer you use to do the installation already runs Parabola, you can do it with:<br />
# pacman -S qemu-user-static-binfmt<br />
# systemctl start systemd-binfmt.service<br />
<br />
You will then need to copy qemu-arm-static to the target rootfs.<br />
If the target rootfs is mounted in /mnt, you will then need to do that:<br />
# mkdir -p /mnt/usr/bin/<br />
# cp /usr/bin/qemu-arm-static /mnt/usr/bin/<br />
<br />
The [[Building_armv7h_packages_on_a_x86_system]] page also have more background information on that.<br />
<br />
Once this is done, you will be able to use as chroot, arch-chroot, and pacstrap transparently.<br />
<br />
=== rootfs installation ===<br />
You can either install the rootfs:<br />
* from the released tarball<br />
* directly with pacstrap<br />
<br />
==== From the released tarball ====<br />
<br />
After mounting the filesystem in /mnt, extract Parabola in the rootfs partition:<br />
$ sudo tar xpf parabola-systemd-cli-armv7h-tarball-YYYY-MM-DD.tar.gz -C /mnt/ --numeric-owner<br />
<br />
Here --numeric-owner is used to make sure that everything is still fine if user and group ids differs between the tarball and the computer you're using to run the tar command above. This also enables you to run that command from another GNU/Linux distribution than Parabola (like Trisquel for instance).<br />
<br />
==== With pacstrap ====<br />
First we need to install arch-install-scripts to be able to use the {{ic|pacstrap}} command<br />
pacman -S --needed arch-install-scripts<br />
<br />
Before installing, you may want to edit {{ic|/etc/pacman.d/mirrorlist}} such that your preferred mirror is first. This copy of the mirrorlist will be installed on your new system by {{ic|pacstrap}} as well, so it's worth getting it right.<br />
<br />
Import, trust and install the archlinuxarm keyring. When possible, Parabola leverages free packages that originally came from Arch ARM.<br />
<br />
# pacman -S --needed archlinuxarm-keyring<br />
<br />
Install the base system using {{ic|pacstrap}}:<br />
# mkdir -p /mnt/usr/bin<br />
# cp /usr/bin/qemu-arm-static /mnt/usr/bin<br />
# pacstrap -C /usr/share/pacman/defaults/pacman.conf.armv7h /mnt/ base<br />
<br />
You can install additional packages passing {{ic|base}} and the names of these packages as arguments after the root directory of the new installation (all packages from the {{ic|base}} group are installed if no package is specified).<br />
<br />
{{Note|<br />
To use [[OpenRC]] instead of systemd, run the following command (instead of {{ic|# pacstrap /mnt}}):<br />
# pacstrap -C /usr/share/pacman/defaults/pacman.conf.armv7h /mnt base-openrc<br />
{{warning|Some of the installation steps, such as setting the hostname and keymap, will be different. Please refer to the [[OpenRC]] page.}}<br />
}}<br />
<br />
If you have a btrfs root, you probably want to install also {{ic|btrfs-progs}}.<br />
<br />
{{Note|<br />
If you face GPG errors when running {{ic|# pacstrap /mnt}}, you can try to fix them with:<br />
# pacman -Sfy archlinux-keyring<br />
}}<br />
<br />
Generate an [[fstab]] with the following command (if you prefer to use UUIDs or labels, add the {{ic|-U}} or {{ic|-L}} option, respectively):<br />
# genfstab -p /mnt >> /mnt/etc/fstab<br />
Next we [[Change Root|chroot]] into our newly installed system:<br />
# arch-chroot /mnt<br />
<br />
=== Configure the system ===<br />
<br />
* Write your hostname to {{ic|/etc/hostname}}<br />
* Symlink {{ic|/etc/localtime}} to {{ic|/usr/share/zoneinfo/Zone/SubZone}}. Replace {{ic|Zone}} and {{ic|Subzone}} to your liking. For example:<br />
<br />
# ln -s /usr/share/zoneinfo/Europe/Athens /etc/localtime<br />
<br />
* Set [[Locale#Setting system-wide locale|locale]] preferences in {{ic|/etc/locale.conf}}<br />
* Add [[KEYMAP|console keymap and font]] preferences in {{ic|/etc/vconsole.conf}}<br />
* Uncomment the selected locale in {{ic|/etc/locale.gen}} and generate it with {{ic|locale-gen}}<br />
* Configure {{ic|/etc/mkinitcpio.conf}} as needed (see [[mkinitcpio]]) and create an initial RAM disk with:<br />
<br />
# mkinitcpio -p linux-libre<br />
<br />
* Configure the network. See [[a:Network configuration]] and [[Wireless Setup]].<br />
<br />
Add your user to the relevant [[Users and groups|group]] such as:<br />
<br />
# gpasswd -a YourActualUserName video<br />
<br />
{{Note | You can visit [[Beginners' Guide#Chroot and configure the base system]] to learn about further configuration options.}}<br />
<br />
=== Change or set the root password ===<br />
The current release tarball has a password set, so if you use it, you will need to change the root password, else you won't be able to log into the installation. This step will probably be un-necessary in future tarball releases.<br />
<br />
If you don't use the release tarball, you might also want to set a root password. <br />
<br />
Setting or changing the root password be done by running the {{ic|passwd}} command inside the chroot.<br />
<br />
=== Installing the bootloader ===<br />
==== Bootloader provided by parabola ====<br />
<br />
Parabola provides bootloaders for many devices.<br />
If parabola has one for your ARM computer, you can simply chroot and install it:<br />
# arch-chroot /mnt<br />
# pacman -S uboot4extlinux-a20-olinuxino-lime2<br />
resolving dependencies...<br />
looking for conflicting packages...<br />
<br />
Packages (1) uboot4extlinux-a20-olinuxino-lime2-2017.01-1.1<br />
<br />
Total Download Size: 0.20 MiB<br />
Total Installed Size: 0.53 MiB<br />
<br />
:: Proceed with installation? [Y/n] <br />
[...]<br />
However merely installing the package isn't sufficent to make the device boot from that bootloader. You then need to put the bootloader in a special location so it's picked up by the hardware.<br />
At the end of the package installation, you will be asked if you want to do that:<br />
A new U-Boot version needs to be flashed onto /dev/mmcblk0.<br />
Do you want to do this now? [y|N]<br />
Double check that /dev/mmcblk0 correspond to the storage device you're installing Parabola on and not the install computer storage or something else.<br />
<br />
If it matches and that you say yes, it will install it:<br />
526+1 records in<br />
526+1 records out<br />
539287 bytes (539 kB, 527 KiB) copied, 0.165519 s, 3.3 MB/s<br />
==> WARNING: Remember to set up your kernels in /boot/extlinux/extlinux.conf<br />
<br />
As the warning says, you will also need to edit /boot/extlinux/extlinux.conf to make it boot.<br />
<br />
Several bootloaders are available in Parabola.<br />
<br />
===== U-Boot4Extlinux =====<br />
<br />
{{Note|{{pkg|uboot4extlinux-am335x_bone}} is available from {{ic | [libre]}} since it's reported to work reliably on coadde's Beaglebone Black. For other uboot4extlinux packages we need more ARMv7 boards for porting and testing before moving them to {{ic | [libre]}}.}}<br />
<br />
Extlinux is one of the many spinoffs of Syslinux -- the bootloader used for live CDs and many other applications. It's not as commonly used as a bootloader for desktops and laptops, but it's perfectly capable of that and U-Boot supports it. This allows for interactive multi-boot and multiple kernels. uboot4extlinux packages are under development yet for U-Boot with Extlinux support. At the moment, we have [https://www.parabola.nu/packages/?sort=&q=uboot4extlinux some packages] for testing and debugging from {{ic | [libre-testing]}}.<br />
<br />
{{Note| 1 = If you wish to use this repo add the following lines to {{ic | /etc/pacman.conf}}:<br />
{{bc | 1 =<br />
[libre-testing]<br />
Include = /etc/pacman.d/mirrorlist}}<br />
}}<br />
<br />
===== U-Boot =====<br />
<br />
{{warning | 1 = Standalone uboot packages only work for a single kernel: {{pkg|linux-libre}}. If you use other or multiples kernels you should look for one of [[#U-Boot4Extlinux]] or [[#U-Boot4GRUB]] instead.}}<br />
<br />
Installing the [https://www.parabola.nu/packages/?q=uboot-&repo=Libre appropriate U-Boot] package will copy the bootloader to your storage device's boot sector. Manual intervention shouldn't be necessary.<br />
<br />
Once installed, you will need to run the following command to configure it:<br />
# cd /boot && ./mkscr<br />
<br />
===== U-Boot4GRUB =====<br />
<br />
uboot4grub packages are under development yet for U-Boot with GRUB support. At the moment, we have [https://www.parabola.nu/packages/?sort=&q=uboot4grub some packages] for testing and debugging from {{ic | [libre-testing]}}.<br />
<br />
{{Note| 1 = If you wish to use this repo add the following lines to {{ic | /etc/pacman.conf}}:<br />
{{bc | 1 =<br />
[libre-testing]<br />
Include = /etc/pacman.d/mirrorlist}}<br />
}}<br />
<br />
===== GRUB =====<br />
<br />
{{pkg|grub}} claims some support for ARMv7 machines with EFI support ([[GRUB#UEFI_systems]]). Parabola hackers are investigating using this.<br />
<br />
{{Note| By default {{pkg|grub}} is built for systems which have RAM at address 0x08000000. However SBC boards which we are targeting have RAM starting from different values (eg. BeagleBone and BeagleBone Black are 0x82000000) so we need to adjust GRUB_KERNEL_ARM_UBOOT_LINK_ADDR to make sure it matches U-Boot load_addr. Therefore, we are creating grub packages with specific suffix for it (eg. {{pkg | grub-am335x_bone}} for BeagleBone and BeagleBone Black)}}<br />
<br />
<br />
===== Which bootloader package to use for which device? =====<br />
<br />
Here's a list of devices with their corresponding bootloaders packages:<br />
{| class="wikitable sortable"<br />
|----<br />
! Computer(s) (vendor, product)<br />
! Bootloader(s) packages<br />
! Bootrom constraints<br />
|-<br />
| <br />
* Banana Pi<br />
|<br />
* {{pkg|uboot4extlinux-bananapi}}<br />
* {{pkg|uboot-bananapi}}<br />
|-<br />
|<br />
* BeagleBoard<br />
* BeagleBoard-xM<br />
| <br />
* {{pkg|uboot4extlinux-omap3_beagle}}<br />
|<br />
|-<br />
| <br />
* BeagleBone<br />
* BeagleBone Black<br />
| <br />
* {{pkg|uboot4extlinux-am335x_bone}}<br />
|<br />
|-<br />
| <br />
* [https://linux-sunxi.org/Olimex_A20-OLinuXino-Lime Olimex A20 OLinuXino Lime]<br />
| <br />
* {{pkg|uboot4extlinux-a20-olinuxino-lime}}<br />
|<br />
|-<br />
| <br />
* [https://linux-sunxi.org/Olimex_A20-OLinuXino-Lime2 Olimex A20 OLinuXino Lime2]<br />
| <br />
* {{pkg|uboot4extlinux-a20-olinuxino-lime2}}<br />
|<br />
|-<br />
| <br />
* [https://www.olimex.com/Products/OLinuXino/A20/A20-OLinuXino-LIME2 Olimex A20 OLinuXino Lime2 eMMC]<br />
| <br />
* {{pkg|uboot4extlinux-a20-olinuxino-lime2-emmc}}<br />
|<br />
|-<br />
|}<br />
<br />
There are many more devices supported, [https://www.parabola.nu/packages/?q=uboot a quick search in Parabola's packages] shows many more bootloaders<br />
<br />
===== Bootloader configurations =====<br />
<br />
Our kernel images use custom names (eg. /boot/vmlinuz-linux-libre-grsec) to allow for various kernels to coexist via a multi-boot bootloader like GRUB or Extlinux. You really need to verify that your bootloader is configured to look for the right kernel name.<br />
<br />
{{Note| We don't have uImage packages available in Parabola since we are adapting our kernels for GRUB and Extlinux compatibility. However, if you won't use them, we suggest you use [https://projects.parabola.nu/abslibre.git/plain/libre/mkuimage/mkuimage.sh our script] to create a new one based on the kernel that you want.}}<br />
<br />
Also remember to configure the bootloader to use an initramfs if you use any stacked block devices like [[LVM]], [[dm-crypt|LUKS]], or [[RAID|RAID]].<br />
<br />
For instance for extlinux, it can be done by adding an {{ic|initrd}} line, which would meake an entry look like that:<br />
label Parabola GNU/Linux-libre, linux-libre kernel<br />
kernel /boot/vmlinuz-linux-libre<br />
initrd /boot/initramfs-linux-libre.img<br />
append console=ttyS0,115200n8 quiet rw root=/dev/mapper/vg-rootfs<br />
fdtdir /boot/dtbs/linux-libre/<br />
<br />
==== Bootloader not provided by parabola ====<br />
===== Barebox =====<br />
* See [[Barebox]]<br />
<br />
===== Already present: Goldelico GTA04 =====<br />
The GTA04 typically has its bootloader in NAND. So there is no need to install a bootloader, however we might need to adjust the boot parameters/cmdline given to the kernel and the uboot environment to fit your partioning scheme. It is strongly advised to have a serial console working to do that as otherwise you won't be able to see why the device is not booting.<br />
Its uboot also expects an uImage in /boot/uImage. It can be created like that:<br />
# pacman -S --needed uboot-tools<br />
# cat /boot/vmlinuz-linux-libre /boot/dtbs/linux-libre/omap3-gta04a3.dtb > /tmp/zImage.dtb<br />
# mkimage -A arm -O linux -T kernel -C none -a 0x82000000 -e 0x82000000 -d /tmp/zImage.dtb /boot/uImage<br />
<br />
===== Already present: TBS2910 Matrix ARM mini PC =====<br />
There are several versions of the board.<br />
<br />
On the version that has "TBS-2910V23" written on it, the bootloader is already present in an eMMC partition.<br />
<br />
It should already be free software as it's u-boot though:<br />
* We need to find the source code. It's probably on the manufacturer website.<br />
* We might want to update it to a new version as the version that I had didn't support using syslinux config files.<br />
<br />
If you have a serial cable, you can then type the following:<br />
ums 0 mmc 2<br />
<br />
This will export the eMMC hardware partition that contain the OS (but not the bootloader).<br />
<br />
It's then possible to just repartition the eMMC and install Parabola in there.<br />
<br />
Once the Parabola rootfs is installed on the first partition, it's possible to load Parabola by creating a /uEnv.txt file with the following content:<br />
mmcroot=/dev/mmcblk2p1 rw rootwait<br />
optargs= loglevel=8 systemd.show_status=true<br />
zImage=/boot/vmlinuz-linux-libre<br />
fdt_file=/boot/dtbs/linux-libre/imx6q-tbs2910.dtb<br />
<br />
===== Already present: Asus Chromebook C201 =====<br />
Bootloader functionality is provided by Depthcharge, which is included with libreboot (and the stock bios).<br />
<br />
the kernel must be flashed to the first partition. if you installed linux-libre-chromebook with pacstrap, you can manually reflash it:<br />
<br />
# dd if=/boot/vmlinux.kpart of=/dev/<KERNEL_PARTITION><br />
<br />
=== Unmount and reboot ===<br />
<br />
If you are still in the chroot environment type {{ic|exit}} or press {{keypress|Ctrl}}+{{keypress|D}} in order to exit.<br />
Earlier we mounted the partitions under {{ic|/mnt}}. In this step we will unmount them:<br />
# umount /mnt/{boot,home,}<br />
<br />
Now you can boot the ARM computer and then login with the root account.<br />
<br />
=== Configure pacman ===<br />
<br />
Edit {{ic|/etc/pacman.conf}} and configure pacman's options, also enabling the repositories you need.<br />
<br />
See [[Pacman]] and [[Official Repositories]] for details.<br />
<br />
Also consider using [[Pacman2pacman]], a peer to peer package system, in order to reduce load on official Parabola servers.<br />
<br />
=== Update the system ===<br />
<br />
At this point you should update your system.<br />
<br />
See [[a:Pacman#Upgrading packages|Upgrading packages]] for instructions.<br />
<br />
=== Add a user ===<br />
<br />
Finally, add a normal user as described in [[a:Users and groups#User management|User management]].<br />
<br />
=== Service management ===<br />
<br />
Parabola GNU/Linux-libre uses [[a:systemd]] as init, which is a system and service manager for Linux. For maintaining your Parabola GNU/Linux-libre installation, it is a good idea to learn the basics about it. Interaction with systemd is done through the {{ic|systemctl}} command. Read [[a:systemd#Basic systemctl usage]] for more information.<br />
<br />
=== Conclusion ===<br />
<br />
Your new Parabola GNU/Linux-libre base system is now a functional GNU/Linux environment.<br />
<br />
You can now continue [[Parabola_MATE_desktop_ISO#Steps_after_basic_installation|here]].<br />
<br />
=== See also ===<br />
<br />
* [[Installation Guide|x86 Installation Guide]]<br />
* [[MIPS Installation|MIPS Installation Guide]]<br />
<br />
=== Troubleshooting ===<br />
<br />
==== Mkinitcpio ====<br />
<br />
===== WARNING: No modules were added to the image. This is probably not what you want. =====<br />
<br />
If when creating the initramfs image with {{Pkg|mkinitcpio}}, you get the message<br />
==> WARNING: No modules were added to the image. This is probably not what you want.<br />
Just ignore, you should be able to boot anyways.<br />
<br />
===== ERROR: kernel version extraction from image not supported for `armv7' architecture =====<br />
<br />
If when running mkinitcpio you get the message<br />
ERROR: kernel version extraction from image not supported for `armv7' architecture<br />
Or similar (like armv7h, armv7l, etc) edit {{ic|/bin/mkinitcpio}} and where it says {{ic|$arch}} leave it as<br />
<nowiki>if [[ $arch != @(i?86|x86_64|armv7?) ]]; then<br />
error "kernel version extraction from image not supported for \`%s' architecture" "$arch"</nowiki><br />
<br />
===== ERROR: invalid kernel specified: '/boot/vmlinuz-linux-libre' =====<br />
<br />
In this case edit {{ic|/etc/mkinitcpio.d/linux-libre-xxx.preset}} and where it says {{ic|<nowiki>ALL_kver="/boot/vmlinuz-linux-libre-xxx"</nowiki>}} change {{ic|/boot/vmlinuz-linux-libre-xxx}} with the kernel release, which should be the output of {{ic|uname -r}}, if you are using that kernel. You can see them with<br />
$ ls /lib/modules<br />
{{Note|The {{ic|xxx}} stands for the kernel special name.}}<br />
<br />
==== Iceweasel ====<br />
<br />
===== Error code: NS_ERROR_NET_INADEQUATE_SECURITY =====<br />
<br />
If some websites give you this error on Iceweasel (an probably on Icecat) with a message like:<br />
<br />
Your connection is not secure<br />
<br />
The website tried to negotiate an inadequate level of security.<br />
<br />
www.example.com uses security technology that is outdated and vulnerable to attack. An attacker could easily reveal information which you thought to be safe. The website administrator will need to fix the server first before you can visit the site.<br />
<br />
Error code: NS_ERROR_NET_INADEQUATE_SECURITY<br />
<br />
Then open a new tab and write about:config, then search {{ic|spd}} and disable {{ic|network.http.spdy.enabled}}<br />
<br />
=== Acknowledgement ===<br />
<br />
<div>This wiki article is based on the [[Installation Guide]] which is itself based on the [https://wiki.archlinux.org/ ArchWiki], with non-[https://www.gnu.org/philosophy/free-system-distribution-guidelines.html FSDG] bits that may have been removed from it.</div><br />
<br />
<br />
[[Category:Installation]]<br />
[[Category:ARM]]</div>Maihttps://wiki.parabola.nu/index.php?title=ARM_Installation_Guide&diff=22629ARM Installation Guide2020-02-06T02:14:05Z<p>Mai: /* Installing the bootloader */</p>
<hr />
<div>{{i18n|Parabola ARM installation}}<br />
<br />
{{Warning| SBCs normally run the GNU/Linux system, but that doesn't mean that all is well for software freedom on these boards. Therefore, there's no support for hardware that doesn't work without running a nonfree program, such as Raspberry Pi, ODROID (models using the Samsung Exynos SoC), Arndale, Intel Edison boards and probably others. See the [https://www.fsf.org/resources/hw/single-board-computers FSF article] for more info.}}<br />
<br />
<br />
The Installation Guide for ARM computers is intended to assist experienced GNU/Linux users in installing Parabola official tarball image. This page assumes a high-level of experience with GNU/Linux systems and utilities, especially the command line. Note that dealing with ARM computers is more complicated than common x86 computers because you will need to lean some some hardware specific knowledge.<br />
<br />
Before beginning, we recommend you view the [[a:Frequently_asked_questions| Arch Linux FAQ]], and employ the {{ic|man ''command''}} to read the [[man page]] of any command they are not familiar with. The Parabola wiki, as well as the [https://wiki.archlinux.org/ Arch Linux wiki], should be the primary source of information and your first resource during trouble-shooting.<br />
<br />
=== Warning ===<br />
{{Warning|Theses new instructions are experimental and have not been tested yet. Remove this warning and/or contact Parabola any parabola contributor to remove this warning if they worked for you.}}<br />
<br />
=== ARM devices status ===<br />
<br />
==== Freedom status ====<br />
<br />
* Many ARM computers can be used with 100% free software. This however doesn't mean that every hardware component is fully supported by free software. It's better to plan ahead and choose your hardware accordingly.<br />
<br />
* See the [https://www.fsf.org/resources/hw/single-board-computers Article on the single-board-computers at the FSF] for more details on the topic. Beware that the article on the single-board-computers at the FSF also covers devices that do not have an ARM CPU, and that are not supported by Parabola because of that.<br />
<br />
* Parabola doesn't support ARM devices that don't even boot without nonfree software. This has several advantages:<br />
** If an ARM device is supported by Parabola, we can be sure that it can boot with free software<br />
** As the boot interface between the bootloader and the distribution evolves, we can update every components of it (this installation manual, the bootloader, the distribution configuration) to work well together.<br />
<br />
* Some ARM devices have integrated nonfree bootloaders. While they could technically run Parabola, they are not supported for the reasons stated above.<br />
<br />
==== 64bit ARM ====<br />
While there are no aarch64 (ARM 64bit) version of Parabola yet, it's still possible to use Parabola on some devices that have 64bit ARM CPU.<br />
<br />
To do that you will need to use the linux-libre-aarch64 kernel with the armv7h version of Parabola.<br />
<br />
A special kernel is needed because 32bit ARM kernels dont't work as-is because:<br />
* The device tree for 64bit devices are not present in the 32bit kernel packages<br />
* Many drivers and hardware support for 64bit ARM hardware are probably be missing in the 32bit kernel configurations, so they are probably missing in the 32bit kernel packages as well.<br />
<br />
To install linux-libre-aarch64 you need to enable the following repository in /etc/pacman.conf:<br />
[kernels]<br />
Include = /etc/pacman.d/mirrorlist<br />
<br />
Then you need to install linux-libre-aarch64. That can be done with the following command<br />
pacman -Sy linux-libre-aarch64<br />
<br />
However there are still some limitations:<br />
* This can only work for devices with CPU that support 32bit mode. Some arm64 CPUs don't support that mode.<br />
* We also need to package bootloaders for aarch64 devices.<br />
<br />
At the time of writing, this is not done yet, and the aarch64 support was tested on a single board computer that had an integrated u-boot bootloader.<br />
<br />
Once the kernel was installed, the following configuration file in /boot/extlinux/extlinux.conf was used to boot the hardware:<br />
timeout 1<br />
default linux-libre-aarch64<br />
label linux-libre-aarch64<br />
kernel /boot/vmlinuz-linux-libre-aarch64<br />
append loglevel=8 systemd.show_status=false rw root=/dev/mmcblk0p1<br />
fdtdir /boot/dtbs/linux-libre-aarch64<br />
initrd /boot/initramfs-linux-libre-aarch64.img<br />
<br />
==== Linux ====<br />
You should take into account the state of the software support in upstream projects before getting ARM devices.<br />
The project that has the biggest impact on hardware support is Linux, as it is required to make your hardware work:<br />
* For allwinner there is some generic information on the topic here: https://linux-sunxi.org/Linux_mainlining_effort and more specific information on the devices pages: https://linux-sunxi.org/Table_of_Allwinner_based_boards<br />
<br />
Devices vendor typically ship an old version of the Linux kernel that is modified by them to support their hardware. The Free and Open source software communities are working actively to add support for many ARM devices in Linux.<br />
<br />
If the device you want to get is not supported upstream (and that you don't intend to add such support yourself) you should rather look for another device. If your device requires a kernel version that is way older than the one used in your GNU/Linux distribution, it is almost unusable: it will be almost impossible to use because several software will not run with older kernels. For instance you won't be able to boot your device with systemd if your kernel is too old. If the vendor kernel is not too old yet, it will become too old years later as it will not be (indefinitely) updated by the device vendor.<br />
<br />
==== Bootloaders ====<br />
Bootloaders are less a concern, as you might be able to workaround the lack of support of modern filesystems and partitions. However finding why your device does not boot can be painful, so it's strongly advised to get devices which are support in upstream Free and Open source bootloader projects.<br />
<br />
=== Know your hardware ===<br />
ARM devices can be very different, and this has implications on the way you will install Parabola.<br />
<br />
More specifically you will need to know:<br />
* From which storage device your device can boot. Most supported devices can boot from a microSD. Knowing the order in which it tries to boot on the storage devices can also be useful as it can help you understand what is going on if your device is not booting. Knowing the partitioning/filesystem boot requirements can also be handy in that case, if they are not mentioned in this installation guide. In that case it would be nice to add them in this guide.<br />
* How to get some feedback on what is going on:<br />
** Not all devices can be connected to a display, and when they can, the display is not necessarily available early at boot.<br />
** Some devices have an easily accessible serial port that can act as a display + keyboard replacement.<br />
* The state of the software support for your device:<br />
** What parts of the hardware works and what doesn't in Linux<br />
** The limitations of the bootloader (version) you are using<br />
<br />
Here are some links to such information:<br />
* For devices with an AllWinner "CPU": https://linux-sunxi.org/Table_of_Allwinner_based_boards<br />
<br />
=== Some hardware and booting background ===<br />
==== System on a chip ====<br />
In most of the ARM computers, the CPU and many peripherals are inside the same chip. This chip is called 'System On A chip' (often abreviated as SOC). Beside the CPU, it often also contains:<br />
* A GPU<br />
* A display controller<br />
* One or more USB host controllers<br />
* An USB OTG/Device controller<br />
* A SD card controller<br />
* A serial port controller<br />
* Many other periperals<br />
<br />
==== Bootrom and booting ====<br />
Most of such System on a chip have ARM code in a ROM (hardwired inside the chip) that is executed at startup.<br />
This is called a bootrom.<br />
<br />
The bootrom is responsible for doing some hardware initialization and fetching the bootloader from a storage device. Often it is also possible to load a bootloader from USB or a serial port.<br />
<br />
The bootloader then do some more (device specific) hardware initialization and loads the operating system.<br />
<br />
In practice, on most hardware, after initializing some hardware, the bootrom will try to locate the bootloader from an external storage device. The external storage device has to be supported by the bootrom. For instance in the bootrom of Allwinner System on a chip, the bootrom doesn't support booting from SATA storage devices, but supports booting from uSD/SD cards, eMMC, SPI flash chips, etc.<br />
<br />
The kind of storage devices the bootrom tries to find a bootloader on, and the order in which it tries them can often be configured by hardware and/or software.<br />
<br />
==== Bootloaders and their limitations ====<br />
===== u-boot =====<br />
u-boot supports the ext2, ext4, and ext4 filesystem, however, at the time of writing, the versions used in Parabola doesn't support all 'extensions' of the ext4 filesystem.<br />
<br />
If you use unsupported extensions you would usually be able to list the filesystem content with ext4ls or similar commands, but you usually won't be able to read some files. When this is the case u-boot will output some errors at boot and booting will fail.<br />
<br />
To make sure it doesn't happen, you can format the ext4 filesystem your kernel and initramfs resides on like that:<br />
mkfs.ext4 -F -O ^metadata_csum,^64bit /dev/CARD1<br />
<br />
In the commands above and below, replace /dev/CARD1 by the path of the SD-card, which could be /dev/mmcblk0 if you use a 'native' SD reader, or /dev/sdb1 for instance if you have an 'usb mass storage' SD reader. <br />
<br />
To see which extensions you have, you can use the following command:<br />
tune2fs -l /dev/CARD1<br />
<br />
TODO: Check the commands below to remove unnecessary fsck<br />
<br />
Ext4 filesystems can also be converted to remove metadata_csum like that:<br />
fsck.ext4 -C 0 -f /dev/CARD1<br />
tune2fs -O ^metadata_csum /dev/CARD1<br />
fsck.ext4 -C 0 -f /dev/CARD1<br />
And for removing 64bit:<br />
fsck.ext4 -C 0 -f /dev/CARD1<br />
resize2fs -s /dev/CARD1<br />
fsck.ext4 -C 0 -f /dev/CARD1<br />
<br />
=== Device-specific informations ===<br />
==== GTA04 A3 ====<br />
Parabola then boots and you are supposed to see the boot log on the serial console.<br />
At the time of writing the kernel lacks the GTA04 display driver, this is [https://labs.parabola.nu/issues/857 bug #587]<br />
<br />
==== BeagleBone Black ====<br />
Scripts for installing Parabola on the internal 4GB EMMC can be found at the [https://notabug.org/isengaara/knochenreiter knochenreiter] repository.<br />
<br />
The BeagleBone Black can also be bought with Parabola already install on it at [https://shop.phreedom2600.net/ Phreedom2600].<br />
<br />
==== Asus Chromebook C201 with Libreboot ====<br />
<br />
See [https://www.parabola.nu/news/parabola-officially-supports-librebooted-asus-chromebook-c201/ This news] for more details<br />
<br />
==== TBS2910 Matrix ARM mini PC ====<br />
<br />
See [https://libreplanet.org/wiki/Group:Hardware/research/sbc/TBS2910_Matrix_ARM_mini_PC The Libreplanet research article] for more details on booting.<br />
<br />
=== Releases tarballs ===<br />
Download and verify the [https://wiki.parabola.nu/Get_Parabola#Parabola_GNU.2FLinux-libre_release_tarballs_for_armv7h_architecture official Release tarball]<br />
<br />
* The release tarballs are signed and it is highly recommend to verify their signature before use. On Parabola GNU/Linux-libre, this can be done by using {{ic|pacman-key -v <tarball-file>.sig}}. On other systems: {{ic|gpg --verify <tarball-file>.sig}}. You may have to import the key from a keyserver with {{ic|gpg --recv-keys <0x key ID>}}.<br />
* Checksums are also provided in the accompanying {{ic|SHA512SUMS}} and {{ic|WHIRLPOOLSUMS}} files. They can be verified with: {{ic|sha512sum -c SHA512SUMS}} and {{ic|whirlpool-hash -c WHIRLPOOLSUMS}}.<br />
<br />
=== Partition disks ===<br />
<br />
See [[partitioning]] for details.<br />
<br />
Remember to create any stacked block devices like [[LVM]], [[dm-crypt|LUKS]], or [[RAID|RAID]].<br />
<br />
If you use such stacked block devices, remember to generate an initramfs and configure the bootloader to use it.<br />
<br />
==== Asus Chromebook C201 partitioning requirements ====<br />
<br />
* the emmc / micro sd / usb drive must be GPT<br />
* make the first partition large enough to fit the kernel. 32M is ok.<br />
* set the typecode for this partition to 66 (ChromeOS kernel)<br />
* some attribute bits for this partition must be set for it to boot. you can do this with fdisk, gdisk, parted, sfdisk, or sgdisk. here is one way:<br />
<br />
# sgdisk -A 1:set:48 -A 1:set:56 /dev/sdX<br />
<br />
you can read more about these bits on the [https://www.chromium.org/chromium-os/chromiumos-design-docs/disk-format#TOC-Selecting-the-kernel chromium-os wiki ]<br />
<br />
=== Format the partitions ===<br />
<br />
See [[File systems]] for details.<br />
<br />
You will most likely need to use a filesystem supported by your bootloader, without using any features it does not support, for the files in /boot.<br />
<br />
Some System on a chip may also require the bootloader to reside on a specific partition.<br />
<br />
=== Mount the partitions ===<br />
<br />
We now must mount the root partition on {{ic|/mnt}}. You should also create directories for and mount any other partitions ({{ic|/mnt/boot}}, {{ic|/mnt/home}}, ...) and mount your [[a:Swap|swap]] partition if you want them to be detected by {{ic|genfstab}}.<br />
<br />
=== Enable executing arm code on x86 ===<br />
<br />
If you are installing from an x86 computer, you will need to enable running non-x86 binaries transparently. This can be done by telling the Linux kernel to use automatically qemu to do that.<br />
<br />
If the computer you use to do the installation already runs Parabola, you can do it with:<br />
# pacman -S qemu-user-static-binfmt<br />
# systemctl start systemd-binfmt.service<br />
<br />
You will then need to copy qemu-arm-static to the target rootfs.<br />
If the target rootfs is mounted in /mnt, you will then need to do that:<br />
# mkdir -p /mnt/usr/bin/<br />
# cp /usr/bin/qemu-arm-static /mnt/usr/bin/<br />
<br />
The [[Building_armv7h_packages_on_a_x86_system]] page also have more background information on that.<br />
<br />
Once this is done, you will be able to use as chroot, arch-chroot, and pacstrap transparently.<br />
<br />
=== rootfs installation ===<br />
You can either install the rootfs:<br />
* from the released tarball<br />
* directly with pacstrap<br />
<br />
==== From the released tarball ====<br />
<br />
After mounting the filesystem in /mnt, extract Parabola in the rootfs partition:<br />
$ sudo tar xpf parabola-systemd-cli-armv7h-tarball-YYYY-MM-DD.tar.gz -C /mnt/ --numeric-owner<br />
<br />
Here --numeric-owner is used to make sure that everything is still fine if user and group ids differs between the tarball and the computer you're using to run the tar command above. This also enables you to run that command from another GNU/Linux distribution than Parabola (like Trisquel for instance).<br />
<br />
==== With pacstrap ====<br />
First we need to install arch-install-scripts to be able to use the {{ic|pacstrap}} command<br />
pacman -S --needed arch-install-scripts<br />
<br />
Before installing, you may want to edit {{ic|/etc/pacman.d/mirrorlist}} such that your preferred mirror is first. This copy of the mirrorlist will be installed on your new system by {{ic|pacstrap}} as well, so it's worth getting it right.<br />
<br />
Import, trust and install the archlinuxarm keyring. When possible, Parabola leverages free packages that originally came from Arch ARM.<br />
<br />
# pacman -S --needed archlinuxarm-keyring<br />
<br />
Install the base system using {{ic|pacstrap}}:<br />
# mkdir -p /mnt/usr/bin<br />
# cp /usr/bin/qemu-arm-static /mnt/usr/bin<br />
# pacstrap -C /usr/share/pacman/defaults/pacman.conf.armv7h /mnt/ base<br />
<br />
You can install additional packages passing {{ic|base}} and the names of these packages as arguments after the root directory of the new installation (all packages from the {{ic|base}} group are installed if no package is specified).<br />
<br />
{{Note|<br />
To use [[OpenRC]] instead of systemd, run the following command (instead of {{ic|# pacstrap /mnt}}):<br />
# pacstrap -C /usr/share/pacman/defaults/pacman.conf.armv7h /mnt base-openrc<br />
{{warning|Some of the installation steps, such as setting the hostname and keymap, will be different. Please refer to the [[OpenRC]] page.}}<br />
}}<br />
<br />
If you have a btrfs root, you probably want to install also {{ic|btrfs-progs}}.<br />
<br />
{{Note|<br />
If you face GPG errors when running {{ic|# pacstrap /mnt}}, you can try to fix them with:<br />
# pacman -Sfy archlinux-keyring<br />
}}<br />
<br />
Generate an [[fstab]] with the following command (if you prefer to use UUIDs or labels, add the {{ic|-U}} or {{ic|-L}} option, respectively):<br />
# genfstab -p /mnt >> /mnt/etc/fstab<br />
Next we [[Change Root|chroot]] into our newly installed system:<br />
# arch-chroot /mnt<br />
<br />
=== Configure the system ===<br />
<br />
* Write your hostname to {{ic|/etc/hostname}}<br />
* Symlink {{ic|/etc/localtime}} to {{ic|/usr/share/zoneinfo/Zone/SubZone}}. Replace {{ic|Zone}} and {{ic|Subzone}} to your liking. For example:<br />
<br />
# ln -s /usr/share/zoneinfo/Europe/Athens /etc/localtime<br />
<br />
* Set [[Locale#Setting system-wide locale|locale]] preferences in {{ic|/etc/locale.conf}}<br />
* Add [[KEYMAP|console keymap and font]] preferences in {{ic|/etc/vconsole.conf}}<br />
* Uncomment the selected locale in {{ic|/etc/locale.gen}} and generate it with {{ic|locale-gen}}<br />
* Configure {{ic|/etc/mkinitcpio.conf}} as needed (see [[mkinitcpio]]) and create an initial RAM disk with:<br />
<br />
# mkinitcpio -p linux-libre<br />
<br />
* Configure the network. See [[a:Network configuration]] and [[Wireless Setup]].<br />
<br />
Add your user to the relevant [[Users and groups|group]] such as:<br />
<br />
# gpasswd -a YourActualUserName video<br />
<br />
{{Note | You can visit [[Beginners' Guide#Chroot and configure the base system]] to learn about further configuration options.}}<br />
<br />
=== Change or set the root password ===<br />
The current release tarball has a password set, so if you use it, you will need to change the root password, else you won't be able to log into the installation. This step will probably be un-necessary in future tarball releases.<br />
<br />
If you don't use the release tarball, you might also want to set a root password. <br />
<br />
Setting or changing the root password be done by running the {{ic|passwd}} command inside the chroot.<br />
<br />
=== Installing the bootloader ===<br />
==== Bootloader provided by parabola ====<br />
<br />
Parabola provides bootloaders for many devices.<br />
If parabola has one for your ARM computer, you can simply chroot and install it:<br />
# arch-chroot /mnt<br />
# pacman -S uboot4extlinux-a20-olinuxino-lime2<br />
resolving dependencies...<br />
looking for conflicting packages...<br />
<br />
Packages (1) uboot4extlinux-a20-olinuxino-lime2-2017.01-1.1<br />
<br />
Total Download Size: 0.20 MiB<br />
Total Installed Size: 0.53 MiB<br />
<br />
:: Proceed with installation? [Y/n] <br />
[...]<br />
However merely installing the package isn't sufficent to make the device boot from that bootloader. You then need to put the bootloader in a special location so it's picked up by the hardware.<br />
At the end of the package installation, you will be asked if you want to do that:<br />
A new U-Boot version needs to be flashed onto /dev/mmcblk0.<br />
Do you want to do this now? [y|N]<br />
Double check that /dev/mmcblk0 correspond to the storage device you're installing Parabola on and not the install computer storage or something else.<br />
<br />
If it matches and that you say yes, it will install it:<br />
526+1 records in<br />
526+1 records out<br />
539287 bytes (539 kB, 527 KiB) copied, 0.165519 s, 3.3 MB/s<br />
==> WARNING: Remember to set up your kernels in /boot/extlinux/extlinux.conf<br />
<br />
As the warning says, you will also need to edit /boot/extlinux/extlinux.conf to make it boot.<br />
<br />
Several bootloaders are available in Parabola.<br />
<br />
===== U-Boot4Extlinux =====<br />
<br />
{{Note|{{pkg|uboot4extlinux-am335x_bone}} is available from {{ic | [libre]}} since it's reported to work reliably on coadde's Beaglebone Black. For other uboot4extlinux packages we need more ARMv7 boards for porting and testing before moving them to {{ic | [libre]}}.}}<br />
<br />
Extlinux is one of the many spinoffs of Syslinux -- the bootloader used for live CDs and many other applications. It's not as commonly used as a bootloader for desktops and laptops, but it's perfectly capable of that and U-Boot supports it. This allows for interactive multi-boot and multiple kernels. uboot4extlinux packages are under development yet for U-Boot with Extlinux support. At the moment, we have [https://www.parabola.nu/packages/?sort=&q=uboot4extlinux some packages] for testing and debugging from {{ic | [libre-testing]}}.<br />
<br />
{{Note| 1 = If you wish to use this repo add the following lines to {{ic | /etc/pacman.conf}}:<br />
{{bc | 1 =<br />
[libre-testing]<br />
Include = /etc/pacman.d/mirrorlist}}<br />
}}<br />
<br />
===== U-Boot =====<br />
<br />
{{warning | 1 = Standalone uboot packages only work for a single kernel: {{pkg|linux-libre}}. If you use other or multiples kernels you should look for one of [[#U-Boot4Extlinux]] or [[#U-Boot4GRUB]] instead.}}<br />
<br />
Installing the [https://www.parabola.nu/packages/?q=uboot-&repo=Libre appropriate U-Boot] package will copy the bootloader to your storage device's boot sector. Manual intervention shouldn't be necessary.<br />
<br />
Once installed, you will need to run the following command to configure it:<br />
# cd /boot && ./mkscr<br />
<br />
===== U-Boot4GRUB =====<br />
<br />
uboot4grub packages are under development yet for U-Boot with GRUB support. At the moment, we have [https://www.parabola.nu/packages/?sort=&q=uboot4grub some packages] for testing and debugging from {{ic | [libre-testing]}}.<br />
<br />
{{Note| 1 = If you wish to use this repo add the following lines to {{ic | /etc/pacman.conf}}:<br />
{{bc | 1 =<br />
[libre-testing]<br />
Include = /etc/pacman.d/mirrorlist}}<br />
}}<br />
<br />
===== GRUB =====<br />
<br />
{{pkg|grub}} claims some support for ARMv7 machines with EFI support ([[GRUB#UEFI_systems]]). Parabola hackers are investigating using this.<br />
<br />
{{Note| By default {{pkg|grub}} is built for systems which have RAM at address 0x08000000. However SBC boards which we are targeting have RAM starting from different values (eg. BeagleBone and BeagleBone Black are 0x82000000) so we need to adjust GRUB_KERNEL_ARM_UBOOT_LINK_ADDR to make sure it matches U-Boot load_addr. Therefore, we are creating grub packages with specific suffix for it (eg. {{pkg | grub-am335x_bone}} for BeagleBone and BeagleBone Black)}}<br />
<br />
<br />
===== Which bootloader package to use for which device? =====<br />
<br />
Here's a list of devices with their corresponding bootloaders packages:<br />
{| class="wikitable sortable"<br />
|----<br />
! Computer(s) (vendor, product)<br />
! Bootloader(s) packages<br />
! Bootrom constraints<br />
|-<br />
| <br />
* Banana Pi<br />
|<br />
* {{pkg|uboot4extlinux-bananapi}}<br />
* {{pkg|uboot-bananapi}}<br />
|-<br />
|<br />
* BeagleBoard<br />
* BeagleBoard-xM<br />
| <br />
* {{pkg|uboot4extlinux-omap3_beagle}}<br />
|<br />
|-<br />
| <br />
* BeagleBone<br />
* BeagleBone Black<br />
| <br />
* {{pkg|uboot4extlinux-am335x_bone}}<br />
|<br />
|-<br />
| <br />
* [https://linux-sunxi.org/Olimex_A20-OLinuXino-Lime Olimex A20 OLinuXino Lime]<br />
| <br />
* {{pkg|uboot4extlinux-a20-olinuxino-lime}}<br />
|<br />
|-<br />
| <br />
* [https://linux-sunxi.org/Olimex_A20-OLinuXino-Lime2 Olimex A20 OLinuXino Lime2]<br />
| <br />
* {{pkg|uboot4extlinux-a20-olinuxino-lime2}}<br />
|<br />
|-<br />
| <br />
* [https://www.olimex.com/Products/OLinuXino/A20/A20-OLinuXino-LIME2 Olimex A20 OLinuXino Lime2 eMMC]<br />
| <br />
* {{pkg|uboot4extlinux-a20-olinuxino-lime2-emmc}}<br />
|<br />
|-<br />
|}<br />
<br />
There are many more devices supported, [https://www.parabola.nu/packages/?q=uboot a quick search in Parabola's packages] shows many more bootloaders<br />
<br />
===== Bootloader configurations =====<br />
<br />
Our kernel images use custom names (eg. /boot/vmlinuz-linux-libre-grsec) to allow for various kernels to coexist via a multi-boot bootloader like GRUB or Extlinux. You really need to verify that your bootloader is configured to look for the right kernel name.<br />
<br />
{{Note| We don't have uImage packages available in Parabola since we are adapting our kernels for GRUB and Extlinux compatibility. However, if you won't use them, we suggest you use [https://projects.parabola.nu/abslibre.git/plain/libre/mkuimage/mkuimage.sh our script] to create a new one based on the kernel that you want.}}<br />
<br />
Also remember to configure the bootloader to use an initramfs if you use any stacked block devices like [[LVM]], [[dm-crypt|LUKS]], or [[RAID|RAID]].<br />
<br />
For instance for extlinux, it can be done by adding an {{ic|initrd}} line, which would meake an entry look like that:<br />
label Parabola GNU/Linux-libre, linux-libre kernel<br />
kernel /boot/vmlinuz-linux-libre<br />
initrd /boot/initramfs-linux-libre.img<br />
append console=ttyS0,115200n8 quiet rw root=/dev/mapper/vg-rootfs<br />
fdtdir /boot/dtbs/linux-libre/<br />
<br />
==== Bootloader not provided by parabola ====<br />
===== Barebox =====<br />
* See [[Barebox]]<br />
<br />
===== Already present: Goldelico GTA04 =====<br />
The GTA04 typically has its bootloader in NAND. So there is no need to install a bootloader, however we might need to adjust the boot parameters/cmdline given to the kernel and the uboot environment to fit your partioning scheme. It is strongly advised to have a serial console working to do that as otherwise you won't be able to see why the device is not booting.<br />
Its uboot also expects an uImage in /boot/uImage. It can be created like that:<br />
# pacman -S --needed uboot-tools<br />
# cat /boot/vmlinuz-linux-libre /boot/dtbs/linux-libre/omap3-gta04a3.dtb > /tmp/zImage.dtb<br />
# mkimage -A arm -O linux -T kernel -C none -a 0x82000000 -e 0x82000000 -d /tmp/zImage.dtb /boot/uImage<br />
<br />
===== Already present: TBS2910 Matrix ARM mini PC =====<br />
There are several versions of the board.<br />
<br />
On the version that has "TBS-2910V23" written on it, the bootloader is already present in an eMMC partition.<br />
<br />
It should already be free software as it's u-boot though:<br />
* We need to find the source code. It's probably on the manufacturer website.<br />
* We might want to update it to a new version as the version that I had didn't support using syslinux config files.<br />
<br />
If you have a serial cable, you can then type the following:<br />
ums 0 mmc 2<br />
<br />
This will export the eMMC hardware partition that contain the OS (but not the bootloader).<br />
<br />
It's then possible to just repartition the eMMC and install Parabola in there.<br />
<br />
Once the Parabola rootfs is installed on the first partition, it's possible to load Parabola by creating a /uEnv.txt file with the following content:<br />
mmcroot=/dev/mmcblk2p1 rw rootwait<br />
optargs= loglevel=8 systemd.show_status=true<br />
zImage=/boot/vmlinuz-linux-libre<br />
fdt_file=/boot/dtbs/linux-libre/imx6q-tbs2910.dtb<br />
<br />
===== Already present: Asus Chromebook C201 =====<br />
<br />
=== Unmount and reboot ===<br />
<br />
If you are still in the chroot environment type {{ic|exit}} or press {{keypress|Ctrl}}+{{keypress|D}} in order to exit.<br />
Earlier we mounted the partitions under {{ic|/mnt}}. In this step we will unmount them:<br />
# umount /mnt/{boot,home,}<br />
<br />
Now you can boot the ARM computer and then login with the root account.<br />
<br />
=== Configure pacman ===<br />
<br />
Edit {{ic|/etc/pacman.conf}} and configure pacman's options, also enabling the repositories you need.<br />
<br />
See [[Pacman]] and [[Official Repositories]] for details.<br />
<br />
Also consider using [[Pacman2pacman]], a peer to peer package system, in order to reduce load on official Parabola servers.<br />
<br />
=== Update the system ===<br />
<br />
At this point you should update your system.<br />
<br />
See [[a:Pacman#Upgrading packages|Upgrading packages]] for instructions.<br />
<br />
=== Add a user ===<br />
<br />
Finally, add a normal user as described in [[a:Users and groups#User management|User management]].<br />
<br />
=== Service management ===<br />
<br />
Parabola GNU/Linux-libre uses [[a:systemd]] as init, which is a system and service manager for Linux. For maintaining your Parabola GNU/Linux-libre installation, it is a good idea to learn the basics about it. Interaction with systemd is done through the {{ic|systemctl}} command. Read [[a:systemd#Basic systemctl usage]] for more information.<br />
<br />
=== Conclusion ===<br />
<br />
Your new Parabola GNU/Linux-libre base system is now a functional GNU/Linux environment.<br />
<br />
You can now continue [[Parabola_MATE_desktop_ISO#Steps_after_basic_installation|here]].<br />
<br />
=== See also ===<br />
<br />
* [[Installation Guide|x86 Installation Guide]]<br />
* [[MIPS Installation|MIPS Installation Guide]]<br />
<br />
=== Troubleshooting ===<br />
<br />
==== Mkinitcpio ====<br />
<br />
===== WARNING: No modules were added to the image. This is probably not what you want. =====<br />
<br />
If when creating the initramfs image with {{Pkg|mkinitcpio}}, you get the message<br />
==> WARNING: No modules were added to the image. This is probably not what you want.<br />
Just ignore, you should be able to boot anyways.<br />
<br />
===== ERROR: kernel version extraction from image not supported for `armv7' architecture =====<br />
<br />
If when running mkinitcpio you get the message<br />
ERROR: kernel version extraction from image not supported for `armv7' architecture<br />
Or similar (like armv7h, armv7l, etc) edit {{ic|/bin/mkinitcpio}} and where it says {{ic|$arch}} leave it as<br />
<nowiki>if [[ $arch != @(i?86|x86_64|armv7?) ]]; then<br />
error "kernel version extraction from image not supported for \`%s' architecture" "$arch"</nowiki><br />
<br />
===== ERROR: invalid kernel specified: '/boot/vmlinuz-linux-libre' =====<br />
<br />
In this case edit {{ic|/etc/mkinitcpio.d/linux-libre-xxx.preset}} and where it says {{ic|<nowiki>ALL_kver="/boot/vmlinuz-linux-libre-xxx"</nowiki>}} change {{ic|/boot/vmlinuz-linux-libre-xxx}} with the kernel release, which should be the output of {{ic|uname -r}}, if you are using that kernel. You can see them with<br />
$ ls /lib/modules<br />
{{Note|The {{ic|xxx}} stands for the kernel special name.}}<br />
<br />
==== Iceweasel ====<br />
<br />
===== Error code: NS_ERROR_NET_INADEQUATE_SECURITY =====<br />
<br />
If some websites give you this error on Iceweasel (an probably on Icecat) with a message like:<br />
<br />
Your connection is not secure<br />
<br />
The website tried to negotiate an inadequate level of security.<br />
<br />
www.example.com uses security technology that is outdated and vulnerable to attack. An attacker could easily reveal information which you thought to be safe. The website administrator will need to fix the server first before you can visit the site.<br />
<br />
Error code: NS_ERROR_NET_INADEQUATE_SECURITY<br />
<br />
Then open a new tab and write about:config, then search {{ic|spd}} and disable {{ic|network.http.spdy.enabled}}<br />
<br />
=== Acknowledgement ===<br />
<br />
<div>This wiki article is based on the [[Installation Guide]] which is itself based on the [https://wiki.archlinux.org/ ArchWiki], with non-[https://www.gnu.org/philosophy/free-system-distribution-guidelines.html FSDG] bits that may have been removed from it.</div><br />
<br />
<br />
[[Category:Installation]]<br />
[[Category:ARM]]</div>Maihttps://wiki.parabola.nu/index.php?title=ARM_Installation_Guide&diff=22628ARM Installation Guide2020-02-06T02:12:05Z<p>Mai: /* Bootloader not provided by parabola */</p>
<hr />
<div>{{i18n|Parabola ARM installation}}<br />
<br />
{{Warning| SBCs normally run the GNU/Linux system, but that doesn't mean that all is well for software freedom on these boards. Therefore, there's no support for hardware that doesn't work without running a nonfree program, such as Raspberry Pi, ODROID (models using the Samsung Exynos SoC), Arndale, Intel Edison boards and probably others. See the [https://www.fsf.org/resources/hw/single-board-computers FSF article] for more info.}}<br />
<br />
<br />
The Installation Guide for ARM computers is intended to assist experienced GNU/Linux users in installing Parabola official tarball image. This page assumes a high-level of experience with GNU/Linux systems and utilities, especially the command line. Note that dealing with ARM computers is more complicated than common x86 computers because you will need to lean some some hardware specific knowledge.<br />
<br />
Before beginning, we recommend you view the [[a:Frequently_asked_questions| Arch Linux FAQ]], and employ the {{ic|man ''command''}} to read the [[man page]] of any command they are not familiar with. The Parabola wiki, as well as the [https://wiki.archlinux.org/ Arch Linux wiki], should be the primary source of information and your first resource during trouble-shooting.<br />
<br />
=== Warning ===<br />
{{Warning|Theses new instructions are experimental and have not been tested yet. Remove this warning and/or contact Parabola any parabola contributor to remove this warning if they worked for you.}}<br />
<br />
=== ARM devices status ===<br />
<br />
==== Freedom status ====<br />
<br />
* Many ARM computers can be used with 100% free software. This however doesn't mean that every hardware component is fully supported by free software. It's better to plan ahead and choose your hardware accordingly.<br />
<br />
* See the [https://www.fsf.org/resources/hw/single-board-computers Article on the single-board-computers at the FSF] for more details on the topic. Beware that the article on the single-board-computers at the FSF also covers devices that do not have an ARM CPU, and that are not supported by Parabola because of that.<br />
<br />
* Parabola doesn't support ARM devices that don't even boot without nonfree software. This has several advantages:<br />
** If an ARM device is supported by Parabola, we can be sure that it can boot with free software<br />
** As the boot interface between the bootloader and the distribution evolves, we can update every components of it (this installation manual, the bootloader, the distribution configuration) to work well together.<br />
<br />
* Some ARM devices have integrated nonfree bootloaders. While they could technically run Parabola, they are not supported for the reasons stated above.<br />
<br />
==== 64bit ARM ====<br />
While there are no aarch64 (ARM 64bit) version of Parabola yet, it's still possible to use Parabola on some devices that have 64bit ARM CPU.<br />
<br />
To do that you will need to use the linux-libre-aarch64 kernel with the armv7h version of Parabola.<br />
<br />
A special kernel is needed because 32bit ARM kernels dont't work as-is because:<br />
* The device tree for 64bit devices are not present in the 32bit kernel packages<br />
* Many drivers and hardware support for 64bit ARM hardware are probably be missing in the 32bit kernel configurations, so they are probably missing in the 32bit kernel packages as well.<br />
<br />
To install linux-libre-aarch64 you need to enable the following repository in /etc/pacman.conf:<br />
[kernels]<br />
Include = /etc/pacman.d/mirrorlist<br />
<br />
Then you need to install linux-libre-aarch64. That can be done with the following command<br />
pacman -Sy linux-libre-aarch64<br />
<br />
However there are still some limitations:<br />
* This can only work for devices with CPU that support 32bit mode. Some arm64 CPUs don't support that mode.<br />
* We also need to package bootloaders for aarch64 devices.<br />
<br />
At the time of writing, this is not done yet, and the aarch64 support was tested on a single board computer that had an integrated u-boot bootloader.<br />
<br />
Once the kernel was installed, the following configuration file in /boot/extlinux/extlinux.conf was used to boot the hardware:<br />
timeout 1<br />
default linux-libre-aarch64<br />
label linux-libre-aarch64<br />
kernel /boot/vmlinuz-linux-libre-aarch64<br />
append loglevel=8 systemd.show_status=false rw root=/dev/mmcblk0p1<br />
fdtdir /boot/dtbs/linux-libre-aarch64<br />
initrd /boot/initramfs-linux-libre-aarch64.img<br />
<br />
==== Linux ====<br />
You should take into account the state of the software support in upstream projects before getting ARM devices.<br />
The project that has the biggest impact on hardware support is Linux, as it is required to make your hardware work:<br />
* For allwinner there is some generic information on the topic here: https://linux-sunxi.org/Linux_mainlining_effort and more specific information on the devices pages: https://linux-sunxi.org/Table_of_Allwinner_based_boards<br />
<br />
Devices vendor typically ship an old version of the Linux kernel that is modified by them to support their hardware. The Free and Open source software communities are working actively to add support for many ARM devices in Linux.<br />
<br />
If the device you want to get is not supported upstream (and that you don't intend to add such support yourself) you should rather look for another device. If your device requires a kernel version that is way older than the one used in your GNU/Linux distribution, it is almost unusable: it will be almost impossible to use because several software will not run with older kernels. For instance you won't be able to boot your device with systemd if your kernel is too old. If the vendor kernel is not too old yet, it will become too old years later as it will not be (indefinitely) updated by the device vendor.<br />
<br />
==== Bootloaders ====<br />
Bootloaders are less a concern, as you might be able to workaround the lack of support of modern filesystems and partitions. However finding why your device does not boot can be painful, so it's strongly advised to get devices which are support in upstream Free and Open source bootloader projects.<br />
<br />
=== Know your hardware ===<br />
ARM devices can be very different, and this has implications on the way you will install Parabola.<br />
<br />
More specifically you will need to know:<br />
* From which storage device your device can boot. Most supported devices can boot from a microSD. Knowing the order in which it tries to boot on the storage devices can also be useful as it can help you understand what is going on if your device is not booting. Knowing the partitioning/filesystem boot requirements can also be handy in that case, if they are not mentioned in this installation guide. In that case it would be nice to add them in this guide.<br />
* How to get some feedback on what is going on:<br />
** Not all devices can be connected to a display, and when they can, the display is not necessarily available early at boot.<br />
** Some devices have an easily accessible serial port that can act as a display + keyboard replacement.<br />
* The state of the software support for your device:<br />
** What parts of the hardware works and what doesn't in Linux<br />
** The limitations of the bootloader (version) you are using<br />
<br />
Here are some links to such information:<br />
* For devices with an AllWinner "CPU": https://linux-sunxi.org/Table_of_Allwinner_based_boards<br />
<br />
=== Some hardware and booting background ===<br />
==== System on a chip ====<br />
In most of the ARM computers, the CPU and many peripherals are inside the same chip. This chip is called 'System On A chip' (often abreviated as SOC). Beside the CPU, it often also contains:<br />
* A GPU<br />
* A display controller<br />
* One or more USB host controllers<br />
* An USB OTG/Device controller<br />
* A SD card controller<br />
* A serial port controller<br />
* Many other periperals<br />
<br />
==== Bootrom and booting ====<br />
Most of such System on a chip have ARM code in a ROM (hardwired inside the chip) that is executed at startup.<br />
This is called a bootrom.<br />
<br />
The bootrom is responsible for doing some hardware initialization and fetching the bootloader from a storage device. Often it is also possible to load a bootloader from USB or a serial port.<br />
<br />
The bootloader then do some more (device specific) hardware initialization and loads the operating system.<br />
<br />
In practice, on most hardware, after initializing some hardware, the bootrom will try to locate the bootloader from an external storage device. The external storage device has to be supported by the bootrom. For instance in the bootrom of Allwinner System on a chip, the bootrom doesn't support booting from SATA storage devices, but supports booting from uSD/SD cards, eMMC, SPI flash chips, etc.<br />
<br />
The kind of storage devices the bootrom tries to find a bootloader on, and the order in which it tries them can often be configured by hardware and/or software.<br />
<br />
==== Bootloaders and their limitations ====<br />
===== u-boot =====<br />
u-boot supports the ext2, ext4, and ext4 filesystem, however, at the time of writing, the versions used in Parabola doesn't support all 'extensions' of the ext4 filesystem.<br />
<br />
If you use unsupported extensions you would usually be able to list the filesystem content with ext4ls or similar commands, but you usually won't be able to read some files. When this is the case u-boot will output some errors at boot and booting will fail.<br />
<br />
To make sure it doesn't happen, you can format the ext4 filesystem your kernel and initramfs resides on like that:<br />
mkfs.ext4 -F -O ^metadata_csum,^64bit /dev/CARD1<br />
<br />
In the commands above and below, replace /dev/CARD1 by the path of the SD-card, which could be /dev/mmcblk0 if you use a 'native' SD reader, or /dev/sdb1 for instance if you have an 'usb mass storage' SD reader. <br />
<br />
To see which extensions you have, you can use the following command:<br />
tune2fs -l /dev/CARD1<br />
<br />
TODO: Check the commands below to remove unnecessary fsck<br />
<br />
Ext4 filesystems can also be converted to remove metadata_csum like that:<br />
fsck.ext4 -C 0 -f /dev/CARD1<br />
tune2fs -O ^metadata_csum /dev/CARD1<br />
fsck.ext4 -C 0 -f /dev/CARD1<br />
And for removing 64bit:<br />
fsck.ext4 -C 0 -f /dev/CARD1<br />
resize2fs -s /dev/CARD1<br />
fsck.ext4 -C 0 -f /dev/CARD1<br />
<br />
=== Device-specific informations ===<br />
==== GTA04 A3 ====<br />
Parabola then boots and you are supposed to see the boot log on the serial console.<br />
At the time of writing the kernel lacks the GTA04 display driver, this is [https://labs.parabola.nu/issues/857 bug #587]<br />
<br />
==== BeagleBone Black ====<br />
Scripts for installing Parabola on the internal 4GB EMMC can be found at the [https://notabug.org/isengaara/knochenreiter knochenreiter] repository.<br />
<br />
The BeagleBone Black can also be bought with Parabola already install on it at [https://shop.phreedom2600.net/ Phreedom2600].<br />
<br />
==== Asus Chromebook C201 with Libreboot ====<br />
<br />
See [https://www.parabola.nu/news/parabola-officially-supports-librebooted-asus-chromebook-c201/ This news] for more details<br />
<br />
==== TBS2910 Matrix ARM mini PC ====<br />
<br />
See [https://libreplanet.org/wiki/Group:Hardware/research/sbc/TBS2910_Matrix_ARM_mini_PC The Libreplanet research article] for more details on booting.<br />
<br />
=== Releases tarballs ===<br />
Download and verify the [https://wiki.parabola.nu/Get_Parabola#Parabola_GNU.2FLinux-libre_release_tarballs_for_armv7h_architecture official Release tarball]<br />
<br />
* The release tarballs are signed and it is highly recommend to verify their signature before use. On Parabola GNU/Linux-libre, this can be done by using {{ic|pacman-key -v <tarball-file>.sig}}. On other systems: {{ic|gpg --verify <tarball-file>.sig}}. You may have to import the key from a keyserver with {{ic|gpg --recv-keys <0x key ID>}}.<br />
* Checksums are also provided in the accompanying {{ic|SHA512SUMS}} and {{ic|WHIRLPOOLSUMS}} files. They can be verified with: {{ic|sha512sum -c SHA512SUMS}} and {{ic|whirlpool-hash -c WHIRLPOOLSUMS}}.<br />
<br />
=== Partition disks ===<br />
<br />
See [[partitioning]] for details.<br />
<br />
Remember to create any stacked block devices like [[LVM]], [[dm-crypt|LUKS]], or [[RAID|RAID]].<br />
<br />
If you use such stacked block devices, remember to generate an initramfs and configure the bootloader to use it.<br />
<br />
==== Asus Chromebook C201 partitioning requirements ====<br />
<br />
* the emmc / micro sd / usb drive must be GPT<br />
* make the first partition large enough to fit the kernel. 32M is ok.<br />
* set the typecode for this partition to 66 (ChromeOS kernel)<br />
* some attribute bits for this partition must be set for it to boot. you can do this with fdisk, gdisk, parted, sfdisk, or sgdisk. here is one way:<br />
<br />
# sgdisk -A 1:set:48 -A 1:set:56 /dev/sdX<br />
<br />
you can read more about these bits on the [https://www.chromium.org/chromium-os/chromiumos-design-docs/disk-format#TOC-Selecting-the-kernel chromium-os wiki ]<br />
<br />
=== Format the partitions ===<br />
<br />
See [[File systems]] for details.<br />
<br />
You will most likely need to use a filesystem supported by your bootloader, without using any features it does not support, for the files in /boot.<br />
<br />
Some System on a chip may also require the bootloader to reside on a specific partition.<br />
<br />
=== Mount the partitions ===<br />
<br />
We now must mount the root partition on {{ic|/mnt}}. You should also create directories for and mount any other partitions ({{ic|/mnt/boot}}, {{ic|/mnt/home}}, ...) and mount your [[a:Swap|swap]] partition if you want them to be detected by {{ic|genfstab}}.<br />
<br />
=== Enable executing arm code on x86 ===<br />
<br />
If you are installing from an x86 computer, you will need to enable running non-x86 binaries transparently. This can be done by telling the Linux kernel to use automatically qemu to do that.<br />
<br />
If the computer you use to do the installation already runs Parabola, you can do it with:<br />
# pacman -S qemu-user-static-binfmt<br />
# systemctl start systemd-binfmt.service<br />
<br />
You will then need to copy qemu-arm-static to the target rootfs.<br />
If the target rootfs is mounted in /mnt, you will then need to do that:<br />
# mkdir -p /mnt/usr/bin/<br />
# cp /usr/bin/qemu-arm-static /mnt/usr/bin/<br />
<br />
The [[Building_armv7h_packages_on_a_x86_system]] page also have more background information on that.<br />
<br />
Once this is done, you will be able to use as chroot, arch-chroot, and pacstrap transparently.<br />
<br />
=== rootfs installation ===<br />
You can either install the rootfs:<br />
* from the released tarball<br />
* directly with pacstrap<br />
<br />
==== From the released tarball ====<br />
<br />
After mounting the filesystem in /mnt, extract Parabola in the rootfs partition:<br />
$ sudo tar xpf parabola-systemd-cli-armv7h-tarball-YYYY-MM-DD.tar.gz -C /mnt/ --numeric-owner<br />
<br />
Here --numeric-owner is used to make sure that everything is still fine if user and group ids differs between the tarball and the computer you're using to run the tar command above. This also enables you to run that command from another GNU/Linux distribution than Parabola (like Trisquel for instance).<br />
<br />
==== With pacstrap ====<br />
First we need to install arch-install-scripts to be able to use the {{ic|pacstrap}} command<br />
pacman -S --needed arch-install-scripts<br />
<br />
Before installing, you may want to edit {{ic|/etc/pacman.d/mirrorlist}} such that your preferred mirror is first. This copy of the mirrorlist will be installed on your new system by {{ic|pacstrap}} as well, so it's worth getting it right.<br />
<br />
Import, trust and install the archlinuxarm keyring. When possible, Parabola leverages free packages that originally came from Arch ARM.<br />
<br />
# pacman -S --needed archlinuxarm-keyring<br />
<br />
Install the base system using {{ic|pacstrap}}:<br />
# mkdir -p /mnt/usr/bin<br />
# cp /usr/bin/qemu-arm-static /mnt/usr/bin<br />
# pacstrap -C /usr/share/pacman/defaults/pacman.conf.armv7h /mnt/ base<br />
<br />
You can install additional packages passing {{ic|base}} and the names of these packages as arguments after the root directory of the new installation (all packages from the {{ic|base}} group are installed if no package is specified).<br />
<br />
{{Note|<br />
To use [[OpenRC]] instead of systemd, run the following command (instead of {{ic|# pacstrap /mnt}}):<br />
# pacstrap -C /usr/share/pacman/defaults/pacman.conf.armv7h /mnt base-openrc<br />
{{warning|Some of the installation steps, such as setting the hostname and keymap, will be different. Please refer to the [[OpenRC]] page.}}<br />
}}<br />
<br />
If you have a btrfs root, you probably want to install also {{ic|btrfs-progs}}.<br />
<br />
{{Note|<br />
If you face GPG errors when running {{ic|# pacstrap /mnt}}, you can try to fix them with:<br />
# pacman -Sfy archlinux-keyring<br />
}}<br />
<br />
Generate an [[fstab]] with the following command (if you prefer to use UUIDs or labels, add the {{ic|-U}} or {{ic|-L}} option, respectively):<br />
# genfstab -p /mnt >> /mnt/etc/fstab<br />
Next we [[Change Root|chroot]] into our newly installed system:<br />
# arch-chroot /mnt<br />
<br />
=== Configure the system ===<br />
<br />
* Write your hostname to {{ic|/etc/hostname}}<br />
* Symlink {{ic|/etc/localtime}} to {{ic|/usr/share/zoneinfo/Zone/SubZone}}. Replace {{ic|Zone}} and {{ic|Subzone}} to your liking. For example:<br />
<br />
# ln -s /usr/share/zoneinfo/Europe/Athens /etc/localtime<br />
<br />
* Set [[Locale#Setting system-wide locale|locale]] preferences in {{ic|/etc/locale.conf}}<br />
* Add [[KEYMAP|console keymap and font]] preferences in {{ic|/etc/vconsole.conf}}<br />
* Uncomment the selected locale in {{ic|/etc/locale.gen}} and generate it with {{ic|locale-gen}}<br />
* Configure {{ic|/etc/mkinitcpio.conf}} as needed (see [[mkinitcpio]]) and create an initial RAM disk with:<br />
<br />
# mkinitcpio -p linux-libre<br />
<br />
* Configure the network. See [[a:Network configuration]] and [[Wireless Setup]].<br />
<br />
Add your user to the relevant [[Users and groups|group]] such as:<br />
<br />
# gpasswd -a YourActualUserName video<br />
<br />
{{Note | You can visit [[Beginners' Guide#Chroot and configure the base system]] to learn about further configuration options.}}<br />
<br />
=== Change or set the root password ===<br />
The current release tarball has a password set, so if you use it, you will need to change the root password, else you won't be able to log into the installation. This step will probably be un-necessary in future tarball releases.<br />
<br />
If you don't use the release tarball, you might also want to set a root password. <br />
<br />
Setting or changing the root password be done by running the {{ic|passwd}} command inside the chroot.<br />
<br />
=== Installing the bootloader ===<br />
==== Bootloader provided by parabola ====<br />
<br />
Parabola provides bootloaders for many devices.<br />
If parabola has one for your ARM computer, you can simply chroot and install it:<br />
# arch-chroot /mnt<br />
# pacman -S uboot4extlinux-a20-olinuxino-lime2<br />
resolving dependencies...<br />
looking for conflicting packages...<br />
<br />
Packages (1) uboot4extlinux-a20-olinuxino-lime2-2017.01-1.1<br />
<br />
Total Download Size: 0.20 MiB<br />
Total Installed Size: 0.53 MiB<br />
<br />
:: Proceed with installation? [Y/n] <br />
[...]<br />
However merely installing the package isn't sufficent to make the device boot from that bootloader. You then need to put the bootloader in a special location so it's picked up by the hardware.<br />
At the end of the package installation, you will be asked if you want to do that:<br />
A new U-Boot version needs to be flashed onto /dev/mmcblk0.<br />
Do you want to do this now? [y|N]<br />
Double check that /dev/mmcblk0 correspond to the storage device you're installing Parabola on and not the install computer storage or something else.<br />
<br />
If it matches and that you say yes, it will install it:<br />
526+1 records in<br />
526+1 records out<br />
539287 bytes (539 kB, 527 KiB) copied, 0.165519 s, 3.3 MB/s<br />
==> WARNING: Remember to set up your kernels in /boot/extlinux/extlinux.conf<br />
<br />
As the warning says, you will also need to edit /boot/extlinux/extlinux.conf to make it boot.<br />
<br />
Several bootloaders are available in Parabola.<br />
<br />
===== U-Boot4Extlinux =====<br />
<br />
{{Note|{{pkg|uboot4extlinux-am335x_bone}} is available from {{ic | [libre]}} since it's reported to work reliably on coadde's Beaglebone Black. For other uboot4extlinux packages we need more ARMv7 boards for porting and testing before moving them to {{ic | [libre]}}.}}<br />
<br />
Extlinux is one of the many spinoffs of Syslinux -- the bootloader used for live CDs and many other applications. It's not as commonly used as a bootloader for desktops and laptops, but it's perfectly capable of that and U-Boot supports it. This allows for interactive multi-boot and multiple kernels. uboot4extlinux packages are under development yet for U-Boot with Extlinux support. At the moment, we have [https://www.parabola.nu/packages/?sort=&q=uboot4extlinux some packages] for testing and debugging from {{ic | [libre-testing]}}.<br />
<br />
{{Note| 1 = If you wish to use this repo add the following lines to {{ic | /etc/pacman.conf}}:<br />
{{bc | 1 =<br />
[libre-testing]<br />
Include = /etc/pacman.d/mirrorlist}}<br />
}}<br />
<br />
===== U-Boot =====<br />
<br />
{{warning | 1 = Standalone uboot packages only work for a single kernel: {{pkg|linux-libre}}. If you use other or multiples kernels you should look for one of [[#U-Boot4Extlinux]] or [[#U-Boot4GRUB]] instead.}}<br />
<br />
Installing the [https://www.parabola.nu/packages/?q=uboot-&repo=Libre appropriate U-Boot] package will copy the bootloader to your storage device's boot sector. Manual intervention shouldn't be necessary.<br />
<br />
Once installed, you will need to run the following command to configure it:<br />
# cd /boot && ./mkscr<br />
<br />
===== U-Boot4GRUB =====<br />
<br />
uboot4grub packages are under development yet for U-Boot with GRUB support. At the moment, we have [https://www.parabola.nu/packages/?sort=&q=uboot4grub some packages] for testing and debugging from {{ic | [libre-testing]}}.<br />
<br />
{{Note| 1 = If you wish to use this repo add the following lines to {{ic | /etc/pacman.conf}}:<br />
{{bc | 1 =<br />
[libre-testing]<br />
Include = /etc/pacman.d/mirrorlist}}<br />
}}<br />
<br />
===== GRUB =====<br />
<br />
{{pkg|grub}} claims some support for ARMv7 machines with EFI support ([[GRUB#UEFI_systems]]). Parabola hackers are investigating using this.<br />
<br />
{{Note| By default {{pkg|grub}} is built for systems which have RAM at address 0x08000000. However SBC boards which we are targeting have RAM starting from different values (eg. BeagleBone and BeagleBone Black are 0x82000000) so we need to adjust GRUB_KERNEL_ARM_UBOOT_LINK_ADDR to make sure it matches U-Boot load_addr. Therefore, we are creating grub packages with specific suffix for it (eg. {{pkg | grub-am335x_bone}} for BeagleBone and BeagleBone Black)}}<br />
<br />
<br />
===== Which bootloader package to use for which device? =====<br />
<br />
Here's a list of devices with their corresponding bootloaders packages:<br />
{| class="wikitable sortable"<br />
|----<br />
! Computer(s) (vendor, product)<br />
! Bootloader(s) packages<br />
! Bootrom constraints<br />
|-<br />
| <br />
* Banana Pi<br />
|<br />
* {{pkg|uboot4extlinux-bananapi}}<br />
* {{pkg|uboot-bananapi}}<br />
|-<br />
|<br />
* BeagleBoard<br />
* BeagleBoard-xM<br />
| <br />
* {{pkg|uboot4extlinux-omap3_beagle}}<br />
|<br />
|-<br />
| <br />
* BeagleBone<br />
* BeagleBone Black<br />
| <br />
* {{pkg|uboot4extlinux-am335x_bone}}<br />
|<br />
|-<br />
| <br />
* [https://linux-sunxi.org/Olimex_A20-OLinuXino-Lime Olimex A20 OLinuXino Lime]<br />
| <br />
* {{pkg|uboot4extlinux-a20-olinuxino-lime}}<br />
|<br />
|-<br />
| <br />
* [https://linux-sunxi.org/Olimex_A20-OLinuXino-Lime2 Olimex A20 OLinuXino Lime2]<br />
| <br />
* {{pkg|uboot4extlinux-a20-olinuxino-lime2}}<br />
|<br />
|-<br />
| <br />
* [https://www.olimex.com/Products/OLinuXino/A20/A20-OLinuXino-LIME2 Olimex A20 OLinuXino Lime2 eMMC]<br />
| <br />
* {{pkg|uboot4extlinux-a20-olinuxino-lime2-emmc}}<br />
|<br />
|-<br />
|}<br />
<br />
There are many more devices supported, [https://www.parabola.nu/packages/?q=uboot a quick search in Parabola's packages] shows many more bootloaders<br />
<br />
===== Bootloader configurations =====<br />
<br />
Our kernel images use custom names (eg. /boot/vmlinuz-linux-libre-grsec) to allow for various kernels to coexist via a multi-boot bootloader like GRUB or Extlinux. You really need to verify that your bootloader is configured to look for the right kernel name.<br />
<br />
{{Note| We don't have uImage packages available in Parabola since we are adapting our kernels for GRUB and Extlinux compatibility. However, if you won't use them, we suggest you use [https://projects.parabola.nu/abslibre.git/plain/libre/mkuimage/mkuimage.sh our script] to create a new one based on the kernel that you want.}}<br />
<br />
Also remember to configure the bootloader to use an initramfs if you use any stacked block devices like [[LVM]], [[dm-crypt|LUKS]], or [[RAID|RAID]].<br />
<br />
For instance for extlinux, it can be done by adding an {{ic|initrd}} line, which would meake an entry look like that:<br />
label Parabola GNU/Linux-libre, linux-libre kernel<br />
kernel /boot/vmlinuz-linux-libre<br />
initrd /boot/initramfs-linux-libre.img<br />
append console=ttyS0,115200n8 quiet rw root=/dev/mapper/vg-rootfs<br />
fdtdir /boot/dtbs/linux-libre/<br />
<br />
==== Bootloader not provided by parabola ====<br />
===== Barebox =====<br />
* See [[Barebox]]<br />
<br />
===== Already present: Goldelico GTA04 =====<br />
The GTA04 typically has its bootloader in NAND. So there is no need to install a bootloader, however we might need to adjust the boot parameters/cmdline given to the kernel and the uboot environment to fit your partioning scheme. It is strongly advised to have a serial console working to do that as otherwise you won't be able to see why the device is not booting.<br />
Its uboot also expects an uImage in /boot/uImage. It can be created like that:<br />
# pacman -S --needed uboot-tools<br />
# cat /boot/vmlinuz-linux-libre /boot/dtbs/linux-libre/omap3-gta04a3.dtb > /tmp/zImage.dtb<br />
# mkimage -A arm -O linux -T kernel -C none -a 0x82000000 -e 0x82000000 -d /tmp/zImage.dtb /boot/uImage<br />
<br />
===== Already present: TBS2910 Matrix ARM mini PC =====<br />
There are several versions of the board.<br />
<br />
On the version that has "TBS-2910V23" written on it, the bootloader is already present in an eMMC partition.<br />
<br />
It should already be free software as it's u-boot though:<br />
* We need to find the source code. It's probably on the manufacturer website.<br />
* We might want to update it to a new version as the version that I had didn't support using syslinux config files.<br />
<br />
If you have a serial cable, you can then type the following:<br />
ums 0 mmc 2<br />
<br />
This will export the eMMC hardware partition that contain the OS (but not the bootloader).<br />
<br />
It's then possible to just repartition the eMMC and install Parabola in there.<br />
<br />
Once the Parabola rootfs is installed on the first partition, it's possible to load Parabola by creating a /uEnv.txt file with the following content:<br />
mmcroot=/dev/mmcblk2p1 rw rootwait<br />
optargs= loglevel=8 systemd.show_status=true<br />
zImage=/boot/vmlinuz-linux-libre<br />
fdt_file=/boot/dtbs/linux-libre/imx6q-tbs2910.dtb<br />
<br />
==== Already present: Asus Chromebook C201 ====<br />
<br />
=== Unmount and reboot ===<br />
<br />
If you are still in the chroot environment type {{ic|exit}} or press {{keypress|Ctrl}}+{{keypress|D}} in order to exit.<br />
Earlier we mounted the partitions under {{ic|/mnt}}. In this step we will unmount them:<br />
# umount /mnt/{boot,home,}<br />
<br />
Now you can boot the ARM computer and then login with the root account.<br />
<br />
=== Configure pacman ===<br />
<br />
Edit {{ic|/etc/pacman.conf}} and configure pacman's options, also enabling the repositories you need.<br />
<br />
See [[Pacman]] and [[Official Repositories]] for details.<br />
<br />
Also consider using [[Pacman2pacman]], a peer to peer package system, in order to reduce load on official Parabola servers.<br />
<br />
=== Update the system ===<br />
<br />
At this point you should update your system.<br />
<br />
See [[a:Pacman#Upgrading packages|Upgrading packages]] for instructions.<br />
<br />
=== Add a user ===<br />
<br />
Finally, add a normal user as described in [[a:Users and groups#User management|User management]].<br />
<br />
=== Service management ===<br />
<br />
Parabola GNU/Linux-libre uses [[a:systemd]] as init, which is a system and service manager for Linux. For maintaining your Parabola GNU/Linux-libre installation, it is a good idea to learn the basics about it. Interaction with systemd is done through the {{ic|systemctl}} command. Read [[a:systemd#Basic systemctl usage]] for more information.<br />
<br />
=== Conclusion ===<br />
<br />
Your new Parabola GNU/Linux-libre base system is now a functional GNU/Linux environment.<br />
<br />
You can now continue [[Parabola_MATE_desktop_ISO#Steps_after_basic_installation|here]].<br />
<br />
=== See also ===<br />
<br />
* [[Installation Guide|x86 Installation Guide]]<br />
* [[MIPS Installation|MIPS Installation Guide]]<br />
<br />
=== Troubleshooting ===<br />
<br />
==== Mkinitcpio ====<br />
<br />
===== WARNING: No modules were added to the image. This is probably not what you want. =====<br />
<br />
If when creating the initramfs image with {{Pkg|mkinitcpio}}, you get the message<br />
==> WARNING: No modules were added to the image. This is probably not what you want.<br />
Just ignore, you should be able to boot anyways.<br />
<br />
===== ERROR: kernel version extraction from image not supported for `armv7' architecture =====<br />
<br />
If when running mkinitcpio you get the message<br />
ERROR: kernel version extraction from image not supported for `armv7' architecture<br />
Or similar (like armv7h, armv7l, etc) edit {{ic|/bin/mkinitcpio}} and where it says {{ic|$arch}} leave it as<br />
<nowiki>if [[ $arch != @(i?86|x86_64|armv7?) ]]; then<br />
error "kernel version extraction from image not supported for \`%s' architecture" "$arch"</nowiki><br />
<br />
===== ERROR: invalid kernel specified: '/boot/vmlinuz-linux-libre' =====<br />
<br />
In this case edit {{ic|/etc/mkinitcpio.d/linux-libre-xxx.preset}} and where it says {{ic|<nowiki>ALL_kver="/boot/vmlinuz-linux-libre-xxx"</nowiki>}} change {{ic|/boot/vmlinuz-linux-libre-xxx}} with the kernel release, which should be the output of {{ic|uname -r}}, if you are using that kernel. You can see them with<br />
$ ls /lib/modules<br />
{{Note|The {{ic|xxx}} stands for the kernel special name.}}<br />
<br />
==== Iceweasel ====<br />
<br />
===== Error code: NS_ERROR_NET_INADEQUATE_SECURITY =====<br />
<br />
If some websites give you this error on Iceweasel (an probably on Icecat) with a message like:<br />
<br />
Your connection is not secure<br />
<br />
The website tried to negotiate an inadequate level of security.<br />
<br />
www.example.com uses security technology that is outdated and vulnerable to attack. An attacker could easily reveal information which you thought to be safe. The website administrator will need to fix the server first before you can visit the site.<br />
<br />
Error code: NS_ERROR_NET_INADEQUATE_SECURITY<br />
<br />
Then open a new tab and write about:config, then search {{ic|spd}} and disable {{ic|network.http.spdy.enabled}}<br />
<br />
=== Acknowledgement ===<br />
<br />
<div>This wiki article is based on the [[Installation Guide]] which is itself based on the [https://wiki.archlinux.org/ ArchWiki], with non-[https://www.gnu.org/philosophy/free-system-distribution-guidelines.html FSDG] bits that may have been removed from it.</div><br />
<br />
<br />
[[Category:Installation]]<br />
[[Category:ARM]]</div>Maihttps://wiki.parabola.nu/index.php?title=ARM_Installation_Guide&diff=22627ARM Installation Guide2020-02-06T01:59:32Z<p>Mai: /* Partition disks */</p>
<hr />
<div>{{i18n|Parabola ARM installation}}<br />
<br />
{{Warning| SBCs normally run the GNU/Linux system, but that doesn't mean that all is well for software freedom on these boards. Therefore, there's no support for hardware that doesn't work without running a nonfree program, such as Raspberry Pi, ODROID (models using the Samsung Exynos SoC), Arndale, Intel Edison boards and probably others. See the [https://www.fsf.org/resources/hw/single-board-computers FSF article] for more info.}}<br />
<br />
<br />
The Installation Guide for ARM computers is intended to assist experienced GNU/Linux users in installing Parabola official tarball image. This page assumes a high-level of experience with GNU/Linux systems and utilities, especially the command line. Note that dealing with ARM computers is more complicated than common x86 computers because you will need to lean some some hardware specific knowledge.<br />
<br />
Before beginning, we recommend you view the [[a:Frequently_asked_questions| Arch Linux FAQ]], and employ the {{ic|man ''command''}} to read the [[man page]] of any command they are not familiar with. The Parabola wiki, as well as the [https://wiki.archlinux.org/ Arch Linux wiki], should be the primary source of information and your first resource during trouble-shooting.<br />
<br />
=== Warning ===<br />
{{Warning|Theses new instructions are experimental and have not been tested yet. Remove this warning and/or contact Parabola any parabola contributor to remove this warning if they worked for you.}}<br />
<br />
=== ARM devices status ===<br />
<br />
==== Freedom status ====<br />
<br />
* Many ARM computers can be used with 100% free software. This however doesn't mean that every hardware component is fully supported by free software. It's better to plan ahead and choose your hardware accordingly.<br />
<br />
* See the [https://www.fsf.org/resources/hw/single-board-computers Article on the single-board-computers at the FSF] for more details on the topic. Beware that the article on the single-board-computers at the FSF also covers devices that do not have an ARM CPU, and that are not supported by Parabola because of that.<br />
<br />
* Parabola doesn't support ARM devices that don't even boot without nonfree software. This has several advantages:<br />
** If an ARM device is supported by Parabola, we can be sure that it can boot with free software<br />
** As the boot interface between the bootloader and the distribution evolves, we can update every components of it (this installation manual, the bootloader, the distribution configuration) to work well together.<br />
<br />
* Some ARM devices have integrated nonfree bootloaders. While they could technically run Parabola, they are not supported for the reasons stated above.<br />
<br />
==== 64bit ARM ====<br />
While there are no aarch64 (ARM 64bit) version of Parabola yet, it's still possible to use Parabola on some devices that have 64bit ARM CPU.<br />
<br />
To do that you will need to use the linux-libre-aarch64 kernel with the armv7h version of Parabola.<br />
<br />
A special kernel is needed because 32bit ARM kernels dont't work as-is because:<br />
* The device tree for 64bit devices are not present in the 32bit kernel packages<br />
* Many drivers and hardware support for 64bit ARM hardware are probably be missing in the 32bit kernel configurations, so they are probably missing in the 32bit kernel packages as well.<br />
<br />
To install linux-libre-aarch64 you need to enable the following repository in /etc/pacman.conf:<br />
[kernels]<br />
Include = /etc/pacman.d/mirrorlist<br />
<br />
Then you need to install linux-libre-aarch64. That can be done with the following command<br />
pacman -Sy linux-libre-aarch64<br />
<br />
However there are still some limitations:<br />
* This can only work for devices with CPU that support 32bit mode. Some arm64 CPUs don't support that mode.<br />
* We also need to package bootloaders for aarch64 devices.<br />
<br />
At the time of writing, this is not done yet, and the aarch64 support was tested on a single board computer that had an integrated u-boot bootloader.<br />
<br />
Once the kernel was installed, the following configuration file in /boot/extlinux/extlinux.conf was used to boot the hardware:<br />
timeout 1<br />
default linux-libre-aarch64<br />
label linux-libre-aarch64<br />
kernel /boot/vmlinuz-linux-libre-aarch64<br />
append loglevel=8 systemd.show_status=false rw root=/dev/mmcblk0p1<br />
fdtdir /boot/dtbs/linux-libre-aarch64<br />
initrd /boot/initramfs-linux-libre-aarch64.img<br />
<br />
==== Linux ====<br />
You should take into account the state of the software support in upstream projects before getting ARM devices.<br />
The project that has the biggest impact on hardware support is Linux, as it is required to make your hardware work:<br />
* For allwinner there is some generic information on the topic here: https://linux-sunxi.org/Linux_mainlining_effort and more specific information on the devices pages: https://linux-sunxi.org/Table_of_Allwinner_based_boards<br />
<br />
Devices vendor typically ship an old version of the Linux kernel that is modified by them to support their hardware. The Free and Open source software communities are working actively to add support for many ARM devices in Linux.<br />
<br />
If the device you want to get is not supported upstream (and that you don't intend to add such support yourself) you should rather look for another device. If your device requires a kernel version that is way older than the one used in your GNU/Linux distribution, it is almost unusable: it will be almost impossible to use because several software will not run with older kernels. For instance you won't be able to boot your device with systemd if your kernel is too old. If the vendor kernel is not too old yet, it will become too old years later as it will not be (indefinitely) updated by the device vendor.<br />
<br />
==== Bootloaders ====<br />
Bootloaders are less a concern, as you might be able to workaround the lack of support of modern filesystems and partitions. However finding why your device does not boot can be painful, so it's strongly advised to get devices which are support in upstream Free and Open source bootloader projects.<br />
<br />
=== Know your hardware ===<br />
ARM devices can be very different, and this has implications on the way you will install Parabola.<br />
<br />
More specifically you will need to know:<br />
* From which storage device your device can boot. Most supported devices can boot from a microSD. Knowing the order in which it tries to boot on the storage devices can also be useful as it can help you understand what is going on if your device is not booting. Knowing the partitioning/filesystem boot requirements can also be handy in that case, if they are not mentioned in this installation guide. In that case it would be nice to add them in this guide.<br />
* How to get some feedback on what is going on:<br />
** Not all devices can be connected to a display, and when they can, the display is not necessarily available early at boot.<br />
** Some devices have an easily accessible serial port that can act as a display + keyboard replacement.<br />
* The state of the software support for your device:<br />
** What parts of the hardware works and what doesn't in Linux<br />
** The limitations of the bootloader (version) you are using<br />
<br />
Here are some links to such information:<br />
* For devices with an AllWinner "CPU": https://linux-sunxi.org/Table_of_Allwinner_based_boards<br />
<br />
=== Some hardware and booting background ===<br />
==== System on a chip ====<br />
In most of the ARM computers, the CPU and many peripherals are inside the same chip. This chip is called 'System On A chip' (often abreviated as SOC). Beside the CPU, it often also contains:<br />
* A GPU<br />
* A display controller<br />
* One or more USB host controllers<br />
* An USB OTG/Device controller<br />
* A SD card controller<br />
* A serial port controller<br />
* Many other periperals<br />
<br />
==== Bootrom and booting ====<br />
Most of such System on a chip have ARM code in a ROM (hardwired inside the chip) that is executed at startup.<br />
This is called a bootrom.<br />
<br />
The bootrom is responsible for doing some hardware initialization and fetching the bootloader from a storage device. Often it is also possible to load a bootloader from USB or a serial port.<br />
<br />
The bootloader then do some more (device specific) hardware initialization and loads the operating system.<br />
<br />
In practice, on most hardware, after initializing some hardware, the bootrom will try to locate the bootloader from an external storage device. The external storage device has to be supported by the bootrom. For instance in the bootrom of Allwinner System on a chip, the bootrom doesn't support booting from SATA storage devices, but supports booting from uSD/SD cards, eMMC, SPI flash chips, etc.<br />
<br />
The kind of storage devices the bootrom tries to find a bootloader on, and the order in which it tries them can often be configured by hardware and/or software.<br />
<br />
==== Bootloaders and their limitations ====<br />
===== u-boot =====<br />
u-boot supports the ext2, ext4, and ext4 filesystem, however, at the time of writing, the versions used in Parabola doesn't support all 'extensions' of the ext4 filesystem.<br />
<br />
If you use unsupported extensions you would usually be able to list the filesystem content with ext4ls or similar commands, but you usually won't be able to read some files. When this is the case u-boot will output some errors at boot and booting will fail.<br />
<br />
To make sure it doesn't happen, you can format the ext4 filesystem your kernel and initramfs resides on like that:<br />
mkfs.ext4 -F -O ^metadata_csum,^64bit /dev/CARD1<br />
<br />
In the commands above and below, replace /dev/CARD1 by the path of the SD-card, which could be /dev/mmcblk0 if you use a 'native' SD reader, or /dev/sdb1 for instance if you have an 'usb mass storage' SD reader. <br />
<br />
To see which extensions you have, you can use the following command:<br />
tune2fs -l /dev/CARD1<br />
<br />
TODO: Check the commands below to remove unnecessary fsck<br />
<br />
Ext4 filesystems can also be converted to remove metadata_csum like that:<br />
fsck.ext4 -C 0 -f /dev/CARD1<br />
tune2fs -O ^metadata_csum /dev/CARD1<br />
fsck.ext4 -C 0 -f /dev/CARD1<br />
And for removing 64bit:<br />
fsck.ext4 -C 0 -f /dev/CARD1<br />
resize2fs -s /dev/CARD1<br />
fsck.ext4 -C 0 -f /dev/CARD1<br />
<br />
=== Device-specific informations ===<br />
==== GTA04 A3 ====<br />
Parabola then boots and you are supposed to see the boot log on the serial console.<br />
At the time of writing the kernel lacks the GTA04 display driver, this is [https://labs.parabola.nu/issues/857 bug #587]<br />
<br />
==== BeagleBone Black ====<br />
Scripts for installing Parabola on the internal 4GB EMMC can be found at the [https://notabug.org/isengaara/knochenreiter knochenreiter] repository.<br />
<br />
The BeagleBone Black can also be bought with Parabola already install on it at [https://shop.phreedom2600.net/ Phreedom2600].<br />
<br />
==== Asus Chromebook C201 with Libreboot ====<br />
<br />
See [https://www.parabola.nu/news/parabola-officially-supports-librebooted-asus-chromebook-c201/ This news] for more details<br />
<br />
==== TBS2910 Matrix ARM mini PC ====<br />
<br />
See [https://libreplanet.org/wiki/Group:Hardware/research/sbc/TBS2910_Matrix_ARM_mini_PC The Libreplanet research article] for more details on booting.<br />
<br />
=== Releases tarballs ===<br />
Download and verify the [https://wiki.parabola.nu/Get_Parabola#Parabola_GNU.2FLinux-libre_release_tarballs_for_armv7h_architecture official Release tarball]<br />
<br />
* The release tarballs are signed and it is highly recommend to verify their signature before use. On Parabola GNU/Linux-libre, this can be done by using {{ic|pacman-key -v <tarball-file>.sig}}. On other systems: {{ic|gpg --verify <tarball-file>.sig}}. You may have to import the key from a keyserver with {{ic|gpg --recv-keys <0x key ID>}}.<br />
* Checksums are also provided in the accompanying {{ic|SHA512SUMS}} and {{ic|WHIRLPOOLSUMS}} files. They can be verified with: {{ic|sha512sum -c SHA512SUMS}} and {{ic|whirlpool-hash -c WHIRLPOOLSUMS}}.<br />
<br />
=== Partition disks ===<br />
<br />
See [[partitioning]] for details.<br />
<br />
Remember to create any stacked block devices like [[LVM]], [[dm-crypt|LUKS]], or [[RAID|RAID]].<br />
<br />
If you use such stacked block devices, remember to generate an initramfs and configure the bootloader to use it.<br />
<br />
==== Asus Chromebook C201 partitioning requirements ====<br />
<br />
* the emmc / micro sd / usb drive must be GPT<br />
* make the first partition large enough to fit the kernel. 32M is ok.<br />
* set the typecode for this partition to 66 (ChromeOS kernel)<br />
* some attribute bits for this partition must be set for it to boot. you can do this with fdisk, gdisk, parted, sfdisk, or sgdisk. here is one way:<br />
<br />
# sgdisk -A 1:set:48 -A 1:set:56 /dev/sdX<br />
<br />
you can read more about these bits on the [https://www.chromium.org/chromium-os/chromiumos-design-docs/disk-format#TOC-Selecting-the-kernel chromium-os wiki ]<br />
<br />
=== Format the partitions ===<br />
<br />
See [[File systems]] for details.<br />
<br />
You will most likely need to use a filesystem supported by your bootloader, without using any features it does not support, for the files in /boot.<br />
<br />
Some System on a chip may also require the bootloader to reside on a specific partition.<br />
<br />
=== Mount the partitions ===<br />
<br />
We now must mount the root partition on {{ic|/mnt}}. You should also create directories for and mount any other partitions ({{ic|/mnt/boot}}, {{ic|/mnt/home}}, ...) and mount your [[a:Swap|swap]] partition if you want them to be detected by {{ic|genfstab}}.<br />
<br />
=== Enable executing arm code on x86 ===<br />
<br />
If you are installing from an x86 computer, you will need to enable running non-x86 binaries transparently. This can be done by telling the Linux kernel to use automatically qemu to do that.<br />
<br />
If the computer you use to do the installation already runs Parabola, you can do it with:<br />
# pacman -S qemu-user-static-binfmt<br />
# systemctl start systemd-binfmt.service<br />
<br />
You will then need to copy qemu-arm-static to the target rootfs.<br />
If the target rootfs is mounted in /mnt, you will then need to do that:<br />
# mkdir -p /mnt/usr/bin/<br />
# cp /usr/bin/qemu-arm-static /mnt/usr/bin/<br />
<br />
The [[Building_armv7h_packages_on_a_x86_system]] page also have more background information on that.<br />
<br />
Once this is done, you will be able to use as chroot, arch-chroot, and pacstrap transparently.<br />
<br />
=== rootfs installation ===<br />
You can either install the rootfs:<br />
* from the released tarball<br />
* directly with pacstrap<br />
<br />
==== From the released tarball ====<br />
<br />
After mounting the filesystem in /mnt, extract Parabola in the rootfs partition:<br />
$ sudo tar xpf parabola-systemd-cli-armv7h-tarball-YYYY-MM-DD.tar.gz -C /mnt/ --numeric-owner<br />
<br />
Here --numeric-owner is used to make sure that everything is still fine if user and group ids differs between the tarball and the computer you're using to run the tar command above. This also enables you to run that command from another GNU/Linux distribution than Parabola (like Trisquel for instance).<br />
<br />
==== With pacstrap ====<br />
First we need to install arch-install-scripts to be able to use the {{ic|pacstrap}} command<br />
pacman -S --needed arch-install-scripts<br />
<br />
Before installing, you may want to edit {{ic|/etc/pacman.d/mirrorlist}} such that your preferred mirror is first. This copy of the mirrorlist will be installed on your new system by {{ic|pacstrap}} as well, so it's worth getting it right.<br />
<br />
Import, trust and install the archlinuxarm keyring. When possible, Parabola leverages free packages that originally came from Arch ARM.<br />
<br />
# pacman -S --needed archlinuxarm-keyring<br />
<br />
Install the base system using {{ic|pacstrap}}:<br />
# mkdir -p /mnt/usr/bin<br />
# cp /usr/bin/qemu-arm-static /mnt/usr/bin<br />
# pacstrap -C /usr/share/pacman/defaults/pacman.conf.armv7h /mnt/ base<br />
<br />
You can install additional packages passing {{ic|base}} and the names of these packages as arguments after the root directory of the new installation (all packages from the {{ic|base}} group are installed if no package is specified).<br />
<br />
{{Note|<br />
To use [[OpenRC]] instead of systemd, run the following command (instead of {{ic|# pacstrap /mnt}}):<br />
# pacstrap -C /usr/share/pacman/defaults/pacman.conf.armv7h /mnt base-openrc<br />
{{warning|Some of the installation steps, such as setting the hostname and keymap, will be different. Please refer to the [[OpenRC]] page.}}<br />
}}<br />
<br />
If you have a btrfs root, you probably want to install also {{ic|btrfs-progs}}.<br />
<br />
{{Note|<br />
If you face GPG errors when running {{ic|# pacstrap /mnt}}, you can try to fix them with:<br />
# pacman -Sfy archlinux-keyring<br />
}}<br />
<br />
Generate an [[fstab]] with the following command (if you prefer to use UUIDs or labels, add the {{ic|-U}} or {{ic|-L}} option, respectively):<br />
# genfstab -p /mnt >> /mnt/etc/fstab<br />
Next we [[Change Root|chroot]] into our newly installed system:<br />
# arch-chroot /mnt<br />
<br />
=== Configure the system ===<br />
<br />
* Write your hostname to {{ic|/etc/hostname}}<br />
* Symlink {{ic|/etc/localtime}} to {{ic|/usr/share/zoneinfo/Zone/SubZone}}. Replace {{ic|Zone}} and {{ic|Subzone}} to your liking. For example:<br />
<br />
# ln -s /usr/share/zoneinfo/Europe/Athens /etc/localtime<br />
<br />
* Set [[Locale#Setting system-wide locale|locale]] preferences in {{ic|/etc/locale.conf}}<br />
* Add [[KEYMAP|console keymap and font]] preferences in {{ic|/etc/vconsole.conf}}<br />
* Uncomment the selected locale in {{ic|/etc/locale.gen}} and generate it with {{ic|locale-gen}}<br />
* Configure {{ic|/etc/mkinitcpio.conf}} as needed (see [[mkinitcpio]]) and create an initial RAM disk with:<br />
<br />
# mkinitcpio -p linux-libre<br />
<br />
* Configure the network. See [[a:Network configuration]] and [[Wireless Setup]].<br />
<br />
Add your user to the relevant [[Users and groups|group]] such as:<br />
<br />
# gpasswd -a YourActualUserName video<br />
<br />
{{Note | You can visit [[Beginners' Guide#Chroot and configure the base system]] to learn about further configuration options.}}<br />
<br />
=== Change or set the root password ===<br />
The current release tarball has a password set, so if you use it, you will need to change the root password, else you won't be able to log into the installation. This step will probably be un-necessary in future tarball releases.<br />
<br />
If you don't use the release tarball, you might also want to set a root password. <br />
<br />
Setting or changing the root password be done by running the {{ic|passwd}} command inside the chroot.<br />
<br />
=== Installing the bootloader ===<br />
==== Bootloader provided by parabola ====<br />
<br />
Parabola provides bootloaders for many devices.<br />
If parabola has one for your ARM computer, you can simply chroot and install it:<br />
# arch-chroot /mnt<br />
# pacman -S uboot4extlinux-a20-olinuxino-lime2<br />
resolving dependencies...<br />
looking for conflicting packages...<br />
<br />
Packages (1) uboot4extlinux-a20-olinuxino-lime2-2017.01-1.1<br />
<br />
Total Download Size: 0.20 MiB<br />
Total Installed Size: 0.53 MiB<br />
<br />
:: Proceed with installation? [Y/n] <br />
[...]<br />
However merely installing the package isn't sufficent to make the device boot from that bootloader. You then need to put the bootloader in a special location so it's picked up by the hardware.<br />
At the end of the package installation, you will be asked if you want to do that:<br />
A new U-Boot version needs to be flashed onto /dev/mmcblk0.<br />
Do you want to do this now? [y|N]<br />
Double check that /dev/mmcblk0 correspond to the storage device you're installing Parabola on and not the install computer storage or something else.<br />
<br />
If it matches and that you say yes, it will install it:<br />
526+1 records in<br />
526+1 records out<br />
539287 bytes (539 kB, 527 KiB) copied, 0.165519 s, 3.3 MB/s<br />
==> WARNING: Remember to set up your kernels in /boot/extlinux/extlinux.conf<br />
<br />
As the warning says, you will also need to edit /boot/extlinux/extlinux.conf to make it boot.<br />
<br />
Several bootloaders are available in Parabola.<br />
<br />
===== U-Boot4Extlinux =====<br />
<br />
{{Note|{{pkg|uboot4extlinux-am335x_bone}} is available from {{ic | [libre]}} since it's reported to work reliably on coadde's Beaglebone Black. For other uboot4extlinux packages we need more ARMv7 boards for porting and testing before moving them to {{ic | [libre]}}.}}<br />
<br />
Extlinux is one of the many spinoffs of Syslinux -- the bootloader used for live CDs and many other applications. It's not as commonly used as a bootloader for desktops and laptops, but it's perfectly capable of that and U-Boot supports it. This allows for interactive multi-boot and multiple kernels. uboot4extlinux packages are under development yet for U-Boot with Extlinux support. At the moment, we have [https://www.parabola.nu/packages/?sort=&q=uboot4extlinux some packages] for testing and debugging from {{ic | [libre-testing]}}.<br />
<br />
{{Note| 1 = If you wish to use this repo add the following lines to {{ic | /etc/pacman.conf}}:<br />
{{bc | 1 =<br />
[libre-testing]<br />
Include = /etc/pacman.d/mirrorlist}}<br />
}}<br />
<br />
===== U-Boot =====<br />
<br />
{{warning | 1 = Standalone uboot packages only work for a single kernel: {{pkg|linux-libre}}. If you use other or multiples kernels you should look for one of [[#U-Boot4Extlinux]] or [[#U-Boot4GRUB]] instead.}}<br />
<br />
Installing the [https://www.parabola.nu/packages/?q=uboot-&repo=Libre appropriate U-Boot] package will copy the bootloader to your storage device's boot sector. Manual intervention shouldn't be necessary.<br />
<br />
Once installed, you will need to run the following command to configure it:<br />
# cd /boot && ./mkscr<br />
<br />
===== U-Boot4GRUB =====<br />
<br />
uboot4grub packages are under development yet for U-Boot with GRUB support. At the moment, we have [https://www.parabola.nu/packages/?sort=&q=uboot4grub some packages] for testing and debugging from {{ic | [libre-testing]}}.<br />
<br />
{{Note| 1 = If you wish to use this repo add the following lines to {{ic | /etc/pacman.conf}}:<br />
{{bc | 1 =<br />
[libre-testing]<br />
Include = /etc/pacman.d/mirrorlist}}<br />
}}<br />
<br />
===== GRUB =====<br />
<br />
{{pkg|grub}} claims some support for ARMv7 machines with EFI support ([[GRUB#UEFI_systems]]). Parabola hackers are investigating using this.<br />
<br />
{{Note| By default {{pkg|grub}} is built for systems which have RAM at address 0x08000000. However SBC boards which we are targeting have RAM starting from different values (eg. BeagleBone and BeagleBone Black are 0x82000000) so we need to adjust GRUB_KERNEL_ARM_UBOOT_LINK_ADDR to make sure it matches U-Boot load_addr. Therefore, we are creating grub packages with specific suffix for it (eg. {{pkg | grub-am335x_bone}} for BeagleBone and BeagleBone Black)}}<br />
<br />
<br />
===== Which bootloader package to use for which device? =====<br />
<br />
Here's a list of devices with their corresponding bootloaders packages:<br />
{| class="wikitable sortable"<br />
|----<br />
! Computer(s) (vendor, product)<br />
! Bootloader(s) packages<br />
! Bootrom constraints<br />
|-<br />
| <br />
* Banana Pi<br />
|<br />
* {{pkg|uboot4extlinux-bananapi}}<br />
* {{pkg|uboot-bananapi}}<br />
|-<br />
|<br />
* BeagleBoard<br />
* BeagleBoard-xM<br />
| <br />
* {{pkg|uboot4extlinux-omap3_beagle}}<br />
|<br />
|-<br />
| <br />
* BeagleBone<br />
* BeagleBone Black<br />
| <br />
* {{pkg|uboot4extlinux-am335x_bone}}<br />
|<br />
|-<br />
| <br />
* [https://linux-sunxi.org/Olimex_A20-OLinuXino-Lime Olimex A20 OLinuXino Lime]<br />
| <br />
* {{pkg|uboot4extlinux-a20-olinuxino-lime}}<br />
|<br />
|-<br />
| <br />
* [https://linux-sunxi.org/Olimex_A20-OLinuXino-Lime2 Olimex A20 OLinuXino Lime2]<br />
| <br />
* {{pkg|uboot4extlinux-a20-olinuxino-lime2}}<br />
|<br />
|-<br />
| <br />
* [https://www.olimex.com/Products/OLinuXino/A20/A20-OLinuXino-LIME2 Olimex A20 OLinuXino Lime2 eMMC]<br />
| <br />
* {{pkg|uboot4extlinux-a20-olinuxino-lime2-emmc}}<br />
|<br />
|-<br />
|}<br />
<br />
There are many more devices supported, [https://www.parabola.nu/packages/?q=uboot a quick search in Parabola's packages] shows many more bootloaders<br />
<br />
===== Bootloader configurations =====<br />
<br />
Our kernel images use custom names (eg. /boot/vmlinuz-linux-libre-grsec) to allow for various kernels to coexist via a multi-boot bootloader like GRUB or Extlinux. You really need to verify that your bootloader is configured to look for the right kernel name.<br />
<br />
{{Note| We don't have uImage packages available in Parabola since we are adapting our kernels for GRUB and Extlinux compatibility. However, if you won't use them, we suggest you use [https://projects.parabola.nu/abslibre.git/plain/libre/mkuimage/mkuimage.sh our script] to create a new one based on the kernel that you want.}}<br />
<br />
Also remember to configure the bootloader to use an initramfs if you use any stacked block devices like [[LVM]], [[dm-crypt|LUKS]], or [[RAID|RAID]].<br />
<br />
For instance for extlinux, it can be done by adding an {{ic|initrd}} line, which would meake an entry look like that:<br />
label Parabola GNU/Linux-libre, linux-libre kernel<br />
kernel /boot/vmlinuz-linux-libre<br />
initrd /boot/initramfs-linux-libre.img<br />
append console=ttyS0,115200n8 quiet rw root=/dev/mapper/vg-rootfs<br />
fdtdir /boot/dtbs/linux-libre/<br />
<br />
==== Bootloader not provided by parabola ====<br />
===== Barebox =====<br />
* See [[Barebox]]<br />
<br />
===== Already present: Goldelico GTA04 =====<br />
The GTA04 typically has its bootloader in NAND. So there is no need to install a bootloader, however we might need to adjust the boot parameters/cmdline given to the kernel and the uboot environment to fit your partioning scheme. It is strongly advised to have a serial console working to do that as otherwise you won't be able to see why the device is not booting.<br />
Its uboot also expects an uImage in /boot/uImage. It can be created like that:<br />
# pacman -S --needed uboot-tools<br />
# cat /boot/vmlinuz-linux-libre /boot/dtbs/linux-libre/omap3-gta04a3.dtb > /tmp/zImage.dtb<br />
# mkimage -A arm -O linux -T kernel -C none -a 0x82000000 -e 0x82000000 -d /tmp/zImage.dtb /boot/uImage<br />
<br />
===== Already present: TBS2910 Matrix ARM mini PC =====<br />
There are several versions of the board.<br />
<br />
On the version that has "TBS-2910V23" written on it, the bootloader is already present in an eMMC partition.<br />
<br />
It should already be free software as it's u-boot though:<br />
* We need to find the source code. It's probably on the manufacturer website.<br />
* We might want to update it to a new version as the version that I had didn't support using syslinux config files.<br />
<br />
If you have a serial cable, you can then type the following:<br />
ums 0 mmc 2<br />
<br />
This will export the eMMC hardware partition that contain the OS (but not the bootloader).<br />
<br />
It's then possible to just repartition the eMMC and install Parabola in there.<br />
<br />
Once the Parabola rootfs is installed on the first partition, it's possible to load Parabola by creating a /uEnv.txt file with the following content:<br />
mmcroot=/dev/mmcblk2p1 rw rootwait<br />
optargs= loglevel=8 systemd.show_status=true<br />
zImage=/boot/vmlinuz-linux-libre<br />
fdt_file=/boot/dtbs/linux-libre/imx6q-tbs2910.dtb<br />
<br />
=== Unmount and reboot ===<br />
<br />
If you are still in the chroot environment type {{ic|exit}} or press {{keypress|Ctrl}}+{{keypress|D}} in order to exit.<br />
Earlier we mounted the partitions under {{ic|/mnt}}. In this step we will unmount them:<br />
# umount /mnt/{boot,home,}<br />
<br />
Now you can boot the ARM computer and then login with the root account.<br />
<br />
=== Configure pacman ===<br />
<br />
Edit {{ic|/etc/pacman.conf}} and configure pacman's options, also enabling the repositories you need.<br />
<br />
See [[Pacman]] and [[Official Repositories]] for details.<br />
<br />
Also consider using [[Pacman2pacman]], a peer to peer package system, in order to reduce load on official Parabola servers.<br />
<br />
=== Update the system ===<br />
<br />
At this point you should update your system.<br />
<br />
See [[a:Pacman#Upgrading packages|Upgrading packages]] for instructions.<br />
<br />
=== Add a user ===<br />
<br />
Finally, add a normal user as described in [[a:Users and groups#User management|User management]].<br />
<br />
=== Service management ===<br />
<br />
Parabola GNU/Linux-libre uses [[a:systemd]] as init, which is a system and service manager for Linux. For maintaining your Parabola GNU/Linux-libre installation, it is a good idea to learn the basics about it. Interaction with systemd is done through the {{ic|systemctl}} command. Read [[a:systemd#Basic systemctl usage]] for more information.<br />
<br />
=== Conclusion ===<br />
<br />
Your new Parabola GNU/Linux-libre base system is now a functional GNU/Linux environment.<br />
<br />
You can now continue [[Parabola_MATE_desktop_ISO#Steps_after_basic_installation|here]].<br />
<br />
=== See also ===<br />
<br />
* [[Installation Guide|x86 Installation Guide]]<br />
* [[MIPS Installation|MIPS Installation Guide]]<br />
<br />
=== Troubleshooting ===<br />
<br />
==== Mkinitcpio ====<br />
<br />
===== WARNING: No modules were added to the image. This is probably not what you want. =====<br />
<br />
If when creating the initramfs image with {{Pkg|mkinitcpio}}, you get the message<br />
==> WARNING: No modules were added to the image. This is probably not what you want.<br />
Just ignore, you should be able to boot anyways.<br />
<br />
===== ERROR: kernel version extraction from image not supported for `armv7' architecture =====<br />
<br />
If when running mkinitcpio you get the message<br />
ERROR: kernel version extraction from image not supported for `armv7' architecture<br />
Or similar (like armv7h, armv7l, etc) edit {{ic|/bin/mkinitcpio}} and where it says {{ic|$arch}} leave it as<br />
<nowiki>if [[ $arch != @(i?86|x86_64|armv7?) ]]; then<br />
error "kernel version extraction from image not supported for \`%s' architecture" "$arch"</nowiki><br />
<br />
===== ERROR: invalid kernel specified: '/boot/vmlinuz-linux-libre' =====<br />
<br />
In this case edit {{ic|/etc/mkinitcpio.d/linux-libre-xxx.preset}} and where it says {{ic|<nowiki>ALL_kver="/boot/vmlinuz-linux-libre-xxx"</nowiki>}} change {{ic|/boot/vmlinuz-linux-libre-xxx}} with the kernel release, which should be the output of {{ic|uname -r}}, if you are using that kernel. You can see them with<br />
$ ls /lib/modules<br />
{{Note|The {{ic|xxx}} stands for the kernel special name.}}<br />
<br />
==== Iceweasel ====<br />
<br />
===== Error code: NS_ERROR_NET_INADEQUATE_SECURITY =====<br />
<br />
If some websites give you this error on Iceweasel (an probably on Icecat) with a message like:<br />
<br />
Your connection is not secure<br />
<br />
The website tried to negotiate an inadequate level of security.<br />
<br />
www.example.com uses security technology that is outdated and vulnerable to attack. An attacker could easily reveal information which you thought to be safe. The website administrator will need to fix the server first before you can visit the site.<br />
<br />
Error code: NS_ERROR_NET_INADEQUATE_SECURITY<br />
<br />
Then open a new tab and write about:config, then search {{ic|spd}} and disable {{ic|network.http.spdy.enabled}}<br />
<br />
=== Acknowledgement ===<br />
<br />
<div>This wiki article is based on the [[Installation Guide]] which is itself based on the [https://wiki.archlinux.org/ ArchWiki], with non-[https://www.gnu.org/philosophy/free-system-distribution-guidelines.html FSDG] bits that may have been removed from it.</div><br />
<br />
<br />
[[Category:Installation]]<br />
[[Category:ARM]]</div>Mai