Skip to content

Commit 8f6a82a

Browse files
committedAug 5, 2024
Buildroot release + sample images
1 parent 740a67d commit 8f6a82a

File tree

10 files changed

+151
-32
lines changed

10 files changed

+151
-32
lines changed
 

‎BUILDING.md

+2
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ Please check the commits in the [kernel repo](https://github.com/alexcaoys/linux
55

66
My dts for superbird: `arch/arm64/boot/dts/amlogic/meson-g12a-superbird.dts`
77

8+
`make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- LOCALVERSION= Image dtbs`
9+
810
Porting from old dts to new, watch out for field changes, \
911
eg. GPIO pinctrl: pins -> groups
1012

‎README.md

+35-18
Original file line numberDiff line numberDiff line change
@@ -4,30 +4,48 @@
44

55
Anyway, if you still think this will become e-waste for you, **you can for sure support this project by sending it to me :)**
66

7-
**TRY EVERYTHING BELOW AT YOUR OWN RISK!!!**
8-
9-
**EXPERT USERS ONLY. If you don't know what you are doing, STOP**.
7+
**TRY EVERYTHING BELOW AT YOUR OWN RISK!!! If you don't know what you are doing, STOP**.
108

119
**Kernel repo**: https://github.com/alexcaoys/linux-superbird-6.6.y
1210

