L-as / NixOS-lazor

NixOS modules for the Acer Chromebook Spin 513 (trogdor/lazor)
MIT License
3 stars 0 forks source link

Revive project? #1

Open jottr opened 1 month ago

jottr commented 1 month ago

Since the nixos-mobile project seems to not be maintained anymore, maybe it would make sense to revive this project? I for one never managed to get to a working system with the current state of mobile-nixos, since the installer is basically broken.

L-as commented 1 month ago

Yeah I want to spend some time and do this properly.

L-as commented 1 month ago

And figure out how to install the thing again successfully. I forgot how I did it originally.

L-as commented 1 month ago

I also never got LTE working.

jottr commented 1 month ago

I wasn't even aware that Lazor comes with an LTE chipset. I was able to boot the images from https://github.com/hexdump0815/imagebuilder. On the latest Ubuntu image the wifi seems broken, while it does work on the Debian image. I wonder if it would be possible to prebuild a booting nixos image via the run-on-arch Github action and then add the relevant hardware config to the nixos-hardware repo.

L-as commented 1 month ago

@jottr since a few kernels ago rmtfs crashes for me, and the only way of working around it is IME restarting it at some point (but not too early, and not too late) after it crashes.

jottr commented 1 month ago

In the mobile-nixos config they create bogus files for the firmware blobs. This would obviously disable the modem.

AFAIR there are firmware blobs related to the modem (qcom/sdm845) missing from their build as well. I've created a PR some time ago but never received feedback. Frankly, I can't recall how I figured that these blobs were missing in the first place. AFAIR I found them in the chromium sources, but I'm not sure anymore since it has been some time since I created that PR.

L-as commented 1 month ago

That is separate, this is done here too. There is a way to extract the files, however. It's supposed to be on one of the partitions. I think I still have the script that allegedly does this.

jottr commented 1 month ago

This is the output of lsmod on my device with a HWID of LAZOR-FHYR:

Module                  Size  Used by
ip6t_REJECT            12288  1
tun                    69632  3
8021q                  32768  0
dm_integrity           57344  1
async_xor              12288  1 dm_integrity
xor                    12288  1 async_xor
xor_neon               16384  1 xor
async_tx               12288  1 async_xor
lz4                    12288  8
lz4_compress           24576  1 lz4
rfcomm                 57344  7
algif_hash             12288  1
zstd                   12288  8
algif_skcipher         12288  1
zstd_compress         442368  1 zstd
af_alg                 28672  6 algif_hash,algif_skcipher
zram                   32768  2
zsmalloc               24576  1 zram
uinput                 32768  1
venus_dec              24576  0
venus_enc              28672  0
snd_soc_rt5682_i2c     12288  1
qcom_spmi_adc5         32768  0
snd_soc_rt5682         73728  1 snd_soc_rt5682_i2c
snd_soc_sc7180         16384  0
cros_ec_typec          20480  0
roles                  12288  1 cros_ec_typec
qcom_vadc_common       12288  1 qcom_spmi_adc5
qcom_spmi_temp_alarm    12288  0
snd_soc_rl6231         12288  1 snd_soc_rt5682
snd_soc_qcom_common    12288  1 snd_soc_sc7180
qcom_stats             12288  0
hci_uart               53248  0
btqca                  16384  1 hci_uart
venus_core            114688  2 venus_dec,venus_enc
icc_bwmon              16384  0
veth                   32768  0
snd_soc_lpass_sc7180    16384  2
snd_soc_lpass_hdmi     12288  1 snd_soc_lpass_sc7180
snd_soc_lpass_cpu      24576  1 snd_soc_lpass_sc7180
snd_soc_lpass_platform    20480  1 snd_soc_lpass_cpu
coresight_tmc          36864  0
coresight_replicator    12288  0
coresight_funnel       12288  0
coresight_etm4x        73728  0
coresight              57344  4 coresight_tmc,coresight_etm4x,coresight_replicator,coresight_funnel
ip6table_nat           12288  1
xt_MASQUERADE          12288  4
snd_soc_max98357a      12288  1
xt_cgroup              12288  2
fuse                  139264  6
ath10k_snoc            45056  0
ath10k_core           466944  1 ath10k_snoc
bluetooth             700416  42 btqca,hci_uart,rfcomm
ath                    36864  1 ath10k_core
ecdh_generic           12288  2 bluetooth
ecc                    24576  1 ecdh_generic
mac80211              925696  1 ath10k_core
iio_trig_sysfs         12288  0
cfg80211              856064  3 ath,mac80211,ath10k_core
cros_ec_lid_angle      12288  0
cros_ec_sensors        12288  0
cros_ec_sensors_core    16384  2 cros_ec_sensors,cros_ec_lid_angle
industrialio_triggered_buffer    12288  2 cros_ec_lid_angle,cros_ec_sensors_core
kfifo_buf              12288  2 industrialio_triggered_buffer,cros_ec_sensors_core
cros_ec_sensorhub      28672  1 cros_ec_sensors_core
uvcvideo              118784  0
uvc                    12288  1 uvcvideo
joydev                 40960  0

