Skip to content

Instantly share code, notes, and snippets.

View dhess's full-sized avatar

Drew Hess dhess

View GitHub Profile
clang -g -O2 -DHAVE_CONFIG_H -c -o wakelan.o wakelan.c
wakelan.c:39:26: warning: cast to 'void *' from smaller integer type 'int' [-Wint-to-void-pointer-cast]
static void *use_rcsid = (void *)((char *)&use_rcsid || (void *)&rcsid);
^
wakelan.c:49:5: warning: implicitly declaring library function 'exit' with type 'void (int) __attribute__((noreturn))' [-Wimplicit-function-declaration]
exit (0);
^
wakelan.c:49:5: note: include the header <stdlib.h> or explicitly provide a declaration for 'exit'
wakelan.c:65:10: warning: implicitly declaring library function 'toupper' with type 'int (int)' [-Wimplicit-function-declaration]
c = toupper(*str++);
$ nix-build -A linux_jetson_tx1 -K
these derivations will be built:
/nix/store/vfr3hbganq78jkxz2ajxk172hiayxi0p-linux-config-4.4-l4t-r28.1.drv
/nix/store/6s1hzc7rjpf3sjcvkyiq3xj2mbsjmp7f-linux-4.4-l4t-r28.1.drv
building path(s) ‘/nix/store/1xvnicmlg1sw0l7iqyy1yipkhp3hqbrj-linux-config-4.4-l4t-r28.1’
unpacking sources
unpacking source archive /nix/store/l4lmx6ms9mnhx4cb303h4m7jakgxf092-source_release.tbz2
source root is sources
setting SOURCE_DATE_EPOCH to timestamp 1501033533 of file sources/kernel_src-tx2.tbz2
patching sources
{ stdenv, hostPlatform, fetchurl, perl, buildLinux, ... } @ args:
let
modDirVersion = "4.4";
in
stdenv.lib.overrideDerivation (import ./generic.nix (args // rec {
version = "${modDirVersion}-l4t-r28.1";
inherit modDirVersion;
@dhess
dhess / gist:74d8304344f5ef218b2d0ad950b08a3d
Created July 29, 2017 04:51
2017-07-28 aarch64 image on Jetson TX1
[0000.160] [TegraBoot] (version 00.00.2014.50-mobile-d44d4bf0)
[0000.166] Processing in cold boot mode Bootloader 2
[0000.170] A02 Bootrom Patch rev = 63
[0000.174] Power-up reason: reset button
[0000.177] No Battery Present
[0000.180] RamCode = 0
[0000.182] Platform has Ddr4 type ram
[0000.186] max77620 disabling SD1 Remote Sense
[0000.190] Setting Ddr voltage to 1125mv
[0000.194] Serial Number of Pmic Max77663: 0x2712ae
[root@nixos:/]# dmesg | grep -i xusb
[ 0.096804] OF: ERROR: Bad of_node_put() on /pmc@7000e400/powergates/xusba
[ 0.097121] OF: ERROR: Bad of_node_put() on /pmc@7000e400/powergates/xusbc
[ 0.427840] tegra-xusb-padctl 7009f000.padctl: failed to setup XUSB ports: -517
[ 2.350012] tegra-xusb 70090000.usb: 70090000.usb supply dvdd-pex-pll not found, using dummy regulator
[ 2.365506] tegra-xusb 70090000.usb: 70090000.usb supply hvdd-pex-pll-e not found, using dummy regulator
[ 2.397504] tegra-xusb 70090000.usb: Direct firmware load for nvidia/tegra210/xusb.bin failed with error -2
[ 2.408619] tegra-xusb 70090000.usb: failed to request firmware: -2
[ 2.414914] tegra-xusb 70090000.usb: failed to load firmware: -2
[ 2.421615] tegra-xusb: probe of 70090000.usb failed with error -2
@dhess
dhess / gist:aee9edcdf672e6ddffb10bee7791a84c
Created July 24, 2017 01:31
NixOS aarch64 install image oops with nouveau driver
U-Boot 2016.11+dfsg1-4 (Mar 27 2017 - 18:39:51 +0000)
TEGRA210
Model: NVIDIA P2371-2180
Board: NVIDIA P2371-2180
DRAM: 3.5 GiB
MMC: Tegra SD/MMC: 0, Tegra SD/MMC: 1
In: serial
Out: serial
Err: serial
[root@nixos:/]# nixos-install
copying closure /nix/store/209abjy7ksanjlsrnyxmvrimxbjnqayr-closure to /mnt...
/nix/store/0f4xjzxlgwv0ivyzpjwcbdhc78dz9fsp-openssl-1.0.2k...
/nix/store/29w3vqlx5c21zmcv6nkw2slmdmk4g7ws-gcc-5.4.0-lib...
/nix/store/55rhz760f7r7fm9396cm25cpcsbh09a6-libssh2-1.8.0...
/nix/store/74v0lnpwp7c5xa95lawlcfxyw7nfgb45-perl-5.24.1...
/nix/store/8l5vh47ng7ji4d924p57mgf0p93d8hhz-zlib-1.2.11...
/nix/store/bc09d9zd1v2vxmmiiwf43bmj3hlkvaf5-openssl-1.0.2k-bin...
/nix/store/bm0f80zmayfwqbg9g61cn51vbj3xkjc7-xz-5.2.3-bin...
/nix/store/fy9f83wj417zq7pmplnzjfzai3grsvy7-sqlite-3.17.0...
[0000.121] [TegraBoot] (version 24.00.2015.42-mobile-ec3b827e)
[0000.126] Processing in cold boot mode Bootloader 2
[0000.131] A02 Bootrom Patch rev = 63
[0000.134] Power-up reason: on button
[0000.137] No Battery Present
[0000.140] RamCode = 0
[0000.142] Platform has Ddr4 type ram
[0000.146] max77620 disabling SD1 Remote Sense
[0000.150] Setting Ddr voltage to 1125mv
[0000.154] Serial Number of Pmic Max77663: 0x2712ae
# dmesg | grep -i xusb
[ 0.096064] OF: ERROR: Bad of_node_put() on /pmc@7000e400/powergates/xusba
[ 0.096382] OF: ERROR: Bad of_node_put() on /pmc@7000e400/powergates/xusbc
[ 0.427321] tegra-xusb-padctl 7009f000.padctl: failed to setup XUSB ports: -517
[ 2.345292] tegra-xusb 70090000.usb: 70090000.usb supply dvdd-pex-pll not found, using dummy regulator
[ 2.360788] tegra-xusb 70090000.usb: 70090000.usb supply hvdd-pex-pll-e not found, using dummy regulator
[ 2.392729] tegra-xusb 70090000.usb: Direct firmware load for nvidia/tegra210/xusb.bin failed with error -2
[ 2.403857] tegra-xusb 70090000.usb: failed to request firmware: -2
[ 2.410153] tegra-xusb 70090000.usb: failed to load firmware: -2
[ 2.416849] tegra-xusb: probe of 70090000.usb failed with error -2
Tegra210 (P2371-2180) # printenv
arch=arm
baudrate=115200
board=p2371-2180
board_name=p2371-2180
boot_a_script=load ${devtype} ${devnum}:${distro_bootpart} ${scriptaddr} ${prefix}${script}; source ${scriptaddr}
boot_efi_binary=load ${devtype} ${devnum}:${distro_bootpart} ${kernel_addr_r} efi/boot/bootaa64.efi; if fdt addr ${fdt_addr_r}; then bootefi ${kernel_addr_r} ${fdt_addr_r};else bootefi ${kernel_addr_r} ${fdtcontroladdr};fi
boot_extlinux=sysboot ${devtype} ${devnum}:${distro_bootpart} any ${scriptaddr} ${prefix}extlinux/extlinux.conf
boot_net_pci_enum=pci enum
boot_net_usb_start=usb start