Difference between revisions of "PineNote Development"

Jump to navigation Jump to search
(→‎Side-by-side setup: Add basic instructions for partition setup)
Line 16: Line 16:


It is possible to set up a partition for mainline development without disturbing the factory Android installation. This allows updating a mainline kernel, DTB, and initramfs over Wi-Fi until WiFi or USB OTG is working in mainline Linux.
It is possible to set up a partition for mainline development without disturbing the factory Android installation. This allows updating a mainline kernel, DTB, and initramfs over Wi-Fi until WiFi or USB OTG is working in mainline Linux.
=== Without Repartitioning ===


The recommended partition for this is <tt>mmcblk0p11</tt> aka <tt>/cache</tt>. It is large and already formatted as <tt>ext4</tt>, so it is readable from U-Boot. Here are some general steps:
The recommended partition for this is <tt>mmcblk0p11</tt> aka <tt>/cache</tt>. It is large and already formatted as <tt>ext4</tt>, so it is readable from U-Boot. Here are some general steps:
Line 22: Line 24:
# Copy in your kernel and DTB, using for example <tt>scp</tt> or <tt>wget</tt> inside the chroot.
# Copy in your kernel and DTB, using for example <tt>scp</tt> or <tt>wget</tt> inside the chroot.
# Finally, create and boot an <code>extlinux.conf</code> as described below.
# Finally, create and boot an <code>extlinux.conf</code> as described below.
=== With Repartitioning ===
It is possible to shrink the <tt>userdata</tt> partition, and create a new partition at the end for use with mainline Linux. This provides much more space than <tt>cache</tt>. However, because <tt>userdata</tt> is formatted with <tt>f2fs</tt>, and that filesystem cannot be shrunk, resizing the partition requires wiping <tt>userdata</tt>.
# Back up any necessary files from userdata
# Boot to a mainline kernel from <tt>mmcblk0p11</tt>, either using that partition as rootfs (see above), or using an initramfs with repartitioning tools
# Modify the partition table with your favorite tool, e.g. <tt>fdisk</tt>, <tt>gdisk</tt>, or <tt>parted</tt>
# Reboot into <tt>fastboot</tt> and wipe <tt>userdata</tt>.
# Reboot into Android, where you can now chroot in and install your favorite distribution to the new partition.


== Using rkdeveloptool ==
== Using rkdeveloptool ==