Also, this might be useful?

$ ls -R /lib/firmware
 ls -R /lib/firmware/
/lib/firmware/:
ath10k   elan_i2c_188.0.bin  elan_i2c_226.0.bin  elants_i2c_3550.bin  elants_i2c_38e0.bin     elants_i2chid_3463.bin  elants_i2chid_3467.bin  elants_i2chid_35ee.bin  pix_tp2xxx_20C1.bin  qcom           rt2870.bin  rtl_nic
cros-pd  elan_i2c_216.0.bin  elan_i2c_303.0.bin  elants_i2c_3665.bin  elants_i2chid_1fa6.bin  elants_i2chid_3464.bin  elants_i2chid_346c.bin  keyspan                 qca                  regulatory.db  rt3070.bin

/lib/firmware/ath10k:
WCN3990

/lib/firmware/ath10k/WCN3990:
hw1.0

/lib/firmware/ath10k/WCN3990/hw1.0:
board-2.bin  firmware-5.bin

/lib/firmware/cros-pd:
README.source  dingdong_v1.7.317-b0bb7c9.bin  dingdong_v1.7.575-96b74f1.bin  dingdong_v1.7.684-69498dd.bin  hoho_v1.7.317-b0bb7c9.bin  hoho_v1.7.575-96b74f1.bin  hoho_v1.7.684-69498dd.bin  zinger_v1.7.509-e5bffd3.bin  zinger_v1.7.539-91a0fa2.bin

/lib/firmware/keyspan:
mpr.fw  usa18x.fw  usa19.fw  usa19qi.fw  usa19qw.fw  usa19w.fw  usa28.fw  usa28x.fw  usa28xa.fw  usa28xb.fw  usa49w.fw  usa49wlc.fw

/lib/firmware/qca:
crbtfw32.tlv  crnv32.bin  crnv32u.bin

/lib/firmware/qcom:
a630_gmu.bin  a630_sqe.fw  sc7180-trogdor  venus-5.4

/lib/firmware/qcom/sc7180-trogdor:
modem  modem-nolte

/lib/firmware/qcom/sc7180-trogdor/modem:
mba.mbn  qdsp6sw.mbn

/lib/firmware/qcom/sc7180-trogdor/modem-nolte:
mba.mbn  qdsp6sw.mbn

/lib/firmware/qcom/venus-5.4:
venus.mbn  venus.mdt

/lib/firmware/rtl_nic:
rtl8153a-2.fw  rtl8153a-3.fw  rtl8153a-4.fw  rtl8153b-2.fw  rtl8153c-1.fw  rtl8156a-2.fw  rtl8156b-2.fw
jottr commented 1 month ago

Looking at the firmware from inside ChromeOS it seems that my aforementioned PR to mobile-nixos was useless after all.