Jump to content

Next Thing Co. CHIP (ntc-chip): Difference between revisions

From postmarketOS Wiki
Fizzo (talk | contribs)
mNo edit summary
Knuxify (talk | contribs)
m gitlab.com -> gitlab.postmarketos.org (bot edit)
 
(15 intermediate revisions by 6 users not shown)
Line 6: Line 6:
| imagecaption = Next Thing Co. CHIP
| imagecaption = Next Thing Co. CHIP
| releaseyear = 2015
| releaseyear = 2015
| originalsoftware = Debian on Linux 4.4
| originalsoftware = Debian
| originalversion = ? (Linux 4.4)
| chipset = Allwinner R8
| chipset = Allwinner R8
| cpu = 1x 1.0 GHz Cortex-A8
| cpu = 1x 1.0 GHz Cortex-A8
Line 25: Line 26:
| status_battery = <!-- Charging the battery with charging-sdl is possible -->
| status_battery = <!-- Charging the battery with charging-sdl is possible -->
| status_3d = <!-- Hardware accelerated 3D graphics (e.g. with freedreno) -->
| status_3d = <!-- Hardware accelerated 3D graphics (e.g. with freedreno) -->
| status_accel = <!-- The sensor that measures proper acceleration works -->
| status_accel = -<!-- The sensor that measures proper acceleration works -->
| status_audio = <!-- Using the device's speakers/headphone jack works -->
| status_audio = <!-- Using the device's speakers/headphone jack works -->
| status_bluetooth = <!-- It's possible to pair and use other devices via the bluetooth protocol -->
| status_bluetooth = <!-- It's possible to pair and use other devices via the bluetooth protocol -->
Line 33: Line 34:
| status_sms = -
| status_sms = -
| status_calls = -
| status_calls = -
| status = <!-- Text displayed in the "not booting" table on the Devices page , e.g "kernel compiles, doesn't boot" -->
| status = Kernel compiles and boots, u-boot needs to be packaged <!-- Text displayed in the "not booting" table on the Devices page , e.g "kernel compiles, doesn't boot" -->
| booting = yes <!-- The device is booting at all, can be yes/no *IMPORTANT* -->
| booting = no <!-- The device is booting at all, can be yes/no *IMPORTANT* -->


<!-- you can also use these lines if you need to:
<!-- you can also use these lines if you need to:
Line 55: Line 56:
<!-- This person needs to be willing to answer questions from users of this device -->
<!-- This person needs to be willing to answer questions from users of this device -->
* Symmetrist
* Symmetrist
== Status ==
At the moment it is possible to build a pmOS image using the commands explained below.
However to boot this image we need to change u-boot configuration, and unfortunately
the procedure explained below does not work on all the version of u-boot for CHIP around.
The next step is to package and compile u-boot to provide a uniform bootloader for pmOS.


== Users owning this device ==
== Users owning this device ==
Line 77: Line 86:
* Power on the CHIP
* Power on the CHIP
* Press enter during boot up to access the U-Boot console
* Press enter during boot up to access the U-Boot console
* On the console type `fastboot 0`
* On the console type <code>fastboot 0</code>


== Configure U-Boot ==
== Configure U-Boot ==
Line 84: Line 93:
To boot PostmarketOS we need to change the U-Boot configuration to support the initramfs.
To boot PostmarketOS we need to change the U-Boot configuration to support the initramfs.


From the U-boot serial console issue the following commands
From the U-boot serial console issue the following commands:
* Print the current value of the <code>bootcmd</code>, save it in case you want to restore it later.
<syntaxhighlight lang="shell-session">
<syntaxhighlight lang="shell-session">
> printenv bootcmd
</syntaxhighlight>
* Change the <code>bootcmd</code> value
<syntaxhighlight lang="shell-session">
> printenv bootcmd
> setenv bootcmd "gpio set PB2; ${bootcmd_fel}; ${boot_initrd};"
> setenv bootcmd "gpio set PB2; ${bootcmd_fel}; ${boot_initrd};"
> saveenv
> saveenv
Line 98: Line 113:
</syntaxhighlight>
</syntaxhighlight>


In `workdir/chroot_rootfs_ntc-chip` there is the rootfs for your ntc-chip
In <code>workdir/chroot_rootfs_ntc-chip</code> there is the rootfs for your ntc-chip


The following commands needs to be launched from your pmbootstrap workdir
The following commands needs to be launched from your pmbootstrap workdir
Line 106: Line 121:
</syntaxhighlight>
</syntaxhighlight>


Install mtd-utils from your distro repositories e.g. `pacman -S mtd-utils`
Install mtd-utils from your distro repositories e.g. <code>pacman -S mtd-utils</code>
* Create the UBIfs image
* Create the UBIfs image
<syntaxhighlight lang="shell-session">
<syntaxhighlight lang="shell-session">
Line 120: Line 135:
* On your computer
* On your computer
<syntaxhighlight lang="shell-session">
<syntaxhighlight lang="shell-session">
$ sudo fastboot erase UBI
$ fastboot erase UBI
$ sudo fastboot flash UBI ubi/ubi.img.sparse
$ fastboot flash UBI ubi/ubi.img.sparse
$ sudo fastboot reboot
$ fastboot reboot
</syntaxhighlight>
</syntaxhighlight>


Line 132: Line 147:
You can also add normal web links:
You can also add normal web links:
* [https://redmine.replicant.us/projects/replicant/wiki/GalaxyS2I9100 Replicant wiki page]
* [https://redmine.replicant.us/projects/replicant/wiki/GalaxyS2I9100 Replicant wiki page]
-->
-->
* [[UBIFS]]
* {{MR|1098|pmaports}} Initial merge request
* {{MR|1098|pmaports}} Initial merge request
* [https://linux-sunxi.org/NextThingCo_CHIP Sunxi wiki page]
* [https://linux-sunxi.org/NextThingCo_CHIP Sunxi wiki page]
* [https://en.wikipedia.org/wiki/CHIP_(computer) Wikipedia wiki page]
* [https://en.wikipedia.org/wiki/CHIP_(computer) Wikipedia wiki page]
* [https://github.com/Thore-Krug/Flash-CHIP Tool for flashing the CHIP]
* [https://byteporter.com/ntc-chip-micro-sd-slot/ CHIP microSD slot mod]
* [https://github.com/umiddelb/armhf/wiki/Get-more-out-of-%22Das-U-Boot%22 Good U-Boot guide]
<!--
<!--
If you manage to get your device packages merged, uncomment links below and change DEVICE_CODENAME with the actual one.
If you manage to get your device packages merged, uncomment links below and change DEVICE_CODENAME with the actual one.
* [https://gitlab.com/postmarketOS/pmaports/tree/master/device/device-DEVICE_CODENAME Device package]
* [https://gitlab.postmarketos.org/postmarketOS/pmaports/tree/master/device/device-DEVICE_CODENAME Device package]
* [https://gitlab.com/postmarketOS/pmaports/tree/master/device/linux-DEVICE_CODENAME Kernel package]
* [https://gitlab.postmarketos.org/postmarketOS/pmaports/tree/master/device/linux-DEVICE_CODENAME Kernel package]
-->
-->

Latest revision as of 13:51, 4 November 2024

This device is marked as not booting.
Status: Kernel compiles and boots, u-boot needs to be packaged
Next Thing Co. CHIP
Next Thing Co. CHIP
Next Thing Co. CHIP
Manufacturer Next Thing Co.
Name CHIP
Codename ntc-chip
Released 2015
Hardware
Chipset Allwinner R8
CPU 1x 1.0 GHz Cortex-A8
GPU Mali-400 MP1
Display Composite video
Storage 8GB MLC NAND
Memory 512 MB DDR3
Architecture armv7
Software
Original software Debian
Original version ? (Linux 4.4)
postmarketOS
Category testing
Pre-built images no


Contributors

  • Symmetrist

Maintainer(s)

  • Symmetrist

Status

At the moment it is possible to build a pmOS image using the commands explained below.

However to boot this image we need to change u-boot configuration, and unfortunately the procedure explained below does not work on all the version of u-boot for CHIP around.

The next step is to package and compile u-boot to provide a uniform bootloader for pmOS.

Users owning this device


How to enter flash mode

The CHIP has two different flashing modes:

  • FEL mode: used to flash bootloader and rootfs
  • Fastboot mode: used to flash rootfs


To enter FEL mode:

  • Connect the FEL and GND pins with a jumper cable
  • Power on the CHIP

To enter Fastboot mode:

  • Connect an serial (UART) USB adapter to UART1-TX, UART1-RX and GND
  • Power on the CHIP
  • Press enter during boot up to access the U-Boot console
  • On the console type fastboot 0

Configure U-Boot

PostmarketOS loads an initramfs together with the kernel, while original Debian installation only used the kernel.

To boot PostmarketOS we need to change the U-Boot configuration to support the initramfs.

From the U-boot serial console issue the following commands:

  • Print the current value of the bootcmd, save it in case you want to restore it later.
> printenv bootcmd
  • Change the bootcmd value
> printenv bootcmd
> setenv bootcmd "gpio set PB2; ${bootcmd_fel}; ${boot_initrd};"
> saveenv

Create the UBIfs image

  • Configure the installation and build the system
$ pmbootstrap init
$ pmbootstrap install

In workdir/chroot_rootfs_ntc-chip there is the rootfs for your ntc-chip

The following commands needs to be launched from your pmbootstrap workdir

  • Copy dtb from linux-ntc-chip
$ sudo cp cache_git/pmaports/device/testing/linux-ntc-chip/sun5i-r8-chip.dtb chroot_rootfs_ntc-chip/boot/

Install mtd-utils from your distro repositories e.g. pacman -S mtd-utils

  • Create the UBIfs image
$ mkdir ubi
$ sudo mkfs.ubifs -m 16384 -e 0x1f8000 -c 2000 -r chroot_rootfs_ntc-chip ubi/ubifs.img
$ sudo chown youruser:youruser ubi/ubifs.img
$ ubinize -o ubi/ubi.img -m 16384 -p 2MiB -s 16384 cache_git/pmaports/device/testing/device-ntc-chip/ubinize.cfg
$ img2simg ubi/ubi.img ubi/ubi.img.sparse 2097152

Flash the UBIfs image

  • Enter fastboot mode as described above
  • On your computer
$ fastboot erase UBI
$ fastboot flash UBI ubi/ubi.img.sparse
$ fastboot reboot

See also