13-
For notes on my kernel tweaks as well as support matrix, please refer to [BUILDING.md](https://github.com/alexcaoys/notes-superbird/blob/main/BUILDING.md).
11+
For notes on my kernel tweaks as well as support matrix, please refer to [`BUILDING.md`](BUILDING.md).
1412

15-
## Release
13+
# Release
1614

17-
**[RELEASE_NOTES.md](https://github.com/alexcaoys/notes-superbird/blob/main/RELEASE_NOTES.md)**
15+
[`RELEASE_NOTES.md`](RELEASE_NOTES.md)
1816

1917
Compiled Kernel will be available on Kernel Repo [release](https://github.com/alexcaoys/linux-superbird-6.6.y/releases) section.
2018

21-
Since display is only working partially, I don't consider this as good for all users. But you are welcome to try. Hopefully we can get this fix ASAP.
19+
The only major issue now is the display refresh rate is not considered as 60Hz within the system, not sure what is the actual refresh rate though. Please refer to this [issue](https://github.com/alexcaoys/notes-superbird/issues/3) for details.
20+
21+
My Buildroot rootfs is available on this release page. But Buildroot is pretty much a customizable system so do try it out on your own. **It's amazing!**
22+
23+
# TL;DR
24+
25+
**Beaware of all the consequences and you can get started.**
26+
27+
![foot](buildroot/images/sway_foot.jpg | width=100) \
28+
![overskride](buildroot/images/overskride.jpg | width=100) \
29+
![youtube](buildroot/images/youtube.jpg | width=100)
30+
31+
## Dualboot (Just to try it out)
32+
33+
Please follow the section **Boot using stock partition table** below.
34+
35+
## Use the whole eMMC
36+
37+
1. Please follow the steps in [`PARTITIONING.md`](partitioning/PARTITIONING.md) to repartition and restore the system image.
38+
2. send `env/env_full_custom.txt` to the device. Please refer to the section **Boot using custom partition table** below for details.
39+
3. after login using `ssh`, `/root/first_login.sh` to run some additional touchups.
2240

23-
I will consider uploading my Buildroot rootfs to this release page. But Buildroot is pretty much a customizable system so do try it out on your own. **It's amazing!**
41+
Please read [`BUILDROOT.md`](buildroot/BUILDROOT.md) for additional tips/details, etc.
2442

2543
# Boot
2644

2745
- pyamlboot: https://github.com/superna9999/pyamlboot (For `pyusb` to work, [please check](https://github.com/pyusb/pyusb/issues/237))
2846
- Restore partitions using superbird-tool:
2947
- https://github.com/Car-Thing-Hax-Community/superbird-tool
30-
- https://github.com/bishopdynamics/superbird-tool ([maintainer seems MIA, not updating](https://github.com/alexcaoys/notes-superbird/issues/6))
48+
- https://github.com/bishopdynamics/superbird-tool ([maintainer seems MIA](https://github.com/alexcaoys/notes-superbird/issues/6))
3149
- kernel params: https://www.kernel.org/doc/html/v6.6/admin-guide/kernel-parameters.html
3250

3351
**In order for the display color to work properly, we need to bypass `init_display` within u-boot, you can either**
@@ -48,32 +66,31 @@ I created an Buildroot uInitrd image in case anything need an in-RAM system (rep
4866

4967
Please use `python amlogic_device.py -i ENV_FILE KERNEL_FILE INITRD_FILE DTB_FILE` to boot kernel + dtb + uInitrd from host. Please check `initrd` folder.
5068

51-
## Boot into stock partitions
69+
## Boot using stock partition table
5270

5371
set `active_slot=_b` and **clear dtbo_b partition**. Otherwise custom dtb won't be loaded.
5472

5573
1. Create empty `dtbo_b` and `boot_b` partitions by `dd` and restore to device.
5674
2. Restore new buildroot partition to `system_b`.
5775
3. Use `uboot_envs/env_b.txt` in this repo to boot. (`python amlogic_device.py -c ENV_FILE KERNEL_FILE DTB_FILE` to boot kernel + dtb from host)
5876

59-
## Boot into custom partitions
77+
## Boot using custom partition table
6078

61-
After **repartitioning** and restoring the rootfs as [`PARTITIONING.md`](https://github.com/alexcaoys/notes-superbird/blob/main/partitioning/PARTITIONING.md).
79+
After **repartitioning** and restoring the rootfs as [`PARTITIONING.md`](partitioning/PARTITIONING.md).
6280

6381
Use `uboot_envs/env_p2.txt` in this repo to boot.
6482

6583
- `python amlogic_device.py -c ENV_FILE KERNEL_FILE DTB_FILE` to boot kernel + dtb from host, **OR**
66-
- Using `fatload` to load kernel and dtb from `mmcblk2p1` and `python amlogic_device.py -m ENV_FILE` to boot. **OR**
67-
- Send `env/env_full_custom.txt` to the device. Button 4 for burn mode, Normally it will load envs from `bootargs.txt` within `mmcblk2p1` and then boot into `mmcblk2p2` using `Image` and `superbird.dtb` from `mmcblk2p1`.
84+
- Send `env/env_full_custom.txt` to the device. **Button 4 for burn mode**, Normally it will load envs from `bootargs.txt` within `mmcblk2p1` and then boot into `mmcblk2p2` using `Image` and `superbird.dtb` from `mmcblk2p1`.
6885

6986
# Partitioning
70-
[`PARTITIONING.md`](https://github.com/alexcaoys/notes-superbird/blob/main/partitioning/PARTITIONING.md)
87+
[`PARTITIONING.md`](partitioning/PARTITIONING.md)
7188

7289
# Buildroot
7390

74-
[`BUILDROOT.md`](https://github.com/alexcaoys/notes-superbird/blob/main/buildroot/BUILDROOT.md)
91+
[`BUILDROOT.md`](buildroot/BUILDROOT.md)
7592

7693
# EXTRA
7794

78-
- [u-Boot](https://github.com/alexcaoys/notes-superbird/blob/main/BUILDING.md#u-boot)
79-
- [Armbian](https://github.com/alexcaoys/notes-superbird/blob/main/BUILDING.md#armbian)
95+
- [u-Boot](BUILDING.md#u-boot)
96+
- [Armbian](BUILDING.md#armbian)

‎RELEASE_NOTES.md

+10-3
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,15 @@
22

33
## Latest
44

5+
- Buildroot: [buildroot_20240804](https://github.com/alexcaoys/notes-superbird/releases/tag/20240804)
6+
7+
First release of Buildroot. Please check `README.md` for details.
8+
9+
- Using `initrd/config_buildroot_sway_overskride`.
10+
- Based on Buildroot 2024.02.4, but there are some tweaks (Sway + Overskride).
11+
- Both `g_ether` and USB `eth` is available, please read `BUILDROOT.md` for details.
12+
- Sway key mapping, Bluetooth, Browser examples included.
13+
514
- Linux & modules: [6.6.43_20240801](https://github.com/alexcaoys/linux-superbird-6.6.y/releases/tag/6.6.43_20240801)
615

716
Using `config_linux_20240729`.
@@ -11,7 +20,7 @@
1120

1221
Working `panel-sitronix-st7701.c` config: The same as 6.6.32_20240618 below.
1322

14-
- uInitrd: [20240724](https://github.com/alexcaoys/notes-superbird/releases/tag/20240724)
23+
- uInitrd: [initrd_20240724](https://github.com/alexcaoys/notes-superbird/releases/tag/20240724)
1524

1625
Since this should contain all the features needed for **repartitioning and rescue rootfs**, in the future there won't be regular release of initrd. This release will be **all in one**, you still need to install `pyamlboot`, and then, `bash initrd.sh` should help you enter the initramfs.
1726

@@ -21,8 +30,6 @@
2130
- `g_ether` will be enabled at boot. `ssh` is available.
2231
- For partitioning only.
2332

24-
- Buildroot: W.I.P
25-
2633
## Kernel
2734

2835
- Linux: [6.6.41_20240724](https://github.com/alexcaoys/linux-superbird-6.6.y/releases/tag/6.6.41_20240724)

‎buildroot/BUILDROOT.md

+6-2
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ rootfs_overlay/
2424
│   │   └── S89bluetooth # using btattach to bring up UART Bluetooth
2525
│   ├── inittab # auto login
2626
│   ├── pulse
27+
│   │   ├── daemon.conf # define default configs for microphone
2728
│   │   └── system.pa # pulseaudio enable bluetooth for root
2829
│   ├── resolv.conf # nameserver
2930
│   └── ssh
@@ -56,8 +57,6 @@ rootfs_overlay/
5657
└── share
5758
└── overskride # gresource for overskride
5859
└── overskride.gresource
59-
60-
23 directories, 21 files
6160
```
6261

6362
## GUI Applications
@@ -66,6 +65,11 @@ rootfs_overlay/
6665
https://lore.kernel.org/buildroot/?q=package%2Fsway:+make+systemd+optional&x=t) for Buildroot. \
6766
autologin + autolaunch `sway` is included. Please check `buildroot/rootfs_overlay/root/.config/sway/config` for some handy sway setup.
6867

68+
1. Button 1 (Leftmost button) for `overskride` bluetooth settings.
69+
2. Button 2 for a Youtube embed demo (720p is doable).
70+
3. Button m (Rightmost button) for power on/off screen.
71+
4. After connect to a bluetooth keyboard, `Windows+Enter` for Terminal
72+
6973
### cog
7074
I include `cog` Browser on Buildroot. It can work on `sway`. \
7175
Standalone `cog -O renderer=gles` should also work with display & touchscreen. [Cog Docs](https://igalia.github.io/cog/platform-drm.html): not the best docs but works. For touch screen, please check [libinput transformation](https://wiki.archlinux.org/title/libinput#Via_Udev_Rule).

‎buildroot/images/overskride.jpg

78.1 KB
Loading

‎buildroot/images/sway_foot.jpg

94.9 KB
Loading

‎buildroot/images/youtube.jpg

100 KB
Loading

‎buildroot/rootfs_overlay/etc/init.d/S89bluetooth

-2
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ case "$1" in
2121
else
2222
echo "FAIL"
2323
fi
24-
return "$status"
2524
;;
2625
stop)
2726
printf 'Stopping %s: ' "$DAEMON"
@@ -34,7 +33,6 @@ case "$1" in
3433
else
3534
echo "FAIL"
3635
fi
37-
return "$status"
3836
;;
3937
restart|reload)
4038
"$0" stop
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
# This file is part of PulseAudio.
2+
#
3+
# PulseAudio is free software; you can redistribute it and/or modify
4+
# it under the terms of the GNU Lesser General Public License as published by
5+
# the Free Software Foundation; either version 2 of the License, or
6+
# (at your option) any later version.
7+
#
8+
# PulseAudio is distributed in the hope that it will be useful, but
9+
# WITHOUT ANY WARRANTY; without even the implied warranty of
10+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11+
# General Public License for more details.
12+
#
13+
# You should have received a copy of the GNU Lesser General Public License
14+
# along with PulseAudio; if not, see <http://www.gnu.org/licenses/>.
15+
16+
## Configuration file for the PulseAudio daemon. See pulse-daemon.conf(5) for
17+
## more information. Default values are commented out. Use either ; or # for
18+
## commenting.
19+
20+
; daemonize = no
21+
; fail = yes
22+
; allow-module-loading = yes
23+
; allow-exit = yes
24+
; use-pid-file = yes
25+
; system-instance = no
26+
; local-server-type = user
27+
; enable-shm = yes
28+
; enable-memfd = yes
29+
; shm-size-bytes = 0 # setting this 0 will use the system-default, usually 64 MiB
30+
; lock-memory = no
31+
; cpu-limit = no
32+
33+
; high-priority = yes
34+
; nice-level = -11
35+
36+
; realtime-scheduling = yes
37+
; realtime-priority = 5
38+
39+
; exit-idle-time = 20
40+
; scache-idle-time = 20
41+
42+
; dl-search-path = (depends on architecture)
43+
44+
; load-default-script-file = yes
45+
; default-script-file = /etc/pulse/default.pa
46+
47+
; log-target = auto
48+
; log-level = notice
49+
; log-meta = no
50+
; log-time = no
51+
; log-backtrace = 0
52+
53+
resample-method = auto
54+
; avoid-resampling = false
55+
; enable-remixing = yes
56+
; remixing-use-all-sink-channels = yes
57+
; remixing-produce-lfe = no
58+
; remixing-consume-lfe = no
59+
; lfe-crossover-freq = 0
60+
61+
; flat-volumes = no
62+
63+
; rescue-streams = yes
64+
65+
; rlimit-fsize = -1
66+
; rlimit-data = -1
67+
; rlimit-stack = -1
68+
; rlimit-core = -1
69+
; rlimit-as = -1
70+
; rlimit-rss = -1
71+
; rlimit-nproc = -1
72+
; rlimit-nofile = 256
73+
; rlimit-memlock = -1
74+
; rlimit-locks = -1
75+
; rlimit-sigpending = -1
76+
; rlimit-msgqueue = -1
77+
; rlimit-nice = 31
78+
; rlimit-rtprio = 9
79+
; rlimit-rttime = 200000
80+
81+
default-sample-format = s32le
82+
; default-sample-rate = 44100
83+
; alternate-sample-rate = 48000
84+
; default-sample-channels = 2
85+
; default-channel-map = front-left,front-right
86+
87+
; default-fragments = 4
88+
; default-fragment-size-msec = 25
89+
90+
; enable-deferred-volume = yes
91+
; deferred-volume-safety-margin-usec = 8000
92+
; deferred-volume-extra-delay-usec = 0

‎partitioning/PARTITIONING.md

+6-7
Original file line numberDiff line numberDiff line change
@@ -54,12 +54,11 @@ My backup `ampart` partitions output is in `ampart_partitions.txt`.
5454
```
5555
10. reboot into `burn_mode`.
5656
11. Restore rootfs using `python amlogic_devices.py -r 319488 rootfs.ext2`. You may also use nfs and `dd` to do it within the initrd system.
57-
12. Reboot into uInitrd, check the partitions, copy the Image, dtb and `bootargs.txt`(`uboot_envs/env_p2.txt`), which is for loading bootargs dynamically) to the boot partition.
57+
12. Reboot into uInitrd, check the partitions, copy the Image, dtb and `bootargs.txt`(`uboot_envs/env_p2.txt`), which is for loading bootargs dynamically to the boot partition.
5858
```
59-
resize2fs /dev/mmcblk2p2
60-
e2fsck /dev/mmcblk2p2
61-
mkdir /root/mntpoint
62-
mount /dev/mmcblk2p1 /root/mntpoint
63-
scp user@172.16.42.1:/home/user/Image /root/mntpoint
64-
scp user@172.16.42.1:/home/user/superbird.dtb /root/mntpoint
59+
/root/init_resize2fs.sh
60+
mount /dev/mmcblk2p1 /boot
61+
scp user@172.16.42.1:/home/user/Image /boot
62+
scp user@172.16.42.1:/home/user/superbird.dtb /boot
63+
scp user@172.16.42.1:/home/user/env_p2.txt /boot/bootargs.txt
6564
```

0 commit comments

Comments
 (0)
Please sign in to comment.