Git Product home page Git Product logo

browser-vm's People

Contributors

humphd avatar urish avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

browser-vm's Issues

How to add g++ package?

I'm able to re-config and add python, lua, qjs Ok but I can't add g++.
I select must or glibc (for qjs), select gcc version 9 -> enable C++. But it's not work.
How to add g++ compiler to the iso output? Thank you!

Further reduce the size of the kernel config, and buildroot image

I'd love to find ways to further strip down the Linux kernel config to remove anything not being used by v86--currently the built ISO is ~4M. I've succeeded in removing lots of unnecessary drivers and services, but there are still more things that could likely go. For example, parts of the network stack that aren't related to virtio could probably get pulled out.

I'm not an expert on kernel configuration, and if someone else has ideas, I'd love to see improvements here. For reference, here is what dmesg shows for startup:

[    0.000000] Linux version 4.15.7 (root@1476c102ae0d) (gcc version 6.4.0 (Buildroot 2018.02)) #2 Thu Feb 7 00:19:41 UTC 2019
[    0.000000] Disabled fast string operations
[    0.000000] x86/fpu: x87 FPU will use FSAVE
[    0.000000] e820: BIOS-provided physical RAM map:
[    0.000000] BIOS-e820: [mem 0x0000000000000000-0x000000000009fbff] usable
[    0.000000] BIOS-e820: [mem 0x000000000009fc00-0x000000000009ffff] reserved
[    0.000000] BIOS-e820: [mem 0x00000000000f0000-0x00000000000fffff] reserved
[    0.000000] BIOS-e820: [mem 0x0000000000100000-0x0000000001ffffff] usable
[    0.000000] BIOS-e820: [mem 0x00000000fffc0000-0x00000000ffffffff] reserved
[    0.000000] Notice: NX (Execute Disable) protection missing in CPU!
[    0.000000] DMI not present or invalid.
[    0.000000] e820: update [mem 0x00000000-0x00000fff] usable ==> reserved
[    0.000000] e820: remove [mem 0x000a0000-0x000fffff] usable
[    0.000000] e820: last_pfn = 0x2000 max_arch_pfn = 0x100000
[    0.000000] MTRR: Disabled
[    0.000000] x86/PAT: MTRRs disabled, skipping PAT initialization too.
[    0.000000] x86/PAT: Configuration [0-7]: WB  WT  UC- UC  WB  WT  UC- UC  
[    0.000000] found SMP MP-table at [mem 0x000f3af0-0x000f3aff] mapped at [(ptrval)]
[    0.000000] Scanning 1 areas for low memory corruption
[    0.000000] initial memory mapped: [mem 0x00000000-0x01bfffff]
[    0.000000] Base memory trampoline at [(ptrval)] 9b000 size 16384
[    0.000000] ACPI: Early table checksum verification disabled
[    0.000000] ACPI BIOS Error (bug): A valid RSDP was not found (20170831/tbxfroot-244)
[    0.000000] 0MB HIGHMEM available.
[    0.000000] 32MB LOWMEM available.
[    0.000000]   mapped low ram: 0 - 02000000
[    0.000000]   low ram: 0 - 02000000
[    0.000000] tsc: Fast TSC calibration failed
[    0.000000] tsc: Unable to calibrate against PIT
[    0.000000] tsc: No reference (HPET/PMTIMER) available
[    0.000000] BRK [0x01835000, 0x01835fff] PGTABLE
[    0.000000] Zone ranges:
[    0.000000]   DMA      [mem 0x0000000000001000-0x0000000000ffffff]
[    0.000000]   Normal   [mem 0x0000000001000000-0x0000000001ffffff]
[    0.000000]   HighMem  empty
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000000001000-0x000000000009efff]
[    0.000000]   node   0: [mem 0x0000000000100000-0x0000000001ffffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000000001000-0x0000000001ffffff]
[    0.000000] On node 0 totalpages: 8094
[    0.000000]   DMA zone: 32 pages used for memmap
[    0.000000]   DMA zone: 0 pages reserved
[    0.000000]   DMA zone: 3998 pages, LIFO batch:0
[    0.000000]   Normal zone: 32 pages used for memmap
[    0.000000]   Normal zone: 4096 pages, LIFO batch:0
[    0.000000] Reserved but unavailable: 98 pages
[    0.000000] Using APIC driver default
[    0.000000] Intel MultiProcessor Specification v1.4
[    0.000000]     Virtual Wire compatibility mode.
[    0.000000] MPTABLE: OEM ID: BOCHSCPU
[    0.000000] MPTABLE: Product ID: 0.1         
[    0.000000] MPTABLE: APIC at: 0xFEE00000
[    0.000000] I/O APIC 0xfec00000 registers return all ones, skipping!
[    0.000000] MPTABLE: no processors registered!
[    0.000000] BIOS bug, MP table errors detected!...
[    0.000000] ... disabling SMP support. (tell your hw vendor)
[    0.000000] Local APIC disabled by BIOS -- you can enable it with "lapic"
[    0.000000] APIC: disable apic facility
[    0.000000] APIC: switched to apic NOOP
[    0.000000] PM: Registered nosave memory: [mem 0x00000000-0x00000fff]
[    0.000000] PM: Registered nosave memory: [mem 0x0009f000-0x0009ffff]
[    0.000000] PM: Registered nosave memory: [mem 0x000a0000-0x000effff]
[    0.000000] PM: Registered nosave memory: [mem 0x000f0000-0x000fffff]
[    0.000000] e820: [mem 0x02000000-0xfffbffff] available for PCI devices
[    0.000000] clocksource: refined-jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.000000] pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768
[    0.000000] pcpu-alloc: [0] 0 
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 8030
[    0.000000] Kernel command line: BOOT_IMAGE=/boot/bzImage root=/dev/sr0
[    0.000000] Dentry cache hash table entries: 4096 (order: 2, 16384 bytes)
[    0.000000] Inode-cache hash table entries: 2048 (order: 1, 8192 bytes)
[    0.000000] Initializing CPU#0
[    0.000000] Initializing HighMem for node 0 (00000000:00000000)
[    0.000000] Memory: 23556K/32376K available (4304K kernel code, 512K rwdata, 1840K rodata, 1184K init, 468K bss, 8820K reserved, 0K cma-reserved, 0K highmem)
[    0.000000] virtual kernel memory layout:
[    0.000000]     fixmap  : 0xfffa3000 - 0xfffff000   ( 368 kB)
[    0.000000]   cpu_entry : 0xffc00000 - 0xffc28000   ( 160 kB)
[    0.000000]     pkmap   : 0xff800000 - 0xffc00000   (4096 kB)
[    0.000000]     vmalloc : 0xc2800000 - 0xff7fe000   ( 975 MB)
[    0.000000]     lowmem  : 0xc0000000 - 0xc2000000   (  32 MB)
[    0.000000]       .init : 0xc1691000 - 0xc17b9000   (1184 kB)
[    0.000000]       .data : 0xc143429a - 0xc1683180   (2363 kB)
[    0.000000]       .text : 0xc1000000 - 0xc143429a   (4304 kB)
[    0.000000] Checking if this processor honours the WP bit even in supervisor mode...Ok.
[    0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] NR_IRQS: 2304, nr_irqs: 32, preallocated irqs: 16
[    0.000000] CPU 0 irqstacks, hard=(ptrval) soft=(ptrval)
[    0.000000] Console: colour VGA+ 80x25
[    0.000000] console [tty0] enabled
[    0.000000] APIC: Keep in PIC mode(8259)
[    0.000000] tsc: Fast TSC calibration failed
[    0.010000] spurious 8259A interrupt: IRQ7.
[    0.010000] tsc: Unable to calibrate against PIT
[    0.010000] tsc: No reference (HPET/PMTIMER) available
[    0.010000] tsc: Marking TSC unstable due to could not calculate TSC khz
[    0.020000] Calibrating delay loop... 47.05 BogoMIPS (lpj=235264)
[    0.170000] pid_max: default: 32768 minimum: 301
[    0.180000] Security Framework initialized
[    0.190000] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.190000] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.220000] Disabled fast string operations
[    0.220000] Last level iTLB entries: 4KB 64, 2MB 64, 4MB 64
[    0.220000] Last level dTLB entries: 4KB 64, 2MB 0, 4MB 64, 1GB 0
[    0.220000] CPU: Intel 0f/06 (family: 0xf, model: 0x6, stepping: 0x3)
[    0.230000] Spectre V2 : Vulnerable: Minimal generic ASM retpoline
[    0.230000] Spectre V2 : Spectre v2 mitigation: Filling RSB on context switch
[    0.250000] Performance Events: unsupported Netburst CPU model 6 no PMU driver, software events only.
[    0.290000] devtmpfs: initialized
[    0.340000] kworker/u2:0 (11) used greatest stack depth: 7204 bytes left
[    0.340000] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.340000] futex hash table entries: 256 (order: -1, 3072 bytes)
[    0.370000] RTC time: 23:07:28, date: 02/12/19
[    0.400000] NET: Registered protocol family 16
[    0.430000] audit: initializing netlink subsys (disabled)
[    0.450000] audit: type=2000 audit(1550012847.430:1): state=initialized audit_enabled=0 res=1
[    0.450000] random: fast init done
[    0.500000] cpuidle: using governor menu
[    0.500000] clocksource: pit: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 1601818034827 ns
[    0.560000] PCI: PCI BIOS revision 2.10 entry at 0xfdaed, last bus=0
[    0.570000] PCI: Using configuration type 1 for base access
[    1.730000] ACPI: Interpreter disabled.
[    1.750000] vgaarb: loaded
[    1.790000] SCSI subsystem initialized
[    1.800000] libata version 3.00 loaded.
[    1.860000] pps_core: LinuxPPS API ver. 1 registered
[    1.860000] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <[email protected]>
[    1.870000] PTP clock support registered
[    1.890000] EDAC MC: Ver: 3.0.0
[    1.910000] dmi: Firmware registration failed.
[    1.930000] PCI: Probing PCI hardware
[    1.930000] PCI: root bus 00: using default resources
[    1.930000] PCI: Probing PCI hardware (bus 00)
[    1.940000] PCI host bridge to bus 0000:00
[    1.940000] pci_bus 0000:00: root bus resource [io  0x0000-0xffff]
[    1.940000] pci_bus 0000:00: root bus resource [mem 0x00000000-0xffffffff]
[    1.940000] pci_bus 0000:00: No busn resource found for root bus, will use [bus 00-ff]
[    1.950000] pci_bus 0000:00: scanning bus
[    1.950000] pci 0000:00:00.0: [8086:1237] type 00 class 0x060000
[    1.960000] pci 0000:00:00.0: calling quirk_mmio_always_on+0x0/0x9
[    1.970000] pci 0000:00:01.0: [8086:7000] type 00 class 0x060100
[    1.980000] pci 0000:00:06.0: [1af4:1009] type 00 class 0x000200
[    1.980000] pci 0000:00:06.0: reg 0x10: [io  0xc000-0xc0ff]
[    1.990000] pci 0000:00:12.0: [10de:0a20] type 00 class 0x030000
[    1.990000] pci 0000:00:12.0: reg 0x10: [mem 0xe0000000-0xe01fffff pref]
[    2.000000] pci 0000:00:12.0: reg 0x30: [mem 0xfeb00000-0xfeb0ffff pref]
[    2.000000] pci 0000:00:12.0: calling efifb_fixup_resources+0x0/0x123
[    2.000000] pci 0000:00:12.0: vgaarb: setting as boot VGA device
[    2.000000] pci 0000:00:12.0: vgaarb: VGA device added: decodes=io+mem,owns=io+mem,locks=none
[    2.010000] pci 0000:00:1e.0: [8086:7010] type 00 class 0x010180
[    2.020000] pci 0000:00:1e.0: reg 0x10: [io  0x01f0-0x01f7]
[    2.020000] pci 0000:00:1e.0: reg 0x14: [io  0x03f4-0x03f7]
[    2.020000] pci 0000:00:1e.0: reg 0x20: [io  0xc100-0xc10f]
[    2.020000] pci 0000:00:1e.0: legacy IDE quirk: reg 0x10: [io  0x01f0-0x01f7]
[    2.020000] pci 0000:00:1e.0: legacy IDE quirk: reg 0x14: [io  0x03f6]
[    2.020000] pci 0000:00:1e.0: legacy IDE quirk: reg 0x18: [io  0x0170-0x0177]
[    2.020000] pci 0000:00:1e.0: legacy IDE quirk: reg 0x1c: [io  0x0376]
[    2.040000] kworker/u2:1 (297) used greatest stack depth: 7164 bytes left
[    2.060000] pci_bus 0000:00: fixups for bus
[    2.060000] pci_bus 0000:00: bus scan returning with max=00
[    2.060000] pci_bus 0000:00: busn_res: [bus 00-ff] end is updated to 00
[    2.060000] pci 0000:00:01.0: PIIX/ICH IRQ router [8086:7000]
[    2.060000] PCI: pci_cache_line_size set to 32 bytes
[    2.060000] pci 0000:00:06.0: BAR 0: reserving [io  0xc000-0xc0ff flags 0x40101] (d=0, p=0)
[    2.060000] pci 0000:00:12.0: BAR 0: reserving [mem 0xe0000000-0xe01fffff flags 0x42208] (d=0, p=0)
[    2.060000] pci 0000:00:1e.0: BAR 0: reserving [io  0x01f0-0x01f7 flags 0x110] (d=0, p=0)
[    2.060000] pci 0000:00:1e.0: BAR 1: reserving [io  0x03f6 flags 0x110] (d=0, p=0)
[    2.060000] pci 0000:00:1e.0: BAR 2: reserving [io  0x0170-0x0177 flags 0x110] (d=0, p=0)
[    2.070000] pci 0000:00:1e.0: BAR 3: reserving [io  0x0376 flags 0x110] (d=0, p=0)
[    2.070000] pci 0000:00:1e.0: BAR 4: reserving [io  0xc100-0xc10f flags 0x40101] (d=0, p=0)
[    2.070000] e820: reserve RAM buffer [mem 0x0009fc00-0x0009ffff]
[    2.070000] e820: reserve RAM buffer [mem 0x02000000-0x03ffffff]
[    2.090000] clocksource: Switched to clocksource pit
[    3.480042] FS-Cache: Loaded
[    3.490542] CacheFiles: Loaded
[    3.504142] pnp: PnP ACPI: disabled
[    3.540839] kworker/u2:2 (308) used greatest stack depth: 6972 bytes left
[    3.960220] pci_bus 0000:00: resource 4 [io  0x0000-0xffff]
[    3.960220] pci_bus 0000:00: resource 5 [mem 0x00000000-0xffffffff]
[    3.960220] NET: Registered protocol family 2
[    4.000919] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[    4.000919] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
[    4.000919] TCP: Hash tables configured (established 1024 bind 1024)
[    4.010619] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    4.010619] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    4.010619] NET: Registered protocol family 1
[    4.020618] pci 0000:00:00.0: calling quirk_natoma+0x0/0x25
[    4.020618] pci 0000:00:00.0: Limiting direct PCI/PCI transfers
[    4.020618] pci 0000:00:00.0: calling quirk_passive_release+0x0/0x62
[    4.033118] pci 0000:00:01.0: PIIX3: Enabling Passive Release
[    4.033118] pci 0000:00:01.0: calling quirk_isa_dma_hangs+0x0/0x28
[    4.033118] pci 0000:00:01.0: Activating ISA DMA hang workarounds
[    4.033118] pci 0000:00:12.0: calling nv_msi_ht_cap_quirk_leaf+0x0/0x1b
[    4.033118] pci 0000:00:12.0: calling pci_fixup_video+0x0/0xba
[    4.040117] pci 0000:00:12.0: Video device with shadowed ROM at [mem 0x000c0000-0x000dffff]
[    4.040117] PCI: CLS 0 bytes, default 32
[    7.360782] platform rtc_cmos: registered platform RTC device (no PNP device found)
[    7.389882] Scanning for low memory corruption every 60 seconds
[    7.510476] Initialise system trusted keyrings
[    7.510476] workingset: timestamp_bits=30 max_order=13 bucket_order=0
[    8.161246] 9p: Installing v9fs 9p2000 file system support
[    8.183946] FS-Cache: Netfs '9p' registered for caching
[    8.330941] jitterentropy: Initialization failed with host not compliant with requirements: 2
[    8.359539] Key type asymmetric registered
[    8.359539] Asymmetric key parser 'x509' registered
[    8.359539] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 250)
[    8.359539] io scheduler noop registered
[    8.359539] io scheduler deadline registered
[    8.370136] io scheduler cfq registered (default)
[    8.370136] io scheduler mq-deadline registered
[    8.370136] io scheduler kyber registered
[    8.479932] virtio-pci 0000:00:06.0: runtime IRQ mapping not provided by arch
[    8.479932] virtio-pci 0000:00:06.0: PCI INT A -> PIRQ 61, mask def8, excl 0000
[    8.479932] virtio-pci 0000:00:06.0: PCI INT A -> newirq 10
[    8.479932] PCI: setting IRQ 10 as level-triggered
[    8.479932] virtio-pci 0000:00:06.0: found PCI INT A -> IRQ 10
[    8.479932] virtio-pci 0000:00:06.0: virtio_pci: leaving for legacy driver
[    8.519930] Serial: 8250/16550 driver, 4 ports, IRQ sharing enabled
[    8.840910] serial8250: ttyS0 at I/O 0x3f8 (irq = 4, base_baud = 115200) is a 16550A
[    8.962705] Non-volatile memory driver v1.3
[    8.990902] Linux agpgart interface v0.103
[    9.021800] agpgart-intel 0000:00:00.0: runtime IRQ mapping not provided by arch
[    9.420580] loop: module loaded
[    9.450079] ata_piix 0000:00:1e.0: runtime IRQ mapping not provided by arch
[    9.450079] ata_piix 0000:00:1e.0: version 2.13
[    9.450079] ata_piix 0000:00:1e.0: PCI INT A not found in routing table
[    9.510377] scsi host0: ata_piix
[    9.530676] scsi host1: ata_piix
[    9.560975] ata1: PATA max MWDMA2 cmd 0x1f0 ctl 0x3f6 bmdma 0xc100 irq 14
[    9.560975] ata2: PATA max MWDMA2 cmd 0x170 ctl 0x376 bmdma 0xc108 irq 15
[    9.630371] i8042: PNP: No PS/2 controller found.
[    9.630371] i8042: Probing ports directly.
[    9.646171] serio: i8042 KBD port at 0x60,0x64 irq 1
[    9.670769] serio: i8042 AUX port at 0x60,0x64 irq 12
[    9.720567] rtc_cmos rtc_cmos: rtc core: registered rtc_cmos as rtc0
[    9.720567] rtc_cmos rtc_cmos: alarms up to one day, 114 bytes nvram
[    9.745466] hidraw: raw HID events driver (C) Jiri Kosina
[    9.870561] input: AT Translated Set 2 keyboard as /devices/platform/i8042/serio0/input/input0
[    9.929858] Initializing XFRM netlink socket
[    9.929858] NET: Registered protocol family 17
[    9.940157] 9pnet: Installing 9P2000 support
[    9.961356] Key type dns_resolver registered
[    9.971356] mce: Unable to init MCE device (rc: -5)
[    9.991855] ata1.00: ATAPI: v86 HD, , max MWDMA2
[   10.017555] ata1.00: configured for MWDMA2
[   10.023154] Using IPI Shortcut mode
[   10.029954] scsi 0:0:0:0: CD-ROM            SONY     CD-ROM CDU-1000  1.1a PQ: 0 ANSI: 1 CCS
[   10.090051] registered taskstats version 1
[   10.090051] Loading compiled-in X.509 certificates
[   10.120450]   Magic number: 7:382:150
[   10.120450] console [netcon0] enabled
[   10.120450] netconsole: network logging started
[   10.150849] Freeing unused kernel memory: 1184K
[   10.161549] Write protecting the kernel text: 4308k
[   10.170148] Write protecting the kernel read-only data: 1848k
[   10.730623] input: PS/2 Generic Mouse as /devices/platform/i8042/serio1/input/input2
[   11.150305] mount (664) used greatest stack depth: 6876 bytes left
[   13.919984] ip (687) used greatest stack depth: 6588 bytes left
[  129.711799] random: crng init done

Add nano editor

Pomax has requested the nano editor be added. I tried doing this quickly, but the obvious thing didn't work. I need to play with it some more.

My assumption is that this should work:

--- a/buildroot-v86/configs/v86_defconfig
+++ b/buildroot-v86/configs/v86_defconfig
@@ -10,6 +10,9 @@ BR2_TARGET_ROOTFS_INITRAMFS=y
 BR2_TARGET_ROOTFS_ISO9660=y
 BR2_TARGET_SYSLINUX=y

+# nano editor
+BR2_PACKAGE_NANO=y
+
 # If you want to add the nled editor, uncomment NLED + NCURSES
 #BR2_PACKAGE_NCURSES=y
 #BR2_PACKAGE_NLED=y

But after building, the nano command is not found.

Unimplemented: #GP handler

I'm trying to build my own v86 using Docker, but putting in the directory to load crashes the VM:

fs, path, and Buffer are all available on window for debugging, e.g., fs.stat('/', console.log)
index.js:1024 See https://github.com/filerjs/filer for docs.
index.js:1025 use ?debug on the URL if you need Plan9/Filer debug info from v86
?debug:508 no xr
index.js:12248 boot 0
index.js:12250 boot 1
index.js:12311 wait for prompt 1
index.js:12001 Unimplemented: #GP handler
index.js:12001 Execution stopped
index.js:11469 Unimplemented: #GP handler
index.js:11469 undefined
index.js:11469 Uncaught Unimplemented: #GP handler

Something I'm doing wrong?

How to add nodejs package?

I have been trying to add the nodejs package to the build.
But the build hangs without error.

From the menu nodejs dependencies are

nodejs needs a toolchain w/ C++, dynamic library, NPTL, gcc >= 7, wchar, host gcc >= 8

So

  1. Inside Dockerfile I use FROM ubuntu:22.04 to have the latest gcc
  2. Added also apt-get -q -y install file libbz2-dev, because they were required during the build
  3. I clone and use latest code from https://github.com/buildroot/buildroot.git
  4. Then I enabled toolchain with c++ from the menu
  5. And the v86_defconfig config file that I got is:
BR2_x86_pentiumpro=y
BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_19=y
BR2_TOOLCHAIN_BUILDROOT_CXX=y
BR2_CCACHE=y
BR2_ROOTFS_OVERLAY="$(BR2_EXTERNAL_v86_PATH)/board/v86/rootfs_overlay/"
BR2_ROOTFS_POST_IMAGE_SCRIPT="$(BR2_EXTERNAL_v86_PATH)/board/v86/post-image.sh"
BR2_LINUX_KERNEL=y
BR2_LINUX_KERNEL_CUSTOM_VERSION=y
BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.19.172"
BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="$(BR2_EXTERNAL_v86_PATH)/board/v86/linux.config"
BR2_PACKAGE_NODEJS=y
BR2_PACKAGE_NODEJS_NPM=y
BR2_PACKAGE_NANO=y
BR2_TARGET_ROOTFS_INITRAMFS=y
BR2_TARGET_ROOTFS_ISO9660=y
BR2_TARGET_SYSLINUX=y

The phase in which build stops and hangs is:

>>> nodejs 16.17.1 Configuring
mkdir -p /root/buildroot-2022.08/output/build/nodejs-16.17.1/bin
ln -sf /root/buildroot-2022.08/output/host/bin/python3 /root/buildroot-2022.08/output/build/nodejs-16.17.1/bin/python
/usr/bin/install -D -m 755 package/nodejs//v8-qemu-wrapper.in /root/buildroot-2022.08/output/build/nodejs-16.17.1/out/Release/v8-qemu-wrapper
/usr/bin/sed -i -e "s%@QEMU_USER@%/root/buildroot-2022.08/output/host/bin/qemu-i386%g" /root/buildroot-2022.08/output/build/nodejs-16.17.1/out/Release/v8-qemu-wrapper
/usr/bin/sed -i -e "s%@TOOLCHAIN_HEADERS_VERSION@%"4.19"%g" /root/buildroot-2022.08/output/build/nodejs-16.17.1/out/Release/v8-qemu-wrapper
/usr/bin/sed -i -e "s%@QEMU_USERMODE_ARGS@%%g" /root/buildroot-2022.08/output/build/nodejs-16.17.1/out/Release/v8-qemu-wrapper
/usr/bin/sed -i -e "s%@MAYBE_WRAPPER@%'<(PRODUCT_DIR)/v8-qemu-wrapper',%g" /root/buildroot-2022.08/output/build/nodejs-16.17.1/node.gyp
/usr/bin/sed -i -e "s%@MAYBE_WRAPPER@%'<(PRODUCT_DIR)/v8-qemu-wrapper',%g" /root/buildroot-2022.08/output/build/nodejs-16.17.1/tools/v8_gypfiles/v8.gyp
(cd /root/buildroot-2022.08/output/build/nodejs-16.17.1; PATH="/root/buildroot-2022.08/output/host/bin:/root/buildroot-2022.08/output/host/sbin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" AR="/root/buildroot-2022.08/output/host/bin/i686-buildroot-linux-gnu-gcc-ar" AS="/root/buildroot-2022.08/output/host/bin/i686-buildroot-linux-gnu-as" LD="/root/buildroot-2022.08/output/host/bin/i686-buildroot-linux-gnu-ld" NM="/root/buildroot-2022.08/output/host/bin/i686-buildroot-linux-gnu-gcc-nm" CC="/root/buildroot-2022.08/output/host/bin/i686-buildroot-linux-gnu-gcc" GCC="/root/buildroot-2022.08/output/host/bin/i686-buildroot-linux-gnu-gcc" CPP="/root/buildroot-2022.08/output/host/bin/i686-buildroot-linux-gnu-cpp" CXX="/root/buildroot-2022.08/output/host/bin/i686-buildroot-linux-gnu-g++" FC="/root/buildroot-2022.08/output/host/bin/i686-buildroot-linux-gnu-gfortran" F77="/root/buildroot-2022.08/output/host/bin/i686-buildroot-linux-gnu-gfortran" RANLIB="/root/buildroot-2022.08/output/host/bin/i686-buildroot-linux-gnu-gcc-ranlib" READELF="/root/buildroot-2022.08/output/host/bin/i686-buildroot-linux-gnu-readelf" STRIP="/root/buildroot-2022.08/output/host/bin/i686-buildroot-linux-gnu-strip" OBJCOPY="/root/buildroot-2022.08/output/host/bin/i686-buildroot-linux-gnu-objcopy" OBJDUMP="/root/buildroot-2022.08/output/host/bin/i686-buildroot-linux-gnu-objdump" AR_FOR_BUILD="/usr/bin/ar" AS_FOR_BUILD="/usr/bin/as" CC_FOR_BUILD="/root/buildroot-2022.08/output/host/bin/ccache /usr/bin/gcc" GCC_FOR_BUILD="/root/buildroot-2022.08/output/host/bin/ccache /usr/bin/gcc" CXX_FOR_BUILD="/root/buildroot-2022.08/output/host/bin/ccache /usr/bin/g++" LD_FOR_BUILD="/usr/bin/ld" CPPFLAGS_FOR_BUILD="-I/root/buildroot-2022.08/output/host/include" CFLAGS_FOR_BUILD="-O2 -I/root/buildroot-2022.08/output/host/include" CXXFLAGS_FOR_BUILD="-O2 -I/root/buildroot-2022.08/output/host/include" LDFLAGS_FOR_BUILD="-L/root/buildroot-2022.08/output/host/lib -Wl,-rpath,/root/buildroot-2022.08/output/host/lib" FCFLAGS_FOR_BUILD="" DEFAULT_ASSEMBLER="/root/buildroot-2022.08/output/host/bin/i686-buildroot-linux-gnu-as" DEFAULT_LINKER="/root/buildroot-2022.08/output/host/bin/i686-buildroot-linux-gnu-ld" CPPFLAGS="-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64" CFLAGS="-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64  -Os -g0 -D_FORTIFY_SOURCE=1" CXXFLAGS="-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64  -Os -g0 -D_FORTIFY_SOURCE=1" LDFLAGS="" FCFLAGS=" -Os -g0" FFLAGS=" -Os -g0" PKG_CONFIG="/root/buildroot-2022.08/output/host/bin/pkg-config" STAGING_DIR="/root/buildroot-2022.08/output/host/i686-buildroot-linux-gnu/sysroot" INTLTOOL_PERL=/usr/bin/perl PATH=/root/buildroot-2022.08/output/build/nodejs-16.17.1/bin:"/root/buildroot-2022.08/output/host/bin:/root/buildroot-2022.08/output/host/sbin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" LDFLAGS=" -latomic" LD="/root/buildroot-2022.08/output/host/bin/i686-buildroot-linux-gnu-g++" PYTHON=/root/buildroot-2022.08/output/host/bin/python3 /root/buildroot-2022.08/output/host/bin/python3 configure.py --prefix=/usr --dest-cpu=ia32     --shared-zlib --shared-cares --shared-libuv --shared-nghttp2 --without-dtrace --without-etw --cross-compiling --dest-os=linux --ninja --shared-openssl --with-intl=none )
INFO: configure completed successfully
>>> nodejs 16.17.1 Building
PATH="/root/buildroot-2022.08/output/host/bin:/root/buildroot-2022.08/output/host/sbin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" PYTHON=/root/buildroot-2022.08/output/host/bin/python3 /usr/bin/make -j17 -C /root/buildroot-2022.08/output/build/nodejs-16.17.1 PATH="/root/buildroot-2022.08/output/host/bin:/root/buildroot-2022.08/output/host/sbin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" AR="/root/buildroot-2022.08/output/host/bin/i686-buildroot-linux-gnu-gcc-ar" AS="/root/buildroot-2022.08/output/host/bin/i686-buildroot-linux-gnu-as" LD="/root/buildroot-2022.08/output/host/bin/i686-buildroot-linux-gnu-ld" NM="/root/buildroot-2022.08/output/host/bin/i686-buildroot-linux-gnu-gcc-nm" CC="/root/buildroot-2022.08/output/host/bin/i686-buildroot-linux-gnu-gcc" GCC="/root/buildroot-2022.08/output/host/bin/i686-buildroot-linux-gnu-gcc" CPP="/root/buildroot-2022.08/output/host/bin/i686-buildroot-linux-gnu-cpp" CXX="/root/buildroot-2022.08/output/host/bin/i686-buildroot-linux-gnu-g++" FC="/root/buildroot-2022.08/output/host/bin/i686-buildroot-linux-gnu-gfortran" F77="/root/buildroot-2022.08/output/host/bin/i686-buildroot-linux-gnu-gfortran" RANLIB="/root/buildroot-2022.08/output/host/bin/i686-buildroot-linux-gnu-gcc-ranlib" READELF="/root/buildroot-2022.08/output/host/bin/i686-buildroot-linux-gnu-readelf" STRIP="/root/buildroot-2022.08/output/host/bin/i686-buildroot-linux-gnu-strip" OBJCOPY="/root/buildroot-2022.08/output/host/bin/i686-buildroot-linux-gnu-objcopy" OBJDUMP="/root/buildroot-2022.08/output/host/bin/i686-buildroot-linux-gnu-objdump" AR_FOR_BUILD="/usr/bin/ar" AS_FOR_BUILD="/usr/bin/as" CC_FOR_BUILD="/root/buildroot-2022.08/output/host/bin/ccache /usr/bin/gcc" GCC_FOR_BUILD="/root/buildroot-2022.08/output/host/bin/ccache /usr/bin/gcc" CXX_FOR_BUILD="/root/buildroot-2022.08/output/host/bin/ccache /usr/bin/g++" LD_FOR_BUILD="/usr/bin/ld" CPPFLAGS_FOR_BUILD="-I/root/buildroot-2022.08/output/host/include" CFLAGS_FOR_BUILD="-O2 -I/root/buildroot-2022.08/output/host/include" CXXFLAGS_FOR_BUILD="-O2 -I/root/buildroot-2022.08/output/host/include" LDFLAGS_FOR_BUILD="-L/root/buildroot-2022.08/output/host/lib -Wl,-rpath,/root/buildroot-2022.08/output/host/lib" FCFLAGS_FOR_BUILD="" DEFAULT_ASSEMBLER="/root/buildroot-2022.08/output/host/bin/i686-buildroot-linux-gnu-as" DEFAULT_LINKER="/root/buildroot-2022.08/output/host/bin/i686-buildroot-linux-gnu-ld" CPPFLAGS="-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64" CFLAGS="-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64  -Os -g0 -D_FORTIFY_SOURCE=1" CXXFLAGS="-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64  -Os -g0 -D_FORTIFY_SOURCE=1" LDFLAGS="" FCFLAGS=" -Os -g0" FFLAGS=" -Os -g0" PKG_CONFIG="/root/buildroot-2022.08/output/host/bin/pkg-config" STAGING_DIR="/root/buildroot-2022.08/output/host/i686-buildroot-linux-gnu/sysroot" INTLTOOL_PERL=/usr/bin/perl NO_LOAD=cctest.target.mk PATH=/root/buildroot-2022.08/output/build/nodejs-16.17.1/bin:"/root/buildroot-2022.08/output/host/bin:/root/buildroot-2022.08/output/host/sbin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" LDFLAGS=" -latomic" LD="/root/buildroot-2022.08/output/host/bin/i686-buildroot-linux-gnu-g++"
make[1]: Entering directory '/root/buildroot-2022.08/output/build/nodejs-16.17.1'
ninja -C out/Release 
ninja: Entering directory `out/Release'
[180/2653] CC obj/deps/brotli/c/dec/brotli.decode.o
../../deps/brotli/c/dec/decode.c:2036:41: warning: argument 2 of type 'const uint8_t *' {aka 'const unsigned char *'} declared as a pointer [-Wvla-parameter]
 2036 |     size_t encoded_size, const uint8_t* encoded_buffer, size_t* decoded_size,
      |                          ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~
In file included from ../../deps/brotli/c/dec/decode.c:7:
../../deps/brotli/c/include/brotli/decode.h:204:19: note: previously declared as a variable length array 'const uint8_t[*decoded_size]' {aka 'const unsigned char[*decoded_size]'}
  204 |     const uint8_t encoded_buffer[BROTLI_ARRAY_PARAM(encoded_size)],
      |     ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../deps/brotli/c/dec/decode.c:2037:14: warning: argument 4 of type 'uint8_t *' {aka 'unsigned char *'} declared as a pointer [-Wvla-parameter]
 2037 |     uint8_t* decoded_buffer) {
      |     ~~~~~~~~~^~~~~~~~~~~~~~
In file included from ../../deps/brotli/c/dec/decode.c:7:
../../deps/brotli/c/include/brotli/decode.h:206:13: note: previously declared as a variable length array 'uint8_t[encoded_size]' {aka 'unsigned char[encoded_size]'}
  206 |     uint8_t decoded_buffer[BROTLI_ARRAY_PARAM(*decoded_size)]);
      |     ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[211/2653] CC obj/deps/brotli/c/enc/brotli.encode.o
../../deps/brotli/c/enc/encode.c:1473:20: warning: argument 5 of type 'const uint8_t *' {aka 'const unsigned char *'} declared as a pointer [-Wvla-parameter]
 1473 |     const uint8_t* input_buffer, size_t* encoded_size,
      |     ~~~~~~~~~~~~~~~^~~~~~~~~~~~
In file included from ../../deps/brotli/c/enc/encode.c:9:
../../deps/brotli/c/include/brotli/encode.h:314:19: note: previously declared as a variable length array 'const uint8_t[*encoded_size]' {aka 'const unsigned char[*encoded_size]'}
  314 |     const uint8_t input_buffer[BROTLI_ARRAY_PARAM(input_size)],
      |     ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../deps/brotli/c/enc/encode.c:1474:14: warning: argument 7 of type 'uint8_t *' {aka 'unsigned char *'} declared as a pointer [-Wvla-parameter]
 1474 |     uint8_t* encoded_buffer) {
      |     ~~~~~~~~~^~~~~~~~~~~~~~
In file included from ../../deps/brotli/c/enc/encode.c:9:
../../deps/brotli/c/include/brotli/encode.h:316:13: note: previously declared as a variable length array 'uint8_t[input_size]' {aka 'unsigned char[input_size]'}
  316 |     uint8_t encoded_buffer[BROTLI_ARRAY_PARAM(*encoded_size)]);
      |     ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[2598/2653] ACTION generating: "obj/to...8_gypfiles/v8_snapshot.gen/embedded.S"

Networking support

Any chance we would be able to do netcat/curl/wget/dig type things inside of the VM?

Obviously the browser has a lot of restrictions on network so these probably can't work the usual way, but I'm wondering if we could get a basic fetch or XHR-type thing in there. It seems it would be logically possible with all of the existing resource sharing.

Also, is this the right repository for this question? :P

How to enable Unicode?

Hello,

Thanks for this project, it's really useful. I'm using it for a little fortune demo over at https://unfortunate.micahrl.com

Do you know how to support Unicode characters in the terminal? Right now when the terminal shows Unicode characters, they are very garbled. One way to test is by typing this, which will get a Euro symbol if Unicode is being displayed properly: echo -e '\xe2\x82\xac' . When I enter that into the terminal on my Mac, I get a Euro symbol as expected. When I enter it into the terminal at https://humphd.github.io/browser-shell/, it comes out garbled.

I've tried building this myself with your Dockerfile and it comes out garbled in my build as well. I've tried to make a few changes too:

  • Added the locales package via apt to your Dockerfile, and ran sed -i -e 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen; locale-gen;
  • Added BR2_TOOLCHAIN_BUILDROOT_LOCALE=y and BR2_ENABLE_LOCALE_WHITELIST="C en_US en_US.UTF-8" to the buildroot config
  • Created a custom busybox configuration with make busybox-menuconfig and setting CONFIG_UNICODE_SUPPORT=y, CONFIG_FEATURE_CHECK_UNICODE_IN_ENV=y, CONFIG_UNICODE_COMBINING_WCHARS=y, CONFIG_UNICODE_WIDE_WCHARS=y, CONFIG_UNICODE_BIDI_SUPPORT=y, CONFIG_UNICODE_NEUTRAL_TABLE=y, CONFIG_UNICODE_PRESERVE_BROKEN=y.

However, it still gives wrong output for Unicode symbols.

Do you know how to enable Unicode properly? Any help appreciated

For the record, here's what the incorrect output looks like in my image via the serial port (using xterm.js copied from v86). I get something similar over the video console, and on your demo at https://humphd.github.io/browser-shell/.

Screen Shot 2021-10-25 at 15 00 08

.

How to change the keyboard layout?

Is there a way to change my keyboard layout? (menuconfig or inittab? I can customize image by menuconfig and build the kernel in Docker, it works well.)

[Request] Config used for copy/v86

Hi!
Would you share the config you used to create the image used in v86
https://k.copy.sh/buildroot-bzimage.bin
I tried this repo, I keep failing to create an image with network working.

TIA!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.