pine64 / website

The PINE64.org community website built with Hugo
https://www.pine64.org
17 stars 36 forks source link

Ox64: NuttX instructions seem overly complicated #34

Closed Pavlos1 closed 7 months ago

Pavlos1 commented 7 months ago

This is mostly a question for @giorez .

The following works for me, no manual partitioning required:

cd ~/ox64/openbouffalo

# Write the normal Linux image to the SD card if you have not done so already.
# Substitute /dev/sdb for wherever your SD card shows up
sudo dd if=sdcard.img of=/dev/sdb bs=1M conv=fsync status=progress

# Re-read partition tables. Reinserting the SD card works too.
sudo blockdev --rereadpt /dev/sdb

# Download NuttX image
wget -O ImageNuttx https://github.com/lupyuen2/wip-pinephone-nuttx/releases/download/bl808d-1/Image

# Mount the boot partition and make required modifications
sudo mount /dev/sdb2 /mnt
sudo cp ImageNuttx /mnt/

cat <<EOF | sudo tee -a /mnt/extlinux/extlinux.conf
LABEL Pine64 0X64 Nuttx
        KERNEL ../ImageNuttx
        FDT ../bl808-pine64-ox64.dtb
        APPEND root=PARTLABEL=rootfs rootwait rw rootfstype=ext4 console=ttyS0,2000000 loglevel=8 earlycon=sbi
EOF

sudo umount /mnt

# Mount the rootfs and make the required modifications
sudo mount /dev/sdb3 /mnt
sudo cp ImageNuttx /mnt/boot/

cat <<EOF | sudo tee -a /mnt/boot/extlinux/extlinux.conf
LABEL Pine64 0X64 Nuttx
        KERNEL ../ImageNuttx
        FDT ../bl808-pine64-ox64.dtb
        APPEND root=PARTLABEL=rootfs rootwait rw rootfstype=ext4 console=ttyS0,2000000 loglevel=8 earlycon=sbi
EOF

sudo umount /mnt
giorez commented 7 months ago

it works for me too, you can pull it to the main repo. sometimes i not able to set simple commands. thanks for pointing this out