Skip to content

Lyoncore/dragonboard410c-image-builds

Repository files navigation

Dragaonbaord 410c ubuntu core image on android layout

This build script produces ubuntu core image with recovery capabilities on top of original android parition layout. Most of processes and scripts were originated from Brando project.

Prerequisite

  • a working android on dragonboard 410c

    follow this installation guide to flash android on eMMC

  • needed packages

apt-get install dosfstools snapd android-tools-fsutils android-tools-fastboot u-boot-tools
  • skales tool (avaiable on ubuntu after 17.04) if you're on 16.04, use this PPA
add-apt-repository ppa:julian-liu/skales
apt-get update
apt-get install skales

U-boot source

u-boot image is pre-built from here which were forked from hallor and appied with patch by kubiko. FAT_ENV_DEVICE_AND_PART is re-defined at 0:16 (mmc device 0 part #22).

how to build u-boot

make ARCH=arm CROSS_COMPILE=aarch64-linux-gnu- dragonboard410c_defconfig
make ARCH=arm CROSS_COMPILE=aarch64-linux-gnu- -j4

skales-mkbootimg --kernel=u-boot.bin --output=u-boot.img --dt=fake_dt --pagesize 2048 --base 0x80000000 --ramdisk=fake_ramdisk --cmdline=""ll

Build images

./dragonboard-local-build.sh

Partition layout

| Part # | Part Label     |  Will be flashed     |
|--------|:--------------:|:--------------------:|
|1       | modem          |                      |
|2       | fsc            |                      |
|3       | ssd            |                      |
|4       | sbl1           |                      |
|5       | sbl1bak        |                      |
|6       | rpm            |                      |
|7       | rpmbak         |                      |
|8       | tz             |                      |
|9       | tzbak          |                      |
|10      | hyp            |                      |
|11      | hypbak         |                      |
|12      | modemst1       |                      |
|13      | modemst2       |                      |
|14      | DDR            |                      |
|15      | fsg            |                      |
|16      | sec            |                      |
|17      | aboot          |                      |
|18      | abootbak       |                      |
|19      | boot           |   Y (u-boot.img)     |
|20      | recovery       |Y (uc kernel + initrd)|
|21      | devinfo        |                      |
|22      | system         |   Y (system-boot)    |
|23      | cache          |                      |
|24      | persist        |                      |
|25      | misc           |                      |
|26      | keystore       |                      |
|27      | config         |                      |
|28      | oem            |                      |
|29      | userdata       |   Y (writable)       |

Flash images

let dragonboard entering fastboot mode (press VOL+ while powering up)

# replace YYYYmmddHHMM to the actual generated image name
fastboot flash recovery ./dragonboard-recovery-YYYYmmddHHMM.img
fastboot flash system ./dragonboard-systemboot-YYYYmmddHHMM.img
fastboot flash userdata ./dragonboard-userdata-YYYYmmddHHMM.img
fastboot flash boot gadget/u-boot.img

Little kernel reboot modes

There are two ways to specify reboot modes in dragonbord's little kernel(decided at compile time by USE_PON_REBOOT_REG). One is internal MSM_SHARED_IMEM and the other is using reserved PON register bits in PMIC. This project assume lk is using IMEM and u-boots will modify the value in memory address at 0x0860065c to specify the reboot mode. u-boots needs to turn dcache off before modifying IMEM.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages